How to create and destroy a cluster from Nutanix CVM
How to create a single-node or multiple-node cluster from inside a Nutanix Controller VM, complete some initial configuration and if you like destroy the cluster once done.
How to create a single-node cluster
Log into the CVM via SSH and run
cluster -s {:CVMIP:} --redundancy_factor=1 create
The single-node should automatically start once it is complete.
How to create a multiple-node cluster
Log into a CVM via SSH and run
cluster -s {:CVMIPs:} create
CVM IPs need to be comma-separated, use the “fill in variables” tool to see this in action.
A minimum of three nodes is required here. Setting up a two node cluster with witness VM is not covered in the kb.
The multiple-node should automatically start once it is complete
Initial config for cluster
Set your cluster name. It can only contain alphanumeric characters, dots, hyphens and underscores (Please note: no spaces).
ncli cluster edit-params new-name="{:ClusterName:}"
Add your DNS server
ncli cluster add-to-name-servers servers="{:DNSIP:}"
You can check your DNS servers with
ncli cluster get-name-servers
Set the timezone your cluster is in (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for timezone list)
ncli cluster set-timezone timezone="{:TZName:}"
You can check your current timezone with
ncli cluster info | grep Timezone
Add your NTP server
ncli cluster add-to-ntp-servers servers="{:NTPServer:}"
You can check your NTP servers with
ncli cluster get-ntp-servers
For a multiple-node cluster you need to set your virtual IP address for the cluster
ncli cluster set-external-ip-address external-ip-address="{:ClusterIP:}"
How to destroy a cluster
Please note: This will delete all guest VM data in the cluster
Log into a CVM via SSH and stop the cluster
cluster stop
Next once all CVM’s show that the cluster has stopped run
cluster destroy