Trying to migrate a paused machine fails. The reason is that the RSTATE_PRE_MIGRATE is reached with vm_stop, and this transition is eaten when the vm is already paused. This patch fixes the problem by always going through runstate_set and always notifying the new state.
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- cpus.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index 8978779..eab8ff6 100644 --- a/cpus.c +++ b/cpus.c @@ -128,6 +128,8 @@ static void do_vm_stop(RunState state) qemu_aio_flush(); bdrv_flush_all(); monitor_protocol_event(QEVENT_STOP, NULL); + } else { + runstate_set(state); } } -- 1.7.6