VMware Cloud Community
angelov72
Contributor
Contributor

Shutdown and restart of VM in a HA Cluster

Hi all,

I have a question: what happens when I shutdown the last ESX server of a Cluster (say, 2 node Cluster) to the VMs that are running in the Cluster? Will the Cluster power down the VM or not?

I know that exist a feature called Virtual Machine Startup and Shutdown but I have read in the Availability Guide

http://www.vmware.com/pdf/vsphere4/r40/vsp_40_availability.pdf

The Virtual Machine Startup and Shutdown (automatic startup) feature is disabled for all virtual

machines residing on hosts that are in (or moved into) a VMware HA cluster. VMware recommends that you

do not manually re-enable this setting for any of the virtual machines. Doing so could interfere with the actions

of cluster features such as VMware HA or Fault Tolerance.

So I have not enabled the Virtual Machine Startup and Shutdown feature on my HA Cluster, but now I ask what happens if I have to shutdown the host: will be the VM powered down or not?

The "VM restart priority" setting of the HA Cluster is set to Medium, and all the VM are set "Use Cluster Settings"

Thanks

Angelo

Reply
0 Kudos
6 Replies
mackfs
Contributor
Contributor

If HA is enabled and configured properly, VMs residing on the host that is being powered down will be shutdown and then restarted on the remaining host.

Reply
0 Kudos
angelov72
Contributor
Contributor

Hi Mackfs,

thanks for the answer.

If the host is the last of the Cluster (so there is no remaining host), will be the VM powered down before the shutdown of the host or not? And the restart of the hosts caue the VM to be powered on or I have to power on them manually?

Thanks

Angelo

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal

If you have a host go down and there is no other hosts in the cluster for HA to failover to, the guests go down as well. Once the ESX Host comes back online, those guests will have to be powered on manually. HA will not restart them.

For your example, I would gracefully shutdown all your guests first, then power down the ESX Host.

Reply
0 Kudos
angelov72
Contributor
Contributor

Thanks Troy,

suppose that the host does not go down for a power outage, for example, but because i launch a "shutdown -h now" from the COS because the UPS is exhausted, and the power will be lost in a couple of minutes.

The question are:

  1. in this case, the VMs simply go down, or the host launch a shutdown command to the guests via VMware Tools (if available)?

  2. If the VMs go down, can I avoid this behaviour with the "Virtual Machine Startup and Shutdown (automatic startup) feature", even if it is not recommended with the HA Cluster?

  3. To be assured that the VM is restarted when the UPS will be back online again and the host is restarted, do I have to use the "Virtual Machine Startup and Shutdown (automatic startup) feature", even if it is not recommended with the HA Cluster?

Thanks

Angelo

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal

The question are:

  1. in this case, the VMs simply go down, or the host launch a shutdown command to the guests via VMware Tools (if available)?

  2. If the VMs go down, can I avoid this behaviour with the "Virtual Machine Startup and Shutdown (automatic startup) feature", even if it is not recommended with the HA Cluster?

if you issue a shutdown -h now command, the guests will hard power off. Startup/Shutdown options are disabled because the ESX Hosts is part of an HA cluster.

  1. To be assured that the VM is restarted when the UPS will be back online again and the host is restarted, do I have to use the "Virtual Machine Startup and Shutdown (automatic startup) feature", even if it is not recommended with the HA Cluster?

see above... Startup/Shutdown options are disabled. The only way around this that I know of would be to disabled HA first, then setup your startup/shutdown options.

Reply
0 Kudos
angelov72
Contributor
Contributor

From what I know (but I may be wrong) the Startup/Shutdown options are disabled by default but can be enabled, also in a HA Cluster.

But the main point is:

suppose I have a 2 nodes Cluster with an UPS that can comunicate via network to the COS.

During the night, there is a power outage, the UPS send a signal to the ESX node to shutdown the VMs and, after the last VM, the ESX too.

The UPS die, but the VMware Infrastructure is powered down so, no problem.

After 2 hours the power comes back, the ESX boot (they are configured in the bios to power on when the power is restored).

Now, what about the VMs? They are not powered on by HA, so how can I tell the ESX to boot them? Do I have to use the Startup/Shutdown options(if I can, and even if it is not recommended)?

From what I understand, if I don't set the UPS to send the shutdown signal to the ESX, everything goes down when the power is lost and then everything goes up when the power is restored, but my VM can be negatevely affected by a hard power off.

I would like that everything goes up after a graceful shutdown.....

Thanks

Angelo

Reply
0 Kudos