Introduction to StarWind Virtual SAN for vSphere
StarWind Virtual SAN for vSphere comes as a prepackaged Linux virtual machine to be installed as a VM on vSphere. It creates a VM-centric and high performing storage pool for a VMware сluster.
This guide describes the deployment and configuration process of the StarWind Virtual SAN with VMware vSphere.
StarWind Virtual SAN for vSphere VM requirements
Prior to installing StarWind Virtual SAN Virtual Machines, please make sure that the system meets the requirements, which are available via the following link: https://www.starwindsoftware.com/system-requirements
Recommended RAID settings for HDD and SSD disks:
Please read StarWind Virtual SAN Best Practices document for additional information: https://www.starwindsoftware.com/resource-library/starwind-virtual-san-best-practices
Additional StarWind Virtual SAN VM requirements for deduplication:
Each VDO volume has following additional memory requirements:
- 370 MB plus an additional 268 MB per each 1 TB of physical storage
- 250 MB per each 1 TB of physical storage, if deduplication is enabled (UDS index)
Example: 370MB + 4 * 268MB +4 * 250MB = 2442 MB RAM for 4 TB underlaying usable physical storage. We recommend to assign StarWind Virtual SAN VM at least 8 GB of RAM (4GB for VM + 4 GB for VDO).
A single VDO volume can be configured to use up to 256 TB of physical storage. All-flash arrays or NVMe drive are strictly recommended as an underlying storage when using combination of StarWind VSAN for vSphere with VDO.
As a general rule, certain storage layers should be placed under VDO and others on top of VDO:
- Under VDO: Hardware and software RAID (LVM or mdraid).
- On top of VDO: StarWind Virtual SAN Thick-Provisioned devices (stand-alone and HA).
VDO volume is a thinly provisioned block device, which can run out of space on underlying storage device. It is recommended to use physical storage, which can be extended in future (MD RAID, LVM).
Pre-Configuring the Servers
The diagram below illustrates the network and storage configuration of the solution:
1. ESXi hypervisor should be installed on each host.
2. The vCenter server should be deployed.
3. StarWind Virtual SAN for vSphere VM should be deployed on each ESXi host.
4. The network interfaces on each node for Synchronization and iSCSI/StarWind heartbeat interfaces should be in different subnets and connected directly according to the network diagram above. Here, the 172.16.10.x subnet is used for the iSCSI/StarWind heartbeat traffic, while the 172.16.20.x subnet is used for the Synchronization traffic.
NOTE: Do not use ISCSI/Heartbeat and Synchronization channels over the same physical link. Synchronization and iSCSI/Heartbeat links and can be connected either via redundant switches or directly between the nodes.
|StarWind HyperConverged Appliance is a turnkey, entirely software-defined hyperconverged platform purpose-built for intensive virtualization workloads. Bringing the desired performance and reducing downtime, the solution can be deployed by organizations with limited budgets and IT team resources. Also, it requires only one onsite node to deliver HA for your applications that make the solution even more cost-efficient.|
|Find out more about StarWind HyperConverged Appliance|
Installing StarWind Virtual SAN for vSphere
1. Download zip archive that contains StarWind Virtual SAN for vSphere.
2. Extract virtual machine files.
3. Deploy a virtual machine to the vSphere. Right-click on the host and select “Deploy OVF template” from a drop-down menu.
4. In the first step of the wizard, point to the location of the OVF template. Select VM files and click Next.
5. Specify the name and location for the StarWind Virtual SAN VM.
6. Select a resource for the StarWind Virtual SAN VM.
7. Review the information about the VM.
8. Select the storage for the VM.
9. Select networks for the VM.
10. Click Finish to start the deployment process.
Preparing Environment for StarWind VSAN Deployment
Configure network interfaces on each node to make sure that Synchronization and iSCSI/StarWind heartbeat interfaces are in different subnets and connected physically according to the network diagram above. All actions below should be applied to each ESXi server.
NOTE: Virtual Machine Port Group should be created for both iSCSI/ StarWind Heartbeat and the Synchronization vSwitches. VMKernel port should be created only for iSCSI traffic. Static IP addresses should be assigned to VMKernel ports.
NOTE: It is recommended to set jumbo frames to 9000 on vSwitches and VMKernel ports for iSCSI and Synchronization traffic. Additionally, vMotion can be enabled on VMKernel ports.
1. Using VMware ESXi web console, create two vSwitches: one for the iSCSI/ StarWind Heartbeat channel and the other one for the Synchronization channel.
2. Create a VMKernel port for the iSCSI/ StarWind Heartbeat channel.
3. Add a Virtual Machine Port Group on the vSwitch for iSCSI traffic and on the vSwitch for Synchronization traffic.
4. Repeat steps 1-3 for any other links intended for Synchronization and iSCSI/Heartbeat traffic on ESXi hosts.
Configuring StarWind Virtual SAN VM networks
By default, the StarWind Virtual SAN virtual machine receives an IP address automatically via DHCP. It is recommended to create a DHCP reservation and set a static IP address for this VM. In order to access StarWind Virtual SAN VM from the local network, the virtual machine must have access to the network. In case there is no DHCP server, the connection to the VM can be established using the VMware console and static IP address can be configured manually.
1. Open a web browser and enter the IP address of the VM, which it had received via DHCP (or had it assigned manually), and log in to StarWind Virtual SAN for vSphere using the following default credentials:
2. After the successful login, on the left sidebar, click Accounts.
3. Select a user and click Set Password.
4. On the left sidebar, click Networking.
Here, Management IP address of the StarWind Virtual SAN Virtual Machine, as well as IP addresses for iSCSI and Synchronization networks can be configured.
In case the Network interface is inactive, click on the interface and turn it on.
5. Alternatively, log in to the VM via the VMware console and assign a static IP address by editing the configuration file of the interface located by the following path:
Open that file and change:
BOOTPROTO=dhcp To: BOOTPROTO=static
Add the IP settings needed to the file:
By default, the Management link should have ens192 interface name. The configuration file should look as following:
Restart interface using following cmdlet: ifdown ens192 && ifup ens192
Configuring StarWind Management Console
1. Install StarWind Management Console on a workstation with Windows OS (Windows 7 or higher, Windows Server 2008 R2 and higher) using the installator available here.
NOTE: StarWind Management Console and PowerShell Management Library components are required.
2. Select the appropriate option to apply the StarWind License key.
Once the appropriate license key has been received, it should be applied to StarWind Virtual SAN service via Management Console or PowerShell.
3. Open StarWind Management Console and click Add Server.
4. Type the IP address of the StarWind Virtual SAN in the pop-up window and click OK.
5. Select the server and click Connect.
6. Click Apply Key… on the pop-up window.
7. Select Load license from file and click the Load button.
8. Select the appropriate license key.
As an alternative, PowerShell can be used. Open StarWind InstallLicense.ps1 script with PowerShell ISE as administrator. It can be found here:
C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell\InstallLicense.ps1
Type the IP address of StarWind Virtual SAN VM and credentials of StarWind Virtual SAN service (defaults login: root, password: starwind).
Add the path to the license key.
9. After the license key is applied, StarWind devices can be created.
NOTE: In order to manage StarWind Virtual SAN service (e.g. create ImageFile devices, VTL devices, etc.), StarWind Management Console can be used.
Configuring StarWind VMs Startup/Shutdown
1. Setup the VMs startup policy on both ESXi hosts from Manage -> System tab in the ESXi web console. In the appeared window, check Yes to enable the option and choose the stop action as Shut down. Click Save to proceed.
2. To configure a VM autostart, right-click on the VM, navigate to Autostart and click Enable.
3. Complete the actions above on StarWind VM located on another host.
4. Start the both virtual machines, install OS and StarWind Virtual SAN.
StarWind Virtual SAN for vSphere can work on top of Hardware RAID or Linux Software RAID (MDADM) inside of the Virtual Machine.
Please select the required option:
Configuring StarWind Storage on Top of Hardware RAID
1. Add a new virtual disk to the StarWind Virtual SAN VM. (Make sure it is Thick Provisioned Eager Zeroed). Virtual Disk should be located on the datastore provided by hardware RAID.
2. Find the Virtual Disk which was added.
NOTE: The added disk does not have any partitions and filesystem.Click Format.
3. Create the XFS partition. The mount point should be as following: /mnt/%yourdiskname% .Click Format.
4. On the storage page of the disk, navigate to the Filesystem tab. Click Mount.
5. Connect to StarWind Virtual SAN from the StarWind Management Console or from Web Console. Click Yes.
6. Select the disk which was recently mounted.
Configuring StarWind Storage on top of Software RAID
Make sure that the prerequisites for deploying Software RAID with StarWind Virtual SAN are met:
- The ESXi hosts have all the drives connected through HBA or RAID controller in HBA mode.
- StarWind Virtual SAN for vSphere is installed on the ESXi server.
- StarWind Virtual SAN must be installed on a separate storage device available to the ESXi host (e.g. SSD, HDD etc.).
- HBA or RAID controller will be added via a DirectPath I/O passthrough device to a StarWind VM.
- vCenter is installed in the environment to manage ESXi hosts.
PCI Device Configuration
1. Login to the vCenter via vSphere Client. Select the host where StarWind Virtual SAN VM is installed.
2. Go to the Configure tab. In the Hardware section, select PCI Devices. Click Edit.
3. Locate the HBA/RAID Controller of the ESXi host. Check the box on the appropriate PCI device. Click OK.
4. The device will appear in the Direct I/O PCI Devices Available to VMs table in the Available (pending) status.
5. Reboot ESXi host. After the reboot, the status changes to Available.
6. Right-click on the StarWind Virtual SAN VM. Select Edit Settings.
7. Click ADD NEW DEVICE. Select PCI Device.
8. Add HBA/RAID Controller to the VM. Reserve memory for the StarWind Virtual Machine. Click OK.
9. Boot StarWind Virtual SAN VM.
10. Repeat steps 1-8 for all hosts where StarWind Virtual SAN for vSphere is deployed.
11. Login to StarWind Virtual SAN VM via IP. The default credentials:
12. Go to the Storage page. The Drives section shows the drives connected to HBA/RAID Controller (if available).
13. Click “+” in the RAID Devices section to create Software RAID. (In the current example, RAID 10 will be created with 4 HDD drives). StarWind recommendations of RAID configurations depending on the number of disks, chunk size, and array level are shown in the table below:
|RAID Level||Chunk size for HDD Arrays||Chunk size for SSD Arrays|
Disk quantity * 4Kb
Disk quantity * 8Kb
(Disk quantity – 1) * 4Kb
(Disk quantity – 1) * 8Kb
(Disk quantity – 2) * 4Kb
(Disk quantity – 2) * 8Kb
|10||(Disk quantity * 4Kb)/2||(Disk quantity * 8Kb)/2|
StarWind Software RAID recommended settings can be found here:
14. Select the drives to add to the array.
15. After the synchronization is finished, find the RAID array created.
NOTE: The disk created will not have any partitions and file system. Click Format.
16. Create the XFS partition. Mount point should be as follows: /mnt/%yourdiskname% . Select the Custom mounting option and type noatime. Click Format.
17. On the storage page of the disk, navigate to the Filesystem tab. Click Mount.
18. Connect to StarWind Virtual SAN from StarWind Management Console or from Web Console. Click Yes.
19. Select the disk recently mounted.
To configuring VDO please choose a disk, where to place vdo device, logical size (recommended up to x3 of physical storage) and index memory size.
1. Open Terminal and paste following command with your parameters:
vdo create –activate=enabled –deduplication=enabled –compression=disabled –emulate512=enabled –indexMem=%size% –vdoLogicalSize=%size% –device=%yourdevice% -n=%name%
2. Click Create.
Wait until creation is finished. And find a new VDO devices in corresponding section.
Hint: Created VDO device will not have any partitions and filesystem.
3. Click Format
4. Create XFS partition. Mount point should be as following: /mnt/%yourdiskname%
Add following custom mounting options to keep mount persistent across reboots: defaults,discard,x-systemd.requires=vdo.service and click Format
5. On the storage page of the disk, navigate to the Filesystem tab. Click Mount
Provisioning Storage with StarWind VSAN
Creating StarWind HA devices
1. Open StarWind Management Console and click on the Add Device (advanced) button.
2. Select Hard disk device as the type of device to be created. Click Next to continue.
3. Select Virtual disk. Click Next to continue.
4. Specify virtual disk Name, Location, and Size.
NOTE: Image file device and HA device can be extended later according to the steps in KB article:
5. Specify virtual disk options.
NOTE: Sector size should be 512 bytes in case of using ESXi.
6. Define the RAM caching policy and specify the cache size (in the corresponding units) and click Next to continue.
NOTE: The recommended RAM cache size is 1 GB per 1 TB of storage.
7. Define the Flash caching policy and the cache size. Click Next to continue.
NOTE: The recommended Flash cache size is 10% of the Device size.
8. Specify Target Parameters and select the Allow multiple concurrent iSCSI connections checkbox to enable several clients to connect simultaneously to the target.
9. Click Create to add a new device and attach it to the target.
10. Click Create to add a new device and attach it to the target.
11. Click Finish to close the wizard.
12. Right-click on the recently created device and select Replication Manager from the shortcut menu.
13. Click Add replica.
14. Select Synchronous “Two-Way” Replication as a replication mode.
15. Specify Partner Hostname or IP Address and Port Number. Click Next.
16. Choose Create new Partner Device and click Next.
17. Choose the device Location and specify the target name if required. Otherwise, the name is generated automatically in accordance with the specified target alias.
18. Click Change Network Settings.
19. Specify the interfaces for Synchronization and Heartbeat channels. Click OK. Then click Next.
20. Choose Synchronize from existing Device
21. Click Create Replica.
Click Finish to close the wizard.
22. The successfully added devices appear in the StarWind Management Console.
23. Follow the similar procedure to create other virtual disks that will be used as datastores.
Adding Discover Portals
1. To connect the previously created devices to the ESXi host, click on the Storage -> Adapters -> Configure iSCSI and choose the Enabled option to enable Software iSCSI storage adapter.
2. In the Configure iSCSI window, under Dynamic Targets, click on the Add dynamic target button to specify iSCSI interfaces.
3. Enter the iSCSI IP addresses of all StarWind nodes for the iSCSI traffic.
Confirm the actions by pressing Save configuration.
4. The result should look like in the image below.
5. Click on the Rescan button to rescan storage.
6. Now, the previously created StarWind devices are visible to the system.
7. Repeat all the steps from this section on the other ESXi host, specifying corresponding IP addresses for the iSCSI subnet.
1. Open the Storage tab on one of your hosts and click on New Datastore.
2. Specify the Datastore name, select the previously discovered StarWind device, and click Next.
3. Enter datastore size and click Next.
4. Verify the settings and click Finish.
5. Add another Datastore (DS2) in the same way but select the second device for the second datastore.
6. Verify that your storages (DS1, DS2) are connected to both hosts. Otherwise, rescan the storage adapter.
7. Path Selection Policy changing for Datastores from Most Recently Used (VMware) to Round Robin (VMware) has been already added into the Rescan Script, and this action is performed automatically. For checking and changing this parameter manually, the hosts should be connected to vCenter.
8. Multipathing configuration can be checked only from vCenter. To check it, click the Configure button, choose the Storage Devices tab, select the device, and click the Edit Multipathing button.
9. From the ESXi host, click on the Manage tab on one of the hosts and proceed to Services. Choose SSH and right-click on Start, then select Start and Stop with host.
10. Connect to the host using the SSH client (e.g. Putty).
11. Check the device list using the following command:
esxcli storage nmp device list
12. For devices, adjust Round Robin size from 1000 to 1 using the following command:
esxcli storage nmp psp roundrobin deviceconfig set --type=iops --iops=1 --device=
NOTE: Paste UID of the StarWind device at the end of the command. Also, this parameter has been already added into the Rescan Script and this action is performed automatically.
13. Repeat the steps above on each host for each datastore.
14. Сhoose Advanced Settings.
15. Select Disk and change the Disk.DiskMaxIOSize parameter to 512.
Configuring an Automatic Storage Rescan
1. Open the Terminal page.
2. Edit file /opt/StarWind/StarWindVSA/drive_c/StarWind/hba_rescan.ps1 with the following command:
3. In the appropriate lines, specify the IP address and login credentials of the ESXi host on which the current StarWind VM is stored and running:
$ESXiHost1 = “IP address”
$ESXiUser = “Login”
$ESXiPassword = “Password”
1. Click on the Configuration tab on all of the ESXi hosts and choose Advanced Settings.
2. Select Disk and change the Disk.DiskMaxIOSize parameter to 512.