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>
This commit is contained in:
parent
1889465a1c
commit
eeb34af986
@ -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) {
|
||||
if (old_vm_running) {
|
||||
vm_start();
|
||||
}
|
||||
state = MIG_STATE_ERROR;
|
||||
} else {
|
||||
state = MIG_STATE_COMPLETED;
|
||||
|
Loading…
Reference in New Issue
Block a user