Patching ESXi or VIB installation fails with the Error "Upgrade VIB(s) "loadesx" is required for the transaction."
search cancel

Patching ESXi or VIB installation fails with the Error "Upgrade VIB(s) "loadesx" is required for the transaction."

book

Article ID: 334599

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • An ESXi update, upgrade, or vib installation fails on ESXi version 7.x with the error "Upgrade VIB(s) "loadesx" is required for the transaction"
  • In the /var/run/log/esxupdate.log file, the following entries may be observed:

    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR: An esxupdate error exception was caught:
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR: Traceback (most recent call last) :
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR:  File "/usr/sbin/esxupdate", line 222, in main
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR:   cmd. Run ()
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR:  File "/lib64/python3.8/site-packages/vmware/esx5update/Cmdline.py", line 148, in Run
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR:  File "/lib64/python3.8/site-packages/vmware/esximage/Transaction.py", line 2213, in InitVibInstall
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR:   curPatcherComp, curPatcherVibs - findPatcher (curProfile)
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR:  File "/1ib64/python3.8/site-packages/vmware/esximage/Transaction.py", line 2500, in findPatcher
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR:   return findPatcherFromCompsVibs(imageProfile. components, imageProfile. vibs,
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR:  File "/1ib64/python3. 8/site-packages/vmware/esximage/Transaction.py", line 2560, in findPatcherFromCompaVibs
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR:   raise Errors.InstallationError(None, None, mag)
    YYYY-MM-DDTHH:MM:SSZ esxupdate: 5619614: esxupdate: ERROR: vmware.esximage.Errors.InstallationError: Upgrade VIB(s) "loadesx" is required for the transaction. Please use a depot with a complete set of ESXi VIBs.

Environment

ESXi 7.0.x, 7.0 U3k

Cause

This issue occurs when an ESXi host is upgraded from 6.x to 7.x using esxcli software vib update (which is an unsupported method for major upgrades), causing the loadesx VIB to be skipped and results in the vib to be missing from the host.

Resolution

Depending on the version of ESXi being used, please follow the relevant steps:

ESXi 7.0 U3g or below:

  • Place the ESXi host in Maintenance mode
  • Run the upgrade again using the command below to install the missing vib(s):
    esxcli software profile update -d <location of Zip file> -p <profile name> -f
    Example:
    esxcli software profile update -d /vmfs/volumes/<DatastoreName>/VMware-ESXi-7.0U3s-24585291-depot.zip -p ESXi-7.0U3s-24585291-standard -f

Note: To get a list of all available image profiles in the zip file, use the command: esxcli software sources profile list -d <location of ZIP file>

  • Reboot the ESXi host to proceed with the patching

 

ESXi 7.0 U3i or above:

To work around this issue, you must temporarily bypass the validation check within the Transaction.py script.

  1. Take a backup of the ESXi host configuration and place the host into maintenance mode.

    How to back up and restore the ESXi host configuration

  2. Log into the ESXi host via SSH as root.

  3. Allow filesystem modifications by running the following command:

    vsish -e set /config/VisorFS/intOpts/VisorFSPristineTardisk 0
    
  4. Create a backup copy of the Transaction.py script in a temporary location:

    cp /lib64/python3.8/site-packages/vmware/esximage/Transaction.py /root/tmp
    
  5. Grant write permissions to the temporary copy:

    chmod 777 /tmp/Transaction.py
    
  6. Overwrite the original script with the writable copy:

    cp /tmp/Transaction.py /lib64/python3.8/site-packages/vmware/esximage/Transaction.py
    
  7. Open the script in the vi editor:

    vi /lib64/python3.8/site-packages/vmware/esximage/Transaction.py
    
  8. Make the following two modifications to the script:

    • Modification 1 (Line 2457): Comment out line 2457 and add a return False statement on line 2458.

      if not oldVibs:                                     
          #raise ValueError('Current patcher VIBs must be provided')
          return False 
      
    • Modification 2 (Line 2560): Comment out the InstallationError raise on line 2560.

      elif len(vibDict) > 0:                                                    
          # Incomplete patcher.                                          
          msg = ('Upgrade VIB(s) "%s" is required for the transaction. '
                 'Please use a depot with a complete set of ESXi VIBs.' 
                 % getCommaSepArg(set(PATCHER_VIB_NAMES) - set(vibDict.keys())))
          #raise Errors.InstallationError(None, None, msg)  
      
  9. Save the settings and exit the vi editor (:wq!).

  10. Run a --dry-run of the profile update command (not install) using the depot to verify the loadesx VIB validation passes.

  11. If the dry run is successful, execute the profile update without the dry run flag and reboot the ESXi host.

  12. After the host reboots and is accessible, you must revert the changes. Open the script in the vi editor again:

    vi /lib64/python3.8/site-packages/vmware/esximage/Transaction.py
    
  13. Revert the previous modifications:

    • Reversion 1 (Line 2457): Uncomment line 2457 and remove the return False statement on line 2458.

      if not oldVibs:                                     
          raise ValueError('Current patcher VIBs must be provided')
      
    • Reversion 2 (Line 2560): Uncomment line 2560.

      elif len(vibDict) > 0:                                                    
          # Incomplete patcher.                                          
          msg = ('Upgrade VIB(s) "%s" is required for the transaction. '
                 'Please use a depot with a complete set of ESXi VIBs.' 
                 % getCommaSepArg(set(PATCHER_VIB_NAMES) - set(vibDict.keys())))
          raise Errors.InstallationError(None, None, msg) 
      
  14. Save the settings and exit the vi editor (:wq!).

  15. Remove the temporary backup file (Note: This may return a "file not found" error if /tmp was cleared during reboot, which is expected):

    rm /tmp/Transaction.py
    
  16. Restore the original read-only permissions to the script:

    chmod 444 /lib64/python3.8/site-packages/vmware/esximage/Transaction.py
    
  17. Re-enable filesystem protection:

    vsish -e set /config/VisorFS/intOpts/VisorFSPristineTardisk