mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-26 21:32:19 +00:00
qemu: snapshot: Allow snapshots of read-only disks when we can create them
With -blockdev or when reusing externally created images and thus without the need for formatting the image we actually can support snapshots of read-only disks. Arguably it's not very useful so they are not done by default but users of libvirt such as oVirt are actually using this. https://bugzilla.redhat.com/show_bug.cgi?id=1832204 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
10d6278279
commit
fe574ea1f5
@ -14687,7 +14687,7 @@ qemuDomainSnapshotPrepareDiskExternal(virDomainObjPtr vm,
|
||||
int err;
|
||||
int rc;
|
||||
|
||||
if (disk->src->readonly) {
|
||||
if (disk->src->readonly && !(reuse || blockdev)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("external snapshot for readonly disk %s "
|
||||
"is not supported"), disk->dst);
|
||||
|
Loading…
x
Reference in New Issue
Block a user