Shutting down a cluster

  • 11 August 2021
  • 5 replies


The instructions for shutting down a cluster are to use “sudo shutdown -P now” on the CVM’s in the cluster to shut each one down, but the command only works on the first CVM.   The command errors out the rest of the CVMs because they can’t reach the first CVM that was shut down.   Am I missing something?


Best answer by Nupur.Sakhalkar 17 August 2021, 23:25

View original

This topic has been closed for comments

5 replies

Userlevel 1
Badge +3

@TimothyGray  Please let me know if this documentation helps: Shutting Down an AHV Cluster The UVMs needs to be evacuated,  cluster services needs to be stopped and then you can shutdown the CVMs using “cvm_shutdown -P now”


I have done this dozen of times.   Only the first CVM shutdown down with that command.   The other CVMs won’t shut down because they can’t reach the first CVM that is shut down.

Is it Esxi or AHV?

If AHV: 

AHV - Shutting down the cluster​ - Maintenance or Re-location | Nutanix Community


If ESXi:

Shutting down Nutanix cluster running VMware vSphere for maintenance or relocation

Userlevel 1
Badge +3

Hi @TimothyGray Can you post the error you are seeing here?  

Userlevel 3
Badge +5

@TimothyGray The commands - “sudo shutdown -P now”  or  “cvm_shutdown -P now” won’t work when you are trying to shut down multiple CVMs in the cluster because these commands check which CVM is currently having the shutdown token so that only that CVM can be powered down on the cluster.

When you run this command on the first CVM, the first CVM will successfully grab the shutdown token (since none of the other CVMs are currently holding this token as all CVMs are UP) and then power down the CVM. However, when you try to run the same command again on other CVMs when the first CVM is already down, the first CVM won't release the shutdown token while it is offline and so the above two commands won’t work in this case as you observed for your cluster as well. 

Since your end goal is to shut down multiple CVMs on the cluster at the same time, hence in this case, the standard Linux shutdown command must be used on each CVM to power it down: 

sudo shutdown -h now

The above linux command won’t check for any shutdown tokens and so multiple CVMs can be taken down at the same time.

An important point to note here is that this command should only be used on CVMs when the cluster is in stopped state (user VMs are powered down already) and you want to shutdown multiple CVMs at the same time. For any other case, always use “cvm_shutdown -P now” command to shutdown the CVM. 

Kindly let us know if the above command helped to resolve your issue.