You can create Virtual SAN disk groups on standalone hosts and add the hosts to a Virtual SAN enabled cluster to form a Virtual SAN datastore. You can then create a virtual machine on the Virtual SAN datastore and assign a storage policy to the virtual machine and its hard disk.

Verify that you are connected to a vCenter Server system.

Verify that you have access to at least three 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.

1

Create a Virtual SAN enabled cluster with manual disk claim mode.

$vsanCluster = New-Cluster -Name 'VsanCluster' -Location (Get-Datacenter) -VsanEnabled -VsanDiskClaimMode 'Manual'
2

Configure a Virtual SAN VMkernel port on each of the three hosts.

New-VMHostNetworkAdapter -VMHost 'Host-A' -PortGroup 'VMkernel' -VirtualSwitch 'vSwitch0' -VsanTrafficEnabled $true
New-VMHostNetworkAdapter -VMHost 'Host-B' -PortGroup 'VMkernel' -VirtualSwitch 'vSwitch0' -VsanTrafficEnabled $true
New-VMHostNetworkAdapter -VMHost 'Host-C' -PortGroup 'VMkernel' -VirtualSwitch 'vSwitch0' -VsanTrafficEnabled $true
3

Create a Virtual SAN disk group on each of the three hosts.

New-VsanDiskGroup -DataDiskCanonicalName 'HDD1-CanonicalName' -SsdCanonicalName 'SSD1-CanonicalName' -VMHost 'Host-A'
New-VsanDiskGroup -DataDiskCanonicalName 'HDD1-CanonicalName' -SsdCanonicalName 'SSD1-CanonicalName' -VMHost 'Host-B'
New-VsanDiskGroup -DataDiskCanonicalName 'HDD1-CanonicalName' -SsdCanonicalName 'SSD1-CanonicalName' -VMHost 'Host-C'
4

Add each of the three hosts to the Virtual SAN cluster to create a Virtual SAN datastore.

Move-VMHost -VMHost 'Host-A' -Destination $vsanCluster
Move-VMHost -VMHost 'Host-B' -Destination $vsanCluster
Move-VMHost -VMHost 'Host-C' -Destination $vsanCluster
5

Revert the virtual machine hosts to Connected state.

Set-VMHost -VMHost 'Host-A','Host-B','Host-C' -State 'Connected'
6

Create a virtual machine on the Virtual SAN datastore.

$vsanDS = Get-Datastore -Name 'vsanDatastore'
$vm = New-VM -Name 'newVM' -DiskMB 1024 -Datastore $vsanDS -VMHost 'Host-A'
7

Create a storage policy by using any of the Virtual SAN capabilities.

$cap = Get-SpbmCapability -Name VSAN*
$rule = New-SpbmRule $cap[1] $true
$ruleset = New-SpbmRuleSet $rule
$policy = New-SpbmStoragePolicy -Name 'vsan policy' -RuleSet $ruleset -Description 'Virtual SAN-based storage policy'
8

Assign the storage policy to the virtual machine and its hard disk.

$vmHdd = Get-HardDisk -VM $vm
Set-SpbmEntityConfiguration $vm, $vmHdd -StoragePolicy $policy
9

Check the compliance of the virtual machine and its hard disk with the storage policy.

Get-SpbmEntityConfiguration $vm, $vmHdd

The status should be Compliant.