Enhanced Linked Mode connects multiple vCenter Server systems together by using one or more Platform Services Controllers. Once all vCenters are linked together we get a nice centralized view of all our infrastructure from one single vCenter URL that shows all the vCenter servers in our environment.
How to remove a dead vCenter in Linked Mode
If you have a vCenter that was dead, removed, or only not in use anymore but was in linked mode, you will receive warnings every time you open the master vCenter, so in this blog post, we will explain how to remove a dead vCenter from linked mode configuration.
There could be an odd scenario as shown
Could not connect to one or more vCenter Server systems:https://sfo-m01-vc02.ash.local:443/sdk
We have two of our vCenters connected in a linked mode and we are on vCenter 7.0.
As shown above, sfo-m01-vc02.ash.local was one of our vCenter Servers that were earlier joined to linked mode and it’s now broken so we will get this warning all the time in your vCenter inventory. We will attempt to clean this up in this blog.
Prerequisties to remove a vCenter from linked mode
- Query the vCenter server to identify the PSC it’s pointing to an external one
- Verify all nodes that participate in our linked mode configuration.
- Power off the vCenter node we are planning to remove from linked mode
- Enable SSH on any vCenter that’s active and staying.
- vCenter services will need a restart thus do this work at a chosen time
Remove a vCenter from linked mode
Launch an SSH session to the vCenter instance that will be staying in the environment and browse into the shell mode as shown.
Check if our vCenter has an external PSC or its embedded
Run the command to find the type of node of vCenter:
cat /etc/vmware/deployment.node.type
- Embedded means there is no external PSC
- Management means there is an external PSC
- If there is an external PSC, run the below command to find the PSC name
/usr/lib/vmware-vmafd/bin/vmafd-cli get-ls-location –server-name localhost
List all known vCenter nodes
Enter the command /usr/lib/vmware-vmafd/bin/dir-cli nodes list
As we see here, we have two vCenters connected and we are now to remove or break the linked mode between these vCenters.
If we need to specify a different target vCenter node or username other than default administrator@vsphere.local the syntax looks like this
/usr/lib/vmware-vmafd/bin/dir-cli nodes list --login admin@domain.corp --server-name 172.16.11.2
Remove or Unregister the vCenter node from Inventory
cmsso-util unregister --node-pnid sfo-m01-vc02.ash.local --username administrator@vsphere.local
All vCenter services will be restarted and vCenter will be unavailable during this operation.
Verify the required vCenter node has been removed
/usr/lib/vmware-vmafd/bin/dir-cli nodes list
As shown above, at times the above process won’t fully remove our vCenters so If cmsso-util fails to remove any of the vCenter nodes, we can force the removal using this command.
When specifying the username, we should use the SSO admin as administrator and not use the full SSO user name as administrator@vsphere.local as that will cause the command to fail.
/usr/lib/vmware-vmdir/bin/vdcleavefed -h <vmwarefqdn> -u Administrator
Reboot the vCenter just to be certain.
You should now see our second vCenter is now fully removed
If you run into any issues the log can be found at /storage/log/vmware/vmdir/vdcleavefed.log
References
Using the cmsso command to unregister vCenter or PSC from Single Sign-On
How to repoint vCenter Server 6.x between External PSC
How to find vCenter Server’s PSC