Pro Tip: Unregistering a vCenter from SSO

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!]

  1. Make sure you have SSH enabled on your PSC
  2. 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
  3. 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 administrator@vsphere.local –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

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: