VMware Cloud Community
BURTH95
Contributor
Contributor

Automatic shutdown of non critical VMs

Hi,

I would like to know if it is possible to automatically shutdown non critical VMs in case of an ESX server failure.

We are runing about 25 VMs in our 3 ESX server cluster. Some VMs are critical (AD, Exchange, ...) and some are non critical (Virtual appliances for software deployment, OS deployment, Lab VMs, Test servers, ...)

If one of our ESX server goes down because of a hardware failure, we will not have enouth memory to all VMs with only two physical servers. So I would like to know if it is possible to automatically shut down non critical VMs to have enouth memory to run critical VMs.

Thanks in advance,

Tags (2)
0 Kudos
4 Replies
unsichtbare
Expert
Expert

Hmmmm.

One thing you want to be sure of: Set the VM restart prority for HA to Disabled. This will prevent non-critical VMs from the affected host restarting on the unaffected host.

  • Cluster Settings > vSphere HA > Virtual Machine Options > VM Restart Priority
+The Invisible Admin+ If you find me useful, follow my blog: http://johnborhek.com/
0 Kudos
BURTH95
Contributor
Contributor

Thank you unsichtbare for your answer,

But is it possible to shutdown non critical VMs if they are running on a unaffected host to save memory ?

0 Kudos
unsichtbare
Expert
Expert

OK, I think this would be possible using a combination for the vSPhere CLI and alarms configured at the cluster level.

If you look at the alarms from the cluster (you have to choose the alarm type - cluster) there are several desirable choices including "HA initiated a failover action" but also choices that would only ocurr if resources were overcommitted like "Cluster resources overcommitted"!

You would then set the action to be: run a command  - http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vsphere.monitoring.doc%2FGUID-AB7450...

You could then create a script/batch file that would shut down a pre-defined list of non-critical VMs

+The Invisible Admin+ If you find me useful, follow my blog: http://johnborhek.com/
0 Kudos
BURTH95
Contributor
Contributor

Thank you very much for your help !

0 Kudos