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

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


  • To: xen-users <xen-users@xxxxxxxxxxxxx>
  • From: Freddie Cash <fjwcash@xxxxxxxxx>
  • Date: Thu, 26 Jun 2014 20:44:38 -0700
  • Delivery-date: Fri, 27 Jun 2014 03:44:55 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>


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.

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.

Then, it doesn't matter what order the VMs are started, or which ones finish booting first. Each of the VMs will wait until the resources they need are available.

Note: this won't work with non-deterministic init systems.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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