[libvirt] Xen device section defaults miss name='qemu'

Christian Ehrhardt christian.ehrhardt at canonical.com
Wed Jul 12 15:35:18 UTC 2017


​Not sure how stupid it might be so clearly just a very humble RFC, but the
following seems to work for me:
Therefore no nicely polished patch, but just inline diff

--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -367,8 +367,9 @@
         int actual_type = virStorageSourceGetActualType(disk->src);
         int format = virDomainDiskGetFormat(disk);

-        /* for network-based disks, set 'qemu' as the default driver */
-        if (actual_type == VIR_STORAGE_TYPE_NETWORK) {
+        /* for network-based disk and cdrom, set 'qemu' as the default
driver */
+        if (actual_type == VIR_STORAGE_TYPE_NETWORK ||
+            disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
             if (!virDomainDiskGetDriver(disk) &&
                 virDomainDiskSetDriver(disk, "qemu") < 0)
                 return -1;

Opinions?
If it seems remotely reasonable I'm totally fine submitting a patch in more
style with proper headers and such.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170712/a795fba3/attachment-0001.htm>


More information about the libvir-list mailing list