Over the past few months, I’ve been involved with a pretty hefty network redesign project.  For the most part the VMware environment has been excluded from this, however recently we have undergone a process in which we need to re-IP our management vmkernel ports.

Now technically wise this is easy, right?  Change the IP on the hosts, update the record within DNS and we are good to go – Our host is now resolving to our new IP – everywhere but on the VCSA.

So I’m not sure how long the VCSA takes in order to refresh its DNS, but I’m a pretty impatient guy and waiting for DNS to propagate around can sometimes drive me a little mental…

So, yeah, to get to the point (you know, like the title says) how do we go about manually clearing out the DNS cache within the VCSA?

  1. SSH into the VCSA
  2. Enter “shell” at the shell prompt to enter bash
  3. Run the following command to restart the DNS service, essentially clearing the cache.

systemctl restart systemd-resolved.service

Once done you can simply run a quick ‘nslookup’ or ‘ping’ in order to confirm that the VCSA is resolving to the new IP and voila!  Done!

So yeah, if you are an impatient guy like myself or have the need to manually clear the DNS cache on the VCSA you now know how!  Thanks for reading!