VMware Cloud Community
ChrisBOC
Contributor
Contributor
Jump to solution

HA and shutting down running VMs

This is my first post, please be gentle Smiley Happy

We have a cluster of 4 hosts.  HA is configured and working properly.

What I would like to achieve is the following:

If one or multiple host fails, VMs of our choice (that are still running on working hosts) would shut down automatically to accomodate the more important VMs.

Is this even possible?

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
Troy_Clavell
Immortal
Immortal
Jump to solution

>The feature you're talking about is for VMs that are on the host that failed, right?

correct

>I'm more concerned with shutting down VMs that are on hosts that are still online.  Am I making any sense?

This  is not possible as a configruatble feature in HA.  Best you can do I  suppose is to disable admission control on your HA Cluster.  This way if  a host fails because of an HA event you're guests will power on even if  you violate resource contraints.

View solution in original post

Reply
0 Kudos
15 Replies
Troy_Clavell
Immortal
Immortal
Jump to solution

You can edit settings of your Cluster, go to Virtual Machine Options and  set the restart priority.  For those guests that you want to come up  first set the restart priority to high

Reply
0 Kudos
ChrisBOC
Contributor
Contributor
Jump to solution

I guess I didn't explain myself properly, sorry!

The feature you're talking about is for VMs that are on the host that failed, right?

I'm more concerned with shutting down VMs that are on hosts that are still online.  Am I making any sense?

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

This is not possible currently.

Elisha

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

>The feature you're talking about is for VMs that are on the host that failed, right?

correct

>I'm more concerned with shutting down VMs that are on hosts that are still online.  Am I making any sense?

This  is not possible as a configruatble feature in HA.  Best you can do I  suppose is to disable admission control on your HA Cluster.  This way if  a host fails because of an HA event you're guests will power on even if  you violate resource contraints.

Reply
0 Kudos
ChrisBOC
Contributor
Contributor
Jump to solution

I already have admission control disabled.  So I guess some manual intervention is in order here.

Hopefully vSphere 5 will have this feature!

Thanks

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Troy, whether admission control is enabled or not has no effect on what HA will do when a host fails. Admission control only prevents a user from powering on an additional vm if there will not be enough failover resources.

Elisha

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Nope, this feature is not in vSphere 5. It is an interesting enhancement we are considering for the future, though Smiley Happy

Troy_Clavell
Immortal
Immortal
Jump to solution

hmmm... Then the definition needs to be more clearly defined.  I was  under the impression that admission control if disabled will allow guests  of a failed host to power on even if they violate resource constraints.   With admission control enabled, well I was under the impression that  you could put yourself in a situation that not all guests power on  because you have no available slots.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

FYI: there has been at least one other posting on the forums asking for this feature (http://communities.vmware.com/message/1570941#276262 - about a year ago). So you're not alone Smiley Happy . Folks reading this thread - please pipe up if you'd like a feature like this.

Elisha

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

It is not possible to power on vms if their resource constraints (ie. memory and cpu reservations) cannot be satisfied. This is true both for user-initiated power on operations and HA failover operations. It is independent of whether HA admission control is enabled or not.

Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

You should be able to use a script combined with a vCenter alarm to shut down specific machines. Alarms can be used to trigger a script.

-- David -- VMware Communities Moderator
Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

I guess I misunderstood/stand the definition and partial use case of Admission control.... Lesson learned! Smiley Happy

Reply
0 Kudos
depping
Leadership
Leadership
Jump to solution

This is for instance what SRM also does, it allows you to select VMs that will not be restarted or can even let you shutdown VMs based on prio etc.

I do wonder though if you are seriously overcommitting your servers to such an extend that powering them on isn't possible anymore? I haven't seen many environments where this was actually the case to be honest.

-duncan

Reply
0 Kudos
depping
Leadership
Leadership
Jump to solution

Also Troy, Admission Control is a task of vCenter. HA failovers take place on the host side, hence the reason HA is not prone to HA Admission Control.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi Duncan,

I don't want to be too nitpicky but that's not the real reason HA failovers are not subject to admission control. Even if HA admission control was performed at the host level, failover would still bypass it. The whole point of admission control is to prevent users from reserving all the resources in the cluster and not leaving any buffer for failover. When a failure does happen and HA needs to restart some vms, it needs to be able to use those failover resources which are off-limits to users (because of admission control). Those failover resources were reserved precisely to be used in a case of failure, so it wouldn't make sense for HA admission control to prevent HA from using them.

Elisha

Reply
0 Kudos