render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
a41c76
From 627b980c628dd06fb9995e83130fbaa858d4087f Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <627b980c628dd06fb9995e83130fbaa858d4087f@dist-git>
a41c76
From: Peter Krempa <pkrempa@redhat.com>
a41c76
Date: Fri, 28 Feb 2020 10:24:42 +0100
a41c76
Subject: [PATCH] qemu: domain: Convert detected 'iso' image format into 'raw'
a41c76
MIME-Version: 1.0
a41c76
Content-Type: text/plain; charset=UTF-8
a41c76
Content-Transfer-Encoding: 8bit
a41c76
a41c76
While our code can detect ISO as a separate format, qemu does not use it
a41c76
as such and just passes it through as raw. Add conversion for detected
a41c76
parts of the backing chain so that the validation code does not reject
a41c76
it right away.
a41c76
a41c76
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
a41c76
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
a41c76
(cherry picked from commit 3c6e6f55a5ded357c39b92629cd523e51f6ca8f9)
a41c76
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1798148
a41c76
Message-Id: <2c6cfa942acf0d7fe56046122b23780ee5c0d777.1582881363.git.pkrempa@redhat.com>
a41c76
Reviewed-by: Ján Tomko <jtomko@redhat.com>
a41c76
---
a41c76
 src/qemu/qemu_domain.c | 4 ++++
a41c76
 1 file changed, 4 insertions(+)
a41c76
a41c76
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
a41c76
index f037f0812e..ed35260712 100644
a41c76
--- a/src/qemu/qemu_domain.c
a41c76
+++ b/src/qemu/qemu_domain.c
a41c76
@@ -11598,6 +11598,10 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
a41c76
         return -1;
a41c76
 
a41c76
     for (n = src->backingStore; virStorageSourceIsBacking(n); n = n->backingStore) {
a41c76
+        /* convert detected ISO format to 'raw' as qemu would not understand it */
a41c76
+        if (n->format == VIR_STORAGE_FILE_ISO)
a41c76
+            n->format = VIR_STORAGE_FILE_RAW;
a41c76
+
a41c76
         if (qemuDomainValidateStorageSource(n, priv->qemuCaps) < 0)
a41c76
             return -1;
a41c76
 
a41c76
-- 
a41c76
2.25.1
a41c76