Unable to save DNS server changes in vCenter TCP/IP stack configuration for ESXi hosts
search cancel

Unable to save DNS server changes in vCenter TCP/IP stack configuration for ESXi hosts

book

Article ID: 440626

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • When attempting to add Secondary/Alternate DNS server to the TCP/IP Stack Configuration for an ESXi host, the changes are not saved. After navigating to the host's Configure tab > TCP/IP Configuration, editing the default stack, and clicking "OK", vCenter rejects the modification and displays a red exclamation icon next to the DNS configuration.

  • When attempting the same configuration directly in the ESXi web UI (Networking > TCP/IP Stacks > Default TCP/IP stack > Edit settings), the following errors are displayed:

    Please provide valid search domains
    Please provide a valid domain name



  • An "Unspecified error" can be observed while attempting to add Secondary/Alternate DNS server.

Environment

  • ESXi 7.x
  • ESXi 8.x
  • vCenter 7.x
  • vCenter 8.x

Cause

This issue occurs because the Domain name and Search Domain fields are mandatory parameters for the TCP/IP stack. If these fields are left blank when updating the DNS settings, input validation fails and prevents the new configuration from saving.

Resolution

To resolve this issue, configure DNS settings for Default TCP/IP stack using one of the following methods:

Method 1: Using vSphere Client (UI)

  1. Log in to the vSphere Client as an administrator (e.g., [email protected]).
  2. Navigate to Hosts and Clusters and select the ESXi host.
  3. Go to the Configure tab.
  4. Under Networking, select TCP/IP configuration.
  5. Choose the appropriate TCP/IP stack (usually Default TCP/IP stack).
  6. Click Edit settings.
  7. Input valid values on all the following fields:
    • Hostname
    • Domain name
    • Primary DNS server
    • Secondary DNS server (optional)
    • Search domain
  8. Click OK. vCenter will now accept and save the configuration update.

Method 2: Using ESXi Shell or SSH

  1. Log in to the ESXi host via SSH or the ESXi Shell as the root user. To enable ESXi shell, refer: Using ESXi Shell in ESXi
  2. View the current DNS configuration:
    esxcli network ip dns server list

  3. Add a new DNS server IP:
    esxcli network ip dns server add -s <DNS_IP_Address>

  4. Remove an existing DNS server IP:
    esxcli network ip dns server remove -s <DNS_IP_Address>

  5. Restart the management services to apply the change:
    /etc/init.d/hostd restart && /etc/init.d/vpxa restart

Additional Information

For additional reference: How to change ESXi host DNS server IP