VMware Cloud Community
tbolckmans
Contributor
Contributor

Automatically shutdown VM when entering Maintenance Mode

Dear community,

I have a few VMWare ESXi hosts on version 5.1.0 update 3.

Every ESXi host in my infrastructure has a Kaspersky scanserver VM (SVM) that scans all files of the other VM's on the same ESXi host.

These scanserver VM's can't be moved to another ESXi host, so I've disabled DRS for these VM's.

Is there an option to power off these VM's automatically when the ESXi host enters maintenance mode?

Because when one of the VM's is not moved or shutdown the host is not able to enter the Shutdown mode.

Kind Regards,

T

0 Kudos
3 Replies
bykreddy
Enthusiast
Enthusiast

Hi,

Procedure

1 In the vSphere Client inventory, select the host where the virtual machine is located and click the Configuration tab.

2 Under Software, click Virtual Machine Startup/Shutdown and click Properties.

3 Select Allow virtual machines to start and stop automatically with the system.

4 (Optional) Configure the startup and shutdown behavior.

Option

Action

Default Startup Delay

Select the amount of time to delay starting the operating system.

This delay allows time for VMware Tools or the booting system to run scripts.

Continue immediately if the VMware Tools starts

Select to start the operating system immediately after VMware Tools starts.

Default Shutdown Delay

Select the amount of time to delay shutdown for each virtual machine.

The shutdown delay applies only if the virtual machine does not shut down before the delay period elapses. If the virtual machine shuts down before the delay time is reached, the next virtual machine starts shutting down.

Shutdown Action

Select a shutdown option from the drop-down menu.

Power Off

Suspend

Guest Shutdown

Move Up and Move Down

Select a virtual machine in the Manual Startup category and use the Move Up button to move it up to Automatic Startup or Any Oder.

When virtual machines are in the Automatic Startup category, you can use Move Up and Move Down to order them so that they start in a preferred sequence. During shutdown, the virtual machines are stopped in the opposite order.

Edit

Click Edit to configure user-specified autostartup and shutdown behavior for virtual machines in the Automatic Startup or Any Order category.

5 Click OK to close the dialog box and save your settings.

Regards, Yash - If you found this or any other answer helpful, please consider the use of the Helpful or Correct buttons to award points.
0 Kudos
mfuenza
Contributor
Contributor

Does a VM guest need to have a specific version of VM Ware tools for the guest to shutdown when the Host is placed into maintenance mode?

0 Kudos
vHaridas
Expert
Expert

There is no such requirements for VM auto shutdown however if ESXi Host is part of ESXi Cluster this feature will not work.

How to Configure VM auto Shutdown - VMware KB: Automating the process of starting and stopping virtual machines on VMware ESX\ESXi

VMware KB: The Virtual Machine Automatic Startup / Shutdown feature in ESXi hosts in a VSA cluster g...

Note: The Virtual Machine Start up and Shutdown (automatic start up) feature is disabled for all virtual machines residing on hosts that are in (or moved into) a vSphere HA cluster. Automatic start up is not supported 

when used with vSphere HA. For more information, see the

Creating a vSphere HA Cluster section of the vSphere 5.1 Availability Guide.

Thanks,

Haridas

Virtual Admin

Please consider awarding points for "Correct" or "Helpful" replies. Thanks....!!! https://vprhlabs.blogspot.in/
0 Kudos