vCenter Server Shows an alert for an expired License for Evaluation Mode when it has been assigned to a Different License
search cancel

vCenter Server Shows an alert for an expired License for Evaluation Mode when it has been assigned to a Different License

book

Article ID: 385470

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

vCenter Server is showing an alert for an expired license
Under Administration > Licensing > Assets: There are two vCenter Assets for the same vCenter FQDN. One asset is assigned the Evaluation License, the other has an assigned license from the Broadcom Portal.
Hosts may show disconnected and fail to re-connect with a vCenter licensing expired error.
You cannot manage the vCenter license assignment from the License Manager.

Environment

VMware vCenter Server 8.0.x

Cause

vCenter Server did not unassign itself from the Evaluation License when the other License was applied.

Resolution

First try the steps in this KB to clear the licenses from the vCenter object:

Removing License in vCenter if you are not able to remove from License Manager or JXplorer

If that fails then please follow the steps below.

Fix licenses assigned to the vCenter

  1. Take a powered off snapshot of the vCenter Server. If in ELM please power off all vCenter nodes and then snapshot them. See: VMware vCenter in Enhanced Linked Mode pre-changes snapshot (online or offline) best practice
  2. Record the currently assigned vCenter license key.
  3. Record vCenter Server ID
    1. Open SSH connection to vCenter as root
    2. cat "/etc/vmware-vpx/instance.cfg"
      Note down the instance UUID "instanceUuid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
  4. Obtain current vCenter Node LDU ID with command:
    1. /usr/lib/vmware-vmafd/bin/vmafd-cli get-ldu --server-name localhost
      yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
  5. Remove license associated with current LDU ID by command:
    1. /opt/likewise/bin/ldapdelete -H ldap://localhost -D "cn=administrator,cn=users,dc=vsphere,dc=local" -W "cn=AssetEntity_<XXXXX>-<yyyyyyyy>,cn=LicenseService,cn=Services,dc=vsphere,dc=local"
    2. Note:
      Adjust dc=vsphere,dc=local to reflect the environment's SSO domain
      Replace XXXXXXXX with the vCenter service ID from step 1 in capital letters
      Replace yyyyyyyy with the LDU ID from above Step 4.
  6. If the above step (e) fails to remove the license with an error similar to: ldap_delete: No such object (32) additional info: (9703)((MDB_NOTFOUND: No matching key/data pair found
    1. Then confirm if the command is typed out correctly, and that the domain matches what is configured for vCenter SSO.
  7. Reboot vCenter and re-assign the license.

Remove all licenses assigned to the vCenter

  1. If the vCenter asset is showing multiple still times then run a full removal for all the License AssetEntity_ID's in the vCenters LDAP:
    1. /opt/likewise/bin/ldapsearch -b "dc=vsphere,dc=local" -s sub -D "cn=Administrator,cn=Users,dc=vsphere,dc=local" -W > $(hostname)_"date +"%m-%d-%Y"".ldif
    2. Cat hostname_m-d-Y.ldif
    3. Find the AssetEntity_ID that matches the Service ID (From step 1b above) for vCenter server and is under the License Service. Search for the "vmwLicSvcAssetName" that has vCenters FQDN that listed. Near it will be all the other licenses under vCenter in the LDIF output.
      There should be 2-3 that are associated with the vCenter Server License. One for the Evaluation License, one for the vCenter Server asset that gets assigned the licene, and one for the License you are trying to use.
    4. Notate down the 2-3 AssetEntity_ID's for the Eval License, vCenter License, and vCenter asset.
    5. Run a ldapdelete for all 3 assets:
        1. /opt/likewise/bin/ldapdelete -H ldap://localhost -D "cn=administrator,cn=users,dc=vsphere,dc=local" -W "cn=AssetEntity_<ZZZZZZZZ-ZZZZ-ZZZZ-ZZZZ-ZZZZZZZZZZZZ>,cn=LicenseService,cn=Services,dc=vsphere,dc=local"
    6. Reboot vCenter and re-assign the license.

Additional Information

Using the vCenter LDU ID and Server ID you can try to remove the vCenter license using KB - vCenter 6.x/7.x/8.x incorrectly displays the amount of licenses in use by ESXi hosts. Just find the ID's from the steps above and look for the License AssetEntity instead of a host asset entity in the steps in the KB.