You can use vicfg-dns 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 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>
    If DNS is not set up for the target server, the command returns an error.
  2. To change the settings, use vicfg-dns with --dns, --domain, or --hostname.
    • Specify the DNS server by using the --dns option and a comma-separated list of hosts, in order of preference.
      vicfg-dns <conn_options --dns <dns1,dns2>
    • Configure the DNS host name for the server specified by --server or --vihost.
      vicfg-dns <conn_options> -n dns_host_name
    • Configure the DNS domain name for the server specified by --server or --vihost.
      vicfg-dns <conn_options> -d mydomain.biz
  3. To turn on DHCP, use the --dhcp option.
    vicfg-dns <conn_options> --dhcp yes