From: Peter Krempa Date: Wed, 12 Feb 2020 16:26:47 +0000 (+0100) Subject: qemu: block: forbid creation of storage sources with X-Git-Tag: v6.1.0-rc1~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c4303768846834893687db68ec265ce35aab5df;p=thirdparty%2Flibvirt.git qemu: block: forbid creation of storage sources with 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 Reviewed-by: Ján Tomko --- 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;