Syed Jahanzaib Personal Blog to Share Knowledge !

August 30, 2012

Vmware ESXi 5.0 Update1 Autostart breakup Fix !

Filed under: VMware Related — Syed Jahanzaib / Pinochio~:) @ 4:19 PM

In my company, we have two virtual servers based on Microsoft Hyper-V & Free version of ESXi 4.0 running 10 guest OS. We did planned to convert all of our physical machine to virtual to get benefit from underutilized modern hardware. Last week I decided to move our Domain Controller & ADC to virtual (which were installed on IBM Xseries physical serve machines).

As a rule of thumb, always test any new / trial product in LAB before deploying it on production server, following this theory I installed Vmware ESXi 5.0 Update 1 on vmware workstation 7.x and found out a BUG that guest vm’s do not auto start anymore when the host ESXi starts (In previous versions i.e 4.x , they auto start normally if they are set to autostart). This is a bug for the FREE version of the hypervisor. (For example if you have installed the FREE License key provided by vmware)

After some googling, I found out that There were some changes made in the way the ESXi APIs are accessed in Update 1 that unfortunately breaks the Guest VM Auto Start feature.

Here is a quick workaround to give you the autostart functionality in traditional Linux style.

If you haven’t done so already, Do Enable SSH on the ESXi host server. This can be easily done using Sphere client.

  • Connect to ESXI using Vsphere client.
  • Goto Configuration Tab | Security Profile | in Services, click on Properties
  • Highlight SSH | Select Options | Service Commands | Start
  • Use any SSH client like PuTTY) to log into your host server. As showed in the image below

In my case, I only wanted to auto start only single guest vm  (Which is my test DC)  So first We need to get the VM ID’s for the virtual machines. Use the following command to do so. Make note of the ID numbers in the first column

Use the following command to get the VM ID of the machine you want to start.

vim-cmd vmsvc/getallvms

You will get results something like below ( I only have one test machine, so only one entry is visible)

Vmid          Name                                File                               Guest OS         Version   Annotation
1      TestPC-4-Autostart   [store] TestPC-4-Autostart/TestPC-4-Autostart.vmx   win2000AdvServGuest   vmx-08

The VM ID for test pc guest OS is 1

Use vi to edit /etc/rc.local  – & Insert the following startup lines above the IF statement and save.

vim-cmd vmsvc/power.on 1

[VI TIP: to enable editing, press i , now add your lines, to save, press ESC, now press shift+: & type wq and press enter]
As showed in the image below . . .

Save & Exit.

Now reboot the ESXi host server.

After reboot completes, you will see the target guest OS Auto starting this time.

Auto Start All VM’s guest OS

TIP: If you want to start all vm’s you need to add them as follow

vim-cmd vmsvc/power.on 1
sleep 180
vim-cmd vmsvc/power.on 2
sleep 180
vim-cmd vmsvc/power.on 3
sleep 180

Change the ID number as per your configuration. Now after starting 1st VM, ESXi HOST will wait 180 Seconds (3 minutes) to start second one and so on. You can change this number as per your hardware/software load.

I hope you will find it useful.


Syed Jahanzaib


  1. Hi you can download new update here: and update by CLI esxcli software vib install –depot=/vmfs/volumes/datastore1/

    Comment by Abraham — September 10, 2012 @ 11:19 PM

  2. Syed Jahanzaib i wish to discuss with you on a project please response me as soon as possible at its honorable for me if you call me i have sent you my detail at your ID

    Thank you

    Comment by Syed Zeeshan Mudassir — October 18, 2012 @ 11:13 PM

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: