Skip to content

February 2021: Automating Nutanix cluster shutdown (vSphere)

Stephane Bourdeaud edited this page Feb 8, 2021 · 6 revisions

Thanks to Jason Terpstra (zycomtec.com) for helping out with testing and sorting out the latest version of the script.

Want to shutdown completely your vSphere based Nutanix cluster? Not sure what process to follow or you want to delegate it to a level 1 team, or you want to schedule it yourself?

The basic steps are to (assuming you have no fancy add-ons such Files or Objects):

  1. Connect to vCenter and shutdown all your user virtual machines (UVMs)
  2. Connect to the ESXi host which holds the vCenter VM and shutdown the vCenter VM
  3. SSH into a CVM and stop the Nutanix cluster
  4. Shutdown each CVM (either thru SSH or by connecting to each ESXi host and shutting down the CVM from there
  5. Shutdown each ESXi host

To power it back on you will need your IPMI IP addresses and you will have to:

  1. Connect to each IPMI and power on your ESXi hosts
  2. Wait for the CVMs to start, connect to one of them and start the Nutanix cluster
  3. Connect to the ESXi host which has the vCenter VM and power on the vCenter VM
  4. Restart all your UVMs by connecting to vCenter and powering them on

Doing this manually can take a little while and is prone to errors. In comes ntnx-clusterShutdown.ps1 which helps you with all of the above. Run it simply with the -cluster parameter pointing at your Nutanix cluster (using the Prism Element fqdn or IP address) and voilà:

To restart the Nutanix cluster and vCenter VM, once you have powered on all your hosts via IPMI using the IP information displayed previously, start a ping on a CVM until it comes back for a minute or two, then run the script again with the -start parameter: