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] Clean shutdown of domain0 and guest domains?

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Clean shutdown of domain0 and guest domains?
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Wed, 10 Jan 2007 03:39:02 +0000
Cc: "Morten W. Petersen" <morten@xxxxxxxxxxxxxx>
Delivery-date: Tue, 09 Jan 2007 19:36:22 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45A45B8F.40307@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: <45A45B8F.40307@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
Hi Morten,

> I'm just wondering about how Xen works when it comes to
> shutting down / rebooting the host.

Xen itself doesn't really care about cleanly shutting down domains.  Ensuring 
this happens is the job of tools running in dom0.

There's an init script called "xendomains" which can be used to shutdown (or 
suspend to disk) guest operating systems when the dom0 system goes down, and 
restart (or restore from disk) when dom0 comes up.

It's not perfect, and you do need to be careful not to confuse things (e.g. 
don't change a guest's filesystem image whilst it's saved and then let 
xendomains restart it without you meaning to - disk corruption happens here, 
as it always will if you modify the filesystem of a suspended guest then 
restore it).  The automatic suspend / restore of guests is cool though - as a 
result of it, I know of at least one person running domUs with a greater 
total uptime than dom0 :-)

> When I enter reboot on domain0, does shutting down of
> guest domains always go well (it is something the kernel
> takes care of) or should I have some scripts to make
> sure that things are properly shut down before shutting
> down domain0?

Xendomains will help you, but it can't really deal with errors in the guests.  
I'm not quite sure what happens if a guest refuses to shutdown, so there's 
potentially an issue in trusting your guests to be polite and let dom0 
reboot.

Take a look at this script, I suspect it'll do more or less what you want.

It's in tools/examples/init.d/, along with a sysconfig file for setting 
various parameters relating to it's operation.

Hope that helps, please come back and pester us if not, or let us know if you 
have a cool configuration.

Cheers,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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

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