Today I bring you VMware ESX users a valuable tip that I have picked up in the few weeks I have worked at VMware Tech Support . By this time next week I will have reached the end of my probationary period and will be a regular full time employee. Even though I’m still greener than daffodil sprouts in the garden, I have handled a number of cases that were easily solved with this small configuration change to your ESX 3.x servers.

This is particularly useful to those using VMotion and/or VMware HA (high availability).

Login to your ESX hosts with your favorite secure shell program and look at your /etc/hosts file.

The file should look something like this:

# Do not remove the following line, or various
# programs that require network functionality
# will fail.
127.0.0.1 localhost.localdomain localhost
192.168.14.2 myesxserver.foo.org

See the last line with the fully qualified domain name (FQDN) of the ESX server beside the IP address of that server? What you want to do is append to that line the shortname of the host as well. What you end up with looks like this:

# Do not remove the following line, or various
# programs that require network functionality
# will fail.
127.0.0.1 localhost.localdomain localhost
192.168.14.2 myesxserver.foo.org myesxserver

The typical way to do this is to insert a tab, then the name you chose for your server, up to (but not including) the first dot. You want to add every ESX host machine that is in your cluster to each other’s hosts file. Not only does this make HA much more robust, it makes DNS lookups redundant, and that’s a good thing. Ask yourself, if my DNS has an outage for just 12 seconds, do I really want all of my HA nodes going into isolation mode?

That’s it! Save your changes and exit.

Why do we need to do this? I’m not sure why it helps with VMotion, but HA needs it. HA you see was not written by the same developers as ESX. HA was developed by Legato, which is owned by EMC, as is VMware. It’s a marriage made in heaven, but the devil’s in the details!

***Here’s a Bonus Tip!

You need to also do this:

http://kb.vmware.com/kb/1339

Make this simple change to your ESX hosts now and save yourself a call into support.