Received: from eggs.gnu.org ([208.118.235.92]:41218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR15u-0005Wk-6O for qemu-devel@nongnu.org; Wed, 24 Oct 2012 09:34:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR15k-0004bU-GO for qemu-devel@nongnu.org; Wed, 24 Oct 2012 09:34:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR15k-0004a9-7Y for qemu-devel@nongnu.org; Wed, 24 Oct 2012 09:33:52 -0400 From: Luiz Capitulino Date: Wed, 24 Oct 2012 11:34:40 -0200 Message-Id: <1351085680-16901-4-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1351085680-16901-1-git-send-email-lcapitulino@redhat.com> References: <1351085680-16901-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PULL 3/3] migration: go to paused state after finishing incoming migration with -S List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com From: Paolo Bonzini 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 Signed-off-by: Luiz Capitulino --- migration.c | 2 +- vl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 62e0304..e9a5822 100644 --- a/migration.c +++ b/migration.c @@ -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 ee3c43a..188af45 100644 --- 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 }, -- 1.7.12.315.g682ce8b