6

The only access I have to an ESXi server is via SSH. I can not use vCenter or the web interface

Vmware provides an article:
kb.vmware.com -- Determining whether virtual machines are configured to autostart (1000163)

but the contents of this article do not seem to be relevant to my ESXi server at all. The file in question IS there but not all lines appear as the document says it should.

VMware instructions:

Log in as root to your ESX host with SSH.
Open the /etc/vmware/hostd/vmAutoStart.xml file in text editor.
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.

To disable autostart for all virtual machines on the host, edit this entry to:
<enabled>false</enabled>

If you want to enable the functionality
add the entry immediately after the line ending with:
</dynamicProperty>

My document contains the following:

<ConfigRoot>
  <AutoStartOrder>
    <_length>0</_length>
    <_type>vim.host.AutoStartManager.AutoPowerInfo[]</_type>
  </AutoStartOrder>
  <SystemDefaults>
    <_type>vim.host.AutoStartManager.SystemDefaults</_type>
    <startDelay>120</startDelay>
    <stopAction>PowerOff</stopAction>
    <stopDelay>120</stopDelay>
    <waitForHeartbeat>false</waitForHeartbeat>
  </SystemDefaults>
</ConfigRoot>

'DynamicPropery' is not a section in my file. It seems there is some syntax required to place the virutal machines/guests that live in this ESXi server in the autostart list, but I've been unable to find it. Anyone in the know, please offer guidance.

1 Answer 1

4

Instead of tinkering with the config file you should use the vim-cmd command (and its namespace hostsvc/autostartmanager) to configure VM autostart. Run

vim-cmd help hostsvc/autostartmanager

to get help. A good overview with examples is here: http://msmhec.pl/vmw/Documents/VIM-CMD.pdf (mentions ESXi 4.1, but still applies to recent ESXi versions)

1
  • 1
    Your answer is mostly a link, I would recommend adding the relevant parts of the link to your answer. Such as the need to: vim-cmd hostsvc/autostartmanager/enable_autostart true then vim-cmd hostsvc/autostartmanager/update_autostartentry $VMId $StartAction $StartDelay $StartOrder $StopAction $StopDelay $WaitForHeartbeat
    – Centimane
    Aug 24, 2017 at 15:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .