Adding a host in vCenter Server fails with the error: Failed to configure the VIM account on the host
search cancel

Adding a host in vCenter Server fails with the error: Failed to configure the VIM account on the host

book

Article ID: 309690

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • Adding a host in vCenter Server fails
  • When attempting to add a host server in vCenter Server, you see one or more of these errors:

    • Failed to configure the VIM account on the host
    • Failed to login with the VIM administrator password
  • In the tasks screen of the ESX/ESXi host, you may see this error:

The specified key, name or identifer already exists.



Environment

VMware vCenter Server 4.1.x
VMware ESX 4.0.x
VMware ESX 4.1.x
VMware vCenter Server 4.0.x

Resolution

There are several issues that can cause this problem. To resolve this issue:
  • Verify name resolution (DNS)
  • Verify the hardware clock time
  • Reinstall the vCenter Server agents on the host

Verify naming resolution (DNS)

To verify that the DNS information in /etc/resolv.conf is correct for your environment, run the command:

Verify that the host is connected to a valid NTP server with the command:

ntpq -p <ntpserver>

You can also review the NTP logs for errors:

cat /var/log/syslog.log

Note: If the CMOS clock is incorrect, you need to go into the BIOS of the host server to reset the CMOS clock to the correct time for your region.


Reinstall the vCenter Server agents on the host

To reinstall the vCenter Server agents:

  1. Remove the host from vCenter Server.
  2. Uninstall the vpxa and aam agents from the host.
    • Run this command to remove the vpxa agent from an ESX host:

      rpm -qa | grep vpx
      rpm -e output_from_previous_command

    • Run this command to remove the aam agent from an ESX host:

      rpm -qa | grep aam

      Note: The output of this command has two entries.

      rpm -e output_from_previous_command

    • Run this command to remove the vpxa agent on an ESXi host:

      cd /opt/vmware/uninstallers/VMware-vpxa-uninstall.sh

    • Run this command to remove the aam agent on an ESXi host:

      cd /opt/vmware/uninstallers/VMware-aam-ha-uninstall.sh

  1. Run this command to remove the vpxuser:

    userdel vpxuser

    Note
    : Verify that the /etc/pam.d/system-auth file is not modified.

  2. Restart the management agents on the host with the commands:

    service vmware-vpxa restart
    service mgmt-vmware restart

  3. Re-add the host to vCenter Server.


Additional Information

在 vCenter Server 中添加主机失败,并显示错误:Failed to configure the VIM account on the host