Hi Guido,

I have attached a patch for CloneManager.py and tested that on my installation. This will create valid clones of the original guest by keeping a qcow2 image as a qcow2 type in the XML of the guest.

I have patched the version that comes with Debian Wheezy. I hope this can make it into the point release.

Cheers,

Roy
--- a/virtinst/CloneManager.py
+++ b/virtinst/CloneManager.py
@@ -473,11 +473,6 @@ class CloneDesign(object):
                     _("Clone onto existing storage volume is not "
                       "supported: '%s'") % clone_disk.path)
.
-            # Change the XML
-            xmldisk.path = None
-            xmldisk.type = clone_disk.type
-            xmldisk.path = clone_disk.path
-
             # Sync 'size' between the two
             if orig_disk.size:
                 clone_disk.size = orig_disk.size
@@ -500,6 +495,12 @@ class CloneDesign(object):
             elif not self.preserve_dest_disks:
                 clone_disk.clone_path = orig_disk.path
.
+            # Change the XML
+            xmldisk.path = None
+            xmldisk.type = clone_disk.type
+            xmldisk.path = clone_disk.path
+            xmldisk.driver_type = orig_disk.driver_type
+
         # Save altered clone xml
         self._clone_xml = self._guest.get_xml_config()
.
@@ -553,7 +553,8 @@ class CloneDesign(object):
                     device = VirtualDisk.DEVICE_CDROM
.
                 d = VirtualDisk(disk.path, conn=self._hyper_conn,
-                                device=device, validate=validate)
+                                device=device, driverType=disk.driver_type,
+                                validate=validate)
                 d.target = disk.target
             except Exception, e:
                 logging.debug("", exc_info=True)

Reply via email to