StarWind Resource Library

StarWind Virtual SAN Hyper-Converged 2 nodes scenario with VMware vSphere

Published: November 17, 2016

Introduction

This document provides detailed instructions on how to create a minimal 2-node highly available shared storage configuration with StarWind Virtual SAN. This document will guide you through creating the Storage Controller Virtual Machine and StarWind Virtual SAN installation.

StarWind Virtual SAN® is a native Windows hypervisor-centric hardware-less VM storage solution. It creates a fully fault tolerant and high performing storage pool built for the virtualization workloads by mirroring existing server’s storage and RAM between the participating storage cluster nodes. The mirrored storage resource is then connected to all cluster nodes and treated just as local storage by both hypervisors and clustered applications.

This guide is intended for experienced VMware and Windows system administrators and IT professionals who would like to configure StarWind® Virtual SAN Hyper-Converged solution for vSphere deployments. It provides a step-bystep configuration guidance for a 2-node vSphere cluster using StarWind Virtual SAN to convert local storage of the ESXi hosts into a fault tolerant shared storage resource for ESXi.

A full set of up-to-date technical documentation can always be found here, or by pressing the Help button in the StarWind Management Console.

For any technical inquiries, please visit our online community, Frequently Asked Questions page, or use the support form to contact our technical support department.

Setup Diagram

The diagram bellow illustrates the network and storage setup schematically.

Preparing Hypervisor for StarWind Deployment

Creating Datacenter

1. Connect to vCenter, click Getting Started tab, click Create Datacenter and enter Datacenter name.

Creating a Cluster

1. Click the Datacenter’s Getting Started tab and click Create a cluster.

2. Enter the cluster name and click next.

Add Hosts to Cluster

1. Open your cluster in a tree view and click Add a host.

2. Enter name or IP address of the ESXi host and enter administrative account.

3. Verify settings.

Click Next.

4. Assign the License.

Click Next.

Lockdown mode is not enabled by-default.

Click Next.

5. Verify the settings.

Click Finish.

6. Add 2-nd host to the cluster. The result should be as on the screen below.

Configuring Networks

1. Create vSwitch to use as Management traffic.

2. Create vSwitch to use as iSCSI and Heartbeat channel.

Please note that you should create Virtual Machine Port Group and VMKernel for this vSwitch. Jumbo Frames should be enabled on vSwitch and VMKernel.

3. Create vSwitch to use as SYNC channel.

Please note that you should create only Virtual Machine port group here. Jumbo Frames should be enabled on vSwitch.

4. Perform the network configuration with same steps as described above on the second ESXi node: Create vSwitch to use for Management traffic.

5. Create vSwitch to use as ISCSI and Heartbeat channel.

Please note that you should create Virtual Machine Port Group and VMKernel for this vSwitch. Jumbo Frames should be enabled on vSwitch and VMKernel.

6. Create vSwitch to use as SYNC channel.

Please not that you should create only Virtual Machine port group here. Jumbo Frames should be enabled on vSwitch.

Repeat these steps in case you have more channels dedicated for Synchronization and iSCSI+Heartbeat traffic.

Preparing StarWind VMs

1. Create VMs with Windows 2012 R2 where StarWind will be deployed.
StarWind VMs on ESXi hosts should be configured with the following settings.
Memory: at least 8 Gb (plus size of RAM cache, which you are planning to use)
CPUs: 4 virtual sockets, 1 core per socket.
Hard disk 1: 100 Gb for OS.
Hard disk 2: Size you are planning to use as a shared storage.
Note: Each hard disk should be Thick Provisioned Eager Zeroed.
Network adapter 1: Management
Network adapter 2: iSCSI for VMs
Network adapter 3: Sync for VMs
Note: All Network Adapters should be VMXNET3.

Configuring StarWind VMs startup/shutdown

1. On both ESXi hosts configure the VM startup policy.

2. Start the VMs, install OS and StarWind.

Configuring Automatic storage rescan

For each ESXi host configure automatic storage rescan.
1. Download vSphere PowerCLI and install it on each StarWind virtual machine: https://my.vmware.com/web/vmware/details downloadGroup=PCLI630R1&productId=491

2. In the VM running StarWind, open Powershell and change the Execution policy to Unrestricted.

3. Type in Set-ExecutionPolicy Unrestricted and press Enter.

4. Create a script that will do a HBA rescan on the hypervisor host.

Add-PSSnapin VMware.VimAutomation.Core | Out-Null
$ESXiHost1 = “IP address”
$ESXiUser = “Login”
$ESXiPassword = “Password”
Connect-VIServer $ESXiHost1 –User $ESXiUser –Password $ESXiPassword | Out-Null
Get-VMHostStorage $ESXiHost1 –RescanAllHba
Disconnect-VIServer $ESXiHost1 –Confirm:$false

In the appropriate lines specify the ESXi host IP address and login credentials the StarWind VM will stay on and run.
$ESXiHost1 = “IP address”
$ESXiUser = “Login”
$ESXiPassword = “Password”
Save the script as rescan_script.ps1 on C:\ of the VM.

NOTE: This script requires PowerCLI 6.3 that in turn requires the .NET 4.5.
Install the .NET 4.5 feature in Server Manager -> Add features (original Media or a connection to Windows Update is required). Download PowerCLI 6.3 from vmware.com

5. Go to Control Panel -> Administrative Tools -> Task Scheduler -> Create Basic Task, and follow the wizard steps:

Click the Next button.

6. Click the Next button.

7. Click the Next button.

8. Click the Next button.

9. In the Add arguments field type: “-ExecutionPolicy Bypass -NoLogo -NonInteractive – NoProfile -WindowStyle Hidden -File C:\rescan_script.ps1”. Click the Next button.

10. Click Finish to exit the Wizard.

11. Configure the task to run with highest privileges by enabling the checkbox at the bottom of the window. Also, make sure that “Run whether user is logged on or not” option is selected.

12. Switch to the Triggers Tab.

13. On the Triggers Tab verify that the trigger is set up correctly.

14. Click New and another trigger.

15. Click New again.

16. Switch to the Actions Tab.

17. On the Actions Tab verify the parameters for the task.

Press OK and type in the credentials for the user whose rights will be used to execute the command.

18. Do the same steps on the second StarWind VM, specifying the corresponding settings.

Provisioning Storage with StarWind

Creating devices (DS1, DS2)

1. Open Add Device (advanced) Wizard.

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 a virtual disk location and size.

To connect previously created devices to ESX host, click over Manage tab, then click Storage and choose (or add new if it doesn’t exist) the Software iSCSI storage adapter. Under Adapter details section click Targets tab.

Click Next.

5. Specify virtual disk options.

Click Next to continue.
Note: Sector size should be 512 bytes in case you are using ESXi.

6. Define the RAM caching policy and specify the cache size (in MB). You can also set maximum available cache size by selecting the appropriate checkbox.

Note: Recommended RAM cache size is 1 Gb per 1 Tb of storage.
Click Next to continue.

7. Optionally, define the Flash caching policy and the cache size.

Note: Recommended Flash cache size is 10% from your Device size.
Click Next to continue.

8. Specify target parameters. Select the Target Name checkbox to enter a custom name of a target.

Otherwise, the name will be generated automatically in accordance with the specified target alias.

Click Next to continue.

9. Click Create to add a new device and attach it to the target.

10. Click Finish to close the wizard.

11. Right-click the recently created device and select Replication Manager from the shortcut menu.

12. Then, click Add replica.

13. Select Synchronous two-way replication as a replication mode.

Click Next to proceed.

14. Specify a partner hostname, IP address and port number.

Click Next.

15. Choose Create new Partner Device and click Next.

16. Choose device location and specify target name. Otherwise, the name is generated automatically in accordance with the specified target alias.

17. Click Change Network Settings.

18. Specify interfaces for synchronization and Heartbeat channels.

Click OK. Then click Next.

19. Choose Synchronize from existing Device

20. Click Create Replica.

Click Finish to close the wizard.

21. The successfully added devices appear in the StarWind Console.

22. Follow the similar procedure to create other virtual disks that will be used as Datastores.

Preparing Datastores

Adding Discover portals

1. To connect previously created devices to ESX host click over Configuration tab, then click Storage Adapters and choose (or add) the ISCSI storage adapter. Under Details section click Properties tab.

2. Under Dynamic Discovery click the Add… button to add iSCSI servers.

3. Enter the IP address of the first StarWind node (sw1) from the virtual local network 172.16.10.*

Click OK.

4. Add the IP address of the second StarWind node (sw2).172.16.10.*

Click OK.

5. The result should look like the image below.

6. After that rescan storage.

7. Now you should see the previously created StarWind devices.

8. Repeat all steps from this section on the other ESXi node specifying corresponding IP addresses.

Creating Datastores

1. Open one of your hosts Configuration tab and click Storage.

2. Click Add Storage.

3. Select Disk/LUN.

4. Select StarWind Disk DS1.

Click Next.

5. Check Current Disk Layout.

Click Next.

6. Enter Datastore name (DS1).

7. Enter datastore size.

Click Next.

8. Verify the settings.

Click Finish.

9. Add another Datastore (DS2) in the same way, but select the second device for the second datastore.

10. Verify that your storages (DS1, DS2) are connected to both hosts. Otherwise rescan storage adapter.

11. Right-Click on Datastore and click Properties.

12. Click Manage Paths.

13. Change Path Selection Policy to Round Robin and click Change.

14. Repeat these steps for each Datastore on each host.

Additional tweaks

1. Click configuration tab on one of the hosts and choose Security Profile.

2. Choose SSH and click Options.

3. Start SSH service.

4. Connect to your host using SSH client (e.g. Putty).

5. Check device list using following cmdlet: esxcli storage nmp device list.

6. For devices adjust Round Robin size from 1000 to 1 using following cmdlet:
esxcli storage nmp psp roundrobin deviceconfig set –type=iops –iops=1 –device=

Note. Paste UID of StarWind device in the end of the cmdlet.

7. Repeat these steps on each host and for each Datastore.

8. Click configuration tab on one of the hosts and choose Advanced Settings.

9. Click Disk and change Disk.DiskMaxIOSize option to 512.

Turn on vSphere HA Feature

1. Open cluster Edit Settings and click Turn on vSphere HA. Click OK.

Conclusion

So far we have covered the configuration of the StarWind VSAN for minimalistic HyperConverged 2-nodes scenario with VMware. All your virtual machines are now stored on a shared storage that is provided by StarWind, VMware HA provides you VMs with redundancy while StarWind is responsible for the storage uptime. The combination of StarWind shared storage and VMware ensures high application and data availability across the entire virtualized environment. Using StarWind VSAN, we’ve converted the local storage of both ESXi hosts into a fault tolerant shared storage as we synchronously ”mirror” the storage between the nodes. The VSAN nested inside a VM and running on both ESXi hosts ensures data safety and maintains continuous application availability.