vSphere HA agent for ESXi host has an error: vSphere HA agent cannot be installed or configured
search cancel

vSphere HA agent for ESXi host has an error: vSphere HA agent cannot be installed or configured

book

Article ID: 381240

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

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 --depot
http://<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...

 

Environment

  • VMware vCenter Server 7.x 
  • VMware vCenter Server 8.x
  • VMware ESXi 7.x
  • VMware ESXi 8.x

Cause

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:

  • Make sure the ESXi host is able to resolve the vCenter FQDN (nslookup <vCenter FQDN>)
  • Validate traffic is routable from the vCenter to the ESXi host over ports 80, 443, 902, and 9080 using the following commands:
    curl -v telnet://<ESXi-HOST-IP>:<Port-Number>   &  curl -v telnet://<ESXi-HOST-FQDN>:<Port-Number>
  • Validate traffic is routable from the ESXi host to the vCenter over ports 902, 9084, 9087 using the following commands: 
    nc -z <VCENTER-IP> <Port-Number>   &    nc -z <VCENTER-FQDN> <Port-Number>



Resolution

  • Review the network configuration of the ESXi host, validate the DNS settings are correct, and validate the DNS is reachable by the host from the management network by using vmkping. 

See the following documentation for testing connectivity using vmkping - Testing VMkernel network connectivity with the vmkping command

  • In some cases, these ports may also need to be enabled within the ESXi host firewall configuration. See the following documentation for configuring the ESXi host firewall - Configuring the ESXi Firewall

Additional Information

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