From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MVXeT-0001Oe-S8 for qemu-devel@nongnu.org; Mon, 27 Jul 2009 17:22:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MVXeO-0001NB-8u for qemu-devel@nongnu.org; Mon, 27 Jul 2009 17:22:32 -0400 Received: from [199.232.76.173] (port=59166 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVXeO-0001N2-2l for qemu-devel@nongnu.org; Mon, 27 Jul 2009 17:22:28 -0400 Received: from mx20.gnu.org ([199.232.41.8]:58054) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MVXeN-0006gn-MJ for qemu-devel@nongnu.org; Mon, 27 Jul 2009 17:22:27 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MVXeM-00076D-VS for qemu-devel@nongnu.org; Mon, 27 Jul 2009 17:22:27 -0400 Date: Mon, 27 Jul 2009 18:29:23 -0300 From: Glauber Costa Message-ID: <20090727212923.GO4776@poweredge.glommer> References: <20090727201855.GK4776@poweredge.glommer> <1248729471-5403-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1248729471-5403-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] Re: [PATCH alternative] fix migration to obey -S List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Anthony Liguori , qemu-devel@nongnu.org On Mon, Jul 27, 2009 at 11:17:51PM +0200, Paolo Bonzini wrote: > Since migration returns right away, starting the VM right > after calling qemu_start_incoming_migration is wrong even > if -S is not passed. We have to do this after migration > has completed. > > Cc: Glauber Costa > Cc: Anthony Liguori > --- > This implements the other semantics that glommer > also agreed were nice to have. > > migration-exec.c | 2 ++ > migration-tcp.c | 2 ++ > sysemu.h | 1 + > vl.c | 4 ++-- > 4 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/migration-exec.c b/migration-exec.c > index e472979..6249b93 100644 > --- a/migration-exec.c > +++ b/migration-exec.c > @@ -118,6 +118,8 @@ static void exec_accept_incoming_migration(void *opaque) > dprintf("successfully loaded vm state\n"); > /* we've successfully migrated, close the fd */ > qemu_set_fd_handler2(qemu_popen_fd(f), NULL, NULL, NULL, NULL); > + if (autostart) > + vm_start(); > > err: > qemu_fclose(f); > diff --git a/migration-tcp.c b/migration-tcp.c > index 7a87a1e..d3feb85 100644 > --- a/migration-tcp.c > +++ b/migration-tcp.c > @@ -166,6 +166,8 @@ static void tcp_accept_incoming_migration(void *opaque) > /* we've successfully migrated, close the server socket */ > qemu_set_fd_handler2(s, NULL, NULL, NULL, NULL); > close(s); > + if (autostart) > + vm_start(); > Hummm,, those are a little bit weird. I'd expect it to be a characteristic of the source machine, no the destination. IOW, if the machine was running prior to migration, it should be running after it, and if it was stopped prior to migration, it should be stopped after it. Having dst flags to tamper this seems only confusing to me.