On our cluster when a blade is shutdown, all the VMs on the blade gracefully shutdown prior to the blade shutting down and powering off itself. This is great.
However one the blade is off, vCenter shows the VMs that were on the blade as "disconnected". Is there a way to ensure that this doesn't happen, as powering these VMs on again can't be achieved without either powering up the blade again, or re-adding them to the inventory?
We had expected that once powered off the VMs would not be assigned to a specific host anymore, and that powering them up again would simply cause them to be assigned to other hosts that are still available. Are our expectations wrong, or is there a setting we have missed somewhere?
If I put the host into maintenance mode:
VM1 would be moved to another host and continue running.
VM2 would be reregistered with vCenter. (By being shutdown, the VM is restartDisabled.)
VM3 would most likely prevent the host from entering maintenance mode. So would need to be manually migrated or shutdown.
VM4 would be reregistered with vCenter. (By being unprotected, the VM is restartDisabled.)
1.) Yes
2.) Yes
3.) The VM would still be vMotion migrated to another host. Once there, since HA is disabled on it, it would remain disabled.
4.) Yes
Also, just a slight clarification. Any and all VMs that are powered off--regardless of any advanced settings--are not HA protected. HA only protects powered-on VMs.
You need to put the blade in maintenance mode if that's what you want to do. If VMs are powered off when that host enters maintenance mode, they will be moved (by default) and registered on other hosts in the cluster.
So if we actually want the VMs to be shutdown along with the host, just shutting down the host and letting ESXi take care of shutting down the VMs is unsuitable, is that what you're saying?
We need to introduce additional steps into the process, which would in many circumstances seem superfluous?
So if we actually want the VMs to be shutdown along with the host, just shutting down the host and letting ESXi take care of shutting down the VMs is unsuitable, is that what you're saying?
Yes
We need to introduce additional steps into the process, which would in many circumstances seem superfluous?
It isn't superfluous if you wish to achieve a goal which requires a certain action. vCenter has no idea that when you shutdown VMs on a given host that those VMs need to be run in its absence. You instruct it that this will be the case by moving powered off VMs to other members in the cluster. Otherwise the VMs remain registered to the host and are powered down as they are.
So the following sequence is recommended:
** An unpowered VM is not generally assigned to a host until powered on, isn't that right? So HA will essentially disassociate the VMs from the host about to be powered off?
The sequence is correct.
An unpowered VM is not generally assigned to a host until powered on, isn't that right?
Yes, assuming DRS is enabled for the cluster.
So HA will essentially disassociate the VMs from the host about to be powered off?
HA removes VMs from the protected list when they are powered off regardless of the host on which they were running. HA does not apply to VMs in a powered-off state. Once they are powered on again, the protected list is updated with the information at that time bringing them under HA protection.
I forgot to mention that we have "das.reregisterRestartDisabledVMs" set to True.
So this offers some protection to powered off VMs and my step 2 essential triggers HA to reregister the powered off VMs with the cluster. Since however they are not running, they're not assigned a specific host, but available in the Webclient GUI to be powered-on, rather than simply appearing as "disconnected".
Basically though I think I am happy that provided we are careful, we can avoid the situation where VMs drop into a disconnected state and tied to a powered-off host. It would be nice if vCenter were able to recognise this, at least optionally.
I forgot to mention that we have "das.reregisterRestartDisabledVMs" set to True.
Well, with this setting you're only getting the reregistration for VMs that have HA explicitly disabled on them, which is fine in your case, but it won't impact other VMs for which HA is enabled. So as I pointed out, if you want to ensure that a powered-down host has its VMs available elsewhere should they need to be powered on in its absence, simply put the host into maintenance mode (which can be triggered via a variety of CLI tools with multiple language bindings) and let vCenter take care of the registrations.
Let me see if I can get this straight, by using a hypothetical example:
I have a host with four VMs:
VM1 is protected by HA and is running.
VM2 is protected by HA, but currently powered-off.
VM3 is not protected and is running.
VM4 is not protected and is powered off.
das.reregisterRestartDisabledVMs is set True.
If I put the host into maintenance mode:
VM1 would be moved to another host and continue running.
VM2 would be reregistered with vCenter. (By being shutdown, the VM is restartDisabled.)
VM3 would most likely prevent the host from entering maintenance mode. So would need to be manually migrated or shutdown.
VM4 would be reregistered with vCenter. (By being unprotected, the VM is restartDisabled.)
If I put the host into maintenance mode:
VM1 would be moved to another host and continue running.
VM2 would be reregistered with vCenter. (By being shutdown, the VM is restartDisabled.)
VM3 would most likely prevent the host from entering maintenance mode. So would need to be manually migrated or shutdown.
VM4 would be reregistered with vCenter. (By being unprotected, the VM is restartDisabled.)
1.) Yes
2.) Yes
3.) The VM would still be vMotion migrated to another host. Once there, since HA is disabled on it, it would remain disabled.
4.) Yes
Also, just a slight clarification. Any and all VMs that are powered off--regardless of any advanced settings--are not HA protected. HA only protects powered-on VMs.
To confirm:
A VM that is not HA protected, will migrate anyway if its host is put into maintenance mode.
If a VM that is not HA protected is on a host that abruptly fails, it will be lost.
A VM that is not HA protected, will migrate anyway if its host is put into maintenance mode.
Yes, because this is not a function of HA but rather DRS. Provided DRS is enabled and admission control is not impacting cluster resources, the VM will be migrated.
If a VM that is not HA protected is on a host that abruptly fails, it will be lost.
It will not be restarted on another host and therefore can be considered "lost" until the original host returns to service.
daphnissov wrote:
A VM that is not HA protected, will migrate anyway if its host is put into maintenance mode.
Yes, because this is not a function of HA but rather DRS. Provided DRS is enabled and admission control is not impacting cluster resources, the VM will be migrated.
Of course! DRS! Thanks.