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

Unable to remove license key from vCenter server 6.0 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:

no enough license to be assigned



Environment

VMware vCenter Server 6.0.x

VMware vCenter Server 7.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 5206ff5e-bb83-4b5d-a3e8-5408c4580879

Valid Entry

AssetEntity_5206ff5e-bb83-4b5d-a3e8-5408c4580879-7207cnn3d-9c77-11e6-93ab- 005056a6a627ba where
5206ff5e-bb83-4b5d-a3e8-5408c4580879—vCenter instance id
7207cnn3d-9c77-11e6-93ab-005056a6a627ba –host instance id

Stale Entry

AssetEntity_4B776AC7-5BF7-4626-ACA1-A37180356AAD-995a020f-1cfb-11e5-a5b5-005056a627ba where
4B776AC7-5BF7-4626-ACA1-A37180356AAD—vCenter instance id
995a020f-1cfb-11e5-a5b5-005056a627ba—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 illustrated in second screenshot.)

AssetEntity-Value–> implies the vCenter entry
AssetEntity_host-Value–>implies the host entry
Currently 5206ff5e-bb83-4b5d-a3e8-5408c4580879 is considered as active instance & the other instance would be considered stale. I.e 4B776AC7-5BF7-4626-ACA1-A37180356AAD

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 995a020f-1cfb-11e5-a5b5-005056a627ba (Any stale entries associated with host needs to be removed)
The reason being id 995a020f-1cfb-11e5-a5b5-005056a627ba 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-995a020f-1cfb-11e5-a5b5-005056a627ba
AssetEntity_host-108162–
995a020f-1cfb-11e5-a5b5-005056a627ba

Host entry which is currently active would be host uuid ending with 7207cnn3d-9c77-11e6-93ab-005056a6a627ba
Once the associate host entries are removed you can go ahead and remove the Stale vCenter instance

AssetEntity_4B776AC7-5BF7-4626-ACA1-A37180356AAD-995a020f-1cfb-11e5-a5b5-005056a627ba

 

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.