Clearing the DNS cache in VMware ESXi 5.5 and later hosts
search cancel

Clearing the DNS cache in VMware ESXi 5.5 and later hosts

book

Article ID: 338032

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
When you change the A record on your DNS server, you experience these symptoms:
  • An ESXi 5.5 and later host continues to resolve the name associated with the changed A record to its old address.
  • Investigation confirms the host in question is using the old address and the DNS server is resolving the name to its new address.


Environment

VMware vSphere ESXi 6.0
VMware vSphere ESXi 5.5

Cause

This issue occurs when the ESXi host does not sync the change for a period of time after an IP address modification is done on the DNS server.

To reduce the number of DNS resolution requests having to traverse the network, the ESXi host DNS client maintains a DNS cache. If the ESXi host has already cached a resolved name and that IP address is changed on the DNS server, ESXi does not get notified of this change and the IP address is incorrect for a period of time.

Clearing the DNS cache forces the ESXi host to query the DNS server the next time this name is accessed. The ESXi host then adds a cache entry with the correct IP Address.

Resolution

To resolve this issue, clear the DNS cache on the ESXi 5.5 or later host.

To clear the DNS cache on the ESXi host, restart the nscd name server cache daemon:

  1. Log in to ESXi using SSH or ESXi shell (formerly known as Tech Support Mode). For more information, see Using ESXi Shell in ESXi.

  2. From the command line, restart the nscd service by running this command:

    # /etc/init.d/nscd restart



Additional Information