Everyday Virtualization

Blog archive

How To Set vSphere VMs To Power Up Automatically

One of the hardest aspects of vSphere administration is resuming operations after a major outage, such as a power outage or network outage. Whether or not outages are planned, it can be incredibly inconvenient to stop everything (the easy part) and then resume everything (the hard part).

Restarts can be especially difficult if your entire infrastructure is virtualized. In my vSphere environments, I have a number of network services that are also virtualized, and this includes DNS and Active Directory through an Active Directory domain controller VM and Internet firewall and DHCP with the Untangle appliance. These two VMs are critical to the operation of my environments (I have multiple labs with this configuration), and nothing else really works without these two.

One way to make the automatic resumption of your core infrastructure is to have the VMs automatically start up. What I don't like is that this setting is only available for a single host. Consider shared storage and multiple hosts, where the setting can be rendered useless for large scale configurations. What I do to get around this is, pin these two VMs on one critical host and ensure that they startup automatically with the host. These can be pinned by using direct attached storage, PowerCLI, a CD-ROM .ISO mapping to a local resource or DRS manual settings.

The setting in vSphere is a property of the ESX(i) host, found within the configuration tab in the Virtual Machine Startup/Shutdown options section. Fig. 1 shows how to set automatic startup for VMs on a host.

A VM startup sequence can be set with timing for each host.

Figure 1. A VM startup sequence can be set with timing for each host. (Click image to view larger version.)

The properties section will allow the startup options to be configured. It is a good idea to shorten their startup time if the hosts power up and are ready to go. This may not be the case with SAN or NAS systems in use, which may take more time to start up. Fig. 2 shows the timing configuration options.

Startup timing can be configured for the VMs.

Figure 2. Startup timing can be configured for the VMs. (Click image to view larger version.)

My recommendation is to use the startup and shutdown for critical VMs, and then have in-guest scripts on one other system to start up related VMs, which may make sense as the cluster is brought online. But it is tough to make generic recommendations for an entire cluster, as all VMs and environments are not created equal.

What tricks have you employed to do automatic startup for vSphere VMs? Share your comments here.

Posted by Rick Vanover on 05/09/2012 at 12:48 PM


Featured

Subscribe on YouTube