During the update process, the ESXi update fails, returning the error code ESX_UPGRADE_FAILED.

Problem

Sometimes during an ESXi update, the process fails. In this case, you can restore the ESXi server from the configuration backup file taken before the update process. Restoring the host configuration also restores the state of the ESXi and the vSphere standard switch networking configuration.

Cause

ESXi server requires restoration following a failed ESXi update process.

Procedure

  1. Copy the backup file from the backup VM to a location that is accessible from the current ESXi host.

    If necessary, you can obtain information about the backup from the failed ESXi host.

    1. Log in to the SDDC Manager and click the LIFECYCLE tab.
    2. Click the UPDATE tab and open Completed Updates.
    3. Locate the update and select View Details from the drop-down list.
    4. Expand the detailed view and locate the failed ESXi update.
    5. Click the failed ESXi host and select Get Backup Information from the drop-down list.
  2. Enter maintenance mode.
  3. Restore the backup using the PowerCLI or the ESXi Command Line.

    For more information about using the PowerCLI, see the VMware PowerCLI Documentation.

    Note:

    The build number of the host must match the build number of the host that created the backup file. Use the -force option to override this requirement.

    To restore the backup using the PowerCLI.

    1. Put the host into maintenance mode.
      Set-VMHost -VMHost <ESXi_host_IP_address> -State 'Maintenance'
    2. Restore the configuration from the backup bundle.
      Set-VMHostFirmware -VMHost <ESXi_host_IP_address> \
           -Restore -SourcePath <backup_file_path_and_name> \
           -HostUser <username> -HostPassword <password> 
    3. Take the host out of maintenance mode.
      Set-VMHost -VMHost <ESXi_host_IP_address> -State 'Connected'

    To restore the backup using the ESXi Command Line.

    1. Put the host into maintenance mode.
      vim-cmd hostsvc/maintenance_mode_enter
    2. Copy the backup configuration file on the host.

      The backup file is located at /tmp/configBundle.tgz.

    3. Restore the configuration from the backup bundle.
      Note:

      This command will initiate an automatic reboot of the host.

      vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz
    4. Take the host out of maintenance mode.
      vim-cmd hostsvc/maintenance_mode_exit