jumebv

autostart VM

This option in ESX / VC has been around for quite some time now (even gave us some headaches in the past where restating the mgmt-vmware services also restarted the VMs - oops). It's the autostart VM feature. How does this work? Quite easy: just enable it using your VI Client! If it is enabled, it autostarts your VMs at ESX poweron. So in case of a full datacenter power failure (and you do not have SRM in place) the most important selected VMs will start as soon as possible.

autostart

By default, this feature is disabled. But once enabled a lot happens on your ESX server (note: I call it explicitly ESX, not vCenter, but I'll come back to that later).

All settings defined in the VI client on the Autostart screen is saved in: /etc/vmware/hostd/vmAutoStart.xml

 

Here is the output of the above example:

<ConfigRoot>
<AutoStartOrder>
<_length>1</_length>
<_type>vim.host.AutoStartManager.AutoPowerInfo[]</_type>
<e id="0">
<_type>vim.host.AutoStartManager.AutoPowerInfo</_type>
<key>
<_type>vim.VirtualMachine</_type>
<moid>16</moid>
</key>
<startAction>PowerOn</startAction>
<startDelay>-1</startDelay>
<startOrder>1</startOrder>
<stopAction>SystemDefault</stopAction>
<stopDelay>-1</stopDelay>
<waitForHeartbeat>systemDefault</waitForHeartbeat>
</e>
</AutoStartOrder>
<SystemDefaults>
<_type>vim.host.AutoStartManager.SystemDefaults</_type>
<enabled>true</enabled>
<startDelay>120</startDelay>
<stopAction>PowerOff</stopAction>
<stopDelay>120</stopDelay>
<waitForHeartbeat>true</waitForHeartbeat>
</SystemDefaults>

During the system start (init process in the Linux RedHat Service Console) it starts the /etc/rc3.d/S99vmware-autostart which starts the VMs defined in the xml file using the /usr/bin/vmware-autopoweron.sh script. Pretty cool huh, so it is no abacadabra!

Anyway, there are nice features where you can set how long to wait between VMs (in seconds, or just allow the following VM to be started when the VMware Tools are running), also a shutdown procedure. And you can specify the order in which the VMs start. Awesome!

The last feature though (the one where you can specify the order), is pretty worthless when you run your ESX server in a cluster with VMotion capabilities. Once a VM is VMotioned (manually or by DRS) the autostart order is not saved. It is saved to start in random order. And you should enable the autostart feature on all hosts! Or else it will not work.

VMware did changed this around quite a lot. In the early days the autostart configuration was saved in the .vmx file. Now it is in an .xml file. It could be changed in the future so it is saved on the vCenter database (and in your ESX server of course) so hopefully it saves the start order.

I like to set this on my domain controller, vCenter Server, SQL Database server. Take a look, don't forget the simple things!


( 0 Votes ) 
Comments (3)
  • Penni Chall  - autostart VM
    avatar

    Howdy! Someone in my Myspace group shared this website with us so I came to take a look. I'm definitely enjoying the information. I'm bookmarking and will be tweeting this to my followers! Outstanding blog and amazing design.

  • Loretta Winkenwerder  - autostart VM
    avatar

    It’s actually a great and helpful piece of information. I’m glad that you shared this helpful information with us. Please keep us informed like this. Thanks for sharing.

  • borvestinkral  - autostart VM
    avatar

    I was just searching for this info for some time. After six hours of continuous Googleing, at last I got it in your site. I wonder what is the lack of Google strategy that do not rank this kind of informative web sites in top of the list. Usually the top web sites are full of garbage.

Write comment
Your Contact Details:
Gravatar enabled
Comment:
[b] [i] [u] [s] [url] [quote] [code] [img]   
:D:):(:0:shock::confused:8):lol::x:P:oops::cry:
:evil::twisted::roll::wink::!::?::idea::arrow: