The following error messages are present when attempting to configure vSphere HA on ESXi hosts:
"Cannot complete the configuration of the vSphere HA agent on the host."Applying HA VIBs on the cluster encountered a failure."Similar logs are found on the ESXi host when attempting to configure HA:
/var/vmware/lifecycle/task-status.json
{"########-####-####-####-############": {"operation": "com.vmware.esx.settingsdaemon.software.scan", "status": "FAILED", "user": "root", "startTime": "[YYYY-MM-DDTHH:MM:SS]", "endTime": "[YYYY-MM-DDTHH:MM:SS]", "progress": {"completed": 0, "total": 100}, "error": {"id": "com.vmware.vcIntegrity.lifecycle.EsxImage.DepotConnectError", "message": {"id": "com.vmware.vcIntegrity.lifecycle.EsxImage.DepotConnectError", "default_message": "An error occurred while connecting to depot.", "args": []}, "resolution": null, "time": "[YYYY-MM-DDTHH:MM:SS]"}}}
/var/run/log/lifecycle.log
[YYYY-MM-DDTHH:MM:SS] lifecycle: 4736221: imagemanagerctl:1171 INFO Calling with arguments: software --scan --software-spec /var/run/lifecycle.scan.swspec --depot http://<vCenter_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-vmw__vmw-ESXi-8.0.3-metadata__index__.xml --depothttp://<vCenter_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-vmw__metadata-19__index__.xml --task-id 52f43aa4-ca7d-f8b6-5dc3-55b0fef71018
[YYYY-MM-DDTHH:MM:SS] lifecycle: 4736221: imagemanagerctl:624 DEBUG Got spec from vAPI: {'add_on': None, 'base_image': {'version': '7.0.3-0.105.22348816'}, 'components': None, 'hardware_support': None, 'solutions': {'com.vmware.vsphere-ha': {'components': [{'component': 'vsphere-fdm'}], 'version': '7.0.3-24024786'}}}[YYYY-MM-DDTHH:MM:SS] lifecycle: 4736221: HostImage:185 DEBUG Deferring initiating installers[YYYY-MM-DDTHH:MM:SS] lifecycle: 4736221: HostImage:223 INFO Installers initiated are {'live': <vmware.esximage.Installer.LiveImageInstaller.LiveImageInstaller object at 0xe8f125c790>, 'boot': <vmware.esximage.Installer.BootBankInstaller.BootBankInstaller object at 0xe8f088e400>, 'locker': <vmware.esximage.Installer.LockerInstaller.LockerInstaller object at 0xe8f1247f70>}[YYYY-MM-DDTHH:MM:SS] lifecycle: 4736221: DepotCollection:321 DEBUG Downloading depot index.xml from http://<vCenter_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-vmw__vmw-ESXi-8.0.3-metadata__index__.xml[YYYY-MM-DDTHH:MM:SS] lifecycle: 4736221: Downloader:372 INFO Opening http://<vCenter_FQDN>:9084/vum/repository/hostupdate/__micro-depot__vendor-vmw__vmw-ESXi-8.0.3-metadata__index__.xml for download[YYYY-MM-DDTHH:MM:SS] lifecycle: 4736221: Downloader:210 WARNING Download failed: <urlopen error [Errno -3] Temporary failure in name resolution>, 9 retry left...[YYYY-MM-DDTHH:MM:SS] lifecycle: 4736221: Downloader:210 WARNING Download failed: <urlopen error [Errno -3] Temporary failure in name resolution>, 8 retry left...<Truncated>[YYYY-MM-DDTHH:MM:SS] lifecycle: 4736221: Downloader:210 WARNING Download failed: <urlopen error [Errno -3] Temporary failure in name resolution>, 1 retry left...
ESXi Hosts were unable to resolve the vCenter FQDN which results in the ESXi hosts failing to download the necessary FDM vibs from the vCenter depot for HA remediation task.
Validation:
(nslookup <vCenter FQDN>)curl -v telnet://<ESXi-HOST-IP>:<Port-Number> & curl -v telnet://<ESXi-HOST-FQDN>:<Port-Number>
nc -z <VCENTER-IP> <Port-Number> & nc -z <VCENTER-FQDN> <Port-Number>
See the following documentation for testing connectivity using vmkping - Testing VMkernel network connectivity with the vmkping command
As a temporary workaround, create manual host entries for the vCenter FQDN with the below until the DNS issue is resolved. Once the issue is resolved, remove the manual entries.
esxcli network ip hosts add --hostname <vCenter-FQDN> --ip <vCenter-IP-Addr>
Reference: Configure the DNS Hosts File by Using ESXCLI Commands