mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
v2v: Disable autoreboot when converting Windows guests.
This allows users to see stop errors, so we can get an accurate report when things go wrong.
This commit is contained in:
@@ -191,6 +191,7 @@ echo uninstalling Xen PV driver
|
||||
if verbose then printf "current ControlSet is %s\n%!" current_cs;
|
||||
|
||||
disable_services root current_cs;
|
||||
disable_autoreboot root current_cs;
|
||||
install_virtio_drivers root current_cs
|
||||
|
||||
and disable_services root current_cs =
|
||||
@@ -212,6 +213,17 @@ echo uninstalling Xen PV driver
|
||||
)
|
||||
) disable
|
||||
|
||||
and disable_autoreboot root current_cs =
|
||||
(* If the guest reboots after a crash, it's hard to see the original
|
||||
* error (eg. the infamous 0x0000007B). Turn off autoreboot.
|
||||
*)
|
||||
try
|
||||
let crash_control =
|
||||
get_node root [current_cs; "Control"; "CrashControl"] in
|
||||
g#hivex_node_set_value crash_control "AutoReboot" 4_L (le32_of_int 0_L)
|
||||
with
|
||||
Not_found -> ()
|
||||
|
||||
and install_virtio_drivers root current_cs =
|
||||
(* Copy the virtio drivers to the guest. *)
|
||||
let driverdir = sprintf "%s/Drivers/VirtIO" systemroot in
|
||||
|
||||
Reference in New Issue
Block a user