[virt-tools-list] [PATCH] [virt-install] Add Missed cdrom in hardware list of customize dialog

Lin Ma lma at suse.com
Tue Aug 26 06:58:24 UTC 2014


While installing guest through 'Local install media', The cdrom item
doesn't be displayed in hardware list of customize dialog, It doesn't
affect guest installation, But cause user a little confusion.
The patch fixes it.

Signed-off-by: Lin Ma <lma at suse.com>
---
 virtManager/create.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/virtManager/create.py b/virtManager/create.py
index d93c7f6..6c19e74 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -1777,6 +1777,15 @@ class vmmCreate(vmmGObjectUI):
 
         if self.get_config_customize():
             logging.debug("User requested 'customize', launching dialog")
+            for dev in guest._install_devices:
+                guest.remove_device(dev)
+            guest._install_devices = []
+            guest.installer.prepare(guest, None,
+                util.make_scratchdir(guest.conn, guest.type))
+            for dev in guest.installer.install_devices:
+                if dev.virtual_device_type == "disk":
+                    guest.add_device(dev)
+                    guest._install_devices.append(dev)
             try:
                 self.customize(guest)
             except Exception, e:
-- 
1.8.4




More information about the virt-tools-list mailing list