Scripts

Welcome to the Nutanix NEXT community. To get started please read our short welcome post. Thanks!

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Shutdown Nutanix Cluster

Journeyman

How to Shutdown Nutanix Cluster

First time you must ssh to all CVM node

and write the script cvm_shutdown -P and then you go to Vcenter and login to all node you can right click and shutdown. wait a minute and nutanix will shutdown

12 REPLIES
Moderator Moderator
Moderator

Re: How to Shutdown Nutanix Cluster

The proper KB for this is here: https://portal.nutanix.com/#/page/kbs/details?targetId=kA0600000008ctECAQ

 

However, if you wanted to script it, its really just two commands. Try this via SSH into a single CVM, you definitely do NOT need to go into all CVM's to do this (note, cluster stop is needed to stop cluster services gracefully first, don't shutdown without doing that if you can)

 

Cluster stop
allssh 'nohup sleep 20 && cvm_shutdown -P'

 

Give that a try.

Jon Kohler | Principal Architect, Nutanix | Nutanix NPX #003, VCDX #116 | @JonKohler
Please Kudos if useful!
Explorer

Re: How to Shutdown Nutanix Cluster

Jon: As you mentioned in this post, to be fully automated would be better to use a pipeline to avoid the manual intervention:

 

echo Y  | cluster stop

Trailblazer

Re: How to Shutdown Nutanix Cluster

I tried this but it threw an error.

 

But I solved it, you need to specify the time:

 

Cluster stop
allssh 'nohup sleep 20 && cvm_shutdown -P now'

 the "now"

 

Seba 

Pathfinder

Re: How to Shutdown Nutanix Cluster

allssh 'nohup sleep 20 && cvm_shutdown -P now'

the problem with this is that it shuts down the cvm you are running command from, how would it shutdown the other nodes when it shuts itself down first? how do we get around this?

 

thank you

Trailblazer

Re: How to Shutdown Nutanix Cluster

Maybe run the command from the hypervisor?

On the AHV I can call  'ssh root@192.168.5.1' (Check the correct internal IP of your CVMs).

 

Regards

Christian

Adventurer

Re: How to Shutdown Nutanix Cluster

@Jon what would be the steps needed to bring the CVMs back online after a shutdown? I understand that I need to bring the CVM up before I can do a cluster start. I am running AHV. Thanks.

Trailblazer

Re: How to Shutdown Nutanix Cluster

Hi,

 

I just had this scenario. I checked this website http://port5480.blogspot.de/2014/10/shut-down-nutanix-cluster.html but I didn't have to start the CVMs. They started automatically. All I needed to do was Cluster start

 

Regards

 

Christian

APC
Adventurer

Re: How to Shutdown Nutanix Cluster

Could you install and use APC PowerChute as your shut down solutions? 

https://www.nutanix.com/documents/partners/nutanix-apc-powerchute.pdf

 

 

 

APC
Adventurer

Re: How to Shutdown Nutanix Cluster

Could you install and use APC PowerChute as your shut down solution? 

https://www.nutanix.com/documents/partners/nutanix-apc-powerchute.pdf