Details
- After applying a patch to or upgrading VirtualCenter, you cannot connect to your ESX hosts from VirtualCenter.
- You see the error:
Failed to install the VirtualCenter agent service
Solution
This issue may occur if the VirtualCenter agent service was installed, but did not start properly, or if the VirtualCenter agent service was not installed (as the error states).
To resolve this issue in ESX:
- Disable VMware High Availability (HA).
- Log into the ESX service console as root user. For more information, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807).
- Restart the management agents. For more information, see Restarting the Management agents on an ESX or ESXi Server (1003490).
Caution: Ensure Automatic Startup/Shutdown of virtual machines is disabled before running this command or you risk rebooting the virtual machines. For more information, see Restarting hostd (mgmt-vmware) on ESX Server Hosts Restarts Hosted Virtual Machines Where Virtual Machine Startup/Shutdown is Enabled (1003312).
- Reconnect the ESX host to VirtualCenter.
- Attempt to re-enable VMware HA within VirtualCenter. If this does not work, this means that vpxa did not install properly. Log into the ESX service console as root user.
- At the service console, run the command:
rpm -qa | grep vpxa
- At the service console, run the rpm -e command on the rpm file that displayed in the previous step:
rpm -e
Note: This uninstalls the agent from the ESX host. Reconnecting the host to VirtualCenter re-installs the agent.
- Reconnect the ESX host in VMware Infrastructure (VI) Client, and re-enable VMware HA.
To resolve this issue in ESXi:
- Disable VMware HA.
- Restart the management agents. For more information, see Restarting the Management agents on an ESX or ESXi Server (1003490).
Caution: Ensure Automatic Startup/Shutdown of virtual machines is disabled before running this command or you risk rebooting the virtual machines. For more information, see Restarting hostd (mgmt-vmware) on ESX Server Hosts Restarts Hosted Virtual Machines Where Virtual Machine Startup/Shutdown is Enabled (1003312).
- Reconnect the ESXi host to VirtualCenter.
- Attempt to re-enable VMware HA within VirtualCenter. If this does not work, this means that vpxa did not install properly. Log in as root to the ESXi troubleshooting mode. For more information, see Tech Support Mode for Emergency Support (1003677).
- Run the following command to remove the VirtualCenter Agent:
/opt/vmware/uninstallers/VMware-vpxa-uninstall.sh
- Restart the hostd service:
The preferred method for restarting hostd service is done using the DCUI, for further details please referenceRestarting the Management agents on an ESX or ESXi Server (1003490)
Note: In instances where remote console is not possible then the individual hostd service can be restarted using the following command.
./etc/init.d/hostd restart
Caution: Ensure Automatic Startup/Shutdown of virtual machines is disabled before running this command or you risk rebooting the virtual machines. For more information, see Restarting hostd (mgmt-vmware) on ESX Server Hosts Restarts Hosted Virtual Machines Where Virtual Machine Startup/Shutdown is Enabled (1003312).
- Reconnect the ESXi host in VI Client, and re-enable VMware HA.Based on VMware KB 4223326