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

Re: [Xen-users] Cannot shut down a domU from dom0



On Tue, 2013-04-16 at 02:33 +0100, Sean Greenslade wrote:
> On Mon, Apr 15, 2013 at 3:24 PM, Alan McKay <alan.mckay@xxxxxxxxx> wrote:
> > On Mon, Apr 15, 2013 at 3:04 PM, Sean Greenslade <zootboysean@xxxxxxxxx> 
> > wrote:
> >> There is. "xl destroy DOMNAME" will kill it, no questions asked. Of
> >> course, it is basically the same as pulling plug, so it should only be
> >> done as a last resort.
> >
> > Aha!   I'd gone through the man page ... but somehow missed that.  Or
> > maybe misunderstood it.
> >
> > This is important for me right now while working out kinks.   In
> > particular I need to be able to boot from a Live CD , then reboot from
> > the HD to see if the fiddling I'd done from the live CD worked.  Then
> > if not, reboot live CD again, fiddle more, then reboot from HD.
> >
> > Maybe there is a cleaner way to do this so if so let me know.  But the
> > DESTROY option is certainly better than rebooting dom0 :-)
> 
> As far as I know, xl shutdown will, if on a PV domain, ask the kernel
> directly to shutdown (as the kernel is Xen-aware).

Correct, note that the kernel will simply call /sbin/poweroff (or
another command which the admin has configured). If you are running an
installer environment that command may or may not exist. 

/sbin/poweroff typically asks the init process to switch to runlevel 6
(shutdown), again depending on your environment it may or may not do so.
Most normal systems will behave as expected but things like installer
environments may not always do so, it depends...

> If the domain is HVM (or you specify -F with a PV domain), it will
> send an AHCI shutdown command to the virtual hardware.

For an HVM domain without -F it will do the same as with a PV guest,
which is to ask the PV drivers to initiate a shutdown, which assumes you
have them installed. With the -F on an HVM domain it will send an ACPI
(AHCI is a disk controller) button event, which depending on the OS may
be set to either reboot or shutdown.

-F on a PV domain is meaningless since such domains have no ACPI.

Ian.

>  Barring any other
> sidechannel shutdowns (e.g. logging into the domU's terminal and
> initiating a shutdown inside the domain), the only other option is the
> "pull the plug" destroy. But hey, it's the same with a real PC, no?
> 



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

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