From 26edd68c3509f06be68133b295fe4f0765272fe4 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Fri, 19 Feb 2016 15:24:11 +0100 Subject: [PATCH] qemu: Start job in qemuDomainDestroyFlags early Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ffdbdb12db..db4b2a66c5 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2274,11 +2274,6 @@ qemuDomainDestroyFlags(virDomainPtr dom, if (virDomainDestroyFlagsEnsureACL(dom->conn, vm->def) < 0) goto cleanup; - qemuDomainSetFakeReboot(driver, vm, false); - - if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_IN) - stopFlags |= VIR_QEMU_PROCESS_STOP_MIGRATED; - if (qemuProcessBeginStopJob(driver, vm, QEMU_JOB_DESTROY, !(flags & VIR_DOMAIN_DESTROY_GRACEFUL)) < 0) goto cleanup; @@ -2289,6 +2284,11 @@ qemuDomainDestroyFlags(virDomainPtr dom, goto endjob; } + qemuDomainSetFakeReboot(driver, vm, false); + + if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_IN) + stopFlags |= VIR_QEMU_PROCESS_STOP_MIGRATED; + qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_DESTROYED, stopFlags); event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED,