I have recently encountered a strange problem when an updated (ESX 4.1 -> ESXi 5.1) host would not connect to the vCenter. The host would be up and respond to ping but no connection to vCenter. A usual troubleshooting step pinging vCenter server from the host showed that the vCenter server’s name could not be resolved. Ping via IP worked fine. Checking hosts file showed that all entries were fine. Worse, the host was not able to resolve localhost either – hence problems wih starting services. So what has changed?
After the upgrade has been done, I added DNS servers to the host’s configuration. So let’s try to remove them. After I commented out the entries in resolve.conf file – bam! – everything started working again. I restarted the management services and the host connected to vCenter. But, well, I needed these DNS entries.
Finally I found out that the /etc/nsswitch.conf was completely empty. I am not sure if it was like that before. The simplest way to resolve the problem was to copy a correct file from another host, review it to make sure all settings were fine, replace it on a faulty host and reboot the server. After the reboot the server connected correctly to vCenter and all names resolution worked fine.