How to Upgrade a vSAN Cluster

Reading Time: 5 minutes

Upgrading a vSAN cluster is not so complicated but you have to pay attention if you want to complete the process to ensure a smooth and uninterrupted upgrade.

The vSAN cluster upgrade is divided into three steps:

  1. Upgrade the vCenter
  2. Upgrade ESXi hosts (you can have a look at the VMWare Documentation)
  3. Upgrade the vSAN disk format. This step is optional but is recommended to use the last disk format for best results.

Before starting the upgrade process ensure that the following requirements are met:

  1. The vSphere environment is up to date:
    • The vCenter Server managing the hosts must be at an equal or higher patch level than the ESXi hosts it manages. It is advisable to have vCenter and ESXi on matching versions ( Released on same date – refer to KB Build numbers and versions of VMware ESXi/ESX  and Build numbers and versions of VMware vCenter Server .  
    • All hosts should be running the same build of ESXi before vSAN cluster upgrade is started. Only a uniform ESXI host versions across cluster will ensure efficient vSAN functionality.
    • If the ESXi host versions are not matched, the hosts should be patched to the same build before upgrading.
  2. It is must that the all checks in the health plugin of the vSAN cluster must show green . ( vSAN cluster > Monitor > Skyline Health > Test  ) All vSAN component ( Disks/DOM objects/Network etc)  should be healthy
    • No disk should be failed or absent
    • This can be determined via the vSAN Disk Management view in the vSphere Web Client
  3. The HCL for controller and driver must be matching and it should also be supported with target version of ESXi 

In this post I’ll be focuse on steps two and three of the upgrade process.

Upgrade the ESXi Hosts

there are two ways to upgrade ESXi hosts:

  1. Using vSphere Lifecycle Manager.
  2. Esxcli command.

When you put the ESXi host into maintenance mode you have to choose the right option.

  • Ensure availability/accessibility
    • If you select Ensure availability, vSAN allows you to move the host into maintenance mode faster than Full data migration and allows access to the virtual machines in the environment.
  • Full data migration
    • vSAN evacuates all data to other hosts in the cluster. This evacuation mode results in the largest amount of data transfer and consumes the most time and resources
  • No data migration
    • If you select No data migration, vSAN does not evacuate any data from this host. If you power off or remove the host from the cluster, some virtual machines might become inaccessible.

Note: The default evacuation mode for Lifecycle Manager is Ensure data accessibility. If you use this mode, and while upgrading vSAN you encounter a failure, data can become inaccessible until one of the hosts is back online

We will proceed using Ensure availability/accessibility as shown.

Then attach the baseline created for the upgrade to the ESXi. You can even attach directly to the cluster.

Then check the compliance, you will see a “Non-Compliant” status shown and then click remediate.

Accept EULA

If you platform support quick boot flag it so the host will need less time for a reboot.

and finally click remediate.

When the upgrade is finished exit the node from the maintence mode and check the vSAN status. You should have error that just need time to disappear.

When the ESXi host is upgraded and moved out of maintenance mode, a resync will occur so ensure this is complete before moving onto the next host. A resync is occurring as the host that has been updated can now contribute to the vSAN Datastore again. It is vital to wait till this resync is complete to ensure there is no data loss.

So, when all errors disappear, you should have just warnings on Disk format and Support Insight.

When you have finished all the ESXi upgrades, in the summary page of the datacenter you’ll find this warning:

As I’ve already told you it’s just suggested to upgrade the disk format but not required.

Upgrade disk format

Note: If you enable encryption or deduplication and compression on an existing vSAN cluster, the on-disk format is automatically upgraded to the latest version.

Before going on you should check that you have enough free space to perform the disk format upgrade running RVC command.

To run RVC follow theese steps:

Navigate into the cluster as follow

if everything looks great go ahead as follow.

First run the precheck upgrade and if you get this message “Ready to upgrade -pre-check completed successfully on..” you can go on upgrading it.

During the upgrade you’ll see this message:

don’t be scared it is not deleting all the data 😀

when done the disk format is upgraded to the latest version.

Check Out koodzo.com!