[Libvirt-cim] [PATCH] Bypass cdrom check while defining VMs

Sharad Mishra snmishra at us.ibm.com
Wed May 19 19:51:09 UTC 2010


# HG changeset patch
# User Sharad Mishra <snmishra at us.ibm.com>
# Date 1274298264 25200
# Node ID 7e986e4a6963fa655d7a5ee70fd5819ae421471a
# Parent  19ce54b3c16676a443c5df53562b0d67294dc04c
Bypass cdrom check while defining VMs.

Signed-off-by: Sharad Mishra <snmishra at us.ibm.com>

diff -r 19ce54b3c166 -r 7e986e4a6963 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c	Thu May 06 21:22:31 2010 -0400
+++ b/src/Virt_VirtualSystemManagementService.c	Wed May 19 12:44:24 2010 -0700
@@ -810,8 +810,11 @@
 
         if (type == VIRT_DISK_TYPE_DISK)
                 dev->dev.disk.device = strdup("disk");
-        else if (type == VIRT_DISK_TYPE_CDROM)
+        else if (type == VIRT_DISK_TYPE_CDROM) {
                 dev->dev.disk.device = strdup("cdrom");
+                if (dev->dev.disk.disk_type == DISK_UNKNOWN)
+                        dev->dev.disk.disk_type = DISK_PHY;
+        }
         else if (type == VIRT_DISK_TYPE_FLOPPY)
                 dev->dev.disk.device = strdup("floppy");
         else




More information about the Libvirt-cim mailing list