VMware Cloud Community
vmsysadmin20111
Enthusiast
Enthusiast

Remove old vCenter from licensed assets

Hi all,

I had to reinstall a vCenter (6.7 U3 with embedded PSC) that was in ELM mode. Now when I go to licensed assets, I have two vCenters with the same name. Any clues on how to remove the old decommissioned vCenter from licensed assets? Thanks!

pastedImage_0.png

Tags (2)
Reply
0 Kudos
3 Replies
NathanosBlightc
Commander
Commander

You can remove it from vCenter Server database anyway, you need to know how to remove it from Microsoft SQL for window-based vCenter Server or PostgreSQL for VCSA.

Check the following VMware KB, I think it can help you how to do it:

VMware Knowledge Base

Please mark my comment as the Correct Answer if this solution resolved your problem
Reply
0 Kudos
vmsysadmin20111
Enthusiast
Enthusiast

It turned out that even though I unregistered the old vCenter with "cmsso-util unregister" prior to reinstall, a lot of stale services from the decommissioned vCenter were still present in PSC. This KB - VMware Knowledge Base  - gives a hint, but it's not just vcenterserver service type that needs to be removed.

Just in case someone else would hit this issue:

1) you need to figure out the Node ID of your old stale vCenter, the KB referenced above gives you a clue how to do that.

2) Find the Service IDs of all stale services matching the old Node ID (in my case the stale Node ID was 0f3616d1-65cc-4a66-aa34-8d1bd5e44586):

/usr/lib/vmidentity/tools/scripts/lstool.py list --url http://localhost:7080/lookupservice/sdk > /tmp/psc_services.txt

services=($(cat /tmp/psc_services.txt | grep -B 3 0f3616d1-65cc-4a66-aa34-8d1bd5e44586 | grep -i "Service id" | cut -d " " -f 3))

3) Now that the Service IDs that you need to remove are in the $services bash variable, you can do the removal:

for i in "${services[@]}"

do

   /usr/lib/vmidentity/tools/scripts/lstool.py unregister --url http://localhost:7080/lookupservice/sdk --id $i --user 'administrator@vsphere.local' --password 'your_password' --no-check-cert

done

4) restart vCenter services and once you log back in, the stale licensed asset entry for the old vCenter should be gone.

Nodnarb
Enthusiast
Enthusiast

Thanks @vmsysadmin20111 ! I was having a problem where a reference to an old linked-mode vCenter was sticking around in the licensing screens. It would show up as a vCenter asset, even though that vCenter was long ago unregistered. There was a single service reference keeping it around. After running the unregister command, I restarted all of the license services using the vCenter VAMI on my remaining vCenters. The reference properly disappeared after I logged off and back on.

Reply
0 Kudos