[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.