ESXi upgrade fails with "Failed to update bootloader: 'NoneType' object has no attribute 'scanPartitions'"
search cancel

ESXi upgrade fails with "Failed to update bootloader: 'NoneType' object has no attribute 'scanPartitions'"

book

Article ID: 399209

calendar_today

Updated On:

Products

VMware vSphere ESX 7.x

Issue/Introduction

Symptoms:

  • ESXi upgrade is attempted from 6.7 t0 7.0
  • In the /var/log/esxupdate.log on the ESXi host you may find entries similar to:

YYYY-MM-DDTHH:MM:SSZ esxupdate: 2100750: HostImage: DEBUG: installer BootBankInstaller failed: Failed to update bootloader: 'NoneType' object has no attribute 'scanPartitions'. Clean up the installation.^@

YYYY-MM-DDTHH:MM:SSZ esxupdate: 2100750: root: ERROR: esximage.Errors.InstallationError: Failed to update bootloader: 'NoneType' object has no attribute 'scanPartitions'^@

  • Just before the failure, you may find below entries where the query to list HBA's on the ESXi host fails

YYYY-MM-DDTHH:MM:SSZ esxupdate: 2100750: vmware.runcommand: INFO: runcommand called with: args = '['/bin/localcli', '--formatter=json', 'storage', 'core', 'adapter', 'list']', outfile = 'None', returnoutput = 'True', timeout = '0.0'.^@

YYYY-MM-DDTHH:MM:SSZ esxupdate: 2100750: esxdisk.py: WARNING: Error querying storage paths and adapters: ['/bin/localcli', '--formatter=json', 'storage', 'core', 'adapter', 'list'] returned non-zero status (1), stderr: Errors:  Unable to list SCSI HBAs. No object id found for: vmhba0 ^@

  • Manually executing the command "esxcli storage core adapter list" on the ESXi host will result in the below error

Unable to list SCSI HBAs. No object id found for: vmhba0

  • In the vCenter UI for the affected ESXi host, some of the HBA's are not listed

Environment

  • VMware vSphere ESXi 7.X

Cause

  • During the ESXi upgrade, the workflow will try to list the HBA's on the ESXi host. Upgrade will fail if the workflow is unable to list the HBA's.
    The failure to list the HBA's on the ESXi host occurs due to presence of 32 bit IMA plugin which is not supported
  • To check if the ESXi host has 32 bit IMA plugin, use the below command:

ls -l /usr/lib/vmware/ima_plugins/

  • The presence of libelxima.so in the output of above command confirms 32 bit IMA plugin

Note: When the HBA driver is upgraded using an offline bundle which contains 32 bit IMA plugin, the upgrade will replace the 64 bit plugin with 32 bit plugin and causes this issue.

Resolution

Perform a clean installation of ESXi 7.0 which contains 64 bit IMA plugin.