Hi guys,
when vSphere environment (or ESX 3.5) is setup to completely use DNS resolution is there any "good practice" to fill in /etc/hosts file with all other ESX hosts (as well as VC server)? Or only DNS is enough to proceed? How does it look like in connection to best practicies?
correct...
Here's an example of our hosts file on all the ESX Servers.
127.0.0.1 localhost.localdomain localhost
10.x.x.x esxname.domain.com esxshortname
10.x.x.x 1.domain.com
10.x.x.x 2.domain.com
10.x.x.x 3.domain.com
10.x.x.x 4.domain.com
10.x.x.x 5.domain.com
ignore the formatting, but there are tabs in between each IP
IMHO I prefer to not depend of external service.
So in small environment (2-4 ESX node) I set also a static resolution in hosts.
Andre
**if you found this or any other answer useful please consider allocating points for helpful or correct answers
We have DNS records setup for all of our ESX Hosts, as well as all of our VMotion Ports (VMKernel). Also, the /etc/hosts file on each host has the ESX Host name (local host) with IP, shortnane and FQDN, as well as our DNS servers.
In my opinion /etc/hosts attracts way too much errors. Every time you add an additional host or change a name/IP you have to modify each ESX-Server (and if you use the hosts file there you also have to use it on your vCenter-Server to be consistent). So in these cases you have to modify 1 vC-Server and x ESX-Servers. This normally leads to copy&paste errors. I think it's best to use DNS-Servers and when adding an ESX-Host to your vC you see if DNS works or not (because as Best Practices tell you, you only use the FQDN for adding ;).
I only use the /etc/hosts file when there are no (configurable) DNS-Servers available.
--
There are 10 types of people. Those who understand binary and the rest. And those who understand gray-code.
Troy,
So I understood, that You don't use /etc/hosts file to "ensure" full name resolution takes place in case DNS is down? Only entries You have in /ect/hosts is entry with its host and DNS, no other host is entered there, right?
correct...
Here's an example of our hosts file on all the ESX Servers.
127.0.0.1 localhost.localdomain localhost
10.x.x.x esxname.domain.com esxshortname
10.x.x.x 1.domain.com
10.x.x.x 2.domain.com
10.x.x.x 3.domain.com
10.x.x.x 4.domain.com
10.x.x.x 5.domain.com
ignore the formatting, but there are tabs in between each IP
ok, so I misunderstood You, because You paste hosts file with all ESX's in the cluster, and I thought You rely only on DNS resolution. But now it is clear for me. I will probably do the same, so both DNS and hosts file.
To avoid sporatic networking issues between cluster members (and the VC), we put populate the host files of that particular cluster. For good measure we also put in the VC address. There are two schools of thought here however (isn't that the truth everywhere?). Manual processes seem to get forgotten and prone to human error. So, if you feel your network is unreliable at times, by all means do not trust DNS and do it locally.