Port-xen archive

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

Re: Problem with auto-starting DomU on NetBSD5.0.2 running Xen3.3



On Wed, Aug 25, 2010 at 04:18:12PM -0700, Kalpesh Zinjuwadia wrote:
> Other question I had (and never asked so far) was if we have multiple guest
> domainname put in xendomains param in rc.conf, I assume the order of creating
> them is as specified in the param. Does it also guarantee that a given VM is
> up and running before next VM is going to be created. I know that the
> definition of "up and running" is subject to user interpretation. What I want
> to find out is if there's any way to serialize the VM creation and have hook
> which checks (using xm commands) if the given VM has reached a particular
> state before going to next VM.

Domains are started in order, but the next domain is started as soon as
'xm create' returns, so nothing is done to wait for the just-started
domain to be in some known-good state.

The state of a domain can be checked with, I guess, checking the
state of frontend or backend devices with xm-list. This doesn't mean the
domU has reached multiuser, but at last that the kernel has made some
significant progress and is about to start init.

> 
> I could think of two ways to do that. Pl let me know which one I should go 
> with or if you have any better alternative.
> 1) Put hooks in xendomains script itself to check if given VM is active. Put 
> sleep to wait if required.
> 2) Get rid off the auto-creation of VM. That is, xendomains in rc.conf is 
> empty. Have a custom script to be called during init (after xend/xenbackend 
> of course) that creates the domains (using xm create) serially and makes sure 
> one is up before next is created.

I think 1) is the best way, because this script also take cares of
running xm shutdown for each domain when shutdown in the dom0 is
run.
If other feels this kind of behavior is desireable you could make it
configurable and provide patch that could be integraded in
the xentools package. 

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index