ESXi hosts still show up in vSphere Licenses even though they are non-existent
search cancel

ESXi hosts still show up in vSphere Licenses even though they are non-existent

book

Article ID: 423816

calendar_today

Updated On:

Products

VMware vCenter Server

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.

  • 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

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.

  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.

Additional Information

How to remove a License Manually from VCenter using JXplorer