Expired License alert shows in vCenter Server despite valid license assigment in vCenter Server.
search cancel

Expired License alert shows in vCenter Server despite valid license assigment in vCenter Server.

book

Article ID: 385470

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • vCenter Server shows 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 and fails to reconnect with a "vCenter licensing expired" message in the UI.
  • User cannot manage the vCenter license assignment from the License Manager.
  • Often occurs in vCenter with ELM (Enhanced Linked Mode) where duplicate assest appar for thesame vCenter FQDN.

Environment

VMware vCenter Server 7.0.x

 

VMware vCenter Server 8.0.x

 

Cause

This issue stems from stale AssetEntity records in the VMware Directory Service (vmdir) LDAP database that fail to purge when a new license is 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 follow the steps below.

Fix licenses assigned to the vCenter

  1. Take a powered off snapshot of the vCenter Server. If in ELM 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=########-####-####-####-############"
  4. Obtain current vCenter Node LDU ID with command:
    1. /usr/lib/vmware-vmafd/bin/vmafd-cli get-ldu --server-name localhost
      "%%%%%%%%-%%%%-%%%%-%%%%-%%%%%%%%%%%%"
  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_<#####>-<%%%%%%%%>,cn=LicenseService,cn=Services,dc=vsphere,dc=local"
    2. Note:
      Adjust dc=vsphere,dc=local to reflect the environment's SSO domain
      Replace ######## with the vCenter service ID from step 1 in capital letters
      Replace %%%%%%%% with the LDU ID from above Step 4.
  6. If the above step (5a) 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 3 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. Note 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_<$$$$$$$$-$$$$-$$$$-$$$$-$$$$$$$$$$$$>,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.