Set Up a DNS Server
with ESXCLILast Updated December 16, 2024
You can use ESXCLI
to set up a DNS server.
The following example
illustrates setting up a DNS server. Specify one of the options listed in
Connection Options for ESXCLI Host Management Commands
in place of
<conn_options>
.
- Print a list of DNS servers configured on the system in the order in which they will be used.If DNS is not set up for the target server, the command returns an empty string.
- Add a server by runningesxcli network ip dns server addand specifying the server IPv4 or IPv6 address.
- Change the DNS settings.
- Specify the DNS server by using the--dnsoption and the DNS host. Run the command multiple times to specify multiple DNS hosts.
- Configure the DNS host name for the server specified by--serveror--vihost.
- Configure the DNS domain name for the server specified by--serveror--vihost.
- To turn on DHCP, enable DHCP and set the VMkernel NIC.
- Turn on DHCP for IPv4.
- Turn on DHCP for IPv6.