QEMU-KVM - start@boot - conditional startup VM

italian01

Member
Feb 23, 2012
57
0
6
Italy
Hi all.

Without waste your time with my Proxmox version and configuration, I have a very little and simple question:

can I condition and program a startup of a kvm' virtual machine by a script, combining two or more events?!

That is, I have a VM Win2k3 srv which I set to start at the boot so it can run just after a crash of the Supervisor. But its virtual disk is stored on an i-node of an iscsi (QNAP) connected to the Host and when they (Host and QNAP) face against a power-failure, Proxmox restart this VM always before a complete boot of the QNAP. Obviously, this leads to an issue because the VM doesn't find its disk. And this becomes a big problem if it happens during a week-end.

So, coming back to my question: is there a way to run a script at the QEMU-KVM's VM startup so I can drives the startup of this Virtual Machine, making it wait the completly boot of the QNAP?!

B. Regards

PS: sorry for my ... english.
 
Hi,

no there is no build in way to do so, but you can workaround it with a space holder VM.
What I mean is make a empty small VM like this

qm create 103 --cores 1 --memory 32

Than start this VM first and set the second VM with a long startup delay.