Nutanix : Remove Prism Central registration

Background

You have removed your Prism Central VM and your cluster still shows a registered but disconnected status. You would like to unregister the cluster with a "force" status and start again with a new Prism Central deployment. Yes, this is possible, this is documented but for some reason it does not work.
There is a KB on the Nutanix portal (https://portal.nutanix.com/#/page/kbs/details?targetId=kA00e000000XeZjCAK) but it does not work/apply to your case. I miss read it and here is the solution !

Let's clean this out !

When following the KB article, you need to issue ncli multicluster delete-cluster-state cluster-id=xxx. The problem is : it does not work, or at least, the cluster-id does not seem to be recognised !

The cluster ID is retrieve with this command :

nutanix@NTNX-15SM6219xxxx-A-CVM:10.57.26.xxx:~$ ncli cluster info

    Cluster Id                : 000521a4-xxxx-xxxx-0000-0000000069fd::27xxx
    Cluster Uuid              : 000521a4-xxxx-xxxx-0000-0000000069fd
    Cluster Name              : NTNX-xxxx
    Cluster Version           : 5.5.2
    External IP Address       : 10.57.xx.xx
    External Data Services... : 10.57.xx.xx
    Node Count                : 3
    Block Count               : 2
    Support Verbosity Level   : BASIC_COREDUMP
    Lock Down Status          : Disabled
    Shadow Clones Status      : Enabled
    Password Remote Login ... : Enabled
    Timezone                  : Greenwich
    On-Disk Dedup             : Enabled
    Has Self Encrypting Disk  : no
    Common Criteria Mode      : Disabled

    Degraded Node Monitoring  : Enabled


The cluster id is the 5 digits at the end of the first line. But, when you enter it using the provided command in the KB, it does not accept it !

nutanix@NTNX-15SM6219xxxx-A-CVM:10.57.26.xxx:~$ ncli multicluster delete-cluster-state cluster-id=27xxx
Error: Cluster state cannot be retrieved for cluster id 27xxx

Why ?!? Because this is not the cluster ID expected by this command. To get the cluster ID expected by ncli, we need to query Zookeeper DB with the below statement :

nutanix@NTNX-15SM6219xxxx-A-CVM:10.57.26.xxx:~$ zkls /appliance/physical/clusterexternalstate
1fd85531-c917-4abf-9d35-d2f14xxxxxa5

Then, all of a sudden, it works like a charm :

nutanix@NTNX-15SM6219xxxx-A-CVM:10.57.26.xxx:~$ ncli multicluster delete-cluster-state cluster-id=1fd85531-c917-4abf-9d35-d2f14xxxxxa5
Cluster state deleted successfully

You can then register your cluster with a freshly deployed Prism Central instance.

Comments

  1. Thank you worked like a charm!! Why Nutanix doesn't update their KB's.

    ReplyDelete

Post a Comment

Thank you for your message, it has been sent to the moderator for review...

What's hot ?

ShredOS : HDD degaussing with style

Wallbox : Get The Most Of It (with API)