forked from rpms/libvirt
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From eb3af538c22a06297d7f423210cbebcdd008e0c1 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <eb3af538c22a06297d7f423210cbebcdd008e0c1@dist-git>
|
|
From: Peter Krempa <pkrempa@redhat.com>
|
|
Date: Wed, 19 Feb 2020 15:10:18 +0100
|
|
Subject: [PATCH] qemu: block: forbid creation of storage sources with <slice>
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Specifically creating such images via libvirt during blockjobs would
|
|
be much more hassle than it's worth. Just forbid them for now.
|
|
|
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
(cherry picked from commit 8c4303768846834893687db68ec265ce35aab5df)
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1791788
|
|
Message-Id: <756f5928f4ba944fdec54f60724194a046276a01.1582120424.git.pkrempa@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
---
|
|
src/qemu/qemu_block.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
|
|
index b408d4c81f..1147f4d3af 100644
|
|
--- a/src/qemu/qemu_block.c
|
|
+++ b/src/qemu/qemu_block.c
|
|
@@ -2529,6 +2529,12 @@ qemuBlockStorageSourceCreate(virDomainObjPtr vm,
|
|
int ret = -1;
|
|
int rc;
|
|
|
|
+ if (src->sliceStorage) {
|
|
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
|
+ _("creation of images with slice type='storage' is not supported"));
|
|
+ return -1;
|
|
+ }
|
|
+
|
|
if (qemuDomainObjEnterMonitorAsync(priv->driver, vm, asyncJob) < 0)
|
|
goto cleanup;
|
|
|
|
--
|
|
2.25.0
|
|
|