Portal Home > Knowledgebase > VMware Knowledge Base > Connecting to ESX hosts from VirtualCenter after an upgrade fails with the error: Failed to install the VirtualCenter agent service

Connecting to ESX hosts from VirtualCenter after an upgrade fails with the error: Failed to install the VirtualCenter agent service

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:
  1. Disable VMware High Availability (HA).
  2. 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).
  3. 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).
     
  4. Reconnect the ESX host to VirtualCenter.
  5. 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.
  6. At the service console, run the command:

    rpm -qa | grep vpxa
     
  7. 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.
     
  8. Reconnect the ESX host in VMware Infrastructure (VI) Client, and re-enable VMware HA.

To resolve this issue in ESXi:

  1. Disable VMware HA. 
  2. 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).
     
  3. Reconnect the ESXi host to VirtualCenter.
  4. 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).
  5. Run the following command to remove the VirtualCenter Agent:

    /opt/vmware/uninstallers/VMware-vpxa-uninstall.sh
     
  6. 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)
    .
     
     
  7. Reconnect the ESXi host in VI Client, and re-enable VMware HA.

    Based on VMware KB 4223326

Also Read

Language: