Determining whether virtual machines are configured to autostart
search cancel

Determining whether virtual machines are configured to autostart

book

Article ID: 341049

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

VirtualCenter allows you to control the automatic startup/shutdown of virtual machines through Configuration > Virtual Machine Startup/Shutdown.

If however, you are unable to connect to your host through VMware Infrastructure Client, you must use the service console to check if it is enabled.


Environment

VMware ESX 4.1.x
VMware VirtualCenter 2.5.x
VMware vCenter Server 4.1.x
VMware ESXi 3.5.x Installable
VMware VirtualCenter 2.0.x
VMware ESX Server 3.0.x
VMware ESX 4.0.x
VMware vCenter Server 4.0.x
VMware ESXi 4.0.x Installable
VMware ESXi 4.1.x Installable
VMware ESX Server 3.5.x

Resolution

Note: Before you begin, refer to Restarting the Management agents on an ESX Server (1003490)for important information on restarting the mgmt-vmware service.
To determine if your virtual machines are configured to autostart:
  1. Log in as root to your ESX host with SSH.
  2. Open the /etc/vmware/hostd/vmAutoStart.xml file in text editor.
  3. Search the file for the entry:

    <enabled>true</enabled>

    Note: If you find this entry, the autostart functionality is enabled. If you do not find this entry, the functionality is disabled.

  4. To disable autostart for all virtual machines on the host, edit this entry to:

    <enabled>false</enabled>

  5. If you want to enable the functionality, add the entry immediately after the line ending with:

    </dynamicProperty>

  6. Save your changes and exit.
  7. Restart the management agents on the ESX host. For instructions on restarting the agents, see Restarting the Management agents on an ESX Server (1003490) .
Caution: For this change to take effect, you must restart the management agent. This poses a circular logic problem in the case where you are disabling virtual machine autostart because you want to restart the agent. In this case, use the vimsh command as discussed in Restarting hostd (mgmt-vmware) on ESX Server Hosts Restarts Hosted Virtual Machines Where Virtual Machine Startup/Shutdown is Enabled (1003312).
Additional Information
  • ESX Servers can be shut down from the command line using the halt command.
  • ESX Servers can be rebooted from the command line with the reboot command.

Additional Information

For translated versions of this article, see: