How to forcibly destroy the Nutanix cluster, Cluster destroy command failing

Thanks to visit again

There will be some instance where you really want to destroy the Nutanix cluster especially when you can’t connect each node to the network or you might not aware about the clusters IP address to access. following steps are very useful when you can’t run the cluster destroy command from CVM

with the following steps you can directly connect the Nutanix nodes and can perform the cluster destroy task:

NOTE:- MAKE SURE YOU ARE TRYING TO DESTORY CORRECT CLUSTER😝

You can use the .node_unconfigure file to forcibly destroy the cluster in such situations as follows.

  • Change to the /home/nutanix directory.
    #nutanix@cvm$ cd /home/nutanix
  • Create the .node_unconfigure file in the /home/nutanix directory.
    #nutanix@cvm$ touch .node_unconfigure
  • Restart Genesis.
    #nutanix@cvm$ genesis restart

Stopping genesis (pids [4102, 4138, 4160, 4161])

Genesis started on pids [18917

  • #nutanix@cvm$ cluster status

and the message should appear “Cluster is currently unconfigured. Please create the cluster.” This is expected and correct  At this time, login to Prism and attempt to add the cvm to the cluster. If the procedure doesn’t seem to work, make sure internal vSwitch is present(this method will not work without communication over 192.168.5.0/24 network) and make sure CVM is able to reach host over management network (CVM & HOST should be configured on the same subnet). If you are facing issues with the Foundation process on the Controller VM in question, proceed to the next steps.

Verify if the Foundation process is working. Nutanix recommends that you use both the genesis status and ps -ef commands to check the Foundation status.

nutanix@cvm$ ps -ef | grep foundation

nutanix 19291 4616 0 19:10 pts/0 00:00:00 grep foundation

You can see that the Foundation process is not working

Kill the Foundation process if it is alive.

$ genesis stop foundation

$ kill -9 PID

  • Remove the zk entries from /etc/hosts

nutanix@cvm$ vi /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

127.0.1.1 Nutanix-Controller-VM

127.0.0.1 NTNX-16SM65110113-A-CVM

  • Stop the zookeeper process.

nutanix@cvm$ genesis stop zookeeper

  • Verify that the .node_unconfigure file does not exist

nutanix@cvm$ rm .node_unconfigure

rm: cannot remove `.node_unconfigure’: No such file or directory

  • Verify if the cluster is destroyed or not.

nutanix@cvm$ cluster status

2016-07-11 19:13:24 CRITICAL cluster:2143 Cluster is currently unconfigured. Please           create the cluster

You can see that the cluster is destroyed.

Verify if the Foundation process is now working or not

nutanix@cvm$ genesis status

 

You can see that Foundation to create new cluster is now working

 

Regards

Nishant Panchal

 

 

 

 

 

 

1 thought on “How to forcibly destroy the Nutanix cluster, Cluster destroy command failing

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 )

Facebook photo

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

Connecting to %s