VMware Cloud Community
DarkPassenger
Contributor
Contributor

Howto automate the startup order of VMs within a HA/DRS cluster?

Hi,

I'd like to automate the startup order of several VMs to follow up dependencies. The host-based "Virtual Machine Startup/Shutdown" Option does't work because I'm running a HA/DRS cluster which disables it. Are there other ways to enforce a boot sequence or do I have to script a solution?

0 Kudos
5 Replies
JCMorrissey
Expert
Expert

Hi,

Have you taken a look at http://communities.vmware.com/thread/262476?start=15&tstart=0 ? gives some possibilities but also points out some

good reasons as to why its counter-intuitive most of the time to do.

Please consider marking as "helpful", if you find this post useful. Thanks!... http://johncmorrissey.wordpress.com/
0 Kudos
DarkPassenger
Contributor
Contributor

Thanks for the link.

From what I've read there is no adequate solution that meet my needs. I hoped for a posibility to control the order on a vcenter-base and above HA/DRS or something like that. In my homelab I have to power down and restart my environment a lot. So it doesn't need to work after a HA event I just want to start the vms in a specific order after a proper shutdown. The dependencies comes with a firewall appliance, dc and storage virtualization on which a couple of vms rely. So I also need to delay some of the startups. Giving this a second thought there is no other option for me than powercli it.

The script would have to read a "hard-coded" list of names sequentially, cycle over two esxi hosts and start one vm after another. Some of the vms are allowed to start immediatly after it's predecessor others should wait a moment.

I'd appreciate some advices for a good approach or maybe some cmd snippets.

0 Kudos
vSchu
Enthusiast
Enthusiast

Have you thought about putting those specific servers in a vApp. From there you can automate the startup order.

Here is the basics.

http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.vm_admin.doc_50%2FGUID-0FAB0...

Donald Schubot | VCAP5-DCA, VCP4/5 | Blog: http://vschu.com/
0 Kudos
DarkPassenger
Contributor
Contributor

Actually I alreay have a vApp with a dedicated pool for my vcOps setup in use . But I didn't thought about creating one to put half of my VMs inside. Is this one of the standard use-cases for vApps?

I'll give it a shot, thanks!

0 Kudos
lenzker
Enthusiast
Enthusiast

if you you wan't to start the VMs after a proper shutdown a vApp is the way to go. This is the only use-case I ever made use of the vApp in vCenter. Since its a vCenter object we can't use it in HA failures/automatic boot start-ups....this would be nice, but not easy to achieve the more I think about it Smiley Happy

VCP,VCAP-DCA,VCI -> https://twitter.com/lenzker -> http://vxpertise.net
0 Kudos