virt-manager/virtinst-clone-disks.patch

37 lines
1.6 KiB
Diff
Raw Normal View History

Index: virt-manager-0.10.0/virtinst/CloneManager.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/CloneManager.py
+++ virt-manager-0.10.0/virtinst/CloneManager.py
@@ -530,6 +530,7 @@ class CloneDesign(object):
xmldisk.type = clone_disk.type
xmldisk.path = clone_disk.path
xmldisk.driver_type = orig_disk.driver_type
+ xmldisk.driver_name = orig_disk.driver_name
# Save altered clone xml
self._clone_xml = self._guest.get_xml_config()
Index: virt-manager-0.10.0/virtinst/VirtualDisk.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/VirtualDisk.py
+++ virt-manager-0.10.0/virtinst/VirtualDisk.py
@@ -1203,6 +1203,10 @@ class VirtualDisk(VirtualDevice):
if util.is_vdisk(self.path):
drvname = self.DRIVER_TAP
drvtype = self.DRIVER_TAP_VDISK
+ elif drvname is None and drvtype:
+ drvtypes = ['qcow2', 'vmdk']
+ if drvtype in drvtypes:
+ drvname = 'tap'
return drvname or None, drvtype or None
@@ -1543,6 +1547,8 @@ class VirtualDisk(VirtualDevice):
if drvxml and self.driver_name is None:
if self.is_qemu():
self.driver_name = "qemu"
+ else:
+ self.driver_name = self.get_driver_name()
if not self.driver_name is None:
drvxml = (" name='%s'" % self.driver_name) + drvxml