From: Andreas Olsowski Subject: Re: XL: pv guests dont reboot after migration (xen4.1.2-rc2-pre) Date: Fri, 23 Sep 2011 11:15:49 +0200 Message-ID: <4E7C4E45.5080509@leuphana.de> References: <4E785FDD.40209@leuphana.de> <1316546621.5182.23.camel@dagon.hellion.org.uk> <4E7C37D6.7050109@leuphana.de> <1316764843.23371.103.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <1316764843.23371.103.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 09/23/2011 10:00 AM, Ian Campbell wrote: > It smells like on reboot it is trying to receive another incoming > migration, instead of restarting the domain it already has. > > This (untested) might help: > > diff -r d7b14b76f1eb tools/libxl/xl_cmdimpl.c > --- a/tools/libxl/xl_cmdimpl.c Thu Sep 22 14:26:08 2011 +0100 > +++ b/tools/libxl/xl_cmdimpl.c Fri Sep 23 08:59:36 2011 +0100 > @@ -1516,6 +1516,11 @@ start: > ret = libxl_domain_create_restore(ctx,&d_config, > cb,&child_console_pid, > &domid, restore_fd); > + /* > + * On subsequent reboot etc we should create the domain, not > + * restore/migrate-receive it again. > + */ > + restore_file = NULL; > }else{ > ret = libxl_domain_create_new(ctx,&d_config, > cb,&child_console_pid,&domid); > > Ian. Patching works. root@xenturio2:/usr/src/xen-4.1-testing.hg# patch -p1 < ../xl-migration-reboot.ian.patch patching file tools/libxl/xl_cmdimpl.c Hunk #1 succeeded at 1520 with fuzz 2 (offset 4 lines). Compilation (clean/make/install) worked fine too. The patch did what you intended for it to do, the guest reboots: ############## root@xenturio2:/usr/src/xen-4.1-testing.hg# xl console thishopefullywontfail PM: early restore of devices complete after 0.068 msecs PM: restore of devices complete after 13.033 msecs Setting capacity to 10485760 Setting capacity to 2097152 root@thishopefullywontfail:~# init 6 INIT: Switching to runlevel: 6 INIT: Sending processes the TERM signal ... usual shutdown ... Restarting system. root@xenturio2:/usr/src/xen-4.1-testing.hg# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 4661 8 r----- 78258.3 thishopefullywontfail 14 512 2 -b---- 2.6 root@xenturio2:/usr/src/xen-4.1-testing.hg# xl console thishopefullywontfail Linux version 3.0.4-xenU (root@xenturio1) (gcc version 4.4.5 (Debian 4.4.5-8) ) #6 SMP Wed Aug 31 17:04:24 CEST 2011 ... usual bootup .... root@thishopefullywontfail:~# ##################### Here is the output of the log: root@xenturio2:/var/log/xen# cat xl-thishopefullywontfail--incoming.log Waiting for domain thishopefullywontfail--incoming (domid 13) to die [pid 14668] Domain 13 is dead Action for shutdown reason code 1 is restart Domain 13 needs to be cleaned up: destroying the domain Done. Rebooting now Waiting for domain thishopefullywontfail (domid 14) to die [pid 14668] with best regards andreas