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.
VMware vCenter Server 8.x
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."
To resolve this, you must manually remove the stale asset entries from the LDAP directory using JXplorer.
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.
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.
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.
Remove the Stale Entry:
Identify the AssetEntity corresponding to the decommissioned host.
Right-click the entry and select Delete.
Confirm the deletion.
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.