- How to use VMware vSAN ReadyNode Configurator - Fri, Dec 17 2021
- VMware Tanzu Kubernetes Toolkit version 1.3 new features - Fri, Dec 10 2021
- Disaster recovery strategies for vCenter Server appliance VM - Fri, Nov 26 2021
Such a cluster can save space compared to RAID 1 configurations, where if you wanted protection against two failures, you would have to store two copies of a virtual machine’ files. We’ll explain erasure coding in detail in another post. It’s interesting and cost effective, as it allows the use of space-efficiency features to save significant space within a cluster.
Before we introduce you to Stretched Cluster architecture, we must understand fault domains, which have been available since v6.0. Fault domains enable “rack awareness,” where you can distribute the virtual machine’s components among multiple hosts in multiple racks. If a rack failure event occurs, the virtual machine would continue to be available.
Fault domains overview
Each physical node represents a fault domain. A virtual machine is composed of two copies of data. Those two copies of the files are stored in two different fault domains, where each fault domain is in a different location.
If one of the VSAN nodes is offline, it is still possible for virtual machines to run using the files on another physical node.
VMware VSAN Stretched Cluster architecture is using fault domains but with datacenters as fault domains (not racks).
As you can see, a Stretched Cluster Datacenter requires fewer than 5 ms latency (roundtrip time – RTT) and a 10 GB Ethernet Network connection. The link to the Witness Datacenter can have lower specs.
In the case where the hosts are unable to communicate across the network, the Witness serves as a “tie-breaker” to achieve a quorum and enables the cluster to restart virtual machines by using High Availability (HA).
Using a virtual appliance as a Witness eliminates the need to deploy a third physical server dedicated to run this Witness. So in this case, this Witness Appliance can run together with other VMs on that particular host in the “Witness Datacenter.”
The Witness has quorum services running and stores Witness objects and cluster metadata. A Witness virtual appliance does not contribute to compute and storage capacities of the VSAN cluster.
Step-by-step configuration of VSAN Stretched Cluster
Open the vSphere Web Client, create a datacenter entity (called Stretched Datacenter in our case), then create a cluster object (VSAN), and place hosts from both sites in there. In our lab, we placed four hosts (two at each fault domain).
Make sure that each host has a VMkernel adapter configured and activated for VSAN traffic. If not, follow the procedure we demonstrated in our previous post for VSAN network configuration.
Deploy a Witness Appliance
Here are the steps to deploy a Witness Appliance. Open the vSphere Web Client and click on the Hosts and Clusters tab. Right click the cluster or host on which you want to deploy the Witness Appliance (Witness Datacenter in our case) and click Deploy OVF Template.
Select the .ova file you downloaded using the Local option and browse and click Next. Review the details and click Next. Accept the License Agreement and click Next. Enter the name for the Witness Appliance.
On the next screen, you’ll have to choose the VM’s configuration, which depends on your environment. Select the Witness Appliance configuration and click Next.
Select the VM Storage Policy (when applicable) and the Datastore on which the Witness Appliance needs to be stored; click Next.
Next, select a network for the management network. This will be associated with both network interfaces (management and VSAN) at deployment, so later we’ll change that. Click Next, pick a root password for the Witness ESXi host, and click Next again.
Check the review page and click Finish. (Do not check the button “Power on the appliance”).
After deployment, we need to configure a few more things: Right click the Witness Appliance and then click Edit Settings.
You must change the network for the second Network Adapter. It is currently set to the network selected during provisioning, and you must select the VSAN network. Now you can power on the appliance.
After we can power on the VM, we’ll have to assign a static IP address for this VM. Open the Witness Appliance VM Console, Press F2, and go to the Network Adapters view.
Select static option, as shown below, and add the appropriate IP address, subnet mask, and default gateway for this Witness ESXi’s management network.
You should then configure the Domain Name System (DNS) server. Use a Fully Qualified domain name (FQDN). Next, you need to add the Witness Appliance to the vCenter Server just as an ESXi host.
Note that you must also configure the VSAN VMkernel interface through the Web Client, as we have done in a previous post. The lab view is like this.
Now we’re done with the Witness Appliance, and we can start configuring the VSAN Stretched Cluster mode.
Select the VSAN cluster on the left, then click the Manage TAB under Virtual SAN, then select General; next, click on Configure, then select the Configure Stretched Cluster radio button.
On the next screen (if you configured the VSAN network correctly), you’ll see just the recap and the green check mark. You can click the Next button to continue the assistant.
On the next screen, you should see unclaimed disks for VSAN from each ESXi host. If you have claimed the disks already, just click Next. If the disks aren’t clean (with partitions), you must clean those partitions before you can continue.
Then we have the fault domain screen, where we can place our hosts as they are in reality. By default, the names of the Stretched Cluster fault domains are “Preferred” and “Secondary,” but you can change them to fit your needs. Let’s say you have two sites (Site 1 and Site 2, so you can name those fault domains according to your real sites). But in our case, let’s just stick with the defaults. …
Select host and click left or right, depending where you want to place this host.
On the next screen, we need to select a Witness host that we deployed previously. The screen looks like this:
Then on the next screen, we need to claim disks for Witness host. The VM is prepackaged with virtual disks tagged for the cache tier and the capacity tier.
Then click the Finish button to finalize the configuration. The VSAN system will work behind the scenes for a few minutes to claim the disks and finish the configuration.
A new Datastore called vsanDatastore (see image below) is created, and this Datastore is visible to all hosts within the VSAN cluster. This Datastore also spans both locations.
We can go and have a look at the VSAN capacity by selecting the Datastores tab, then Monitor, and then Virtual SAN.
Now we can see the total capacity, used capacity, etc.
VSAN capacity view
Subscribe to 4sysops newsletter!
This ends our post about VSAN Stretched Cluster configuration. In my next post I will cover RAID 5/6 (erasure coding), deduplication, and compression.