Adding ESXi to vCenter inventory fails with "Unable to connect because the username or password is incorrect" after stuck at 80 percent
search cancel

Adding ESXi to vCenter inventory fails with "Unable to connect because the username or password is incorrect" after stuck at 80 percent

book

Article ID: 446407

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Unable to add/re-add ESX Host to vCenter inventory as the process fails at 80 percent
  • An error message is seen, stating:

    Error: Unable to connect because the username or password is incorrect

  • License updates may have been performed prior to this changing from evaluation.
  • /var/log/vmware/vpxd/vpxd.log in the vCenter Server contains messages simular to:
    ####-##-##T##:##:##.###Z warning vpxd[#####] [Originator@#### sub=TrustedInfrastructure.HostConfig opID=########-#####-auto-###-##:########-##] [CreateOrUpdate] Policy with local user name vpxuser already exists on host <ESX_IP>. Exception: N4Vpxd7Clients22AlreadyExistsExceptionE(Error:
    -->  com.vmware.vapi.std.errors.already_exists
    -->  No messages!
    -->  )
  • ESX Host has no Hostname/FQDN configured.
  • There is no hostname/FQDN to IP address translation configured in the /etc/hosts file in the vCenter Server Appliance operating system either. Contents will look similar to below:
    # Do not modify this file directly, please use esxcli.
    # Any line beginning with a pound sign is a comment and will not be read.
    127.0.0.1 localhost.localdomain localhost
    ::1            localhost.localdomain localhost

Environment

  • VMware vCenter Server 8.0.x
  • VMware vSphere ESXi 8.0.x

Cause

This issue occurs when there is no valid hostname configured for the ESXi host.

Resolution

To fix this issue, take the following steps:

Additional Information

Modifying host entry in /etc/hosts file for vCenter or ESXi host using vi editor