]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: snapshot: Don't forbid snapshot if autodestroy is registered
authorPeter Krempa <pkrempa@redhat.com>
Tue, 24 Sep 2019 12:39:21 +0000 (14:39 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 25 Sep 2019 06:38:51 +0000 (08:38 +0200)
Semantically VIR_DOMAIN_START_AUTODESTROY doesn't really clash with
snapshot operations as the VM stays on the same host and thus bound to
the same connection. Saving the state also doesn't differ from modifying
the state of the VM which is allowed.

Remove the check as it doesn't make much sense.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_driver.c

index f7f059b6d6bc96b2bff885a23904bd1401ebfb42..823aa558aca1e80086c212d409432b780b06ba5f 100644 (file)
@@ -15917,12 +15917,6 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
     if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
         goto cleanup;
 
-    if (qemuProcessAutoDestroyActive(driver, vm)) {
-        virReportError(VIR_ERR_OPERATION_INVALID,
-                       "%s", _("domain is marked for auto destroy"));
-        goto cleanup;
-    }
-
     if (!vm->persistent && (flags & VIR_DOMAIN_SNAPSHOT_CREATE_HALT)) {
         virReportError(VIR_ERR_OPERATION_INVALID, "%s",
                        _("cannot halt after transient domain snapshot"));