How To: Leveraging FlashArray Snapshots for VCF Host Reassignment
Simplify Workload Domain Host Reassignment in VMware Cloud Foundation with FlashArray Snapshots
A key value proposition for VMware Cloud Foundation is the capability to move ESXi hosts between Workload Domains with relative ease - redistributing those resources to meet ever-changing demands. Separating storage from the compute layer with the FlashArray further enhances this proposition since direct attached storage (DAS) volumes need to be evacuated and have parity rebuilt (an operation that can take a lot of time) as hosts are moved around within SDDC Manager. With storage instead disaggregated, hosts can simply be removed from one FlashArray Host Group and added to the new one encompassing the new Workload Domain that they are to be migrated to.
However, since the release of VMware Cloud Foundation 4.0, it is now required that ESXi hosts be completely re-imaged between use in separate Workload Domains.
The overall lifecycle of ESXi hosts within the context of SDDC Manger and VMware Cloud Foundation is shown in the below flowchart:
At scale, these two components of ESXi host lifecycle can easily become challenging and inefficient since both imaging ESXi and preparing it for use within VMware Cloud Foundation are time-consuming and monotonous tasks when done manually.
Fortunately, using FlashArray Snapshots for ESXi host boot from SAN (BFS) volumes gives us a simple yet powerful shortcut to reassign ESXi hosts to a new Workload Domain. When we include that capability, an ESXi host lifecycle within Cloud Foundation looks something more like this:
By simply reverting to a snapshot with ESXi installed + the needed VCF prerequisites previously applied, massive amounts of time and effort are saved relative to the 'out of the box' model we showed first when ESXi hosts need to be moved around.
To enable using FlashArray snapshots to assist in moving ESXi hosts between VCF Workload Domains, the following two prerequisites should be confirmed prior to following the steps in the remainder of this section:
- VMware Cloud Foundation with SDDC Manager Environment is online and accessible.
- Workload Domain hosts are using a boot from SAN (BFS) volume for ESXi hosted on FlashArray. More info on how to set that up here.
With those two items confirmed, the first step is to install ESXi to the version and patch level that VMware Cloud Foundation requires. The ESXi version required for use can be found in the VMware Cloud Foundation BOM that ships with every release. An example of this can be found here.
Once ESXi has been installed onto the BFS volume, the next step is to apply the prerequisites needed before the host can be imported for use to SDDC Manager. The steps to complete this in VCF 4.0.1 are outlined here and we also cover this in our FlashStack Deployment Automation User Guide.
The next step is quite simple, but extremely important to this overall process. Once the ESXi host has all prerequisites applied, take an on-demand snapshot of the BFS volume from the FlashArray. We recommend powering off the ESXi host prior to taking the BFS volume snapshot to reduce the risk of any corruption from a running ESXi instance. The below sequence of images shows how to accomplish the snapshot task. Note that this process can be accomplished from the Pure Storage CLI as well.
First, select the Storage button, then the Hosts tab and then the individual host in question.
Under Connected Volumes select the correct volume where ESXi is installed. This is often most easily found by looking at the Shared column and confirming it is set to False.
Once the boot from SAN volume has been selected, click on the + above and to the right of the Volume Snapshots window.
Optionally, provide a suffix for the on-demand snapshot and then click Create.
We can see our snapshot has been taken by reviewing the Volume Snapshots pane.
At this point, the ESXi host can be commissioned for use within SDDC Manager and then deployed into a Workload Domain. At some point in the future, when it comes time for that ESXi host to be moved to a different Workload Domain or different cluster due to shifting business requirements, the host would then need to be unassigned from the Workload Domain and then decommissioned from SDDC Manager.
First, remove the ESXi host from the Workload Domain. This is done by going into SDDC Manager, selecting the Workload Domains section from Inventory, clicking on the Cluster for the Workload Domain, selecting the host(s) you wish to remove and then clicking on Remove Selected Hosts.
It can take several minutes for the host to be completely and correctly removed from its Workload Domain. Once the tasks completes, next select Inventory then Hosts. From there, click on the Unassigned Hosts button and select the one or more ESXi host(s) you wish to decommission from SDDC Manager. Lastly, click on the Decommission Selected Hosts button to complete their removal.
Once the host has been removed from SDDC Manager, it is time to revert the boot from SAN volume to the snapshot that we took earlier.
To start, find the FlashArray Volume Snapshot that was taken earlier in this guide, click on the Radio button on the right and then select the Restore... option from the spawned menu.
Confirm the boot from SAN Restore by clicking on the button.
Now that the volume has been reverted, a reboot of the ESXi host is required in order for the reverted snapshot volume to be reinstituted. At this point it is also important to remove the ESXi host from its current Host Group on the FlashArray and then add it to the new Host Group for the Workload Domain where it will be deployed.
When the host comes back online, we can then Commission the host back into SDDC Manager and deploy it into the new or existing Workload Domain.
Narrated Demo Video
The steps outlined above can be viewed in the narrated demo video shown below.