Konstantin Emelyanov - Fotolia


Configure ESXi Autostart to streamline host patching

Enabling ESXi Autostart can save you time and effort when managing VMs. Learn how to configure Autostart VMs in VMware host settings to make patching hosts easier.

As its name implies, the VMware ESXi Autostart feature automates the process of starting and stopping VMs on the...

ESXi server in the interest of making VM management easier. ESXi Autostart is especially useful if you run multiple VMs and need to reboot the host after you apply patches -- without Autostart, you'd have to restart each VM individually after you patch your host. There are two primary situations that call for you to autostart VMs: when you have a single ESXi host or a few ESXi hosts that you manage separately without vCenter Server and when you have several hosts configured into a vCenter Server-managed cluster. ESXi Autostart works differently within a cluster environment.

Prioritize VMs with Autostart

The way Autostart works is that it arranges VMs in a specific order and starts them automatically, one by one. You have the option to wait, for example, one to two minutes between each VM to allow your storage the time to handle the load increase within the boot time. You can also check a box that will allow the next VM to start after the previous one, when VMware Tools within the VM is up and running.

To configure ESXi Autostart on a single host, use the VMware Host Client to connect, and then enter your root login and password. Select Host > Manage from the sidebar to the left, and under the System tab, click Autostart.

Refer to Figure A, and complete the following steps:

  1. Click Edit settings > Select a VM.
  2. Choose the VM for which you'd like to configure ESXi Autostart.
  3. Click Enable.
Enable Autostart in the VMware Host Client.
Figure A. Follow these three easy steps to enable ESXi Autostart in the VMware Host Client.

You can then configure the order in which your VMs start. If you have a domain controller that serves as a main Microsoft Active Directory server and authenticates all of the users in your company, then you should make sure this domain controller VM starts first.

While still in the Autostart section, select the domain controller VM, and click Start earlier. As illustrated in Figure B, you'll see in the Autostart column that this VM will move up in front of the other VMs.

Select the VM to autostart.
Figure B. Rearrange the order in which VMs autostart by selecting a VM and clicking Start earlier.

Use ESXi Autostart on a VMware cluster

As mentioned earlier, ESXi Autostart works differently for multiple hosts configured in a High Availability (HA) cluster than it does in a nonclustered environment.

VMware HA clusters are designed to protect running VMs. As such, if one of your hosts goes down or loses a network connection, it will automatically restart the VMs that were running on that host on hosts that remain in the cluster.

There are three things you need in order to configure a VMware HA cluster. First, you'll need vCenter Server to manage the environment. Second, all hosts within your cluster must have access to shared storage. The VMs must also run from this shared storage and not from a direct-attached storage that might be available on your hosts. Finally, you must have a license for VMware HA. Almost all VMware vSphere versions include a VMware HA license, but some versions, such as VMware vSphere Essentials or any free versions of ESXi, do not.

VSphere 6.5 allows you to create VM-to-VM dependency chains for multi-tier applications installed across multiple VMs. You can also use this to define the startup order of an application.

If you have an application that runs on three VMs at the same time, you can define the order such that it starts with a database VM, then the VM with the application and, lastly, the front-end web server VM. For VMware HA clusters, the VM restart is handled at the cluster level, not at the host level. If your host fails, the system detects the failure and restarts the VMs on remaining hosts within the cluster.

The main purpose of using ESXi Autostart to automatically restart your VMs is to ensure that they can start up automatically without input from the admin.

Dig Deeper on Scripting administrative tasks