提交 eeb34af9 编写于 作者: A Anthony Liguori

Make sure to only vm_start() a failed migration if we were running to begin

with.
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 1889465a
...@@ -261,12 +261,16 @@ void migrate_fd_put_ready(void *opaque) ...@@ -261,12 +261,16 @@ void migrate_fd_put_ready(void *opaque)
dprintf("iterate\n"); dprintf("iterate\n");
if (qemu_savevm_state_iterate(s->file) == 1) { if (qemu_savevm_state_iterate(s->file) == 1) {
int state; int state;
int old_vm_running = vm_running;
dprintf("done iterating\n"); dprintf("done iterating\n");
vm_stop(0); vm_stop(0);
bdrv_flush_all(); bdrv_flush_all();
if ((qemu_savevm_state_complete(s->file)) < 0) { if ((qemu_savevm_state_complete(s->file)) < 0) {
vm_start(); if (old_vm_running) {
vm_start();
}
state = MIG_STATE_ERROR; state = MIG_STATE_ERROR;
} else { } else {
state = MIG_STATE_COMPLETED; state = MIG_STATE_COMPLETED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册