vSphere HA configuration fails for a host. The vCenter Server reports a failure in applying HA VIBs to the host.
Reconfigure HA task fails with: "Cannot complete the configuration of the vSphere HA agent on the host."
Lifecycle logs (/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 ESXi 7.x
VMware 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: esxcli network ip dns server add -s <DNS_IP_ADDRESS>
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.