VMWare ESXi editing the Hostfile
If you are as paranoid with redundancy as my team & I are, then entering the hostnames & IPs of all the server in a cluster into the VMware host file is a must. As your VMware HA is dependant on your servers being able to resolve the names of itself & other ESX server in the cluster, the DNS get to play a major role in HA. What if DNS fail? As many customers are using Microsoft DNS as their primary means of DNS, there is a chance it will fail a day or another. Would you like a way to ensure that your HA will work even if your DNS fail? then Adding these records to the host files of each of the ESXi server in the cluster will do the trick. What if you did not even have a DNS & still want to implement HA & other feature that depend on name resolution, then again adding the records to the host file is the solution.
The steps below show what to do after you login to the console of your VMware Server. If you are using ESX, then logging in to the service console is straight forward. If you are using ESXi, then please check out the other article in here on how to access the VMware ESXi Console: VMware ESXi – Console Access (Unsupported)
After logging into the VMware Console you will need to run the following command as shown in the image below to open the host file of you VMware:
vi /etc/hosts
Enter the host names & ip addresses in the host file as shown in the image below:
Save the file & exit from the service console. Repeat the above steps for the rest of the ESX/ESXi server in the same cluster.
I hope that help someone. If it helped you, please leave me a comment so I will know that I helped someone not just writing for myself. If you have something to add to this please comment it.





July 3rd, 2009 at 11:09 pm
thanks mate! This was very usefull
September 21st, 2009 at 10:22 pm
Thank you!!
Exactly the information I needed.
September 25th, 2009 at 2:03 pm
I am glad I was able to help, as it took me some time to figure it out as well
. You might want to follow my RSS or twitter to keep updated with my new posts
.