WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] xm shutdown and graceful shutdowns

To: Andrew Ball <anball@xxxxxxxxx>
Subject: Re: [Xen-users] xm shutdown and graceful shutdowns
From: Chris <hap10@xxxxxxxxxxxxxx>
Date: Tue, 16 May 2006 12:22:21 -0400
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 16 May 2006 09:23:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <b3bd3a9d0605151818l3743d2b3s4b22bb6bb4064998@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <b3bd3a9d0605151818l3743d2b3s4b22bb6bb4064998@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.2 (X11/20060501)
Andrew Ball wrote:
> Does anyone know if 'xm shutdown' does anything special to get Linux
> domU's to shutdown gracefully?
> 
> It seems like a chicken before the egg type of problem to me, unless
> the kernel can send an appropriate signal to the init process, wait on
> it to terminate, and then signal the control partition's kernel that
> the shutdown is complete.

By writing to a very specific field in xenstore, 'xm shutdown <domid>'
tells a domU to gracefully shut itself down.  A benefit is that xen
doesn't have to know anything about to shutdown a given OS; a caveat is
that all guests must be watching xenstore to notice a shutdown request
from dom0.  In this way, the domU executes a shutdown as cleanly as
though someone typed /sbin/poweroff at the command line.

Also, the domU kernel is slightly modified to include a hypercall that
tells the hypervisor it's ready to be cleaned up.  When Xen receives
such a hypercall it deallocates resources assigned to that domU and the
domain is effectively gone.

This scenario is or a paravirtualized guest; perhaps someone else could
explain how shutdown works on HVMs.

Cheers
-Chris

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>