Virtual Machine Boot Priority

When I build virtual systems that interact, often there is a a need for a vm boot up priorty order. an example of this, would be the NFS server booting before the NFS Clients, or another case, database driven websites firing up AFTER the database server is online.

I would like to see/suggest the inclusion of some kind of a VM boot priority that is respected by cloudmin when booting up the hosts, it could then know and adhere to the order the VMs should be brought online.

The only way I can see to accomplish this now, is to set all VMS to not "Start at host boot time" and then write a shell script using the cloudmin shell commands to manually start the vms in order.

This would be an easy feature to integrate into the GUI where you could assign a weight, or drag and drop the order.

Anyhow, just thought I would share this (before writing my shell scripts to boot services before clients) Thanks! Franco



Which virtualization type are you using there? This may only be possible if the underlying VM system supports it ..

Im running KVM on cloudmin. Does cloudmin not establish shell scripts for those vms which are suppose to start on host boot? if so, would it not be a matter of running the scripts in a set order ?

For KVM, you could manually change the boot order by editing the file /etc/init.d/cloudmin-kvm and moving the higher priority VMs to the top of the list. We don't have a UI in Cloudmin for this currently, but a manual change like that will work fine, and will be preserved..

Nice, a perfect solution for a single host, but in my case my VMs span 3 hosts, so this approach does not work that well.

Also, You can control the order in the script by the order you enable host boot in the gui, so shut them all off, then turn on the ones you want to boot first, and cloudmin will add them in that order to the /etc/init.d/cloudmin-kvm script.

I can't think of any way to control the boot order across multiple hosts unfortunately .. a better solution may be to make it so that your VMs wait at boot time until their dependencies are ready, or can handle the case where the dependency comes online later.

Hmm, yes sounds like a good strategy, I was also thinking it might be a good case for having dependents on the same host as they depend wherever possible... Franco

That seems like the best idea. Even with a boot priority, you still can't guarantee that the servers on your VMs would be ready to serve in the expected order..