How to edit/add the DNS Servers in VMware ESX server?


While ago I blogged about How to mount a Windows Share in VMware ESX server?. I realized Windows (shared) server should be pingable via the hostname, so you don’t have to type IP address every time. Here the easy way to add your Windows server into local Hosts (/etc/resolv.conf) file in your ESX server.

1. Log on as root privileges in ESX server console or via remote shell. (you may have to log on as casual user and get into "su" shell).

2. Open /etc/resolv.conf file in "vi" editor

#vi /etc/resolv.conf

3. Type your domain name and corresponding DNS servers. You have to me in "edit" mode in vi. Press "i" to go into edit mode.

search yourcompany.com
nameserver    10.20.30.40
nameserver    10.20.30.41

Syntax format for the above configuration lines are,

search <Domain Name>
nameserver <IP address of your DNS server for the above domain>

4. Save it by pressing ESC to get out of "edit" mode and ":wq!" for save and quit vi.

Now you can test any host name using nslookup or directly try pinging the hostname.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s