- (* Is the host_cpu compatible with the guest arch? ie. Can we
- * run commands in this guest?
- *)
- let guest_arch = g#inspect_get_arch root in
- let guest_arch_compatible = guest_arch_compatible guest_arch in
-
(* Based on the guest type, choose a log file location. *)
let logfile =
match g#inspect_get_type root with
@@ -54,42 +48,14 @@ let run (g : G.guestfs) root (ops : ops) =
(* Useful wrapper for scripts. *)
let do_run ~display ?(warn_failed_no_network = false) cmd =
- if not guest_arch_compatible then
+ let incompatible_fn () =
+ let guest_arch = g#inspect_get_arch root in
error (f_"host cpu (%s) and guest arch (%s) are not compatible, so you cannot use command line options that involve running commands in the guest. Use --firstboot scripts instead.")