ESXi 5.1 Upgrade fails with the error: Cannot execute upgrade script on host

After a flawless upgrade to ESXi 5.1 of one of my HP Microservers N36L,  upgrading the second N36L gave some issues. I am using VMware Update Manager for the upgrade, which failed at 93% with the following error: “Cannot execute upgrade script on host“.

A short investigation of both /var/log/vmware/vua.log on the ESXi host and C:\Users\All Users\VMware\VMware Update Manager\Logs on the Update Manager didn’t offer any clues. I ran into this VMware KB article which is about quite the same issue, although the article is talking about an upgrade from 4.1 to 5.0.

Unfortunately I didn’t have the error which is mentioned in the KB article on my systen: “OSError: [Errno 39] Directory not empty: /bootbank/state.XXXXXXX (where XXXXXXX is a number)”. This didn’t stop me investigating the /bootbank directory. The /bootbank/ directory didn’t had a state.XXXXXXX directory, but there was a /altbootbank/state.92793/ directory available on the system which contained a local.tgz. Local.tgz contains a system state backup of your ESXi server. More information about the two bootbanks is available in this VMware PDF:

The ESXi system has two independent banks of memory, each of which stores a full system image, as a fail-safe for applying updates. When you upgrade the system, the new version is loaded into the inactive bank of memory, and the system is set to use the updated bank when it reboots. If any problem is detected during the boot process, the system automatically boots from the previously used bank of memory. You can also
intervene manually at boot time to choose which image to use for that boot, so you can back out of an update if necessary.”

So /altbootbank/ is used in a upgrade scenario, to have a fail safe option. I decided to move the local.tgz (in /altbootbank/state.92793/) one directory higher. This did the trick and the Update Manager successfully deployed the upgrade…Well, almost. At the end of the upgrade, the ESXi server reverted to an old network configuration. Probably to a networkconfiguration which was in the local.tgz? (Anybody additional information on this?).

After a manual reconfiguration of the network settings, everything is working fine now.

Featured Posts on

About viktorious

Viktor van den Berg is a Solution Architect at PQR and VCDX #121.

Viktor is a regular speaker at seminars and conferences. Continue reading...

Comments (12)

  • Marko

    I had the exact same issues on IBM iDataPlex dx360 M3 machines … on some of them the upgrade went succesfully through, on some I’ve got the “Cannot execute upgrade script on host” error and just like viktorious and I’ve followed his instructions and thus been able to upgrade all hosts to ESX 5.1. Thanks, viktorious!

  • viktorious

    Hi Marko! Great it solved your issue. Did you also ran into an old network configuration, or was this not a problem for you?

  • Nes

    Works perfect for me. Thank a lot

  • McFly

    Does not work for me. Had exactly the same problem, but there’s no state.XXXXX directory neither in /bootbank/ nor in /altbootbank/. Any solutions?

  • Hedgehog_57

    McFly: Does not work fo me too. But i’ve found an issue. I’ve copied


    on my computer and found this
    –> stderr: ——–
    –> Traceback (most recent call last):
    –> File “/tmp/vuaScript-d5WQfG/”, line 1283, in
    –> sys.exit(main(sys.argv))
    –> File “/tmp/vuaScript-d5WQfG/”, line 1279, in main
    –> prepareBootloader()
    –> File “/tmp/vuaScript-d5WQfG/”, line 1193, in prepareBootloader
    –> prepareEsxiBootloader()
    –> File “/tmp/vuaScript-d5WQfG/”, line 900, in prepareEsxiBootloader
    –> raise Exception(‘/altbootbank/boot.cfg has a higher “updated”‘
    –> Exception: /altbootbank/boot.cfg has a higher “updated” value than in /bootbank/boot.cfg.
    –> ——–

    Bingo! I don’t know what produced situation like this. But i’ve runned an “update” rather than “upgrade”. That repaired this situation. After I’ve restarted “upgrade” and it works like a charm.

  • Mikael Winther

    I had this issue too, but with no state.XXXXX directory in either /bootbank/ or /altbootbank/
    I got it to work by booting off the ESX 5.1 install CD, choosing the sdcard my installation was on, and choosing the upgrade option, and then the upgrade finished without further errors.
    Even the patch upgrade afterwards finished without error.

    Mikael Winther

  • Karan


    I am performing an upgrade from v5.0 to v5.1 and have ran into this issue where I dont find state.xxxxx under /bootbank. However, as you suggested, I found the folder under /altbootbank. Now I can try moving the file one level up and then perform the upgrade however, you even mentioned about the network issue. Could you please elaborate on this ? As I may prepare myself for the same incase I fall under the same scenario.

    • adminviktor

      Hmmm, good question. It’s always good idea to backup (write down?) the network configuration…just in case. Also take a look at the vicfg-cfgbackup command which might help:

      • Karan

        thanks for the prompt reply Viktor. I just moved the file one level up into /altbootbank folder and kick started with the upgrade. Upgrade completed and the ESX is now on v5.1 however, the remediation wasnt able to complete stating it couldnt reconnect the host coz of credential issue. So i entered the credentials and now the only problem I am facing is HA issue. The error I find is Cannot install the vCenter Agent service. :(

        If you could please help me with this ?


  • George

    Hi. Wondering if anyone can help..with esx 5.1 can you schedule automatic or scheduled remediation of esx 5.1 patches after automatic download?


Leave a Comment

© 2013 Powered By Wordpress

Scroll to top