I try to make all the two hosts go into maintenance mode in HA configuration.
when I started the maintenance mode of first ESXi, It works well after the host migrate guest os to another ESXi.
But when I started the maintenance mode of 2nd ESXi after the entering to maintenance mode of 1st ESXi host, It stop at 2%.
I think all all the guest OS shoud go into shutdown or power off because no other runnning ESXi exist.
But Guest OS do not go into shutdown, also 2nd ESXi host can not go into maintenan mode.
It seems that guest OS waiting to migrate to another host.
I don't know why Guest OS can not go into shutdown or power off even though no other running host exist.
I guess, You have only two hosts in Cluster and you are trying to put both Host in Maintenance Mode.
The behavior what you see is correct. Maintenance mode process will not be completed until you power off or migrate VMs to another running ESXi host.
if you need to bring down all Host in Cluster, you have to manually ( or using scripting) shutdown or power Off VMs.
ESXi or the Cluster will not Power off VMs as long as one host is running.
As of now there is no such option to shutdown VMs if there are no more resources available in Cluster.
For me question is not clear, I think you are trying to put the second host in to the Maintenance mode and it stuck at 2% until all the VMs migrating to the other host.
This is correct and that's what we are expecting from the Maintenance mode. if you have VMs which are not migrating to the other host check that VM. check any affinity rules in the cluster.
If you can explain more clearly, I believe everyone will help you to resolve your problem.
why put both esxi in maintenance mode?
do one server. update that server/upgrade hardware or what ever you wanna do and start it again
then do the other server.
unless you need to power off everything for lets say connecting to ups or long period of downtime
thenindeed manual or scripting is the key to put in maintenance mode.