How to Shutdown Nutanix CVM and Nutanix AHV Host

How to Shutdown Nutanix CVM and Nutanix AHV Host
How to Shutdown Nutanix CVM and Nutanix AHV Host – cvm maintenance mode Nutanix

In this post I will show you how to shutdown Nutanix CVM and Nutanix AHV node / host and enter and exit from maintenance mode in the Nutanix CVM ( Controller VM ) in a Nutanix Cluster. CVM maintenance mode nutanix.

To shutdown Nutanix CVM and Nutanix AHV hypervisor in the Nutanix cluster it is vital to use the right procedure to shutdown properly without any harmful impact of the running services and software in the Nutanix AHV Hypervisor as well as Nutanix CVM.

Here is the Nutanix Shutdown Procedure

Before we can shutdown the Nutanix AHV hypervisor we need to perform a graceful shutdown of the Nutanix CVM (Controller VM).
The Nutanix CVM is hosted on the Nutanix AHV Hypervisor(in this case, it is the same with ESXi, Hyper-V and XenServer as well) as a VM and it´s responsible for running the Nutanix components and services in a Nutanix Cluster.
Please note, that the CVMs communicate with each other, and will automatically elect a new Master, if current master CVM becomes unavailable. This does not apply in a 1 node Cluster, this goes for 1 node Robo Solutions and Nutanix Community Edition 1 node cluster.

First we need to Shutdown Nutanix CVM

Step 1 : Log in to Nutanix CVM via SSH -> on MAC use Terminal or similar (ssh nutanix@CVM-IP-ADDRESS), on Windows use Putty or similar.
I have made a list of default passwords here

Step 2 : If Nutanix AHV host is member of Nutanix cluster then you need to enter Nutanix CVM / AHV host into maintenance mode , but first we need to live migrate the running VMs to another host in the Nutanix AHV Cluster.

Run the following command in CLI to enter Nutanix AHV host into maintenance mode.

nutanix@cvm$ acli  host.enter_maintenance_mode Hypervisor_IP_address wait=true

Please wait for the command to execute successfully.

Step 3 : Now it´s time to shutdown Nutanix CVM

nutanix@cvm$ cvm_shutdown -P now

Note: Always use the cvm_shutdown command to power off, reset, or shutdown the Controller VM. The cvm_shutdown command notifies the cluster that the Controller VM is unavailable.

To be sure that the CVM has shutdown, ping it, so you know that it is powered off or check Nutanix Prism that the CVM in focus is turned off.

Now Shutdown the Nutanix AHV Host

After successfully shutdown the Nutanix CVM, now we can continue to shutdown/power off the Nutanix AHV host.

Step 4 : Log in to Nutanix AHV host via SSH

Step 5 : Now we will Shutdown the Nutanix AHV host

root@ahv# shutdown -h now

Wait for the shutdown of the Nutanix AHV host to be successful, then ping the Nutanix AHV host to be sure that it is powered off.

How to power on Nutanix AHV host ?

Step 1 : To power on the Nutanix AHV host, need to press power button on Nutanix node or we can use the IPMI web console/iDrac/iLO etc. (IPMI is what we use here due to that the HW is Nutanix).

Note : After we have successfully powered on the Nutanix AHV host, it will automatically power on the Nutanix CVM without any manual interference.

How to Exit Nutanix AHV host from Maintenance mode ?

If a Nutanix AHV host is in maintenance mode then we need to exit it from maintenance mode to make it functional in the Nutanix Cluster again.

Exit Nutanix AHV host from Maintenance mode

To Exit the Nutanix AHV host from maintenance mode we need to run the following command from the Nutanix CVM.

Step 1 : Log in to the Nutanix CVM with SSH

Step 2 : Run the following command to exit the Nutanix AHV host from maintenance mode.

nutanix@cvm$ acli host.exit_maintenance_mode AHV-hypervisor-IP-address

Wait for the command to execute successfully,

After a successful exit from maintenance mode, we now have a fully working member of a Nutanix AOS cluster and we can now migrate back VMs from other Nutanix AHV hosts. That´s it you have now learned how to Shutdown Nutanix CVM and Nutanix AHV Host.

Useful links