From: Anthony Liguori Date: Thu, 9 Jul 2009 18:25:47 +0000 (-0500) Subject: Make sure to only vm_start() a failed migration if we were running to begin X-Git-Tag: v0.10.6~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2872b8a445ad666b471d5dd1583ab4e51e962205;p=thirdparty%2Fqemu.git Make sure to only vm_start() a failed migration if we were running to begin with. Signed-off-by: Anthony Liguori --- diff --git a/migration.c b/migration.c index 41a703af4f4..61c92fe5ff8 100644 --- a/migration.c +++ b/migration.c @@ -213,12 +213,16 @@ void migrate_fd_put_ready(void *opaque) dprintf("iterate\n"); if (qemu_savevm_state_iterate(s->file) == 1) { int state; + int old_vm_running = vm_running; + dprintf("done iterating\n"); vm_stop(0); bdrv_flush_all(); if ((qemu_savevm_state_complete(s->file)) < 0) { - vm_start(); + if (old_vm_running) { + vm_start(); + } state = MIG_STATE_ERROR; } else { state = MIG_STATE_COMPLETED;