Renew DNS Servers in VMWare ESXi via ESXCLI Commands
About Issue
If you need to renew DNS servers on an ESXi host and are having trouble finding the DNS field in the ESXi portal, you can use ESXCLI commands to update the DNS servers.
Procedure
- Enable SSH Service first on ESXi
- Open a console or SSH session to the ESXi host.
|
|
- List Current DNS server IP Address Run the command
|
|
DNSServers: 10.1.1.253, 10.1.1.254
- Add new DNS server IP address
In this scenario, I use 1.1.1.1 and 1.0.0.1 as the new DNS server address.
|
|
- Remove the exsiting (old) DNS address
Refer to previous list the DNS address (10.1.1.253, 10.1.1.254)
|
|
- List Current DNS server IP Address after update.
|
|
DNSServers: 1.1.1.1, 1.0.0.1
- Finally diable SSH Service on ESXi
Conclusion
Using the ESXCLI commands to update DNS servers is particularly useful when the DNS field is not easily accessible in the ESXi portal, or when there are a large number of ESXi hosts to update.