Reconnecting VMware ESXi hosts to vCenter

On April 22nd, 2011, posted in: Tech by

Recently I came across a situation where I had to remove an ESXi host from vCenter in order to temporarily free up some processor licenses.  Well today when I attempted to add that host back to the datacenter it was previously in I came across the error “Cannot install the vCenter agent service.  Unknown installer error.”

It seems there is a bug when doing this in ESXi version 4.0 and 4.0 Update 1 where the command to mount vpxa.vgz to ramdisk fails with an out of memory error.  This can be found in the log file /var/log/vmware/vpx-iupgrade.log after the ‘unknown installer error’ mentioned above.  My best guess is that either an attempt to uninstall the vpx agent when the host was originally removed failed or either it was never attempted in the first place.

There is a patch available that addresses this as referenced in kb article 1016262, but here’s how I got around having to down the host or virtual machines on this unpatched server.

Since this is ESXi and there is no service console CLI, hit Alt-F1 at the Direct Console UI and type the word “unsupported” (disclaimer that doing this is in fact unsupported by vmware unless done under their direction, so follow at your own risk).

Verify that the agent is in fact still installed by issuing the command:
cat `ls -t /var/log/vmware/vpx/vpxa*` | head -1
and you should get an output with the version of the vCenter agent that was installed.

Manually remove the agent using the command:
/opt/vmware/uninstallers/VMware-vpxa-uninstall.sh

And then remove the vpxuser:
userdel vpxuser

At this point you can type ‘exit’ and then press Alt-F2 at the console to return to the normal DCUI and return to vCenter to reconnect the host and the agent should be able to reinstall.  This procedure is outlined in kb article 1003714 that covers HA and the vpx agent for both ESX and ESXi.

No Responses to “Reconnecting VMware ESXi hosts to vCenter”

Leave a Reply

You must be logged in to post a comment.