VMware Cloud Community
GuGu1
Contributor
Contributor

Failed to add host to vCenter (A specified parameter was not correct: spec.hostName)

vCenter version : vCenter 7.0.3 19717403
ESXi version : ESXi 7.0.3 20965157
ansible version : ansible 2.10.17
python version : python 3.6.8

When registering a host in vCenter one by one, it fails while outputting the error message below.
Use vmware_host among the ansible modules

Failed to add host to vCenter '${vcenter_ip}' : ('A specified parameter was not correct: spec.hostName', None)

When I fail, I try to retry immediately and fail with the same error.

When using the vmware_host module, use the following value as the input parameter
hostname, username, password, datacenter_name, validate_certs, cluster_name, esxi_hostname, esxi_username, esxi_password, state
-> esxi_hostname is entered in the domain form, not ip

 

0 Kudos
1 Reply
BivasM
Enthusiast
Enthusiast

from vcenter shell can you resolve that hostname for that esxi? can you add that esxi manually from vcenter to test connectivity?

0 Kudos