Home > Blogs > VMware vSphere Blog


Free ESXi Hypervisor – Auto Start Breaks with 5.0 Update 1

Kyle Gleed, Sr. Technical Marketing Manager, VMware

If you are running the free version of ESXi (aka ESXi Hypervisor) then you'll want to be aware of a critical issue that surfaces after upgrading to 5.0 Update 1.  I want to stress this only applies to people runing the free ESXi version.  If you're ESXi hosts are licensed this issue does not affect you.

There were some changes made in the way the ESXi APIs are accessed in Update 1 that unfortunately breaks the VM Auto Start feature in the free ESXi version.  Please note that this issue only affects the free ESXi version and it was not intentional.  I've heard some people making claims that VMware did this on purpose as a way to further limit the free ESXi version, this is not true.  I'm not aware of a workaround, but many customers have been able to leverage the dual-image architecture of ESXi in order to roll-back to the pre-upgrade state.   

To roll-back to the pre-upgrade image:

DCUI
Using the DCUI is the supported and recommended way to rollback your ESXi image.  From the ESXi host console reboot the host, at the very beginning of the boot, when you see the boot options prompt (<ENTER: Boot>), press SHIFT+R to enter recovery mode, and when prompted answer "y" to confirm that you want to revert back to the previous image profile.

A2

ESXi Shell
If you don't have access to the host console you can still revert back to the pre-upgrade image profile by editing the "boot.cfg" files located in the /bootbank and /altbootbank directories (yes, you have to edit both files).  Note that manually editing these configuration files is not supported by VMware, so you never want to do this on a production ESXi hosts.  However, because this issue only affects the free ESXi version, and because I've had a couple folks ask how this can be done I wanted to go ahead and show you.  Assuming the last line in your /bootbank/boot.cfg shows "updated=2" and the last line in your /altbootbank/boot.cfg shows "updated=1", simply reverse the numbers so that /bootbank/boot.cfg is "updated=1" and /altbootbank/boot.cfg is "updated=2".  For example:

Before:
/bootbank/boot.cfg = "updated=2"
/altbootbank/boot.cfg = "updated=1"

After
/bootbank/boot.cfg = "updated=1"
/altbootbank/boot.cfg = "updated=2"

After editing the boot.cfg file in both the /bootbank and /altbootbank reboot your host for the change to take affect.  Having reversed the order of the bootbanks in the boot.cfg file the host will now reboot off the pre-upgrade image. 

Keep in mind that it is always a good idea to take a backup of your host (vicfg-cfgbackup) before attempting to revert your image profile.  Again, please note that the supported/recommend method is using the DCUI.  Only resort to editing the boot.cfg files for noncritical hosts such as those used in home labs and other test and development environments as any mistakes will very likely render your host unable to boot.

Many thanks to William Lam (@lamw) for his help on this blog…

Follow me on twitter @VMwareESXi

64 thoughts on “Free ESXi Hypervisor – Auto Start Breaks with 5.0 Update 1

  1. Kyle Gleed

    There are two separate issues related to Auto Deploy in 5.0 Update 1, and while similar they are not related. There is separate discussion going around that talks about how in Update 1 you can no longer configure Auto Start for hosts in an HA cluster (see the Update 1 release notes). Configuring Auto Deploy for hosts in an HA cluster has never been supported because HA is responsible for VM start-up in a cluster, and it was an error that users were even allowed to configure it. In Update 1 we fixed this by greying out the Auto Start option when a host is in a cluster. Again, this HA issue, while it does pertain to “auto start”, is not related to the issue I discuss here where Auto Start on the free ESXi (ESXi Hypervisor) no longer works with Update 1.

    Reply
  2. Robin Friberg

    Hi there,
    I just managed to get this problem. And I made a little script to work around it for now.
    By modifying this you may get the solution you want, this is how I did it.
    * First off, connect to your VMware ESXi hypervisor with VMware vSphere Client.
    * Go to the Configuration-tab on the host
    * Select Security Profile
    * Preferences on services.
    * Find SSH in the list and click Options
    * Enable SSH
    * Use a SSH-client like PuTTy to connect to your host.
    * Once logged into the host, run the command “vim-cmd vmsvc/getallvms” to find all VMs on your host and theire IDs (first column). Note the IDs for the VMs you would like to autostart. Or if you would like to start everyone, theres no need to remember the ID.
    * Now edit /etc/rc.local with the editor “vi” using this command “vi /etc/rc.local”
    * To enter insert-mode in “vi” press “i”-key.
    * Somewhere in that file (I put mine above the if-statement) write this if you want every VM to autostart:
    * * for i in $(vim-cmd vmsvc/getallvms|cut -f1 -d” “|grep -v Vmid); do vim-cmd vmsvc/power.on $i; sleep 10; done
    * And if you only would like to start a few of the VMs on the host, this will be enough:
    * * vim-cmd vmsvc/power.on ID_OF_VM
    * * sleep NUMBER_OF_SECONDS (10 in my case)
    * * vim-cmd vmsvc/power.on ID_OF_VM2
    * * etc…
    * When you are done editing, press ESC-key to exit “insert”-mode and then write “:wq” to write and quit.
    * Reboot your host and the VMs should autostart once again.
    I’m running the latest VMware ESXi 5.0 from HP, the ISO i used was: 5.0_U1_Mar_2012_ESXi_HD-USB-SDImgeInstlr_Z7550-00352.iso
    Hopefully this will help someone :)
    Regards,
    Robin

    Reply
  3. Steve Quinn

    Thanks Robin, this rocks
    Would anyone know where to place the appropriate vim-cmd vmsvc/power.off statements for graceful VM shut downs upon a shut down/reboot of the host machine?
    Thanks
    Steve

    Reply
  4. John

    i have just downloaded the Vmware Vsphere evaluation iso , 60days trial on a HP DL380 g7 server the boot_When booting its not detecting the iso file..

    Reply
  5. John

    Am downloading the Vmware ESXI 60 days for demo, the file is too big its takes almost 9hrs even wid DAP 6.0.

    Reply
  6. John

    Am downloading the Vmware ESXI 60 days for demo, the file is too big its takes almost 9hrs even wid DAP 6.0.

    Reply
  7. Kyle Gleed

    The ESXi ISO is only ~300MB in size. The vCenter installation ISO is 2.4GB. Shouldn’t take 9 hours. How fast is your network connection?

    Reply
  8. Robin Friberg

    Steve,
    The vim-cmd vmsvc/power.off will just pull the plug. You might need vmsvc/power.shutdown. It might be possible to do something like this:

    Well, I haven’t tried this myself.. But it might be possible to change the file /etc/inittab
    Add a row like:
    ::shutdown:vim-cmd vmsvc/power.shutdown 1; sleep 15; vim-cmd vmsvc/power.shutdown 2; sleep 90
    Before the rest of the ::shutdown rows. For me this would be:
    ::shutdown:vim-cmd vmsvc/power.shutdown 1; sleep 15; vim-cmd vmsvc/power.shutdown 2; sleep 90
    ::shutdown:/usr/lib/vmware/vmksummary/log-bootstop.sh stop
    ::shutdown:/sbin/shutdown.sh
    at the end of inittab. This MIGHT work, I no longer have a test environment to try this at thou
    To explain, the /etc/inittab defines commands that should run when the system is in a specific state. When the system enters shutdown state, we can call vim-cmd vmsvc/power.shutdown to gracefully shutdown our VMs that are still alive. By sleeping 90 seconds in the end, I would like to think that the VMs gets powered off before the ESXi-host.
    This is as I said, not tested. It might work, it might not.
    I do not know if the inittab runs sequential or parallel, so a worst case scenario would be that the VMs are getting a gracefull shutdown and the ESXi hosts reboot in the middle of the shutdown.
    Also, if you are running Windows VMs, and they have a lot of security patches or such, the shutdown process of the guest might be alot longer than 90 seconds.
    Try this and report back
    Good night!
    Regards
    /Robin

    Reply
  9. Miguel Angel Vides

    ALo.. to all…
    .. first post … from Argentina…
    well… about ..
    Posted by: Robin Friberg | 04/06/2012 at 07:30 AM
    I have installed this iso VMware-VMvisor-Installer-5.0.0-469512.x86_64.iso and then
    upgrade with this VMware-VMvisor-Installer-5.0.0.update01-623860.x86_64.iso…
    and auto start vm don’t work any more…
    so.. I have try to follow Robin steps… but
    > vim-cmd vmsvc/getallvms
    …I get an error … because I don’t have vmsvc directory.. and
    > #pwd
    > /
    > #find . -iname get*
    > ./bin/getty
    > #
    so… I don’t know if the solution works…
    if it is… there is another way to get the id of VM
    any way…
    ..1K thanks
    inlakech
    PD: may be .. if someone will paste part of thous files in /vmsvc/* …
    I can create them … and may be work…
    PD2: again… 10K thanks… I hope not to overhead the net with thanks. :)

    Reply
  10. Jonny

    I’ve checked out Patch 702118 now and this issue still isn’t fixed.
    Robins solution is good if you have only the autostart in mind. In my situation I need the auto shutdown too, but this is even broken by update 1. So all VMs will be powered off instandly after shutdown the host. That’s evil. ;)
    Patch 515841 is the last usable for me.

    Reply
  11. Jean

    what .vib (bulletin ID#) within 5U1 causes the problem? Can I install 5U1 *minus* the one that causes the problem, e.g. by removing reference to the vib file in the ESXi500-Update01.xml or something?
    I did browse the KB articles for each patch/bulletinID within 5U1 but didn’t find / can’t tell what would have caused the problem.

    Reply
  12. Jim

    The bug was that the pre patch version could be installed on a hardware with more than 32GB, and despite of what Mr Gleed says the fix was intentional.
    Check the Free ESXi FAQ:
    How much vRAM does a VMware vSphere Hypervisor license provide?
    vSphere Hypervisor license provides a vRAM entitlement of 32GB per server, regardless of the number of physical processors. vSphere Hypervisor can be used on servers with maximum physical RAM capacity of 32GB.

    Reply
  13. Jim

    The bug was that the pre patch version could be installed on a hardware with more than 32GB, and despite of what Mr Gleed says the fix was intentional.
    Check the Free ESXi FAQ:
    How much vRAM does a VMware vSphere Hypervisor license provide?
    vSphere Hypervisor license provides a vRAM entitlement of 32GB per server, regardless of the number of physical processors. vSphere Hypervisor can be used on servers with maximum physical RAM capacity of 32GB.

    Reply
  14. Jim

    The bug was that the pre patch version could be installed on a hardware with more than 32GB, and despite of what Mr Gleed says the fix was intentional.
    Check the Free ESXi FAQ:
    How much vRAM does a VMware vSphere Hypervisor license provide?
    vSphere Hypervisor license provides a vRAM entitlement of 32GB per server, regardless of the number of physical processors. vSphere Hypervisor can be used on servers with maximum physical RAM capacity of 32GB.

    Reply
    1. Bharat

      @Jim, I can assure that this hard enforcement has started from Build 623860. All the build released before that is working with more then 32GB physical RAM box. So do you know how to downgrade the ESXi 5.0.0 build 623860 to 469512 ?? If yes, please let me know.
      Kind regards.

      Reply
  15. Alberto

    good morning
    i have the same problem ( in a fresh installation)
    i need use auto startup and auto shoutdown ( for mange an apc ups with powerchute shutdown)
    what way can i try ?
    thanks Alberto

    Reply
  16. Duane Morris

    I have tested the auto startup using the rc.local and works great.
    The auto shutdown using the inittab does not work, so more research and testing there.

    Reply
  17. Duane Morris

    I tested writting a script and putting into /etc/init.d to shutdown VM’s and it works well. The problem is that Hypervisor over writes this area on a reboot, so all is lost. Once I figure how to get around that. I’ll post update.

    Reply
  18. Jay

    A question for Kyle Gleed > or anyone at vmWare -
    Is there any planned date for a Fix to the Autostart /Auto Shutdown feature in the free version of esxi 5.1?
    Please let us know if it will or won’t be fixed so we can plan for our next school year.
    Thank you.

    Reply
  19. Kyle Gleed

    Hi Jay. Yes, a fix is in the works. I’m not able to comment on when it will be available yet. I’m hoping soon…

    Reply
  20. Dale.E

    It appears the break was not intentional, but why mess with a good thing?
    seems like the lack of fix is intentional.

    Reply
  21. PB

    Thanks for the info Robin your work around has worked for me – well almost. I have 5 Linux servers that all power on successfully following your script with one deliberately being delayed by 160 seconds as it relies on network information from another. However no matter how I try I cannot get a Windows 2003 advanced server based VM to auto power on at all. If I connect a client to the EXSi server I can power on the Win 2003 server manually but really need to automate the startup the same as the other servers.
    Can anyone help me out with this please?

    Reply
  22. Diego

    I have just installed Vmware ESXi5 U1 build 623860, and the issue with AutoStart is still there. How come VMware not be worried about it? It is now more than 3 months!!! Wake up VMware, please!

    Reply
  23. Diego

    I have just installed Vmware ESXi5 U1 build 623860, and the issue with AutoStart is still there. How come VMware not be worried about it? It is now more than 3 months!!! Wake up VMware, please!

    Reply
  24. online to-do list

    Wonderful job!!
    I like your information. I have been looking for this type of information that is interesting and good, Thanks again and looking forward for your post on making more.

    Reply
  25. Bjoern

    This issue seems to be fixed. I installed the updates from the ESXi500-201207001.zip patch on three different ESXi 5.0U1 hosts, and the VMs start up automatically, like they should.

    Reply
  26. DanielB

    Good news! I received an update to my support ticket and this issue has been resolved with ESXi500-201207001. I just tested in the lab and it is fully working again.

    Reply
  27. Dennis

    Hi there,
    there is a Rollup Pack 2 available on the vmware site. Download ist, burn a cd boot ist, select the esxi partition an update it fron 5.0 to 5.0. After that the vm’s will boot automaticaly.
    cu dennis

    Reply
  28. Bill M

    Robin, thanks for the scripts. I couldn’t get the for .. to work (probably a typo) but the individual calls work just fine. Thanks again.

    Reply
  29. David Dawson

    Wonder if the 5.1 build 733799 fixes this. No word in release notes. Then again there was never really an “official” acknowledgement of this problem aside from this blog post, I believe.

    Reply
  30. NATE

    This is absolute shit! How could this HUGE problem not be noticed during the testing phase? The article claims this wasnt a ploy by vmware to get the free users to use the fully licensed version but yet there has been no attempt to fix the problem for months now and ohh yea, it doesnt effect the fully licensed version. WTF!!!

    Reply
      1. me

        How old are you?Such nasty response? Get some basic classes in communication, anger management, and get some manners. You are just nasty.

        Reply
  31. Robin Friberg

    Nice to see that people liked my little “hack”, it warms my heart to know I can be of service :)
    FYI: Still running 768111 with the bug in my environment. Haven’t rebooted once since it went up last year (talk about a stable product!!).

    Also, I didn’t notice the bug in my test environment when I set it up, mainly because I never rebooted the ESXi-host.

    I’ll be buying the Essentials Plus kit in a couple of months and trying out the shared storage between two of my servers with HA and vMotion.. Hopefully the latests release doesn’t have to many bugs :)

    Just wanted to say thanks for the comments, much appreciated and thanks to VMware for a nice FREE product!

    Best regards,
    Robin

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>