VMWare ESXi ESXCLI Commands to Update Host DNS Servers

VMWare Logo

Last updated on March 30th, 2023 at 05:49 pm

Read Time:1 Minute, 40 Second

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.

Click to rate this post!
[Total: 0 Average: 0]

Free Subscription

If you want to be notified when we post more quality guides like this one, sign up to our free subscription service and you will receive an email when a new post is live.

Join 441 other subscribers.

No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.


Leave us a message...

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