Clear DNS Cache on vCenter Server
search cancel

Clear DNS Cache on vCenter Server

book

Article ID: 397197

calendar_today

Updated On:

Products

VMware vCenter Server VMware vCenter Server 8.0

Issue/Introduction

After making changes to the DNS server, vCenter may fail to resolve IP addresses or Fully Qualified Domain Names (FQDNs) correctly. The server may still reference outdated DNS information, leading to incorrect IP resolutions, even if a DNS lookup (using nslookup) shows the correct result.

Symptoms:

  • nslookup to the DNS server returns the correct result.

  • Pinging an FQDN returns an outdated or incorrect IP address.

Cause

The old DNS information is cached within vCenter, preventing it from reflecting recent DNS changes.

Resolution

To clear the DNS cache and refresh the DNS resolution, follow these steps:

  1. Enable SSH on vCenter
    First, ensure SSH is enabled on your vCenter Server. For instructions, refer to the official VMware documentation:
    Enable or Disable SSH and Bash Shell Access on vCenter Server

  2. SSH into vCenter
    Connect to your vCenter server using SSH. You can use a terminal or an SSH client like PuTTY.

  3. Clear the DNS Cache
    Run the following commands to restart the DNS-related services:

    systemctl restart dnsmasq
    systemctl restart systemd-resolved
  4. Verify DNS Resolution
    After restarting the services, verify that vCenter can now resolve the correct IP or FQDN.