ESXi license assignments persist for non-existent hosts in vCenter
search cancel

ESXi license assignments persist for non-existent hosts in vCenter

book

Article ID: 423816

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

vCenter Server license usage shows "Assigned" for ESXi hosts that no longer exist in the environment. These phantom host assignments typically appear after a vCenter Server has been removed from Enhanced Linked Mode (ELM) or after hosts were decommissioned without being properly unassigned from their license keys.

  • Stale hosts are not visible in the "Hosts & Clusters" inventory.

  • The vSphere Client UI provides no way to remove these assignments, as the objects are missing from the inventory.

  • The environment was previously in Enhanced Linked Mode (ELM)

 

 

Environment

VMware vCenter Server 8.x

 

 

Cause

This is caused by stale AssetEntity objects residing in the VMware Directory Service (vmdir) LDAP database. When a host is decommissioned or a linked-mode relationship is broken, the pointer between the license key and the Host ID may fail to delete correctly. Since the vSphere Client only interacts with the live inventory, it cannot see the host to unassign it, but the Licensing Service still sees the LDAP entry and considers the license "in use."

Resolution

Note: It is mandatory to take a file-based backup and an offline snapshot of the vCenter Server Appliance (VCSA) before proceeding, as this involves direct modification of the SSO database.

To resolve this, manually via JXplorer:

  1. Connect to vCenter via JXplorer:

    • Host: FQDN or IP of the vCenter Server.

    • Port: 389

    • Protocol: LDAP v3

    • Base DN: dc=vsphere,dc=local (Adjust if using a custom SSO domain).

    • Security Level: User + Password

    • User DN: cn=administrator,cn=users,dc=vsphere,dc=local

    • Password: Your SSO administrator password.

  2. Locate the Stale Assets:

    • Navigate to: Services > LicenseService.

    • Look for entries starting with AssetEntity_host-.

    • Click each entry and check the attribute vmwLicSvcAssetName on the right. This will show the FQDN or IP of the host assigned to that entry.

  3. Remove the Stale Entry:

    • Identify the AssetEntity corresponding to the decommissioned host.

    • Right-click the entry and select Delete.

    • Confirm the deletion.

  4. Refresh Licensing Service:

    • Log into the vCenter Appliance via SSH (Bash).

    • Restart the license service to reflect the changes: service-control --restart vmware-cis-license

    • Log out and back into the vSphere Client. The stale assignment should now be cleared.

OR

To resolve this issue, manually via command line.

  1. Log in to the vCenter Server Appliance via SSH as root.
  2. Identify the Distinguished Name (DN) of the stale host by running the following command:
     
    /opt/likewise/bin/ldapsearch -b "cn=LicenseService,cn=Services,dc=vsphere,dc=local" -D "cn=Administrator,cn=Users,dc=vsphere,dc=local" -s sub "(objectclass=vmwLicSvcAssetEntity)" cn vmwLicSvcAssetName -W

     

  3. Locate the dn: for the affected host (verify via the vmwLicSvcAssetName field).
  4. Delete the orphaned entry using the ldapdelete utility:
     
    /opt/likewise/bin/ldapdelete -h localhost -D "cn=Administrator,cn=Users,dc=vsphere,dc=local" -W "####_INSERT_STALE_DN_####" -v

     

  5. Restart the license service to refresh the vSphere Client inventory:
     
    service-control --restart vmware-cis-license

Additional Information

How to remove a License Manually from VCenter using JXplorer

  • To speak with a customer representative or a support engineer, see Contact Support. Scroll to the bottom of the page and click on your respective region.