Cleaning Up Tanzu License – CLI Method

by Apr 7, 2025vSphere With Tanzu

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.

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 :

  1. use JXplorer – I didn’t want to go download and just work through the solution via CLI
  2. 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:

Tanzu license assigned to the Supervisor cluster

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.

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
ShellSession

In 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"
ShellSession

Revisit the Assets view. We see that the license is not assigned to the supervisor cluster anymore.

The license is not assigned to the supervisor cluster anymore!
Cleaning the Tanzu license assigned to the Supervisor cluster

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"
ShellSession

Restart the vCenter vpxd service. The license view does not refresh without that restart.

service-control --restart vpxd
ShellSession

We see that the Tanzu license is not showing anymore:

Tanzu licence cleaned

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