]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Unset the genid start change flag for revert force
authorJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jun 2018 22:54:18 +0000 (18:54 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 20 Jun 2018 22:42:49 +0000 (18:42 -0400)
If the the snapshot revert involves a forced revert option, then
let's not cause startup to change the genid flag in order to signify
that we're still running the same/previous guest and not some
snapshot reversion.

Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1149445

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_driver.c

index 1f2b7361b3ea252671b3e5f8ba0dec8dfcd1ab8a..143058326e1ed051a38c17d3a56ca92a84f35dc2 100644 (file)
@@ -16182,12 +16182,14 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
                 }
 
                 /* If using VM GenID, there is no way currently to change
-                 * the genid for the running guest, so set an error and
-                 * mark as incompatible. */
+                 * the genid for the running guest, so set an error,
+                 * mark as incompatible, and don't allow change of genid
+                 * if the revert force flag would start the guest again. */
                 if (compatible && config->genidRequested) {
                     virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                                    _("domain genid update requires restart"));
                     compatible = false;
+                    start_flags &= ~VIR_QEMU_PROCESS_START_GEN_VMID;
                 }
 
                 if (!compatible) {