From: Peter Krempa Date: Fri, 7 Apr 2017 14:56:49 +0000 (+0200) Subject: qemu: snapshot: Skip empty drives with internal snapshots X-Git-Tag: v3.3.0-rc1~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eee3b4b9493a0b4e5e5fb473893a55320b4f83b1;p=thirdparty%2Flibvirt.git qemu: snapshot: Skip empty drives with internal snapshots The code that validates whether an internal snapshot is possible would reject an empty but not-readonly drive. Since floppies can have this property, add a check for emptiness. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 388af4f6fd..e39de625db 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13825,7 +13825,8 @@ qemuDomainSnapshotPrepare(virConnectPtr conn, case VIR_DOMAIN_SNAPSHOT_LOCATION_NONE: /* Remember seeing a disk that has snapshot disabled */ - if (!dom_disk->src->readonly) + if (!virStorageSourceIsEmpty(dom_disk->src) && + !dom_disk->src->readonly) forbid_internal = true; break;