From 3d94e45820a8490219b6baa5811ad14447f92590 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 19 Jun 2018 18:54:17 -0400 Subject: [PATCH] qemu: Use start_flags for RUNNING and PAUSED transitions Use and set the @start_flags at the top of the RUNNING and PAUSED transitions to GEN_VMID | PAUSED. Signed-off-by: John Ferlan ACKed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 46f9ff9ed3..1f2b7361b3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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, -- GitLab