Removing Advanced vCenter Server Settings

The other day I was working on a vCenter and had to evacuate the vCLS virtual machines from a failed cluster I was working on. If you are unfamiliar with this, here is the kb that explains how to do it. The short version is that you navigate to the cluster, capture the cluster id from the URL bar, and then add an advanced setting. After about a minute or less, the vCLS virtual machines should power off and be deleted.

Here is the message I received when I went to start adding an advanced setting and thought nothing of it…until I had to.

Turns out, I was tired and rushing and accidentally populated this particular entry incorrectly. I realized after a few minutes when the vCLS virtual machines were not evacuating. I ended up just adding an additional entry with the correct information and it worked as expected in about a minute or so.

But what to do with that incorrect entry? I did try to remove it with PowerCLI, but that also did not work. I turned to Google and found an article on www.yellow-bricks.com that documented this.

Turns out it is extremely simple to do, but the format was not what I expected. I am going to add an entry to showcase this.

After saving this entry, I can see that it is in the list of entries.

Now to remove the entry.

  1. Make an SSH connection the the vCenter server.

2. We want to launch BASH, so type shell.

3. Type vi /etc/vmware-vpx/vpxd.cfg to open the file.

In my case, my entry is the first one in the list. But suppose that’s not the case, we will start a search with the forward slash (/).

In the vCenter GUI, I specified config.aaron.test.2. This resulted in an XML-like file as seen above. The advanced setting turned into:
<aaron>
<test>
<2>true</2>
</test>
</aaron>

In vi, use the keyboard arrows to go to the beginning of the line to remove and press dd. Do this for each line to remove. When ready to save the file, press esc (a colon (:) will display), press w (to write), and q (to quit).

The only thing left to do is to restart the vmware-vpxd service so it re-reads the configuration file, this time, without the incorrect Advanced Setting. Note, at least on my Mac, when I ran this, the terminal was blank for longer than it seemed necessary. Eventually, the terminal returned to a prompt.

service-control --restart vmware-vpxd

Once back in vCenter, either navigate away and return to the Advanced Settings or just refresh the page. This time, though, the incorrect Advanced Setting is gone!


Leave a Reply

Your email address will not be published. Required fields are marked *