XJaBBaX
Contributor
Contributor

Offline VMs were moved

Hi all and a Happy New Year.

I am having 2 ESXi hosts in one cluster and I have to shut the complete environment for a power maintenance.
In the past I stopped all VMs and then shut down the two hosts one by one. The VMs stayed on the host where it were and I was able to just start it after the maintenance and everything was even distributed. In addition the running VMs stayed where it were and used last state to start automatically.

During my last maintenance I recognized that all VMs were moved from first shut host to the second host, which was still running.

Why did it move and do I have a chance to prevent it?
I would like to use it as before, especially the last state was great because VMs started automatically.

Looking forward to your answers
with best regards
Stefan

0 Kudos
3 Replies
JDMils_Interact
Enthusiast
Enthusiast

When you put a host in Maintenance Mode, there is a little checkbox checked by default: Move powered off and suspended virtual machines to other hosts in the cluster- I guess you missed unchecking that. When checked, this will migrate all powered OFF virtuals to another host. If you do not check this, all powered OFF virtuals will stay on the current host.

0 Kudos
HassanAlKak88
Expert
Expert

Hello,

The following option should be selected in your scenario, by default is unchecked:

HassanAlKak88_0-1611212004693.png

 


Cheers,
vExpert2020-2019||vExpert-NSX2020||VCIX6-NV||VCAP-NV-DCV||VCP-NV-DC-CMA||CCNA-R&S
Twitter: @KakHassan
LinkedIn: linkedin.com/in/hassanalkak
0 Kudos
XJaBBaX
Contributor
Contributor

Hi both,

 

Thanks very much for your answers. 

Well, I know that checkbox for setting a host into maintenance mode, but I don't want to set the host in maintenance mode. 

In the past we left the host running regularly, powered down all VMs besides domain controllers and vCenter itself and just shut the host down. The offline VMs were not moved to the second still running host. Afterwards we shut the second host down, where domain controllers and vCenter are still running. Of course here was nothing moved because no further host available. 

 

The benefit of our approach was, after the maintenance the first level guys just had to press the power button on both hosts and it came up, exactly as it was configured before. Domain controllers and vCenter was starting automatically due to remembered last state and all VMs were well distributed. 

 

Nevertheless, you are right. I have to rethink my whole procedure and work with maintenance mode for the first host and just shutdown the last host without.

 

Best regards

Stefan

0 Kudos