Upgrading a VMware ESXi host fails with the error: Cannot run upgrade script on host
search cancel

Upgrading a VMware ESXi host fails with the error: Cannot run upgrade script on host

book

Article ID: 324784

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • VMware vCenter Update Manager fails to upgrade the ESXi host at 92%.
  • Cannot upgrade from ESXi 6.0 to ESXi 6.7 using the ISO image.
  • Cannot upgrade from ESXi 5.0 to ESXi 5.1/5.5 using the ISO image.
  • Cannot upgrade from ESXi 5.1 to ESXi 5.5 using the ISO image.
  • Cannot upgrade from ESXi 5.x to ESXi 6.0 using the ISO image.
  • Cannot upgrade from ESXi 4.0 Update 1 or Update 2 to ESXi 5.0.
  • Upgrading from ESXi 4.0 Update 1 or Update 2 to ESXi 5.0 using Update Manager fails.
  • You see the error:

    Cannot run upgrade script on host
     
  • In the C:\Documents and Settings\All Users\Application Data\VMware\Update Manager or C:\Users\All Users\VMware\VMware Update Manager\Logs\vmware-vum-server-log4cpp.log file, you see an entry similar to:

    Remediation failed due to non mode failure
     
  • In the /var/log/vua.log file, you see an entry similar to:

    OSError: [Errno 39] Directory not empty: /bootbank/state.XXXXXXX (where XXXXXXX is a number)


Environment

VMware vSphere Update Manager 6.7.x
VMware vSphere ESXi 5.1
VMware vSphere ESXi 5.5
VMware vSphere ESXi 6.7
VMware vSphere Update Manager 6.5.x
VMware vSphere Update Manager 6.0.x
VMware vSphere ESXi 6.0
VMware vSphere Update Manager 5.5.x

Cause

This issue occurs when the /bootbank/state.XXXXXXXX directory is not empty.

Resolution

To resolve this issue, ensure that the /bootbank/state.XXXXXXXX directory is empty.
 
To ensure the /bootbank/state.XXXXXXXX directory is empty:
  1. Log in to the ESXi Management console.
  2. Run this command:

    cd /var/log
     
  3. Using the grep command, find state.XXXXXXX and its corresponding directory within the vua.log file (replace XXXXXXX with the number indicated in the error)

    For example:

    grep state.31110473 vua.log
     
  4. Run these commands:

    cd /bootbank/
    ls -l


    Note: The preceding commands may also be required on /altbootbank because this directory can also hold state.XXXXXXX.
     
  5. Run this command to change directory to state.XXXXXXX directory indicated in the /var/log/vua.log file:

    cd state.XXXXXXX

    For example:

    cd state.31110473
     
  6. Run this command:

    ls -l

    You see an output similar to:

    -rwx------ 1 root root 18297 Jan 10 2011 local.tgz
     
  7. Note the name of the file within the state.XXXXXXX directory. For example, local.tgz.
  8. Run this command to move the files up one directory level:

    mv * ../

     
  9. In vCenter Server, remediate the host.
     
    1. Select the ESXi host.
    2. Click the Update Manager tab.
    3. Click Remediate.
If this article didn’t solve your issue:
Ask for help here : Click for VMware Communities


Additional Information

 


Upgrading from a Dell customized VMware ESXi 5.0 ISO to a later version fails at 26%
VMware ESXi ホストのアップグレードが失敗し、次のエラーが表示される: ホストでアップグレード スクリプトを実行できません
升级 VMware ESXi 主机失败并显示错误: 无法在主机上运行升级脚本