libvirt/SOURCES/libvirt-qemu-domain-Convert-detected-iso-image-format-into-raw.patch
2021-09-10 11:57:33 +00:00

44 lines
1.6 KiB
Diff

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