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-10 17:26:09 -0500 |
commit | 2872b8a445ad666b471d5dd1583ab4e51e962205 (patch) | |
tree | de2c0c0ef93b383f692e47e6f4db39e8059d3354 /migration.c | |
parent | 51224c6f783ad0f711d69068ce8e0a3e60deb032 (diff) | |
download | qemu-2872b8a445ad666b471d5dd1583ab4e51e962205.tar.gz |
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>
Diffstat (limited to 'migration.c')
-rw-r--r-- | migration.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/migration.c b/migration.c index 41a703af4f..61c92fe5ff 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; |