VMWare ESXi ESXCLI Commands to Update Host DNS Servers

VMWare Logo
VMWare Logo

Estimated reading time: 2 minutes

Problem

You have a requirement to change the DNS server IP addresses on a VMWare ESXi host. However, because Adobe Flash Player is no longer available and the option is not in the newer HTML5 version, you have to make the changes using an SSH connection to your VMWare host.

Resolution

Connect to your VMWare host using PuTTy and login using the root account.

Adding a DNS Server IP Address

To add DNS servers to your connected host, run the following command:

esxcli network ip dns server add --server=8.8.8.8

Where:

  • 8.8.8.8 is your primary DNS server.

Run the same command again with a different DNS server IP address to add multiple DNS servers.

Removing a DNS Server IP Address

To remove a DNS server IP address from your VMWare ESXi host, run the following command:

esxcli network ip dns server remove --server=1.1.1.1

Where:

  • 1.1.1.1 is the DNS server IP you want to remove from your host.

Run the same command again with a different DNS server IP address to remove multiple DNS servers.

List DNS Server IP Addresses

To list the DNS server IP addresses that are now set on your VMWare ESXi host, run the following command whilst connected to your host in PuTTy:

esxcli network ip dns server list

Conclusion

This should now allow you to add and remove DNS server IP addresses from your VMWare ESXi host. However, this really should be an option in the new HTML5 version as Flash has now reached end of life.

FAQ’s

If you are messing around with CLI commands on an ESXi host, then you really should know the below, however, these are genuine things that I have been asked in the past in the real world.

What does DNS stand for?

DNS stands for Domain Name System.

What does IP stand for?

IP stands for Internet Protocol.

What does ESXi stand for?

ESXi stands for ESX integrated.

Share this content:

Click to rate this post!
[Total: 0 Average: 0]
Avatar for Andrew Armstrong

About Andrew Armstrong

Founder of TechyGeeksHome and Head Editor for over 15 years! IT expert in multiple areas for over 26 years. Sharing experience and knowledge whenever possible! Making IT Happen.

View all posts by Andrew Armstrong

Leave a Reply

Your email address will not be published. Required fields are marked *