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

Re: [Xen-users] how to start VMs in a particular order

Freddie Cash <fjwcash@xxxxxxxxx> writes:

> On Jun 26, 2014 6:45 PM, "lee" <lee@xxxxxxxxxxxxxxx> wrote:
>> "squidmobile@xxxxxxxxxxx" <squidmobile@xxxxxxxxxxx> writes:
>> > 26 jun 2014
>> >
>> > greetings,
>> >
>> >> how would I make it so that VMs which are started automatically are
>> >> being started in a particular order?
>> >
>> > well, i have something that (sort of) works for me.  i create my
>> > vm.cfg files in a directory of my choosing and ln -s from that
>> > directory to etc/xen/auto.  i rename the symbolic links to look
>> > like this:
>> >   01.vm-name.cfg
>> >   02.vm-name.cfg
>> >   03.vm-name.cfg
>> >   ...
>> Yes, I though of numbering them --- haven't tried yet, though.
>> Is this a feature, or did you happen to create the links in the desired
>> order?  I see both possibilities, i. e. sorting the directory entries as
>> a feature, or start the VMs in the order the files/links have been
>> created/are found as directory entries.
>> > when i reboot my system, the vm's come up in the proper sequence.
>> > however, xen starts them at its pace and NOT when the previous vm
>> > is ready for transactions.
>> Yes, starting them one after another without waiting for them to be up
>> won't make a difference.  In this case, the VM with the name server
>> needs to be up first, then the VM with the firewall, then the VM with
>> the NFS server and finally the rest of them in no particular order.
> Inside each VM, write a startup script that pauses the boot process until
> the needed resource is available.

That's a good idea ... There must be a way to define dependencies for
the boot process because some services must be started in the right
order, and if everything would depend on the checking script, it should

> It can be add simple as a while loop waiting for a ping response. Or as
> complex as "try to resolve a hostname". Or whatever else is needed.

That's the problem:  How do you try to resolve a hostname, and how do
you find out whether a NFS server is up or not?

Knowledge is volatile and fluid.  Software is power.

Xen-users mailing list



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