When adding a host and you receive " Cannot contact host " error, but you are able to connect to the Local ESXi Web console by IP and you are able to ping the ESXi host by IP.
But when you use FQDN it fails to connect to Local ESXi Web console and ping by FQDN responds back but it shows the incorrect ESXi host IP.
VMware ESXi 7.x
VMware ESXi 8.x
Pinging from another ESXi host
[root@test02:] nslookup ###.###.##.###
Server: ###.###.###.###
Address: ###.###.###.90:53
** server can't find 103.10.###.###.in-addr.arpa: NXDOMAIN
[root@test02:] nslookup test03.domain.local
Server: ###.###.###.####
Address: ###.###.###.90:53
Name: test03.domain.local
Address: ###.###.5.103
[root@test02:] ping ###.###.10.103PING ###.###.10.103 (###.###.10.103) 56(84) bytes of data.64 bytes from ###.###.10.103: icmp_seq=1 ttl=64 time=0.017 ms64 bytes from ###.###.10.103: icmp_seq=2 ttl=64 time=0.038 ms64 bytes from ###.###.10.103: icmp_seq=3 ttl=64 time=0.028 ms64 bytes from ###.###.10.103: icmp_seq=4 ttl=64 time=0.032 ms64 bytes from ###.###.10.103: icmp_seq=5 ttl=64 time=0.035 ms
Pinging from local Windows client
C:\>ping -a ###.###.10.103Pinging ###.###.10.103 with 32 bytes of data:Reply from ###.###.10.103: bytes=32 time<1ms TTL=64Reply from ###.###.10.103: bytes=32 time<1ms TTL=64Reply from ###.###.10.103: bytes=32 time<1ms TTL=64Reply from ###.###.10.103: bytes=32 time<1ms TTL=64
Ping statistics for ###.###.10.103: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\>nslookup test03.domain.localServer: localhostAddress: ::1
Name: test03.domain.localAddress: ###.###.5.103
C:\>nslookup ###.###.10.103Server: localhostAddress: ::1
*** localhost can't find ###.###.10.103: Non-existent domain
Port(s) 902 or port 443 may be blocked by the firewall.
To resolve the issue you need to verify that your DNS record has the correct IP address to respond for the FQDN of the host.
Access your DNS Server (e.g. Windows DNS Manager).
Locate the Forward Lookup Zone and Reverse Lookup Zone for your management network.
Open Forward Lookup Zone and search for the ESXi host's Name.
Confirm the IP associated with ESXi host FQDN entry, if its incorrect update the DNS record to reflect the correct IP and make sure you select Checkbox for " Create associated pointer (PTR) record. This will update your Reverse DNS entry
Ensure only One DNS record for the ESXi host exist there, as well as one reverse DNS entry for the ESXi host.
Allow changes to replicate to other DNS servers in your environment and then try to run an nslookup with the current ESXi IP and nslookup with ESXi FQDN to validate that it returns with a the correct information.
Try to Add the ESXI host to the vCenter and it should allow you to continue on past the " Cannot contact host "
If the above steps do not resolve the issue, involve the customers firewall team to fix the connectivity issues between the vCenter and the ESXi host when using the FQDN.