Cleaning up a (expired) Tanzu license is not possible from the GUI. It’s aesthetic, I know, but I want it out!
I enabled Workload Management on my cluster before, and assigned a license. Now the supervisor cluster is not there anymore, but the license assignment is.
If you experience this in a production environment :
Contact Broadcom support for assistance !
I wouldn’t write this blog post if it were merely a copy and paste from a Knowledge Base article. Anyway, the Broadcom KB article mentions two options :
- use JXplorer – I didn’t want to go download and just work through the solution via CLI
- CLI
We are going to focus on how to do this from the CLI !
Let’s visualize how the problem looks, this is my view from vCenter:

It is standard behaviour that licenses assigned to an Asset, are not available for removal. Because it is Expired, it is just ugly showing there within the overview of my added licenses. I want to get rid of it, but how do I do that?
As mentioned in the Broadcom KB article, one can browse the LDAP database, and throw it out.
Backup (or snapshot) your vCenter machine, for real !
It will save your day (One day)
First, we need to find the entry for the asset, and license in the LDAP database. Piping it to ‘less’ will give the option to search (type /) through the content. You’ll need it as it returns a lot of values
/opt/likewise/bin/ldapsearch -h localhost -D "cn=Administrator,cn=Users,dc=vsphere,dc=local" -w 'INSERT_PASSWORD' -b "cn=LicenseService,cn=Services,dc=vsphere,dc=local"| less
ShellSessionIn my case, I need to search for the supervisor cluster assignment. So I used words like Asset, Tanzu and wcp. It could be vSAN, or something else as well. I found two relevant entries, one for the license, and one for the asset assigned license. You’ll need the common name (cn) for the asset entity, in my case ‘AssetEntity_wcp-domain-c7-a76334a1-f4fd-4636-a466-e4c753d990ee’
/opt/likewise/bin/ldapdelete -h localhost -D "cn=Administrator,cn=Users,dc=vsphere,dc=local" -w 'INSERT_PASSWORD' "cn=AssetEntity_wcp-domain-c7-a76334a1-f4fd-4636-a466-e4c753d990ee,cn=LicenseService,cn=services,dc=vsphere,dc=local"
ShellSessionRevisit the Assets view. We see that the license is not assigned to the supervisor cluster anymore.

When we go and review the Licenses view, we can see that the license is still present, and assigned. I didn’t restart the vCenter vpxd service at this point. If I would have, the license would have probably been available for removal. I went on and removed the license via the CLI. Same as before, find the actual license in the LDAP database, and delete it. I searched for the first part of the license key, and copied the license entity, here ‘LicenseEntity_b056d2ce-b035-42f4-8733-b5d21c094121’
/opt/likewise/bin/ldapdelete -h localhost -D "cn=Administrator,cn=Users,dc=vsphere,dc=local" -w 'INSERT_PASSWORD' "cn=LicenseEntity_b056d2ce-b035-42f4-8733-b5d21c094121,cn=LicenseService,cn=services,dc=vsphere,dc=local"
ShellSessionRestart the vCenter vpxd service. The license view does not refresh without that restart.
service-control --restart vpxd
ShellSessionWe see that the Tanzu license is not showing anymore:

That is how we are cleaning up a Tanzu license from vCenter !