What is a vSAN witness host?

The vSAN witness host is basically an ESXi host that does not store VM data, It stores the witness components for each VM object from a Stretched cluster. It is used for an site failure in a vSAN stretched cluster using fault domain making sure vSAN data is redundant across fault domains.

First thing is to deploy vSAN witness host at the third site.

Deploy a ovf template

A screenshot of a computer

Description automatically generated with medium confidence

Upload the VMware vSAN witness ova.

A screenshot of a computer

Description automatically generated with medium confidence

Give it a vm name

A screenshot of a computer

Description automatically generated

Select a compute resource and continue

A screenshot of a computer

Description automatically generated

Review details and click next

A screenshot of a computer

Description automatically generated with medium confidence

Accept agreement and conintue

A screenshot of a computer

Description automatically generated

Size will depend on your current and future requirments

A screenshot of a computer

Description automatically generated

Select storage and continue

A screenshot of a computer

Description automatically generated with medium confidence

Select a port group and continue

A screenshot of a computer

Description automatically generated

Put in your password and scroll down

A screenshot of a computer

Description automatically generated with medium confidence

Put in your management details and leave secondary network blank (We will be using vSAN witness traffic as management on vmk0)

A screenshot of a computer

Description automatically generated with medium confidence

A screenshot of a computer

Description automatically generated with medium confidence

Click finish

A screenshot of a computer

Description automatically generated with medium confidence

Power on witness

Make you’re your esxi witness has connectivity, I needed to tag an vlan on it as the port group I used is using vlan trunking

A screenshot of a computer

Description automatically generated

Add the esxi witness host to datacenter not the cluster were your stretched cluster is

A screenshot of a computer

Description automatically generated

Put in the fqdn and continue

A screenshot of a computer

Description automatically generated

Put in the credentials and continue

A screenshot of a computer

Description automatically generated

Accept SSL certificate

A screenshot of a security alert

Description automatically generated with medium confidence

Continue

A screenshot of a computer

Description automatically generated with medium confidence

Ensure the witness license is selected and continue

A screenshot of a computer

Description automatically generated with medium confidence

Click next on lockdown mode page

A screenshot of a computer

Description automatically generated with medium confidence

Continue

A screenshot of a computer

Description automatically generated

Click finish

A screenshot of a computer

Description automatically generated

Ensure you have ntp setup on the esxi witness host

Ensure the ntp daemon service on the ESXi witness host is start and stop with host

A screenshot of a computer

Description automatically generated

Ensure the ssh service on the ESXi witness host is start and stop with host

A screenshot of a computer

Description automatically generated with medium confidence

Under vmkernel adapters for the ESXI witness host remove vmk1

A screenshot of a computer

Description automatically generated with medium confidence

A screenshot of a computer

Description automatically generated with medium confidence

Remove secondary switch

A screenshot of a computer

Description automatically generated

A screenshot of a computer

Description automatically generated with medium confidence

Remove VM network from vSwitch0

A screenshot of a computer

Description automatically generated

A screenshot of a computer

Description automatically generated with medium confidence

Edit vmk0 in VMkernel adapters and add the vSAN service

A screenshot of a computer

Description automatically generated with medium confidence

A screenshot of a computer

Description automatically generated with medium confidence

A screenshot of a computer

Description automatically generated

Now we will stretch the cluster so esx1,2 will be site 1(Primary fault domain) and site 2 will be esx3,4 (Secondary fault domain)

Click the cluster > click configure tab > under vSAN click fault domains > Click configure stretched cluster

Sort out your primary and secondary fault domains.

A screenshot of a computer

Description automatically generated with medium confidence

A screenshot of a computer

Description automatically generated

Select your witness ESXi host

A screenshot of a computer

Description automatically generated with medium confidence

Claim your cache and capacity disks for your ESXi witness host.

Finish

A screenshot of a computer

Description automatically generated with medium confidence

Done

A screenshot of a computer

Description automatically generated with medium confidence

You can see the vcenter virtual machine component is in both sites. So in a event of a site failure vCenter will HA over and data will be intact.

A screenshot of a computer

Description automatically generated

In production I would normally create affinity rules so I know were my virtual machines compute is running from. Using ‘should’ rules.

So for example

Host group1 – esx1, esx2

Host group2 – esx3, esx4

vm group1 – websvr1, websvr2

vm group2 – websvr3, websvr4

vm/host group1 – Host group1, vm group1

vm/host group2 – Host group2, vm group2

So this would ensure my webservers are always running active from both sites

Official Configure the VMkernel Adapters on the vSAN Witness Host

https://docs.vmware.com/en/VMware-Cloud-Foundation/4.3/vcf-admin/GUID-E8FE54DB-45E5-45C3-A4A1-13643CB8021F.html

Official vSAN stretched cluster guide.

https://core.vmware.com/resource/vsan-stretched-cluster-guide#overview

By Kader