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

Re: [Xen-devel] xl / xend feature parity: Missing '-a' option for xl 'shutdown' to shutdown all domains



Friday, August 31, 2012, 12:55:06 PM, you wrote:

> On Fri, 2012-08-31 at 11:49 +0100, Sander Eikelenboom wrote:
>> Hi All,
>> 
>> Is there any reason why xl doesn't support the '-a' option for
>> shutdown,  to shutdown all domains ?

> I'd never heard of it for one thing ;-)

> It should be a reasonably easy patch -- I can give some pointers if you
> are interested.

> Ian.

Could give it a try, although my C skills are virtually non existent :-)
So every pointer could be handy !


I found out some more slightly related issues/inconsistencies:

- /etc/default/xendomains contains:
  XENDOMAINS_SHUTDOWN="--halt --wait"
  XENDOMAINS_SHUTDOWN_ALL="--all --halt --wait"

  which are used by /etc/init.d/xendomains.

- man xm says:

       shutdown [OPTIONS] domain-id
           Gracefully shuts down a domain.  This coordinates with the domain OS 
to perform graceful shutdown, so there is no guarantee that it will succeed, 
and may take a variable length of time depending on what services must be
           shutdown in the domain.  The command returns immediately after 
signally the domain unless that -w flag is used.

           The behavior of what happens to a domain when it reboots is set by 
the on_shutdown parameter of the xmdomain.cfg file when the domain was created.

           OPTIONS

           -a  Shutdown all domains.  Often used when doing a complete shutdown 
of a Xen system.

           -w  Wait for the domain to complete shutdown before returning.

- man xl says:
       shutdown [OPTIONS] domain-id
           Gracefully shuts down a domain.  This coordinates with the domain OS 
to perform graceful shutdown, so there is no guarantee that it will succeed, 
and may take a variable length of time depending on what services must be
           shutdown in the domain.

           For HVM domains this requires PV drivers to be installed in your 
guest OS. If PV drivers are not present but you have configured the guest OS to 
behave appropriately you may be able to use the -F option trigger a power
           button press.

           The command returns immediately after signally the domain unless 
that -w flag is used.

           The behavior of what happens to a domain when it reboots is set by 
the on_shutdown parameter of the domain configuration file when the domain was 
created.

           OPTIONS

           -w  Wait for the domain to complete shutdown before returning.

           -F  If the guest does not support PV shutdown control then fallback 
to sending an ACPI power event (equivalent to the power option to trigger.

               You should ensure that the guest is configured to behave as 
expected in response to this event.

- xm shutdown --help
  Usage: xm shutdown <Domain> [-waRH]

  There are two undocumented options "R" and "H"


So i have to:
     - Implement the '-a' option
     - Update docs that '-a' is supported
     - Find out what "--halt" / "-H" did .. and perhaps implement that as well
     - Change /etc/default to use the short option format, so it will work for 
both xm and xl

--
Sander


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


 


Rackspace

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