From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPDpi-0002iu-Ci for qemu-devel@nongnu.org; Fri, 19 Oct 2012 10:46:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPDpg-0004AL-KO for qemu-devel@nongnu.org; Fri, 19 Oct 2012 10:45:54 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:46492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPDpg-00049Y-Dl for qemu-devel@nongnu.org; Fri, 19 Oct 2012 10:45:52 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so414741pad.4 for ; Fri, 19 Oct 2012 07:45:51 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 19 Oct 2012 16:45:24 +0200 Message-Id: <1350657924-10624-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1350657924-10624-1-git-send-email-pbonzini@redhat.com> References: <1350657924-10624-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 2/2] 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: lcapitulino@redhat.com 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 --- migration.c | 2 +- vl.c | 2 +- 2 file modificati, 2 inserzioni(+), 2 rimozioni(-) diff --git a/migration.c b/migration.c index 32d43e7..72abd3c 100644 --- a/migration.c +++ b/migration.c @@ -108,7 +108,7 @@ static void process_incoming_migration_co(void *opaque) if (autostart) { vm_start(); } else { - runstate_set(RUN_STATE_PRELAUNCH); + runstate_set(RUN_STATE_PAUSED); } } diff --git a/vl.c b/vl.c index 5b357a3..8b1e0b2 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.1