All of lore.kernel.org
 help / color / mirror / Atom feed
* Graceful shutdown of a virtual domain
@ 2004-01-30  1:30 stevegt
  2004-01-30  8:10 ` stevegt
  2004-01-31 12:24 ` Keir Fraser
  0 siblings, 2 replies; 6+ messages in thread
From: stevegt @ 2004-01-30  1:30 UTC (permalink / raw)
  To: xen-devel

Hi All,

I've been looking through the code and list archives but haven't found
this yet...  From dom0, how do you cause a virtual domain to gracefully
shutdown?  It seems like the machinery is there somewhere, because the
hypervisor can do it to dom0...

For reference, in UML you do this by putting this in /etc/inittab:

	ca:12345:ctrlaltdel:/sbin/shutdown -h now

...and then sending it a ctrlaltdel signal from the userland tool.

Steve

-- 
Stephen G. Traugott  (KG6HDQ)
UNIX/Linux Infrastructure Architect, TerraLuna LLC
stevegt@TerraLuna.Org 
http://www.stevegt.com -- http://Infrastructures.Org 


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Graceful shutdown of a virtual domain
  2004-01-30  1:30 Graceful shutdown of a virtual domain stevegt
@ 2004-01-30  8:10 ` stevegt
  2004-01-31 12:24 ` Keir Fraser
  1 sibling, 0 replies; 6+ messages in thread
From: stevegt @ 2004-01-30  8:10 UTC (permalink / raw)
  To: xen-devel

(Answering my own shutdown question...)

Just did a clone of the latest 1.2 (I was on 1.2-rc), and found the new
tools/examples/xc_dom_control.py.  From the README:


    xc_dom_control.py
     - general tool for controling running domains
       Usage: xc_dom_control.py [command] <params>
	    stop [dom]         -- pause a domain
	    start [dom]        -- un-pause a domain
	    shutdown [dom]     -- request a domain to shutdown
	    destroy [dom]      -- immediately terminate a domain
	    pincpu [dom] [cpu] -- pin a domain to the specified CPU
	    list               -- print info about all domains
	    listvbds           -- print info about all virtual block devs
	    ... more to follow... e.g.
	       control CPU scheduling parameters
	       control network scheduling parameters
	       control vif rules



Fantastic!  Thanks all,

Steve




On Thu, Jan 29, 2004 at 05:30:55PM -0800,  wrote:
> Hi All,
> 
> I've been looking through the code and list archives but haven't found
> this yet...  From dom0, how do you cause a virtual domain to gracefully
> shutdown?  It seems like the machinery is there somewhere, because the
> hypervisor can do it to dom0...
> 
> For reference, in UML you do this by putting this in /etc/inittab:
> 
> 	ca:12345:ctrlaltdel:/sbin/shutdown -h now
> 
> ...and then sending it a ctrlaltdel signal from the userland tool.
> 
> Steve
> 
> -- 
> Stephen G. Traugott  (KG6HDQ)
> UNIX/Linux Infrastructure Architect, TerraLuna LLC
> stevegt@TerraLuna.Org 
> http://www.stevegt.com -- http://Infrastructures.Org 

-- 
Stephen G. Traugott  (KG6HDQ)
UNIX/Linux Infrastructure Architect, TerraLuna LLC
stevegt@TerraLuna.Org 
http://www.stevegt.com -- http://Infrastructures.Org 


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Graceful shutdown of a virtual domain
  2004-01-30  1:30 Graceful shutdown of a virtual domain stevegt
  2004-01-30  8:10 ` stevegt
@ 2004-01-31 12:24 ` Keir Fraser
  2004-01-31 20:34   ` stevegt
  1 sibling, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2004-01-31 12:24 UTC (permalink / raw)
  To: stevegt; +Cc: xen-devel

> Hi All,
> 
> I've been looking through the code and list archives but haven't found
> this yet...  From dom0, how do you cause a virtual domain to gracefully
> shutdown?  It seems like the machinery is there somewhere, because the
> hypervisor can do it to dom0...
> 
> For reference, in UML you do this by putting this in /etc/inittab:
> 
> 	ca:12345:ctrlaltdel:/sbin/shutdown -h now
> 
> ...and then sending it a ctrlaltdel signal from the userland tool.

In Xen 1.2 you can use the xc_dom_control script:
 xc_dom_control.py shutdown <dom-id>

In Xen 1.3 the scripts aren't completely up to date yet. There's an
old script in tools/examples that should do the trick though:
 destroydom.py <dom-id>

In both cases, if the domain is unresponsive then there is an option
to forcibly kill it.

 -- Keir


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Graceful shutdown of a virtual domain
  2004-01-31 12:24 ` Keir Fraser
@ 2004-01-31 20:34   ` stevegt
  2004-02-01  0:50     ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: stevegt @ 2004-01-31 20:34 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On Sat, Jan 31, 2004 at 12:24:26PM +0000, Keir Fraser wrote:
> > Hi All,
> > 
> > I've been looking through the code and list archives but haven't found
> > this yet...  From dom0, how do you cause a virtual domain to gracefully
> > shutdown?  It seems like the machinery is there somewhere, because the
> > hypervisor can do it to dom0...
> > 
> > For reference, in UML you do this by putting this in /etc/inittab:
> > 
> > 	ca:12345:ctrlaltdel:/sbin/shutdown -h now
> > 
> > ...and then sending it a ctrlaltdel signal from the userland tool.
> 
> In Xen 1.2 you can use the xc_dom_control script:
>  xc_dom_control.py shutdown <dom-id>
> 
> In Xen 1.3 the scripts aren't completely up to date yet. There's an
> old script in tools/examples that should do the trick though:
>  destroydom.py <dom-id>
> 
> In both cases, if the domain is unresponsive then there is an option
> to forcibly kill it.

Cool!  That means it'll work in 1.2rc also -- that'll save me from an
upgrade for a little while longer.  I hadn't noticed that destroydom.py
was able to do a graceful shutdown (and hadn't realized that
xc.domain_destroy(domid,0) was in fact a graceful shutdown).  ;-)

Thanks Keir,

Steve

-- 
Stephen G. Traugott  (KG6HDQ)
UNIX/Linux Infrastructure Architect, TerraLuna LLC
stevegt@TerraLuna.Org 
http://www.stevegt.com -- http://Infrastructures.Org 


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Graceful shutdown of a virtual domain
  2004-01-31 20:34   ` stevegt
@ 2004-02-01  0:50     ` Keir Fraser
  2004-02-01  4:46       ` stevegt
  0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2004-02-01  0:50 UTC (permalink / raw)
  To: stevegt; +Cc: xen-devel

> Cool!  That means it'll work in 1.2rc also -- that'll save me from an
> upgrade for a little while longer.  I hadn't noticed that destroydom.py
> was able to do a graceful shutdown (and hadn't realized that
> xc.domain_destroy(domid,0) was in fact a graceful shutdown).  ;-)

As a user of Xenolinux there's no reason to upgrade right now. There
have been a fair few changes within Xen and Xenolinux in 1.3, but the
user tools are in fact more up to date in 1.2 since we're just about
to release another ISO image.

 -- Keir


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Graceful shutdown of a virtual domain
  2004-02-01  0:50     ` Keir Fraser
@ 2004-02-01  4:46       ` stevegt
  0 siblings, 0 replies; 6+ messages in thread
From: stevegt @ 2004-02-01  4:46 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On Sun, Feb 01, 2004 at 12:50:36AM +0000, Keir Fraser wrote:
> > Cool!  That means it'll work in 1.2rc also -- that'll save me from an
> > upgrade for a little while longer.  I hadn't noticed that destroydom.py
> > was able to do a graceful shutdown (and hadn't realized that
> > xc.domain_destroy(domid,0) was in fact a graceful shutdown).  ;-)
> 
> As a user of Xenolinux there's no reason to upgrade right now. There
> have been a fair few changes within Xen and Xenolinux in 1.3, but the
> user tools are in fact more up to date in 1.2 since we're just about
> to release another ISO image.

I'm still on 1.2rc right now though.  ;-}   I'm going to go ahead and
upgrade to 1.2 anyway, to get the cleaned-up VD tools.

Steve
-- 
Stephen G. Traugott  (KG6HDQ)
UNIX/Linux Infrastructure Architect, TerraLuna LLC
stevegt@TerraLuna.Org 
http://www.stevegt.com -- http://Infrastructures.Org 


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-02-01  4:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-30  1:30 Graceful shutdown of a virtual domain stevegt
2004-01-30  8:10 ` stevegt
2004-01-31 12:24 ` Keir Fraser
2004-01-31 20:34   ` stevegt
2004-02-01  0:50     ` Keir Fraser
2004-02-01  4:46       ` stevegt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.