Set startup order for KVM virtual machines via libvirt

bootkvm-virtualizationlibvirtvirtualization

I have some server applications failing because their virtual machine starts up before the database virtual machines. Anyway to configure libvirt to start them up in a certain order and possible insert delays in front of some of them?

Running libvirt 0.9.8 on Ubuntu 12.04 x64. Most of the guests are also Ubuntu Server 12.04.

Best Answer

libvirt only provides the autostart function. If this is important for you, I would set up an init script that starts VMs in a certain order. The algorithm would be virsh start VM1; wait for service to come up (check with ping/snmp/telnet to relevant ports); virsh start VM2 and so on