When you need to perform maintenance on the physical server hosting your VMware ESXi hypervisor, it's important to take some precautions before shutting down your VMware ESXi hypervisor.
The first and safest possibility is to enable maintenance mode on your VMware ESXi hypervisor before stopping it.
Indeed, this will allow you to be sure that no more virtual machines are running and that none of them will be able to start on this physical server.
However, in order to enable maintenance mode on your VMware ESXi hypervisor, you will first need to shut down the virtual machines running on it.
Cleanly shut down your virtual machines using the "Shut down" option.
Once you have clicked on "Stop", this option will be replaced by "Power off".
Wait while the virtual machine's guest operating system shuts down.
Once the virtual machines are stopped, continue to the next step.
To put your VMware ESXi hypervisor in maintenance, go to "Host" and click on : Actions -> Enter maintenance mode.
As indicated in the displayed message, when maintenance mode is enabled, you will not be able to create or start (power on) virtual machines.
In the event that your VMware ESXi hypervisor will be linked to a VMware vCenter Server, this will also prevent that server from migrating virtual machines to your hypervisor.
As specified here, you will also need to power off any virtual machines on your hypervisor before going into maintenance mode.
What you just did.
Confirm the activation of this maintenance mode by clicking on Yes.
If virtual machines are still running, a warning "Entering maintenance mode delayed" will appear.
VMs are still powered on. Maintenance mode will not be entered until all VMs are either migrated or powered down/suspended.
Click OK to hide this warning.
However, if you look in the "Recent tasks" block located at the bottom of the page, you will see that an "Enter Maintenance Mode" task has been started and that it will continue to run while waiting for you to shut down all the VMs on your device. hypervisor.
If all virtual machines are stopped, your VMware ESXi hypervisor will enter maintenance mode.
Now that your VMware ESXi hypervisor is in maintenance mode, you can safely shut it down.
Confirm the host shutdown.
You will be logged out automatically and the "The host is shutting down" message will be displayed.
Once the physical maintenance is complete, you can restart your server.
Once it has started, don't forget to disable the maintenance mode, since it will have remained enabled.
To do this, in "Host", click on "Actions -> Exit maintenance mode".
Now, his status is "Normal" again.
In case you have a lot of virtual machines and especially virtual machines that can depend on each other, you can use another feature present in VMware ESXi.
With the "Autostart" feature of VMware ESXi, you can configure the automatic shutdown of running virtual machines and configure the boot order of them.
For this tutorial, we created 2 virtual machines on Windows Server 2016 (the version doesn't matter) :
When starting our hypervisor, it will therefore be important that the "WS 2016 - AD" virtual machine is started first.
Then, that the virtual machine "WS 2016 - File server" be started, only when the virtual machine "WS 2016 - AD" has finished starting. Otherwise, it will not be able to connect to our Active Directory domain controller and this will notably cause authentication problems in it.
To enable and configure the automatic start and stop of virtual machines on VMware ESXi, go to : Host -> Manage -> System -> Autostart.
Then, click on : Edit settings.
The "Change autostart configuration" window appears.
As you can see, by default this feature is disabled.
Enable this feature by selecting "Enabled : Yes" and choose how the virtual machines should be shut down.
To manage the automatic startup and shutdown of virtual machines, you can :
Then, click on : Save.
The "Host Autostart configuration was successfully updated" message is displayed.
By default, no virtual machine will be configured to start automatically when your hypervisor starts.
For a virtual machine to start automatically after starting your VMware ESXi hypervisor, you will need to select it from the list and click "Enable".
In our case, we are going to select our "WS 2016 - AD" virtual machine and click on "Enable".
By default, the values used for the automatic shutdown of the virtual machine, the waiting time for starting and stopping, ... will be inherited from the global settings configured previously.
If you want to change these values for this virtual machine, select it and click : Configure.
As you can see, this virtual machine will be started 1st in the boot sequence.
In our case, we changed the delays (for the tutorial).
For the 2 other settings where the value selected is "System default", this means that the values used will be the same as those defined globally (and which are displayed at the top of the page).
Then, click on : Save.
The "Autostart configuration for [VM name] was successfully updated" message will appear.
We select our 2nd virtual machine (WS 2016 - File server) and we click on "Enable".
As expected, it appears second in the autostart order and inherits globally defined values.
If you want to change the boot order of your virtual machines, select the desired virtual machine and click "Start earlier" or "Start later" to have it start earlier or later than another virtual machine.
Then, refer to the numbers indicated in the "Autostart order" column.
For the "Actions" option, this simply corresponds to the "Actions" menu for the selected virtual machine.
At the moment, our 2 virtual machines are running.
We go to "Host" and we click on "Shut down" to shut down our hypervisor, as well as our virtual machines thanks to the settings configured previously.
Confirm VMware ESXi shutdown.
The "The host is shutting down" message appears.
Once the physical maintenance on your server is finished, start it and go to the "Virtual Machines" section.
Then, open the "Recent Tasks" block located at the bottom of the page and you will see that an "Auto Start Power On" task is running.
This task is caused by configuring automatic startup of your virtual machines in your VMware ESXi hypervisor settings.
As expected, this task first starts our "WS 2016 - AD" virtual machine and waits for it to finish starting.
Then, once the VMware Tools have started, the name of the host in the operating system will be communicated to your VMware ESXi hypervisor.
Since we had configured the autostart to wait for the heartbeat signal (from VMware Tools), the "Auto Start Power On" task therefore passes to the virtual machine configured previously in the autostart order.
A 2nd "Power On VM" task therefore appears in recent tasks and our 2nd virtual machine (WS 2016 - File server) starts.
Once all the desired virtual machines have been started, the "Auto Start Power On" task will be completed.
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
You must be logged in to post a comment