In this blog post, I will be discussing a recent customer support ticket I received regarding an issue with connecting a host to vCenter. The customer was experiencing an error message stating “License not available to perform the operation”, which prevented them from connecting the host to the vCenter.
After investigating, I discovered that the customer had two vCenter servers, both of which were in ELM mode, and the issue had started after a recent host patch.
To resolve the issue, I followed these steps:
- First, I checked the license to ensure that the customer had a valid license, and it was confirmed that they did.
- Next, I looked for any stale licenses attached to the vCenter and tried to remove them using the below command.
ldapsearch -H ldap://localhost -x -D "cn=administrator,cn=users,dc=vsphere,dc=local" -W -b "cn=LicenseService,cn=Services,dc=vsphere,dc=local" -s sub -LLL -o ldif-wrap=no >/tmp/LicenseService_export.ldif ldapdelete -H ldap://localhost -x -D "cn=administrator,cn=users,dc=vsphere,dc=local" -W 'cn=LicenseEntity_xxxxx,cn=LicenseService,cn=Services,dc=vsphere,dc=local'
- Despite removing any stale licenses, the same issue persisted.
- We also discovered that the replication was in a broken state. To check the status of the replication, we ran the below commands in both vCenters.
/usr/lib/vmware-vmdir/bin/vdcrepadmin -f showservers -h localhost -u administrator /usr/lib/vmware-vmdir/bin/vdcrepadmin -f showpartnerstatus -h localhost -u administrator /usr/lib/vmware-vmafd/bin/dir-cli state get
- You can also check the replication status by logging into vCenter, navigating to administration, and selecting system configuration or you can also use the below command to check the replication status.
- After fixing the replication between both vCenters, we were able to successfully connect the host to vCenter.
If you’re experiencing the same issue, I recommend following these steps. If you encounter any difficulties, please feel free to comment, and I will do my best to assist you. Additionally, if you require further help, you can connect with me on Twitter.
Thank you for reading!