Shutdown the vSAN cluster with vCenter running on the datastore

vsan-cluster-shutdown-01

To shutdown the vSAN cluster with vCenter running on the datastore, you need to follow a specific procedure to avoid data loss keeping the cluster configuration healthy.

In addition, if the vCenter Server Appliance (vCSA) is stored in the vSAN cluster, you need to follow a specific sequence to properly shutdown the running VMs.

vsan-cluster-shutdown-02

 

Shutdown VMs

There are several reasons why you would shutdown the entire vSAN cluster and if the vSAN is the main storage used in your virtual infrastructure, most probabily also the vCenter Server resides in the vSAN cluster. With this scenario you need to shutdown the VMs properly.

From the vSphere Web Client, select the vSAN cluster and go to VMs tab. Shutdown all running virtual machines except the vCSA.

vsan-cluster-shutdown-03

Click Yes to confirm the shutdown of selected VMs.

vsan-cluster-shutdown-04

The VMs have been shutdown.

vsan-cluster-shutdown-05

 

Move the vCenter Server to the first ESXi host

Write down on which host the vCenter resides or, as recommended by VMware, migrate the vCenter to the first ESXi host to easily find the VM when the vSAN cluster is powered on again.

Right click the vCenter Server and select Migrate to move the VM to the first ESXi if currently resides on a different host.

vsan-cluster-shutdown-06

Select Change compute resource only option and click Next.

vsan-cluster-shutdown-07

Select the first host and click Next.

vsan-cluster-shutdown-08

Select the correct network and click Next.

vsan-cluster-shutdown-09

Select Schedule vMotion with high priorty option and click Next.

vsan-cluster-shutdown-10

Click Finish to migrate the VM.

vsan-cluster-shutdown-11

Make sure the vCSA has been migrated to the first ESXi host.

vsan-cluster-shutdown-12

If your environment uses Active Directory, I recommend to migrate to the first ESXi host also a Domain Controller.

 

Shutdown the vSAN cluster

From the Inventory view, select the vSAN cluster then go to Monitor > vSAN. Select Resyncing Components tab and verify no vSAN components are currently resyncing before putting the hosts members of the vSAN cluster in Maintenance Mode.

vsan-cluster-shutdown-13

If no resyncing is occuring in the cluster, right click the vCenter Server and select Power > Shut Down Guest OS.

vsan-cluster-shutdown-14

This action makes the vSphere Web Client unavailable.

vsan-cluster-shutdown-15

To shutdown hosts member of the vSAN cluster, you can proceed via GUI or using the ESXCLI command. From the vSphere Host Client, right click Host and select Enter maintenance mode.

vsan-cluster-shutdown-16

Make sure vSAN data migration is set as No data migration option because we are going to put all hosts into Maintenance Mode to shutdown the cluster then there is no reason to migrate VMs between hosts. Click Yes to proceed.

vsan-cluster-shutdown-17

Using the command line, SSH the ESXi by entering the root credentials and run the following ESXCLI command:

# esxcli system maintenanceMode set -e true -m noAction

vsan-cluster-shutdown-18

The ESXi host is now in Maintenance Mode.

vsan-cluster-shutdown-19

ESXi hosts can be shutdown or rebooted.

 

Power on the vSAN cluster

To power on the vSAN cluster, using the vSphere Host Client connect to each ESXi and right click Host then select Exit maintenance mode.

vsan-cluster-shutdown-20

Alternatively run from the shell the ESXCLI command:

# esxcli system maintenanceMode set -e false

vsan-cluster-shutdown-21

Do the same for the other hosts members of the vSAN cluster.

vsan-cluster-shutdown-22

vsan-cluster-shutdown-23

Connect to the first ESXi host and power on your vCenter Server and the Domain Controller as well in case you use Active Directory. It may take a few minutes for vCenter Server to become available again. The green icons in the column Status indicate the VMs are reacheable then the vSAN datastore is available.

vsan-cluster-shutdown-24

When you are able to connect to the vSphere Web Client, do a quick health check on the vSAN cluster to ensure the vSAN cluster is running with no errors.

vsan-cluster-shutdown-25

If everything is fine, power on the remaining virtual machines in the vSAN cluster.

vsan-cluster-shutdown-26

This procedure must be used only when you need to shutdown the entire vSAN cluster.

signature

One Response

  1. Bob 16/04/2018