Duplicate DNS Services in vCenter Server after upgrade to 9.0.2
search cancel

Duplicate DNS Services in vCenter Server after upgrade to 9.0.2

book

Article ID: 438766

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • After upgrading the vCenter Server from 8.x to 9.0.2, there are duplicate entries of the DNS servers.

  • Updating the DNS entries via the vCenter Server Appliance Management Interface (VAMI) to reflect a single primary and secondary DNS server does not remove the duplicates.

  • Viewing the /etc/resolv.conf file reveals the following warning message: # Too many DNS servers configured

    root@vcenter [ ~ ]# cat /etc/resolv.conf

    #...
    #...

    nameserver 127.0.0.1
    nameserver dns_server1
    nameserver dns_server2
    # Too many DNS servers configured, the following entries may be ignored.
    nameserver dns_server1
    nameserver dns_server2
    search .

Environment

VMware vCenter Server 9.0.2

Cause

The systemd-resolved service caches and retains stale duplicate DNS nameserver entries. This causes the dynamically generated /run/systemd/resolve/resolv.conf file (which is symlinked to /etc/resolv.conf) to temporarily exceed the standard limit of nameservers.

Resolution

Reboot the vCenter server - this enforces DNS to flush the cached entries and force it to re-read the current network configuration.

Workaround :

  1. SSH session to the affected vCenter Server as root.

  2. Verify the presence of duplicate entries and the warning message in the active resolver configuration file:

    cat /etc/resolv.conf 
    cat /run/systemd/resolve/resolv.conf
  3. Restart the systemd-resolved service: 

    systemctl restart systemd-resolved.service

  4. Verify that the duplicate entries and the truncation warning have been successfully cleared from the configuration file:
    cat /etc/resolv.conf
  5. Log in to the vCenter VAMI (https://<vcenter-fqdn>:5480) and navigate to Networking to confirm the duplicate entries have been cleared.