Clear DNS cache VCSA/PhotonOS

The last few weeks I’ve had to do a couple of IP changes on ESXi hosts. This always goes without a lot of issues but it can be annoying when you have to wait for the new IP address to be updated in DNS and then for it to be visible in vCenter. The quickest way to get the new DNS records, is to clear the DNS cache in VCSA. Since VCSA is based on PhotonOS, this will also work on other PhotonOS VMs.

PhotonOS uses dnsmasq as a local DNS cache/proxy. So all we have to do is restart that service to clear the cache.

First, open up an SSH session to VCSA and enter the bash shell.

Run the following systemctl command to restart the service.

systemctl restart dnsmasq.service

Now, we just have to check that the service is up and running again. We can use systemctl for that as well.

systemctl status dnsmasq.service

If all is well you should see the output like it’s shown above. Run a quick ping to check that the DNS record is resolving to the correct IP and you’re done!

This was a quick post but I kept having to google it. Hope this helps !

vCenter update fails: vCenter server is non-operational

Today, while I was updating vCenter in my lab, I ran into a strange issue. The update I was installing failed, when I wanted to try again, this ominous error message popped up.

vCenter being non-operational left me a bit of a doom and gloom feeling but, thankfully, the fix is rather easy.

Fixing the issue

Open up an SSH session to your vCenter server and run the command below to remove the software_update_state.conf file.

rm /etc/applmgmt/appliance/software_update_state.conf

You can check the contents of the file by opening it with vi, an example is shown below.


Turns out that the state “INSTALL_FAILED” is checked by the python script that performs the installation. The script can be found in /usr/lib/applmgmt/update/py/vmware/appliance/update/

Removing the file will make this check pass and the installation will continue.