Traditionally, VMware requires having some sort of the shared storage to guarantee the data safety, allow the virtual machines migration, enable continuous application availability, and eliminate any single point of failure within IT environment. VMware users have to choose between two options when selecting the shared storage:
Hyperconverged solutions that allow sharing the same hardware resources for the application (i.e. hypervisor, database) and the shared storage, thus decreasing the TCO and achieving the outstanding performance results.
Compute and Storage separated solutions that keep the compute and storage layers separately from each other, thus making the maintenance easier, increasing the hardware usage efficiency, and allow building the system accurately for solving the task.
This guide is intended for experienced VMware and Windows system administrators and IT professionals who would like to configure StarWind Virtual SAN® hyperconverged solution for vSphere deployments. It provides a step-by-step guidance on configuring 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.
Pre-Configuring the Servers
The diagram below illustrates the network and storage configuration of the solution described in this guide.
Preparing Hypervisor for StarWind 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. In this document, 172.16.10.x subnet is used for iSCSI/StarWind heartbeat traffic, while 172.16.20.x subnet is used for the Synchronization traffic. All actions below should be applied to each ESXi server.
1. Create two vSwitches, one for the iSCSI/ StarWind Heartbeat channel and the other one for the Synchronization channel.
Note: Virtual Machine Port Group should be created for iSCSI/ StarWind Heartbeat and the Synchronization vSwitches while VMKernel port should be created only for iSCSI traffic. Static IP address should be assigned to VMKernel ports.
2. Create a VMKernel port for iSCSI/ StarWind Heartbeat channel.
3. Add Virtual Machine Port Group on the vSwitch for iSCSI traffic and on the vSwitch for Synchronization traffic.
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.
Preparing StarWind Virtual Machines
5. Create Virtual Machines (VMs) on each ESXi host with Windows Server 2016 (2012 R2) and StarWind VSAN installed.
StarWind VMs on ESXi hosts should be configured with the following settings:
RAM: at least 4 GB (plus the size of the RAM cache if it is planned to be used)
CPUs: at least 4 virtual processors with 2 GHz reserved;
Hard disk 1: 100 GB for OS (recommended);
Hard disk 2: Depends on the storage volume to be used as shared storage.
NOTE: Each hard disk should be Thick Provisioned Eager Zeroed.
Network adapter 1: Management
Network adapter 2: iSCSI
Network adapter 3: Sync
NOTE: All network adapters should be of the VMXNET3 type.
NOTE: Active Directory Domain Services role can be added on StarWind Virtual Machine (VM) if necessary, thus it can serve as a domain controller.
Configuring StarWind VMs Startup/Shutdown
6. Setup the VMs startup policy on both ESXi hosts from Manage -> System tab in ESXi web console. In the appeared window, check Yes to enable the option and choose stop action as Shut down. Click Save to proceed.
7. To configure VM autostart, right – click on it, navigate to Autostart and click Enable.
8. Complete the actions above on StarWind VM located on another host.
9. Start the both virtual machines, install OS and StarWind Virtual SAN.
Downloading, Installing and Registering the Software
10. Download the StarWind setup executable file from our website by following the next link:
11. Launch the downloaded setup file on the virtual machine where StarWind Virtual SAN will be installed. The setup wizard will appear.
12. Read and accept the License Agreement.
Click Next to continue.
13. Carefully read the information about new features and improvements. Red text indicates warnings for users who are updating existing software installations.
Click Next to continue.
14. Select the following components for the minimum setup:
- StarWind Virtual SAN Service
The StarWind service is the “core” of the software. It can create iSCSI targets as well as share virtual and physical devices. The service can be managed from StarWind Management Console on any Windows computer or VSA that connected to the network. Alternatively, the service can be managed from StarWind Web Console deployed separately.
- StarWind Management Console
The StarWind Management Console is the Graphic User Interface (GUI) part of the software that controls and monitors all storage-related operations (e.g. allows users to create targets and devices on StarWind Virtual SAN servers connected to the network).
15. Specify the Start Menu folder.
Click Next to continue.
16. Enable the checkbox if you want to create a desktop icon.
17. A prompt will appear that allows requesting a time-limited fully functional evaluation key, or a FREE version key. Alternatively, the already purchased commercial license key for StarWind Virtual SAN can be used. Select the appropriate option.
18. Click Browse to locate the license file.
19. Review the licensing information.
Click Next to apply the license key.
20. Verify the installation settings. Click Back to make any changes or Install to continue.
21. Click Finish to complete the installation process. Optionally, StarWind Management Console can be launched by choosing the corresponding setting.
22. Repeat the steps above on the second virtual machine.
Configuring Automatic Storage Rescan
For each ESXi host, configure automatic storage rescan.
23. Log in to StarWind VM and install vSphere PowerCLI on each StarWind virtual machine by adding the PowerShell module (Internet connectivity is required). To do so, run the following command in PowerShell:
Install-Module -Name VMware.PowerCLI -AllowClobber
NOTE: In case of using Windows Server 2012 R2, online installation of PowerCLI requires Windows Management Framework 5.1 or upper version available on VMs. Windows Management Framework 5.1 can be downloaded by the following link:
24. Open PowerShell and change the Execution Policy to Unrestricted by running the following command:
25. Create a PowerShell script which will perform an HBA rescan on the hypervisor host.
IIn the appropriate lines, specify the IP address and login credentials of the ESXi host on which the current StarWind VM is stored and running:
$ESXiHost = “IP address”
$ESXiUser = “Login”
$ESXiPassword = “Password”
Save the script as rescan_script.ps1 to the root of the C:\ drive of the VM.
26. Perform the configuration steps above on the partner node.
27. Go to Control Panel -> Administrative Tools -> Task Scheduler -> Create Basic Task and follow the wizard steps:
28. Specify the task name, select When a specific event is logged, and click Next.
29. Select Application in the Log dropdown, type StarWindService as the event source and 788 as the event ID. Click the Next button.
30. Choose Start a Program as the action that the task will perform and click Next.
31. Type powershell.exe in the Program/script field. In the Add arguments field, type:
“ -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File C:\rescan_script.ps1 ”
Click the Next button to continue.
32. Click Finish to exit the Wizard.
33. Configure the task to run with highest privileges by enabling the checkbox at the bottom of the window. Also, make sure that the “Run whether user is logged on or not” option is selected.
34. Switch to the Triggers tab. Verify that the trigger on event 788 is set up correctly.
35. Click New and add other triggers by Event ID 782, 257, 773, and 817.
36. All added triggers should look like in the picture below.
37. Switch to the Actions tab and verify the parameters for the task.
38. Press OK and type in the credentials for the user whose rights will be used to execute the command.
Perform the same steps on the second StarWind VM, specifying the corresponding settings.
Provisioning Storage with StarWind VSAN
Creating StarWind HA devices (DS1, DS2)
39. Open StarWind Management Console and click on the Add Device (advanced) button.
40. Select Hard disk device as the type of device to be created. Click Next to continue.
41. Select Virtual disk. Click Next to continue.
42. Specify virtual disk name, location, and size.
43. Specify virtual disk options.
Click Next to continue.
Note: Sector size should be 512 bytes in case you are using ESXi.
44. Define the RAM caching policy and specify the cache size (in corresponding units).
Note: Recommended RAM cache size is 1 GB per 1 TB of storage.
Click Next to continue.
45. Define the Flash caching policy and the cache size. Click Next to continue.
Note: Recommended Flash cache size is 10% of your Device size.
46. Specify target parameters. Select the Target Name checkbox to enter a custom name of a target if required. Otherwise, the name will be generated automatically in accordance with the specified target alias.
Click Next to continue.
47. Click Create to add a new device and attach it to the target.
48. Click Finish to close the wizard.
49. Right-click on the recently created device and select Replication Manager from the shortcut menu.
50. Then, click Add replica.
51. Select Synchronous “Two-Way” Replication as a replication mode.
Click Next to proceed.
52. Specify a partner hostname, IP address, and port number.
53. Choose Create new Partner Device and click Next.
54. Choose a device location and specify target name if required. Otherwise, the name is generated automatically in accordance with the specified target alias.
55. Click Change Network Settings.
56. Specify interfaces for Synchronization and Heartbeat channels.
Click OK. Then click Next.
57. Choose Synchronize from existing Device
58. Click Create Replica.
59. Click Finish to close the wizard.
60. The successfully added devices appear in the StarWind Management Console.
61. Follow the similar procedure to create other virtual disks that will be used as datastores.
Adding Discover Portals
62. 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.
63. In the Configure iSCSI window, under Dynamic Targets, click on the Add dynamic target button to specify iSCSI interfaces.
64. Enter the iSCSI IP address of the first StarWind node from the virtual local network 172.16.10.*
65. Add the IP address of the second StarWind node – 172.16.10.*
Confirm your actions by pressing Save configuration.
66. The result should look like in the image below.
67. Click on the Rescan button to rescan storage.
68. Now, the previously created StarWind devices are visible.
69. Repeat all the steps from this section on the other ESXi node, specifying corresponding IP addresses for the iSCSI subnet.
70. Open the Storage tab on one of your hosts and click on New Datastore.
71. Specify the Datastore name, select the previously discovered StarWind device, and click Next.
72. Enter datastore size. Click Next.
73. Verify the settings. Click Finish.
74. Add another Datastore (DS2) in the same way but select the second device for the second datastore.
75. Verify that your storages (DS1, DS2) are connected to both hosts. Otherwise, rescan the storage adapter.
76. 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.
77. 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.
78. 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.
79. Connect to the host using the SSH client (e.g. Putty).
80. Check the device list using the following command:
esxcli storage nmp device list
81. 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 in the end of the command. Also, this parameter has been already added into the Rescan Script and this action is performed automatically.
82. Repeat the steps above on each host for each datastore.
83. Click the configuration tab on one of the hosts and choose Advanced Settings.
84. Select Disk and change the Disk.DiskMaxIOSize parameter to 512.
NOTE: Before creating Datacenter, the vCenter server should be deployed.
85. Connect to vCenter, select the Getting Started tab, click on Create Datacenter, and enter the Datacenter name.
86. Click the Datacenter’s Getting Started tab and click Create a cluster. Enter the name of the cluster and click Next.
Adding Hosts to Cluster
87. Open the Cluster tab and click Add a host.
88. Enter the name or IP address of the ESXi host and enter the administrative account.
89. Lockdown mode is not enabled by default.
90. Assign the License from the Licensing tab.
Verify the settings.
91. Turn on vSphere HA, click Cluster -> Configure -> Edit
This technical paper has covered the configuration of the StarWind VSAN for minimalistic Hyperconverged 2-nodes scenario with VMware v6.5. In this setup, all virtual machines are stored on a shared storage that is provided by StarWind. VMware HA provides 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, the local storage of both ESXi hosts is converted into a fault-tolerant shared storage synchronously ”mirrored” between the nodes. The VSAN nested inside a VM and running on both ESXi hosts ensures data safety and maintains continuous application availability.