About

Shut down all hosts in a Nutanix cluster that is running VMware ESXi for maintenance. Note: The procedure is designed to be executed only in the absence of Metro, Async/NearSync, and Nutanix Files services.


Power Off

1. Run NCC Health Check via Nutanix Web Console

Note: Upgrade to the latest version of NCC before proceeding with the following steps.

i. Upgrade NCC to latest version

2023-07-06_132540

ii. Run NCC Health Check

2023-07-06_132601

Check that everything is working well, then could proceed to the next step.

2. Shut down All VMs in the vCenter

NOTE : Do not shut down the Nutanix Controller VMs (CVM).

i. The DRS setting must be set to ‘Manual’ before shutting down all VMs.

2022-12-29_160831

ii. Start the process of shutting down all virtual machines using vCenter.

3. Shut down the vCenter (VM)

Note: Remember the host on which the vCenter is currently running.

* Host will be assigned automatically based on the cluster, and their names should fall within the range of vms01-08.

2023-07-07_143216

Method 1: Login - vCenter Server Management to shut down (via Browser)

2023-07-06_133219

Method 2: To shut down via Remote Console

2023-07-06_133304

4. Stop the Nutanix Cluster and Shut down CVM

i. Stop the Nutanix cluster

Log in to one of CVM using SSH and execute the following command to stop the Nutanix cluster:

 cluster stop

Wait until output similar to the following is displayed for every Controller VM in the cluster before proceeding:

2023-07-07_143944

ii. Shut down CVM:

Log in to each CVM using SSH and execute the following command to shut down:

 sudo shutdown -P now

5. Shut down each Node (Host)

Method01: via GUI

Log in to each node (ESXi) using a browser to follow the indicators.

i. Put host in maintenance mode:

2023-07-07_150321

ii. Shut down the host:

2023-07-07_150334

Method02: via Command line

Log in to each Node (ESXi) using SSH and execute the following command

i. Put host in maintenance mode:

 esxcli system maintenanceMode set --enable true

ii. Shut down the host:

 poweroff

Power On

6. Powering on the Nodes and Cluster

After the shutdown

i. Power On all Nodes via IPMI. (Or turn it on by pressing the physical power button on the front)

2023-07-07_164950

ii. Log in to each node (ESXi) using a browser and select Exit Maintenance Mode.

2023-07-07_150321

Or, log in to each Node using SSH and execute the following command

 esxcli system maintenanceMode set --enable false

iii. Log in the node that previous was recorded (e.g.vms01) , then Right-click the vCenter and select Power > Power on.

2023-07-07_170424

Or, log in to the Node (vms01) using SSH and execute the following command

vim-cmd vmsvc/power.on "$(vim-cmd vmsvc/getallvms | grep -ia "vCenter" | cut -d ' ' -f 1)"

Wait for approximately 5 minutes for all services to start on the VM.

iv. Right-click each CVM and select Power > Power on via vCenter

2023-07-07_171706

Or, log in to Each Node (ESXi) using SSH and execute the following command

vim-cmd vmsvc/power.on "$(vim-cmd vmsvc/getallvms | grep -ia "NTNX-*-CVM" | cut -d ' ' -f 1)"

7. Start Nutanix Cluster

i. Log on to any of the CVMs in the cluster via SSH with the nutanix user credentials.

ii. Start the Nutanix cluster by issuing the following command:

cluster start

When the cluster starts, output similar to the following is displayed for each Controller VM in the cluster:

2023-07-10_103716

iii. Confirm that all cluster services are running on the Controller VMs.

cluster status

2023-07-11 03:38:45,982Z INFO MainThread cluster:3088 Success! (*The last in line.)

iv. Confirm that all Nutanix datastores are available:

Right-click the ESXi host in the vSphere client and select Rescan for Datastores.

2023-07-10_104707

8. Start All VMs

i. Power On all virtual machines using vCenter.

ii. The DRS setting must be set to ‘Fully Automated’ after Power On all VMs.

2023-07-07_143123


Reference