]> www.infradead.org Git - qemu-nvme.git/commitdiff
migration: go to paused state after finishing incoming migration with -S
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Oct 2012 14:45:24 +0000 (16:45 +0200)
committerLuiz Capitulino <lcapitulino@redhat.com>
Wed, 24 Oct 2012 13:27:33 +0000 (11:27 -0200)
At the end of migration the machine has started already, and cannot be
destroyed without losing the guest's data.  Hence, prelaunch is the
wrong state.  Go to the paused state instead.  QEMU would reach that
state anyway (after running the guest for the blink of an eye) if the
"stop" command had been received after the start of migration.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
migration.c
vl.c

index 62e030487d5512f63ca318e5508d9abf72eee9f7..e9a58228e95ca730146daf5b445d9b9064b17b68 100644 (file)
@@ -102,7 +102,7 @@ void process_incoming_migration(QEMUFile *f)
     if (autostart) {
         vm_start();
     } else {
-        runstate_set(RUN_STATE_PRELAUNCH);
+        runstate_set(RUN_STATE_PAUSED);
     }
 }
 
diff --git a/vl.c b/vl.c
index ee3c43ae2f131db8dddef5e325cc7dfe4473ad60..188af45869564c510d0f0b25148f62bdcd1d8b83 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -341,7 +341,7 @@ static const RunStateTransition runstate_transitions_def[] = {
     { RUN_STATE_DEBUG, RUN_STATE_RUNNING },
 
     { RUN_STATE_INMIGRATE, RUN_STATE_RUNNING },
-    { RUN_STATE_INMIGRATE, RUN_STATE_PRELAUNCH },
+    { RUN_STATE_INMIGRATE, RUN_STATE_PAUSED },
 
     { RUN_STATE_INTERNAL_ERROR, RUN_STATE_PAUSED },
     { RUN_STATE_INTERNAL_ERROR, RUN_STATE_FINISH_MIGRATE },