Daniel P. Berrange wrote:
On Tue, May 26, 2009 at 10:11:52AM -0400, Thomas Sjolshagen wrote:
  
Quoting Michael Ansel <libvir@anselcomputers.com>:

    
[true|false|1|2|3|..]. style directive in the main XML)? I'd be
interested in putting something together if it is a feasible addition
and someone can point me to the general area of the code that needs to
be changed. Also, is there an indicator in libvirt for when a domain
has finished booting, or would this boot staggering need to be time
      
Time based seems way too simplistic since there, in a production
environment could be a number of issues determining the time it takes
for a specific guest to boot, including the load on the host system.

Also, the fact that the guest is done booting in by no means an
indication that the application its hosting is ready to be interacted
with by one of the dependent guests (example: database recovery for
some of the commercial database vendors occurs asynchronously to
the completion of the boot process, yet the DB isn't ready for
transactions until the recovery is complete, which could be long
after the boot process is "complete" from an OS perspective.)
    

Yeah, this is what makes ordered startup of guests a 'feature' that
is doomed to fail. It is essentially impossible to determine 'finished
booing' from the host OS, and time delays are inevitably going to fail
on some percentage of boot attempts. The only reliable way is to have
the applications which depend on resources from other guests automatically
retry connections, or have something in the guest which probes to see if
the external resource is ready before attempting to start the app in
question. 

Daniel
  
Just a simple time-based solution would be sufficient.  Right now when multiple guests all try to boot at the same time it takes about 4 times as long for all of them to boot up as when you boot them individually.  Apparently too much context switching.  So if we could check off an autoboot flag and then say +120 seconds, that guest would start booting 120 seconds after the autoboot process started.  Even this simple mechansim would help quite a bit.

Regards,
Gerry