Ever entered a typo when building a vCenter, and redeploying seemed the easiest way forward? Or just want to decommission and old vCenter from an SSO domain? Well its not as easy as powering off the VM and deleting it. At least not unless you want annoying pop errors when you log into your remaining vCenters.
Something like “Could not connect to one or more vCenter Server Systems: https://vc02.regiona.domain.local:443/sdk”
This can be very off putting – and a significant red herring depending on the scenario. Let’s take the case that you rebuilt a vCenter with exactly the same FQDN. Then this error can relate to the first build of that vCenter and not the second.
So it’s important to clean up the system before you attempt that rebuild. Thankfully the fix is easy, and can be run before you delete that vCenter VM or after.
[Disclaimer: At your own risk, do outside of production hours, and make sure you cover yourself with a known good backup!]
- Make sure you have SSH enabled on your PSC
- Connect to the PSC via SSH and open the bash shell if not already done
- Type shell to get to it in one-time fashion
- Enter chsh -s “/bin/bash” root if you want to make it the permanent default shell
- Enter the following at the command prompt, replacing yourCenterFQDN with the vCenter you want to decommission and YourPassword as appropriate
cmsso-util unregister –node-pnid yourvCenterFQDN –username firstname.lastname@example.org –passwd YourPassword
Note if your password contains certain sequences of characters (eg two consecutive exclamation points / bangs) then it may not paste correctly. In that scenario omit the -passwd parameter and supply it manually when prompted