"Cannot complete the configuration of the vSphere HA agent on the host."
or
Unconfiguring vSphere HA "An error occurred while communicating with the remote host."
/var/log/lifecycle.log) on the host show"Name or service not known": YYYY-MM-DDTHH:MM:SS.##Z lifecycle: ######: imagemanagerct1:157 ERROR vmware.esximage.Errors.MetadataDownloadError:('https://<VC_FQDN>: 9087/vum/repository/hostupdate/<VIB_NAME>. xml','', "Could not download from depot at https://<VC_FQDN>: 9087/vum/repository/hostupdate/<VIB_NAME>. xml, skipping (('https://<VC_FQDN>: 9087/vum/repository/hostupdate/<VIB_NAME>. xml', '', '<urlopen error [Errno -2] Name or service not known>'))")
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
The ESXi host lacks valid DNS server configuration, preventing it from resolving the Fully Qualified Domain Name (FQDN) of the vCenter Server to download required HA VIB components.
Verify the host is able to ping the VC FQDN/IP and if nslookup is working both ways:
Follow the below steps to add DNS server to the ESXi is missing:
Log in to the affected ESXi host via SSH as root.
Verify the current DNS configuration: esxcli network ip dns server list
Add a valid DNS server using the below command
esxcli network ip dns server add -s <DNS_IP_ADDRESS>
Alternatively use the Direct Console method to update the DNS referred in Configuring VMware ESXi Management Network from the direct console
NOTE: If IPv6 is enabled and configured with option 'Obtain IPv6 address automatically through DHCP' the above command will fail, switch to 'Obtain IPv6 address automatically through Router Advertisement' or unselect all the options from the VMK0 edit settings.
Verify the host can now resolve the vCenter FQDN: ping <vCenter_FQDN>
In the vSphere Client, right-click the affected host and select Reconfigure for vSphere HA.