[Pkg-libvirt-commits] [libguestfs] 51/146: v2v: Disable autoreboot when converting Windows guests.

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 17:00:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository libguestfs.

commit cd87f1291d55e064923ad9af31793a4842604583
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Thu Dec 4 09:12:27 2014 +0000

    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.
    
    (cherry picked from commit 39d64121ec809076703b109053e12a3c91b9c2ea)
---
 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list