VMWare ESXi ESXCLI Commands to Update Host DNS Servers

VMWare Logo
()

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.

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Feedback is critical to our site so please, if this has helped you out, give the article a star rating above, it only takes one click! Thank You!

About A.J. Armstrong

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

View all posts by A.J. Armstrong

Leave us a message...

This site uses Akismet to reduce spam. Learn how your comment data is processed.