]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: snapshot: restart CPUs when recover from interrupted snapshot job
authorWangjing (King, Euler) <king.wang@huawei.com>
Thu, 5 Jan 2017 09:34:17 +0000 (09:34 +0000)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 5 Jan 2017 09:47:03 +0000 (10:47 +0100)
If we restart libvirtd while VM was doing external memory snapshot, VM's
state be updated to paused as a result of running a migration-to-file
operation, and then VM will be left as paused state. In this case we must
restart the VM's CPUs to resume it.

Signed-off-by: Wang King <king.wang@huawei.com>
src/qemu/qemu_process.c

index afe3caca9570facfb292489afffd0f0a3d2db3bb..7d283fb5f7769954bf7ab5e061d90421dfa8a7d9 100644 (file)
@@ -3093,7 +3093,8 @@ qemuProcessRecoverJob(virQEMUDriverPtr driver,
               (job->asyncJob == QEMU_ASYNC_JOB_SAVE &&
                reason == VIR_DOMAIN_PAUSED_SAVE) ||
               (job->asyncJob == QEMU_ASYNC_JOB_SNAPSHOT &&
-               reason == VIR_DOMAIN_PAUSED_SNAPSHOT) ||
+               (reason == VIR_DOMAIN_PAUSED_SNAPSHOT ||
+                reason == VIR_DOMAIN_PAUSED_MIGRATION)) ||
               reason == VIR_DOMAIN_PAUSED_UNKNOWN)) {
              if (qemuProcessStartCPUs(driver, vm, conn,
                                       VIR_DOMAIN_RUNNING_UNPAUSED,