Re: Xen device section defaults miss name='qemu'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



​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.
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux