Decommissioning a vCenter PSC and VCSA

Posted by & filed under Virtualization, VMWare.

I recently needed to decommission a VCSA and external PSC. Following the VMWare KB 2106736 I proceeded to decomission the servers usign the cmsso utility.

 

Decommission vCenter — connected to the PSC it is registered with and:

root@vcenter-sb-psc [ ~ ]# cmsso-util unregister --node-pnid vcenter-sb.redacted.lan --username administrator@vsphere.local
Password:
2017-11-01T18:20:15.806Z   Running command: ['/usr/lib/vmware-vmafd/bin/dir-cli', 'service', 'list', '--login', 'administrator@vsphere.local']
2017-11-01T18:20:15.863Z   Done running command
Success

Now to connect to the PSC that will be staying online and decommission the other PSC

root@vcenter-psc [ ~ ]# cmsso-util unregister --node-pnid vcenter-sb --username administrator@vsphere.local
Password:
Could not find a host id which maps to vcenter-sb in Component Manager
Failed!!!

I proceeded to use vdcrepadmin to check out the replication partners which is only vcenter-sb-psc.redacted.lan from my PSC that will be staying online:

root@vcenter-psc [ /usr/lib/vmware-vmdir/bin ]# ./vdcrepadmin -f showpartners -h vcenter-psc.redacted.lan -u administrator
password:
ldap://vcenter-sb-psc.redacted.lan

Then I checked the actual servers:

root@vcenter-psc [ /usr/lib/vmware-vmdir/bin ]# ./vdcrepadmin -f showservers -h vcenter-psc.redacted.lan -u administrator
password:
cn=vcenter-psc.redacted.lan,cn=Servers,cn=redactedfl,cn=Sites,cn=Configuration,dc=vsphere,dc=local
cn=vcenter-sb-psc.redacted.lan,cn=Servers,cn=redactedsb,cn=Sites,cn=Configuration,dc=vsphere,dc=local

We see both PSC’s as expected. Finally I removed the PSC that is to be decommissioned:

root@vcenter-psc [ /usr/lib/vmware-vmdir/bin ]# ./vdcleavefed -h vcenter-sb-psc.redacted.lan -u administrator
password:
vdcleavefd offline for server vcenter-sb-psc.redacted.lan
Leave federation cleanup failed. Error[1] - Operations error

Error again. Some googling led me to techbrainblog’s excellent page on using these utilities and also the solutions to some common but cryptic errors. Very useful. The solution to this error in particular is to simply shut down the old PSC. It needs to be offline before the command is ran.

root@vcenter-psc [ /usr/lib/vmware-vmdir/bin ]# ./vdcleavefed -h vcenter-sb-psc.redacted.lan -u administrator
password:
vdcleavefd offline for server vcenter-sb-psc.redacted.lan
 vcenter-sb-psc.tnsc.lan server cleanup performed.

Good to go!

Ref: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2106736

Ref: https://techbrainblog.com/2015/10/02/issues-and-errors-when-decommissioning-the-vcenter-server-or-a-platform-services-controller-vcsa-6-0/