Receiving error " Cannot contact host " when trying to add a host in vCenter , reference screenshot below
VMware ESXi Server
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.
Pinging from another ESXi host
When you attempt to run an nslookup against the current ESXi host IP and it fails
[root@test02:] nslookup xxx.xxx.10.103
Server: xxx.xxx.xxx.90
Address: xxx.xxx.xxx.90:53
** server can't find 103.10.xxx.xxx.in-addr.arpa: NXDOMAIN
When you attempt to run an nslookup with current ESXi FQDN but it returns a different IP from DNS record
[root@test02:] nslookup test03.domain.local
Server: xxx.xxx.xxx.90
Address: xxx.xxx.xxx.90:53
Name: test03.domain.local
Address: xxx.xxx.5.103
When you ping the ESXi host by current IP and its successful
[root@test02:] ping xxx.xxx.10.103
PING xxx.xxx.10.103 (xxx.xxx.10.103) 56(84) bytes of data.
64 bytes from xxx.xxx.10.103: icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from xxx.xxx.10.103: icmp_seq=2 ttl=64 time=0.038 ms
64 bytes from xxx.xxx.10.103: icmp_seq=3 ttl=64 time=0.028 ms
64 bytes from xxx.xxx.10.103: icmp_seq=4 ttl=64 time=0.032 ms
64 bytes from xxx.xxx.10.103: icmp_seq=5 ttl=64 time=0.035 ms
Pinging from local Windows client
When you ping the current ESXi host by IP and its successful
C:\>ping -a xxx.xxx.10.103
Pinging xxx.xxx.10.103 with 32 bytes of data:
Reply from xxx.xxx.10.103: bytes=32 time<1ms TTL=64
Reply from xxx.xxx.10.103: bytes=32 time<1ms TTL=64
Reply from xxx.xxx.10.103: bytes=32 time<1ms TTL=64
Reply from xxx.xxx.10.103: bytes=32 time<1ms TTL=64
Ping statistics for xxx.xxx.10.103:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
When you attempt to run a nslookup with current ESXi FQDN but it returns a different IP from DNS record
C:\>nslookup test03.domain.local
Server: localhost
Address: ::1
Name: test03.domain.local
Address: xxx.xxx.5.103
When you attempt to run an nslookup against the current ESXi host IP and it fails
C:\>nslookup xxx.xxx.10.103
Server: localhost
Address: ::1
*** localhost can't find xxx.xxx.10.103: Non-existent domain
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.