You can create a vSAN stretched cluster with a witness node. You can then create a vSAN storage policy and enable performance service on the vSAN cluster.
Prerequisites
- Verify that you are connected to a vCenter Server system.
- Verify that you have access to at least two virtual machine hosts.
- Verify that each of the virtual machine hosts has at least one SSD and one HDD.
- Verify that the virtual machine hosts are in maintenance mode.
- Verify that you have access to an ESXi host that can be used as a witness host or deploy a witness appliance on any node. Ensure that the witness host or appliance is outside the vSAN cluster.
Procedure
- Configure a vSAN VMkernel port on each of the two hosts.
New-VMHostNetworkAdapter -VMHost 'Host-A' -PortGroup 'VMkernel' -VirtualSwitch 'vSwitch0' -VsanTrafficEnabled $true
New-VMHostNetworkAdapter -VMHost 'Host-B' -PortGroup 'VMkernel' -VirtualSwitch 'vSwitch0' -VsanTrafficEnabled $true
- Create a vSAN enabled cluster with automatic disk claim mode.
$vsanCluster = New-Cluster -Name 'VsanCluster' -Location (Get-Datacenter) -VsanEnabled -VsanDiskClaimMode 'Automatic'
- Add the two hosts to the vSAN cluster to create a vSAN datastore.
Move-VMHost -VMHost 'Host-A' -Destination $vsanCluster
Move-VMHost -VMHost 'Host-B' -Destination $vsanCluster
- Revert the virtual machine hosts to the Connected state.
Set-VMHost -VMHost 'Host-A','Host-B' -State 'Connected'
- Create two fault domains in the vSAN cluster.
$primaryFd = New-VsanFaultDomain -Name 'Primary' -VMHost 'Host-A'
$secondaryFd = New-VsanFaultDomain -Name 'Secondary' -VMHost 'Host-B'
- Enable stretched cluster.
Set-VsanClusterConfiguration -Configuration $vsanCluster -StretchedClusterEnabled $true -PreferredFaultDomain $primaryFd -WitnessHost 'Witness-Virtual-Appliance-IP'
- Create a storage policy by using any vSAN capability.
$cap = Get-SpbmCapability -Name vSAN*
$rule = New-SpbmRule $cap[1] $true
$ruleset = New-SpbmRuleSet $rule
$policy = New-SpbmStoragePolicy -Name 'vsan policy' -RuleSet $ruleset -Description 'vSAN-based storage policy'
- Enable performance service on the vSAN cluster.
Set-VsanClusterConfiguration -Configuration $vsanCluster -PerformanceServiceEnabled $true –StoragePolicy $policy