[PATCH v3 07/15] qemu: block: forbid creation of storage sources with <slice>

Peter Krempa pkrempa at redhat.com
Wed Feb 12 18:03:18 UTC 2020


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 at 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 6ac1d34281..b23a4baae6 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.24.1




More information about the libvir-list mailing list