To create a VM, run these PowerShell commands as an administrator:
- To create a fixed VHD for better I/O performance, run the following command:
$VHDPath="C:\ClusteredStorage\volume1\HDD\<HDDname>.vhdx"
New-VHD -SizeBytes <size> –Path $VHDPath –Fixed
- Create a VM:
$VMPath="C:\ClusteredStorage\volume1\VMs\<VMname>"
New-VM -Name SP -Path $VMPath -MemoryStartupBytes <Memory> -
BootDevice CD -SwitchName
<switchname> -VHDPath $VHDPath
- Configure the VM:
Set-VMProcessor -VMName DB -Count <vcpu count>
Add-VMNetworkAdapter -VMName <VMName> -Name <Virtual Network
adapter>
Set-VMNetworkAdapterVlan -VMName <VMName>
-VMNetworkAdapterName
<Virtual Network adapter> - Access -VlanId <VLANID>
- Add the vSAN switches to the VM:
Add-VMFibreChannelHba –VMName <VMName> –SanName <vSAN switch
name1>
Add-VMFibreChannelHba –VMName <VMname> –SanName <vSAN switch name2>