"esxupdate error code 15" error after patching an ESXi host
search cancel

"esxupdate error code 15" error after patching an ESXi host

book

Article ID: 320137

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

To workaround this issue, reinstall the ESXi host or copy the imgdb.tgz file from the other working ESXi host


Symptoms:
  • When installing an extension, patch, or incompatible VIB on an ESXi host using vSphere Update Manager, the operation fails with the error:

    esxupdate error code 15
     
  • You may see the error:

    DEBUG: Creating an empty ImageProfile for bootbank /bootbank
  • On the Update Manager, you see this error:
The host returns esxupdate error code:99. An unhandled exception was encountered. Check the Update Manager log files and esxupdate log files for more details.
  • In the /var/log/esxupdate.log file, you see entries similar to:

    esxupdate: esxupdate: ERROR: An esxupdate error exception was caught:
    esxupdate: esxupdate: ERROR: Traceback (most recent call last):
    esxupdate: esxupdate: ERROR: File "/usr/sbin/esxupdate", line 216, in main
    esxupdate: esxupdate: ERROR: cmd.Run()
    esxupdate: esxupdate: ERROR: File "/build/mts/release/bora-469512/bora/build/esx/release/python-2.6-lib-zip-stage/469512/visor/pylib/python2.6/site-packages/vmware/esx5update/Cmdline.py", line 144, in Run
    esxupdate: esxupdate: ERROR: File "/build/mts/release/bora-469512/bora/build/esx/release/python-2.6-lib-zip-stage/469512/visor/pylib/python2.6/site-packages/vmware/esximage/Transaction.py", line 218, in InstallVibsFromSources
    esxupdate: esxupdate: ERROR: File "/build/mts/release/bora-469512/bora/build/esx/release/python-2.6-lib-zip-stage/469512/visor/pylib/python2.6/site-packages/vmware/esximage/Transaction.py", line 122, in GetProfile
    esxupdate: esxupdate: ERROR: InstallationError: (None, 'No image profile is found on the host or image profile is empty. An image profile is required to install or remove VIBs. To install an image profile, use the esxcli image profile install command.')


Environment

VMware ESXi 3.5.x Installable
VMware vSphere ESXi 5.5
VMware ESXi 4.0.x Installable
VMware vSphere ESXi 6.5
VMware ESXi 3.5.x Embedded
VMware ESXi 4.1.x Embedded
VMware ESXi 4.1.x Installable
VMware vSphere ESXi 5.1
VMware vSphere ESXi 5.0
VMware ESXi 4.0.x Embedded
VMware vSphere ESXi 6.0

Cause

This issue occurs due to the corrupt imgdb.tgz image database file.

To verify if the imgdb.tgz file is corrupted:
  1. Connect to the ESXi host with an SSH session.
  2. Navigate to /vmfs/volumes/ with this command:

    cd /vmfs/volumes
     
  3. Search for the imgdb.tgz file:

    find * | grep imgdb.tgz

    Note: This command normally results in two matches. For example:

    0ca01e7f-cc1ea1af-bda0-1fe646c5ceea/imgdb.tgz
    edbf587b-da2add08-3185-3113649d5262/imgdb.tgz

     
  4. Run this command on each match:

    ls -l match_result

    For example:

    ls -l 0ca01e7f-cc1ea1af-bda0-1fe646c5ceea/imgdb.tgz

    -rwx------ 1 root root 26393 Jul 20 19:28 0ca01e7f-cc1ea1af-bda0-1fe646c5ceea/imgdb.tgz

     
  5. The default size for the imgdb.tgz file is approximately 26 KB. If one of the files is only a couple of bytes, it indicates that the file is corrupt.

Resolution

To work around this issue, use one of these options:
  • Rebuild the ESXi host.
  • Copy the imgdb.tgz file from a known good ESXi host with the same VIBs, upgrades and Patches.

    To copy the imgdb.tgz file from a ESXi host::
    1. On the working ESXi host, copy a imgdb.tgz file by running this command:

      cp /bootbank/imgdb.tgz /vmfs/volumes/shared-LUN
       
    2. On the corrupt host, move the imgdb.tgz file to /tmp by running this command:

      cp /vmfs/volumes/shared_LUN/imgdb.tgz /tmp
      cd /tmp
      tar -xzf imgdb.tgz

       
    3. Copy profile files to the profile directory by running this command:

      cp /tmp/var/db/esximg/profiles/* /var/db/esximg/profiles/

       
    4. Copy VIBs to the VIB repository by running this command:

      cp /tmp/var/db/esximg/vibs/* /var/db/esximg/vibs/

       
    5. Remove the corrupt imgdb.tgz from the bootbank by running this command:

      rm /bootbank/imgdb.tgz

       
    6. Move the correct imgdb.tgz file into the bootbank by running this command:

      cp /tmp/imgdb.tgz /bootbank/

       
    7. Backup configuration changes by running this command:

      /sbin/auto-backup.sh
       
    8. Restart the ESXi host.
    9. Attempt to install or patch the host again using vSphere Update Manager.


Additional Information

The host returns esxupdate error code:99" error on ESXi host 6.x when staging the patches
ESXi ホストへのパッチ適用後の「esxupdate エラー コード 15」エラー
修补 ESXi 主机之后显示“esxupdate 错误代码 15 (esxupdate error code 15)”错误