How do you make VMs automatically start after an outage? You may want a virtual machine to start by itself when a host is powered on, to maintain availability of the service of that VM – particularly if you don’t have a VMware High Availability cluster (like a single ESXi host).

datacenter-sunfireParticularly during a total outage of all vSphere hosts, there will be a requirement for specific Virtual Machines to be powered up on ESXi hosts automatically in order to access the host or perform other management tasks. This may be VMware and/or partner solutions or third party solutions which depend upon a general purpose operating system such as Microsoft Windows Server or Linux.
If your virtual environment does not use Windows for the vSphere client software (for example, a completely Linux or Mac environment, or only using the vSphere Web Client), then there is no GUI to connect directly to an ESXi host in order to power on required VMs that may be necessary to administer the virtual environment.

Examples of VMware and/or partner solutions which may need to be powered on can include;

  • VMware vShield Service Appliance/Machines and agents
  • vCenter Single Sign On virtual machines (and dependencies such as databases)
  • Cisco Nexus 1000v VEM (Virtual Ethernet Module) or IBM DVS 5000v virtual switch modules
  • vCenter (and dependencies such as databases – which in turn may require authentication repositories such as Microsoft Active Directory)
  • vCenter Web Client (particularly if the Windows based C# client is not deployed)

There may also be a requirement to start other virtual machines which are providing services, which are required for access to, or administration of, the ESXi host. Examples of these include;

  • Microsoft Windows Active Directory (or OpenLDAP or NIS authentication) repositories
  • DNS services
  • NTP services
  • Other networking services such as DHCP, NAP/NAC
READ ARTICLE:   Save Money - by buying more disk

If these VMs are not configured to automatically power on, then it may be difficult to access the virtual infrastructure in order to power on the VMs.

Workaround

Power on the VMs from the command line of a host;

Solution (standalone hosts or non-HA cluster)

Configure the virtual machines to automatically start when the host has started, by performing the following procedure;

  1. Select the host where the VM(s) are running
  2. Go to the Configuration tab and select Virtual Machine Startup/Shutdown within Software
  3. Press Properties
  4. Check the box Allow virtual machines to start and stop automatically with the host
  5. Identify your VM, press Move Up to move the VM into the Automatic Startup section
    VMware HA Auto Restart Options
  6. If required, press the Edit button to change parameters for startup delay.
  7. If required, move more VMs into the Automatic Startup area, placing them in order of required startup.

Note: Activating HA on a cluster will render these settings invalid.

Solution (HA-enabled cluster)

When a cluster is enabled for HA, the setting to power on machines automatically is made at the cluster level and not on an individual ESXi host. This enables a more rapid response, as the first available ESXi host will commence powering on of VMs.

  1. Select the cluster, right click and select Edit Settings
    • Or, select the cluster, go to the DRS tab and select Edit Settings
  2. Within vSphere HA, select Virtual Machine Options
  3. Identify the virtual machines which require automatic restart
  4. In the column VM Restart Policy, choose from the drop down list the appropriate priority for this VM to restart.
    • You should prioritise network and security appliances such as vShield
    • Only prioritise critical VMs required for providing management access to the ESXi host or vCenter.
  5. Press OK
READ ARTICLE:   Download Client Integration Plugin for Webclient

For further information, refer to “Automating the process of starting and stopping virtual machines on VMware ESX” http://kb.vmware.com/kb/850

Share this knowledge