File virtinst-xen-drive-type.patch of Package virt-manager.9957

Reference: bnc#813082
Virt-manager on Xen doesn't fill in any type thereby defaulting to
'raw'. This patch will generate the correct XML on Xen.

Index: virt-manager-1.5.1/virtinst/devicedisk.py
===================================================================
--- virt-manager-1.5.1.orig/virtinst/devicedisk.py
+++ virt-manager-1.5.1/virtinst/devicedisk.py
@@ -581,6 +581,10 @@ class VirtualDisk(VirtualDevice):
         http://lists.gnu.org/archive/html/qemu-devel/2008-04/msg00675.html
         """
         if self.driver_name != self.DRIVER_NAME_QEMU:
+            if self.driver_name and \
+               self.driver_name != self.DRIVER_NAME_PHY and \
+               self.type != 'file':
+                return self.type
             return None
 
         drvtype = self._storage_backend.get_driver_type()
openSUSE Build Service is sponsored by