[et-mgmt-tools] [PATCH] Fix continue to install Windows

Nobuhiro Itou fj0873gn at aa.jp.fujitsu.com
Fri May 25 09:49:58 UTC 2007


Hi,

I can't continue to install Windows HVM domain after first restart.
After the restarting, /dev/cdrom (or ISO path) has not been attached to the domain.
The attached patch solves this problem.

Signed-off-by: Nobuhiro Itou <fj0873gn at aa.jp.fujitsu.com>


Thanks,
Nobuhiro Itou.


diff -r 6bb44f72be68 virtinst/FullVirtGuest.py
--- a/virtinst/FullVirtGuest.py Thu May 24 17:10:22 2007 -0400
+++ b/virtinst/FullVirtGuest.py Fri May 25 15:02:10 2007 +0900
@@ -227,8 +227,10 @@ class FullVirtGuest(Guest.XenGuest):
         ret = ""
         count = 0
         for d in self.disks:
+            backup_path = None
             if d.transient and not install:
                 if d.device == Guest.VirtualDisk.DEVICE_CDROM:
+                    backup_path = d.path
                     d.path = None
                 else:
                     continue
@@ -242,5 +244,7 @@ class FullVirtGuest(Guest.XenGuest):
                    count += 1
                disknode = "%(disknode)s%(dev)c" % { "disknode": self.disknode, "dev": ord('a') + count }
             ret += d.get_xml_config(disknode)
+            if backup_path:
+                d.path = backup_path
             count += 1
         return ret
diff -r 6bb44f72be68 virtinst/Guest.py
--- a/virtinst/Guest.py Thu May 24 17:10:22 2007 -0400
+++ b/virtinst/Guest.py Fri May 25 14:22:11 2007 +0900
@@ -625,10 +625,11 @@ class Guest(object):
         else:
             action = "restart"

+        osblob_install = install
         if disk_boot:
-            install = False
-
-        osblob = self._get_osblob(install)
+            osblob_install = False
+
+        osblob = self._get_osblob(osblob_install)
         if not osblob:
             return None




More information about the et-mgmt-tools mailing list