diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-09 13:25:47 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-09 16:58:08 -0500 |
commit | eeb34af986c28b8da4001d947d66e2efaaad0e66 (patch) | |
tree | 5f1ab126f50b4074e3eb4c97820c0dd3800d2e56 | |
parent | 1889465a1c0c8403447aed4da0823ef2bb249473 (diff) |
Make sure to only vm_start() a failed migration if we were running to begin
with.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | migration.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/migration.c b/migration.c index 190b37e550..e6c8b16a1f 100644 --- a/migration.c +++ b/migration.c @@ -261,12 +261,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; |