The operation makes no sense regardless of the way how we specify disks. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_driver.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f1fc954f8c..c2722c39da 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9985,14 +9985,15 @@ qemuDomainBlockResize(virDomainPtr dom, disk->src->format == VIR_STORAGE_FILE_QED) size = VIR_ROUND_UP(size, 512); + if (virStorageSourceIsEmpty(disk->src) || disk->src->readonly) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, + _("can't resize empty or readonly disk '%s'"), + disk->dst); + goto endjob; + } + if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV) && !qemuDiskBusIsSD(disk->bus)) { - if (virStorageSourceIsEmpty(disk->src) || disk->src->readonly) { - virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("can't resize empty or readonly disk '%s'"), - disk->dst); - goto endjob; - } nodename = disk->src->nodeformat; } else { -- 2.36.1