You can use vicfg-dns to modify the setup of a preconfigured DNS server.

Specify one of the options listed in Connection Options for vCLI Host Management Commands in place of <conn_options>.

Procedure

  1. Run vicfg-dns without command-specific options to display DNS properties for the specified server.
    vicfg-dns <conn_options>
    The information includes the host name, domain name, DHCP setting (true or false), and DNS servers on the ESXi host.
  2. If the DNS properties are set, and you want to change the DHCP settings, you must specify the virtual network adapter to use when overriding the system DNS.
    v_nic must be one of the VMkernel network adapters.
    You can override the existing DHCP setting by using the following command.
    vicfg-dns <conn_options> --dhcp yes --v_nic <vnic>