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

  1. 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
  2. Create a vSAN enabled cluster with automatic disk claim mode.
    $vsanCluster = New-Cluster -Name 'VsanCluster' -Location (Get-Datacenter) -VsanEnabled -VsanDiskClaimMode 'Automatic'
  3. 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
  4. Revert the virtual machine hosts to the Connected state.
    Set-VMHost -VMHost 'Host-A','Host-B' -State 'Connected'
  5. Create two fault domains in the vSAN cluster.
    $primaryFd = New-VsanFaultDomain -Name 'Primary' -VMHost 'Host-A'
    $secondaryFd = New-VsanFaultDomain -Name 'Secondary' -VMHost 'Host-B'
  6. Enable stretched cluster.
    Set-VsanClusterConfiguration -Configuration $vsanCluster -StretchedClusterEnabled $true -PreferredFaultDomain $primaryFd -WitnessHost 'Witness-Virtual-Appliance-IP'
  7. 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'
  8. Enable performance service on the vSAN cluster.
    Set-VsanClusterConfiguration -Configuration $vsanCluster -PerformanceServiceEnabled $true –StoragePolicy $policy