During the HA configuration of ESXi host, the task fails with the below error:
Cannot complete the configuration of the vSphere HA agent on the host. "Applying HA VIBs on the cluster encountered a failure". Failed installing HA component on the host: host-###. An internal error occurred while staging/remediating the host.
Hard Disk that backs the altbootbank is encountering hardware errors.
This issue can be verified using the below log entries.
/var/run/log/lifecycle.logYYYY-MM-DDTMM:SS:zzzZ lifecycle: 1122312: imagemanagerctl:152 ERROR [InstallationError] Failed to copy files from /tmp/stagebootbank to /altbootbank: [Errno 5] Input/output error: '/altbootbank/boot.cfg'YYYY-MM-DDTMM:SS:zzzZ lifecycle: 1122312: imagemanagerctl:157 ERROR Traceback (most recent call last):YYYY-MM-DDTMM:SS:zzzZ lifecycle: 1122312: imagemanagerctl:157 ERROR File "/lib64/python3.8/site-packages/vmware/esximage/Installer/BootBankInstaller.py", line 346, in FileCopyYYYY-MM-DDTMM:SS:zzzZ lifecycle: 1122312: imagemanagerctl:157 ERROR shutil.copy2(src, dest)YYYY-MM-DDTMM:SS:zzzZ lifecycle: 1122312: imagemanagerctl:157 ERROR File "/lib64/python3.8/shutil.py", line 435, in copy2YYYY-MM-DDTMM:SS:zzzZ lifecycle: 1122312: imagemanagerctl:157 ERROR File "/lib64/python3.8/shutil.py", line 264, in copyfileYYYY-MM-DDTMM:SS:zzzZ lifecycle: 1122312: imagemanagerctl:157 ERROR OSError: [Errno 5] Input/output error: '/altbootbank/boot.cfg'
/var/run/log/vmkernel.log
YYYY-MM-DDTMM:SS:zzzZ cpu29:2617443)ScsiDeviceIO: 4167: Cmd(0x45e99d30a488) 0x28, CmdSN 0x4 from world 2008262 to dev "naa.<disk_identifier_string>" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x3 0x11 0x1 Medium Error, LBA: 2342017YYYY-MM-DDTMM:SS:zzzZ cpu29:2617443)ScsiDeviceIO: 4167: Cmd(0x45e99d386588) 0x28, CmdSN 0x5 from world 2008262 to dev "naa.<disk_identifier_string>" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x3 0x11 0x1 Medium Error, LBA: 2342017YYYY-MM-DDTMM:SS:zzzZ cpu29:2617443)ScsiDeviceIO: 4167: Cmd(0x45e99d38b588) 0x28, CmdSN 0x6 from world 2008262 to dev "naa.<disk_identifier_string>" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x3 0x11 0x1 Medium Error, LBA: 2342017YYYY-MM-DDTMM:SS:zzzZ cpu29:2617443)ScsiDeviceIO: 4167: Cmd(0x45e9945695c8) 0x28, CmdSN 0x7 from world 2008262 to dev "naa.<disk_identifier_string>" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x3 0x11 0x1 Medium Error, LBA: 2342017YYYY-MM-DDTMM:SS:zzzZ cpu29:2617443)ScsiDeviceIO: 4167: Cmd(0x45e9944015c8) 0x28, CmdSN 0x8 from world 2008262 to dev "naa.<disk_identifier_string>" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x3 0x11 0x1 Medium Error, LBA: 2342017
Replace the faulty disk and reinstall the ESXi.
Once the host is reimaged and added back to the inventory, the vSphere HA configuration should be successful as the hardware failure condition will no longer exist.
With the naa id, the actual disk can be identified using Identifying disks when working with VMware ESXi