This allows users to see stop errors, so we can get an accurate report
when things go wrong.
---
v2v/convert_windows.ml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml
index e37c6b8..c8db860 100644
--- a/v2v/convert_windows.ml
+++ b/v2v/convert_windows.ml
@@ -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
--
2.1.0