[PATCH] vmx: Adapt to emptyBackingString for cdrom-image

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

 



https://bugzilla.redhat.com/show_bug.cgi?id=1266088

We are missing this value for cdrom-image device. Honestly, I
have no idea whether it can happen for other disk devices too.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/vmx/vmx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 568b2c7..baf27de 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2317,6 +2317,16 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
                  */
                 goto ignore;
             }
+        } else if (STREQ(fileName, "emptyBackingString")) {
+            if (deviceType && STRCASENEQ(deviceType, "cdrom-image")) {
+                virReportError(VIR_ERR_INTERNAL_ERROR,
+                               _("Expecting VMX entry '%s' to be 'cdrom-image' "
+                                 "but found '%s'"), deviceType_name, deviceType);
+                goto cleanup;
+            }
+
+            virDomainDiskSetType(*def, VIR_STORAGE_TYPE_FILE);
+            ignore_value(virDomainDiskSetSource(*def, NULL));
         } else {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Invalid or not yet handled value '%s' "
-- 
2.4.10

--
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]