From 54b5b0ac3945ad5417b67bec8443cf6e7b3d482b Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Tue, 11 Sep 2018 19:26:07 +0200 Subject: [PATCH] qemu: Report more appropriate running reasons This patch replaces some rather generic VIR_DOMAIN_RUNNING_UNPAUSED reasons when changing domain state to running with more specific ones. All of them are done when libvirtd reconnects to an existing domain after being restarted and sees an unfinished migration or save. Signed-off-by: Jiri Denemark Reviewed-by: John Ferlan --- src/qemu/qemu_process.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index a471a1e839..417e47ec29 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3292,7 +3292,7 @@ qemuProcessRecoverMigrationIn(virQEMUDriverPtr driver, VIR_DEBUG("Incoming migration finished, resuming domain %s", vm->def->name); if (qemuProcessStartCPUs(driver, vm, - VIR_DOMAIN_RUNNING_UNPAUSED, + VIR_DOMAIN_RUNNING_MIGRATED, QEMU_ASYNC_JOB_NONE) < 0) { VIR_WARN("Could not resume domain %s", vm->def->name); } @@ -3399,7 +3399,7 @@ qemuProcessRecoverMigrationOut(virQEMUDriverPtr driver, (reason == VIR_DOMAIN_PAUSED_MIGRATION || reason == VIR_DOMAIN_PAUSED_UNKNOWN)) { if (qemuProcessStartCPUs(driver, vm, - VIR_DOMAIN_RUNNING_UNPAUSED, + VIR_DOMAIN_RUNNING_MIGRATION_CANCELED, QEMU_ASYNC_JOB_NONE) < 0) { VIR_WARN("Could not resume domain %s", vm->def->name); } @@ -3457,7 +3457,7 @@ qemuProcessRecoverJob(virQEMUDriverPtr driver, reason == VIR_DOMAIN_PAUSED_MIGRATION)) || reason == VIR_DOMAIN_PAUSED_UNKNOWN)) { if (qemuProcessStartCPUs(driver, vm, - VIR_DOMAIN_RUNNING_UNPAUSED, + VIR_DOMAIN_RUNNING_SAVE_CANCELED, QEMU_ASYNC_JOB_NONE) < 0) { VIR_WARN("Could not resume domain '%s' after migration to file", vm->def->name);