StoneLund
Contributor
Contributor

VmWare 5 and HA cluster startup/shutdown on powerfailure

Hi

I have a three host cluster with HA enabled. I´m trying to find a way to gracefully shut down the virtual machines on a signal from the UPS in a specific order. On the same way, i need some machines to startup before the others when the power is back (domain controller first etc). . Is there some best practice for this? And can this be done with an Eaton UPS.

Thankful for any help!

Reply
0 Kudos
Samcer
Expert
Expert

Hi,

you may use Powerchute to shutdown VMs (see "Installing the APC Powerchute Network Shutdown software on ESX/ESXi hosts": http://kb.vmware.com/kb/1007036), not suer it could be use with your UPS.

For the startup phase 2 options:

- if you have a cluster with DRS you may consider to use VAPP and its "start order option" (start vCenter first and all the required dependencies), the PowerCLI cmd Start-VApp;

- if you just have HA, use VMA script. I use a "vmlist" test file which contains the VM I need to porwer on.

You may find useful also this link: http://vsential.com/2011/09/esxi-5-0-apc-smartups-1000/

Sam

samcer| http://about.me/samcer | http://www.vm-support.it/ | @samuelecerutti
Reply
0 Kudos
StoneLund
Contributor
Contributor

Hi

Thank you for the reply. I found a command reference to the start-vapp, but i could not find the startup delay option.

Next question, :grinning_face_with_big_eyes: How do I call the script after the virtualcenter machine has started, and how do I get the virtualcenter server to start first, if it has been gracefully shutdown. If all the virtual machines get gracefully shutdown by the cluster on power failure, my understanding is that they will not startup since the ha cluster thinks that they are supposed to be shut down.

Reply
0 Kudos
Samcer
Expert
Expert

Concerning your last sentence, you are right. Speaking about VAPP you may set start-up delay a start-up action in the VAPP "Start Order" tab.

and vCenter? Well if vCenter itself is a VM inside the Datacenter you have to use a script to power it up (see Start-VM).

Why don't use Start-VM for all VMs? by using the "VAPP Approach" you just need 2 script. The one for vCenter, the second for VAPP (which is a VMs collection). Please Note: to use VAPPs in a cluster Environment you will need the DRS feature.

samcer| http://about.me/samcer | http://www.vm-support.it/ | @samuelecerutti
StoneLund
Contributor
Contributor

Hi

Okey, so i found the VAPP tab. I have not used that before. Basicly, would I be able to create a new vapp in the cluster, add all the virtual machines that require a specific order to that VAPP. Set the start order to that wich i require. (This machine before this one, etc. etc.). And then, start upp the VAPP and the cluster will respect that order when it starts up after a power failure?

So, the only question left if that would work is how to call the scripts automaticly, the one for the vcenter. And, the one for the vapp?

Reply
0 Kudos