]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Use start_flags for RUNNING and PAUSED transitions
authorJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jun 2018 22:54:17 +0000 (18:54 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 20 Jun 2018 22:42:44 +0000 (18:42 -0400)
Use and set the @start_flags at the top of the RUNNING and PAUSED
transitions to GEN_VMID | PAUSED.

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

index 46f9ff9ed382f988fc1a652cf91d4327f4a245e0..1f2b7361b3ea252671b3e5f8ba0dec8dfcd1ab8a 100644 (file)
@@ -16148,6 +16148,9 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
     switch ((virDomainState) snap->def->state) {
     case VIR_DOMAIN_RUNNING:
     case VIR_DOMAIN_PAUSED:
+
+        start_flags |= VIR_QEMU_PROCESS_START_PAUSED;
+
         /* Transitions 2, 3, 5, 6, 8, 9 */
         /* When using the loadvm monitor command, qemu does not know
          * whether to pause or run the reverted domain, and just stays
@@ -16267,8 +16270,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
                                   cookie ? cookie->cpu : NULL,
                                   QEMU_ASYNC_JOB_START, NULL, -1, NULL, snap,
                                   VIR_NETDEV_VPORT_PROFILE_OP_CREATE,
-                                  VIR_QEMU_PROCESS_START_PAUSED |
-                                  VIR_QEMU_PROCESS_START_GEN_VMID);
+                                  start_flags);
             virDomainAuditStart(vm, "from-snapshot", rc >= 0);
             detail = VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT;
             event = virDomainEventLifecycleNewFromObj(vm,