We will currently support slice only for the 'raw' format slice reject any other option.
Signed-off-by: Peter Krempa <pkre...@redhat.com> --- src/qemu/qemu_domain.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 139496307f..d24d1c81db 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -6821,6 +6821,18 @@ qemuDomainValidateStorageSource(virStorageSourcePtr src, return -1; } + if (src->sliceStorage) { + /* In pre-blockdev era we can't configure the slice so we can allow them + * only for detected backing store entries as they are populated + * from a place that qemu would be able to read */ + if (!src->detected && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("storage slice is not supported by this QEMU binary")); + return -1; + } + } + return 0; } -- 2.24.1