Unable to remove license key from vCenter server due to stale licensing entry in VMware Directory.
search cancel

Unable to remove license key from vCenter server due to stale licensing entry in VMware Directory.

book

Article ID: 305904

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
• ESXi host in the licensing section are seen grayed out.
• Trying to assign the license on the host, you receive error similar to:

not enough license to be assigned



Environment

VMware vCenter Server 6.0.x

VMware vCenter Server 7.0.x

VMware vCenter Server 8.0.x

Cause

This issue occurs when we have stale entries in the VMware Directory.

Resolution

To resolve this issue differentiate between the stale and actual entry of the VC using jxplorer,

Easiest way would be to get the active instance id of the underlying vCenter from instance.cfg.

Note: Location of instance.cfg

For Example:

Current entry in instance.cfg is ########-####-####-####-#######80879

Valid Entry

AssetEntity_########-####-####-####-#######80879-########-####-####-####-#######627ba where
########-####-####-####-#######80879 — vCenter instance id
########-####-####-####-#######627ba – host instance id

Stale Entry

AssetEntity_########-####-####-####-#######56AAD-########-####-####-####-#######627ba where
########-####-####-####-#######56AAD — vCenter instance id
########-####-####-####-#######627ba — host instance id

VMwLicSvcAsset name(identifier) – To differentiate the stale and actual entries hostname would be common for both under VMwLicSvcAsset name on the right hand side in details section.

AssetEntity-Value–> implies the vCenter entry
AssetEntity_host-Value–>implies the host entry
Currently ########-####-####-####-#######80879 is considered as active instance & the other instance would be considered stale. I.e ########-####-####-####-#######56AAD

Before proceeding to modify any content ensure:

• Take a active snapshot of all the vCenter and PSC currently available in the environment
• Stop the licensing service from PSC.

Based on the previous data we have to go ahead and remove stale entries which match the host entry with uuid ########-####-####-####-#######627ba (Any stale entries associated with host needs to be removed)
The reason being id ########-####-####-####-#######627ba is generated along with older(stale) instance where any entry associated with this respective id is considered stale and needs to be removed.

Right click and click on delete in order to delete any entry as shown below. Below screenshot is just taken as an eg and does not match the eg we have taken in to consideration.

For instance(Every host entry that would be stale will end up with same id making it easier to differentiate between actual and stale instance).

AssetEntity_host-107900-########-####-####-####-#######627ba
AssetEntity_host-108162–########-####-####-####-#######
627ba

Host entry which is currently active would be host uuid ending with ########-####-####-####-#######627ba
Once the associate host entries are removed you can go ahead and remove the Stale vCenter instance

AssetEntity_########-####-####-####-#######56AAD-########-####-####-####-#######627ba

 

Once all the respective stale entries are removed go ahead and start the licensing service. Login to the web client and verify if all the underlying stale entries are removed. You should be able to achieve adding the license henceforth
To avoid such issue going forward ensure you perform a clean uninstallation or unregister the vCenter from PSC.