Introduction to StarWind Virtual SAN for Hyper-V
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 the existing server’s storage and RAM between the participating storage cluster nodes. The mirrored storage resources are then connected to all cluster nodes and treated just as a local storage by all hypervisors and clustered applications. High Availability (HA) is achieved by providing multipath access to all storage nodes. StarWind Virtual SAN® delivers supreme performance compared to any dedicated SAN solution since it runs locally on the hypervisor and all I/O is processed by local RAM, SSD cache, and disks. This way it never gets bottlenecked by storage fabric.
StarWind VSAN for Hyper-V System Requirements
Prior to installing StarWind Virtual SAN for Hyper-V, 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
Pre-Configuring the Hyper-V Servers
The network interconnection diagram is demonstrated below:
Configure network interfaces on each node to make sure that Synchronization and iSCSI/StarWind heartbeat interfaces are in different subnets and connected 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.
Enabling Multipath Support
1. Open the MPIO Properties manager: Start -> Windows Administrative Tools -> MPIO. Alternatively, run the following PowerShell command :
2. In the Discover Multi-Paths tab, select the Add support for iSCSI devices checkbox and click Add.
3. When prompted to restart the server, click Yes to proceed.
4. Repeat the same procedure on the other server.
5. Enable Remote Desktop connection to the servers and join them to the domain by selecting the corresponding option in the Server Configuration window.
NOTE: Rename and configure a static IP address for network adapters.
6. Run powershell.exe in the Command Prompt to check the network adapters availability in the system:
7. To change the name and set the static IP for Heartbeat/iSCSI and Synchronization channel, run the next commands via PowerShell:
Get-NetAdapter “Ethernet1” | Rename-NetAdapter –NewName “Sync”
Get-NetAdapter “iSCSI” | New-NetIPAddress –IPAddress 172.16.10.10 –PrefixLength 24
Get-NetAdapter “Ethernet2” | Rename-NetAdapter –NewName “Sync”
Get-NetAdapter “Sync” | New-NetIPAddress –IPAddress 172.16.20.10 –PrefixLength 24
NOTE: The corresponding IP addresses should be configured on the partner node.
8. Alternatively, the network settings can be changed through the sconfig.cmd window. In Network Settings (option 8), select the Index of the NIC which should be edited:
The following actions are possible:
- Set Network Adapter Address – selection between DHCP or Static IP (recommended);
- Set DNS Servers – providing DNS settings;
- Clear DNS Server Settings;
- Return to Main Menu.
9. It is highly recommended to enable jumbo frames (9014) on the Synchronization and iSCSI networks. This can be done via PowerShell in two ways:
- Directly on the Synchronization / iSCSI adapter:
Set-NetAdapterAdvancedProperty –Name “Sync” –RegistryKeyword “*JumboPacket” –Registryvalue 9014
Set-NetAdapterAdvancedProperty –Name “iSCSI” –RegistryKeyword “*JumboPacket” –Registryvalue 9014
- For all adapters available in the system:
Set-NetAdapterAdvancedProperty –Name “*” –RegistryKeyword “*JumboPacket” –Registryvalue 9014
10. Ping each node with jumbo frames (change the asterisk to the corresponding partner node’s IP address):
ping 172.16.20.* -f –l 8900 - for Synchronization network;
ping 172.16.10.* -f –l 8900 - for iSCSI network
11. To create a virtual switch on the Management interface, run the next command via PowerShell:
New-VMSwitch –Name “vSwitch” –NetAdapterName “management”
NOTE: The Virtual Switch name must be the same on both nodes.
12. To disable firewall, please run the following command via PowerShell on each server:
Get-NetFirewallProfile | Set-NetFirewallProfile –Enabled False
13. Install Failover Clustering and Multipath I/O features on both servers using PowerShell:
Install-WindowsFeature Failover-Clustering –IncludeAllSubFeature –Restart
Enable-WindowsOptionalFeature –Online –FeatureName MultiPathIO
Enable-MSDSMAutomaticClaim –BusType iSCSI
14. Preparing storage for StarWind devices
NOTE: Please refer to the KB article about recommended RAID settings before proceeding:
Any storage array intended to be used by StarWind Virtual SAN for storing virtual disk images should meet the following requirements:
- Initialized as GPT;
- Have a single NTFS-formatted partition;
- Have a drive letter assigned.
15. To create a Local Partition for the storage drive, run the commands below in the CMD window:
select disk X //where X is the number of the disk to be processed
attributes disk clear readonly
create partition Primary
format fs=ntfs label=X quick //where X is the name for the Volume
select volume X
assign letter X //where X is the letter for the Volume
Installing StarWind VSAN for Hyper-V
1. Download the StarWind setup executable file from the StarWind website:
2. Launch the downloaded setup file on the server to install StarWind Virtual SAN or one of its components. The Setup wizard will appear. Read and accept the License Agreement.
3. Carefully read the information about the new features and improvements. Red text indicates warnings for users that are updating the existing software installations.
4. Select Browse to modify the installation path if necessary. Click on Next to continue.
5. Select the following components for the minimum setup:
- StarWind Virtual SAN Service. The StarWind Virtual SAN 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 that is on the same network. Alternatively, the service can be managed from StarWind Web Console deployed separately.
- StarWind Management Console. 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).
NOTE: To manage StarWind Virtual SAN installed on a Windows Server Core edition with no GUI, StarWind Management Console should be installed on a different computer running the GUI-enabled Windows edition.
6. Specify Start Menu Folder.
7. Enable the checkbox if a desktop icon needs to be created. Click on Next to continue.
8. When the license key prompt appears, choose the appropriate option:
- Request time-limited fully functional evaluation key.
- Request FREE version key.
- Select the previously purchased commercial license key.
9. Click on the Browse button to locate the license file.
10. Review the licensing information.
11. Verify the installation settings. Click on Back to make any changes or Install to proceed with installation.
12. Enable the appropriate checkbox to launch StarWind Management Console right after the setup wizard is closed and click on Finish.
13. Repeat the installation steps on the partner node.
Creating StarWind devices
1. In the StarWind Management Console click to Add Device (advanced) button and open Add Device (advanced) Wizard.
2. Select Hard Disk Device as the type of device to be created.
3. Select Virtual Disk.
4. Specify a virtual disk Name, Location, and Size.
5. Select the Thick provisioned disk type.
6. Define a caching policy and specify a cache size (in MB). Also, the maximum available cache size can be specified by selecting the appropriate checkbox. Optionally, define the L2 caching policy and cache size.
7. Specify Target Parameters. Select the Target Name checkbox to enter a custom target name. Otherwise, the name is generated automatically in accordance with the specified target alias.
8. Click Create to add a new device and attach it to the target.
9. Click Close to finish the device creation.
10. The successfully added devices appear in the StarWind Management Console.
Select the Required Replication Mode
The replication can be configured in one of two modes:
Synchronous “Two-Way” Replication
Synchronous or active-active replication ensures real-time synchronization and load balancing of data between two or three cluster nodes. Such a configuration tolerates the failure of two out of three storage nodes and enables the creation of an effective business continuity plan. With synchronous mirroring, each write operation requires control confirmation from both storage nodes. It guarantees the reliability of data transfers but is demanding in bandwidth since mirroring will not work on high-latency networks.
Asynchronous “One-Way” Replication
Asynchronous Replication is used to copy data over a WAN to a separate location from the main storage system. With asynchronous replication, confirmation from each storage node is not required during the data transfer. Asynchronous replication does not guarantee data integrity in case of storage or network failure; hence, some data loss may occur, which makes asynchronous replication a better fit for backup and disaster recovery purposes where some data loss is acceptable. The Replication process can be scheduled in order to prevent the main storage system and network channels overloads.
Please select the required option:
Synchronous “Two-Way” replication
1. Right-click the recently created device and select Replication Manager from the shortcut menu.
2. Select the Add Replica button in the top menu.
Asynchronous "One-Way" Replication
NOTE: Asynchronous replication requires minimum 100 MbE network bandwidth or higher. The Asynchronous node uses the LSFS device by design. Please, make sure that the Asynchronous node meets the LSFS device requirements:
1. Select Asynchronous “One-Way” Replication.
2. Enter Host name or IP address of the Asynchronous node.
3. Choose the Create New Partner Device option.
4. Specify the partner device Location . Optionally, modify the target name by clicking the appropriate button.
5. Click Change Network Settings.
6. Specify the network for asynchronous replication between the nodes. Click OK and then click Next.
7. In Select Partner Device Initialization Mode, select Synchronize from existing Device and click Next.
8. Specify Scheduler Settings and click Next.
NOTE: The size of journal files and number of snapshots depends on the settings specified in this step.
9. Specify the path for journal files and click Next.
NOTE: By default, the journal files will be located on the node with the original device. However, it is highly recommended not to store journal files on the same drive where the original device is located. Additionally, the C:\ drive should not be used as the path for journal files to avoid any issues with Windows OS.
If the same drive where the StarWind device is located is selected, the warning message about possible performance issues will pop up. If there is no additional volume available for storing the journals, click I understand the potential problem. Use the selected path.
10. Press the Create Replica button.
11. Wait until StarWind service creates a device and click Close to complete the device creation.
Selecting the Failover Strategy
StarWind provides 2 options for configuring a failover strategy:
The Heartbeat failover strategy allows avoiding the “split-brain” scenario when the HA cluster nodes are unable to synchronize but continue to accept write commands from the initiators independently. It can occur when all synchronization and heartbeat channels disconnect simultaneously, and the partner nodes do not respond to the node’s requests. As a result, StarWind service assumes the partner nodes to be offline and continues operations on a single-node mode using data written to it.
If at least one heartbeat link is online, StarWind services can communicate with each other via this link. The device with the lowest priority will be marked as not synchronized and get subsequently blocked for the further read and write operations until the synchronization channel resumption. At the same time, the partner device on the synchronized node flushes data from the cache to the disk to preserve data integrity in case the node goes down unexpectedly. It is recommended to assign more independent heartbeat channels during the replica creation to improve system stability and avoid the “split-brain” issue.
With the heartbeat failover strategy, the storage cluster will continue working with only one StarWind node available.
The Node Majority failover strategy ensures the synchronization connection without any additional heartbeat links. The failure-handling process occurs when the node has detected the absence of the connection with the partner.
The main requirement for keeping the node operational is an active connection with more than half of the HA device’s nodes. Calculation of the available partners is based on their “votes”.
In case of a two-node HA storage, all nodes will be disconnected if there is a problem on the node itself, or in communication between them. Therefore, the Node Majority failover strategy requires the addition of the third Witness node or file share (SMB) which participates in the nodes count for the majority, but neither contains data on it nor is involved in processing clients’ requests. In case an HA device is replicated between 3 nodes, no Witness node is required.
With Node Majority failover strategy, failure of only one node can be tolerated. If two nodes fail, the third node will also become unavailable to clients’ requests.
Please select the required option:
1. Select Failover Strategy.
2. Select Create new Partner Device and click Next.
3. Select a partner device Location.
4. Click Change Network Settings.
5. Specify the interfaces for Synchronization and Heartbeat Channels. Click OK and then click Next.
6. In Select Partner Device Initialization Mode, select Synchronize from existing Device and click Next.
7. Click Create Replica. Click Finish to close the wizard.
The successfully added device appears in StarWind Management Console.
8. Follow the similar procedure for the creation of other virtual disks that will be used as storage repositories.
NOTE: To extend an Image File or a StarWind HA device to the required size, please check the article below:
There are two ways to configure Witness for 2-nodes StarWind HA device, created with Node Majority Failover Strategy: File Share (SMB) as Witness and additional server as Witness Node.
– Creating HA device with File SHare(SMB) as Witness:
SMB Witness is a file, located on SMB share, which can be accessed by both nodes and help them to eliminate the split-brain issue in case of synchronization connection interruption between the nodes. To set up the SMB file share as a Witness for 2-nodes HA device with Node Majority Failover Strategy, perform the actions, described on this page:
– Creating HA device with Witness Node:
1. Select the Node Majority failover strategy and click Next.
2. Choose Create new Partner Device and click Next.
3. Specify the partner device Location and modify the target name if necessary. Click Next.
4. In Network Options for Replication, press the Change network settings button and select the synchronization channel for the HA device.
5. In Specify Interfaces for Synchronization Channels, select the checkboxes with the appropriate networks and click OK. Then click Next.
6. Select Synchronize from existing Device as the partner device initialization mode.
7. Press the Create Replica button and close the wizard.
8. The added devices will appear in StarWind Management Console.
Repeat the steps above to create other virtual disks if necessary.
Adding Witness Node
Witness node can be configured on a separate host or as a virtual machine in a cloud. It requires StarWind Virtual SAN service installed on it.
NOTE: Since the device created in this guide is replicated between 2 active nodes with the Node Majority failover strategy, a Witness node must be added to it.
1. Open StarWind Management Console, right-click on the Servers field and press the Add Server button. Add a new StarWind Server which will be used as the Witness node and click OK.
2. Right-click on the HA device with the configured Node Majority failover policy and select Replication Manager and press the Add Replica button.
3. Select Witness Node.
4. Specify the Witness node Host Name or IP address. The default Port Number is 3261.
5. In Partner Device Setup, specify the Witness device Location. Optionally, modify the target name by clicking the appropriate button.
6. In Network Options for Replication, select the synchronization channel with the Witness node by clicking the Change Network Settings button.
7. Specify the interface for Synchronization and Heartbeat and click OK.
8. Click Create Replica and then close the wizard.
9. Repeat the steps above to create other virtual disks if necessary.
NOTE: To extend an Image File or a StarWind HA device to the required size, please check the article below:
Provisioning StarWind HA Storage to Windows Server Hosts
1. Launch Microsoft iSCSI Initiator: Start -> Windows Administrative Tools -> iSCSI Initiator. Alternatively, launch it using the command below in the command line interface:
2. Navigate to the Discovery tab.
3. Click the Discover Portal button. The Discover Target Portal dialog appears. Type 127.0.0.1.
4. Click the Advanced button. Select Microsoft iSCSI Initiator as a Local adapter and select Initiator IP (leave default for 127.0.0.1). Confirm the actions to complete the Target Portal discovery.
5. Click the Discover Portal… button once again.
6. In Discover Target Portal dialog, type in the iSCSI interface IP address of the partner node that will be used to connect the StarWind provisioned targets. Click Advanced.
7. Select Microsoft iSCSI Initiator as the Local adapter, select the Initiator IP in the same subnet as the IP address of the partner server from the previous step. Confirm the actions to complete the Target Portal discovery.
8. Now, all the target portals are added on the first node.
9. Repeat the steps 1-8 on the partner node.
1. Click the Targets tab. The previously created targets are listed in the Discovered Targets section.
NOTE: If the created targets are not listed, check the firewall settings of the StarWind Server as well as the list of networks served by the StarWind Server (go to StarWind Management Console -> Configuration -> Network). Alternatively, check the Access Rights tab on the corresponding StarWind VSAN server in StarWind Management Console for any restrictions.
2. Select the Witness target from the local server and click Connect.
3. Enable checkboxes as shown in the image below. Click Advanced.
4. Select Microsoft iSCSI Initiator in the Local adapter dropdown menu. In Target portal IP, select 127.0.0.1. Confirm the actions.
NOTE: It is recommended to connect the Witness device only by loopback (127.0.0.1) address. Do not connect the target to the Witness device from the partner StarWind node.
5. Select the CSV1 target discovered from the local server and click Connect.
6. Enable checkboxes as shown in the image below. Click Advanced.
7. Select Microsoft iSCSI Initiator in the Local adapter dropdown menu. In Target portal IP, select 127.0.0.1. Confirm the actions.
8. Select the partner target from the other StarWind node and click Connect.
9. Repeat the step 6.
10. Select Microsoft iSCSI Initiator in the Local adapter dropdown menu. In the Initiator IP field, select the IP address for the iSCSI channel. In the Target portal IP, select the corresponding portal IP from the same subnet. Confirm the actions.
11. Repeat the steps 1-10 for all remaining HA device targets.
12. Repeat the steps 1-11 on the other StarWind node, specifying corresponding local and data channel IP addresses.
NOTE: It is recommended to configure the different MPIO policies depending on iSCSI channel throughput. For 1 Gbps iSCSI channel throughput, it is recommended to set Failover Only or Least Queue Depth MPIO load balancing policy. For 10 Gbps iSCSI channel throughput, it is recommended to set Round Robin or Least Queue Depth MPIO load balancing policy.
1. Configure the MPIO policy for each target except for Witness with the load balance policy of choice. Select the Target located on the local server and click Devices.
2. In the Devices dialog, click MPIO.
3. Select the appropriate load balancing policy.
4. For the Witness target, set the load balance policy to Failover Only.
5. Repeat the steps 1-4 for configuring the MPIO policy for each remaining device on the current node and on the partner node.
NOTE: In case the Failover Only MPIO policy is used, make sure to check that the local path (127.0.0.1) is set to Active, while the partner connection is set to Standby.
Connecting Disks to Servers
1. Open the Disk Management snap-in. The StarWind disks will appear as unallocated and offline.
2. Bring the disks online by right-clicking on them and selecting the Online menu option.
3. Select the CSV disk (check the disk size to be sure) and right-click on it to initialize.
4. By default, the system will offer to initialize all non-initialized disks. Use the Select Disks area to choose the disks. Select GPT (GUID Partition Style) for the partition style to be applied to the disks. Press OK to confirm.
5. Right-click on the selected disk and choose New Simple Volume.
6. In New Simple Volume Wizard, indicate the volume size. Click Next.
7. Assign a drive letter to the disk. Click Next.
8. Select NTFS in the File System dropdown menu. Keep Allocation unit size as Default. Set the Volume Label of choice. Click Next.
9. Press Finish to complete.
10. Complete the steps 1-9 for the Witness disk. Do not assign any drive letter or drive path for it.
11. On the partner node, open the Disk Management snap-in. All StarWind disks will appear offline. If the status is different from the one shown below, click Action->Refresh in the top menu to update the information about the disks.
12. Repeat step 2 to bring all the remaining StarWind disks online.
Creating a Failover Cluster in Windows Server 2016
NOTE: To avoid issues during the cluster validation configuration, it is recommended to install the latest Microsoft updates on each node.
NOTE: Server Manager can be opened on the server with desktop experience enabled (necessary features should be installed). Alternatively, the Failover cluster can be managed with Remote Server Administration Tools: https://docs.microsoft.com/en-us/windows-server/remote/remote-server-administration-tools
1. Open Server Manager. Select the Failover Cluster Manager item from the Tools menu.
2. Click the Create Cluster link in the Actions section of Failover Cluster Manager.
3. Specify the servers to be added to the cluster. Click Next to continue.
4. Validate the configuration by running the cluster validation tests: select Yes… and click Next to continue.
5. Specify the cluster name.
NOTE: If the cluster servers get IP addresses over DHCP, the cluster also gets its IP address over DHCP. If the IP addresses are set statically, set the cluster IP address manually.
6. Make sure that all settings are correct. Click Previous to make any changes or Next to proceed.
NOTE: If checkbox Add all eligible storage to the cluster is selected, the wizard will add all disks to the cluster automatically. The device with the smallest storage volume will be assigned as a Witness. It is recommended to uncheck this option before clicking Next and add cluster disks and the Witness drive manually.
7. The process of the cluster creation starts. Upon the completion, the system displays the summary with the detailed information. Click Finish to close the wizard.
Adding Storage to the Cluster
1. In Failover Cluster Manager, navigate to Cluster -> Storage -> Disks. Click Add Disk in the Actions panel, choose StarWind disks from the list and confirm the selection.
2. To configure the cluster witness disk, right-click on Cluster and proceed to More Actions -> Configure Cluster Quorum Settings.
3. Follow the wizard and use the Select the quorum witness option. Click Next.
4. Select Configure a disk witness. Click Next.
5. Select the Witness disk to be assigned as the cluster witness disk. Click Next and press Finish to complete the operation.
6. In Failover Cluster Manager, Right-click the disk and select Add to Cluster Shared Volumes.
7. If renaming of the cluster shared volume is required, right-click on the disk and select Properties. Type the new name for the disk and click Apply followed by OK.
8. Perform the steps 6-7 for any other disk in Failover Cluster Manager. The resulting list of disks will look similar to the screenshot below.
Configuring Cluster Network Preferences
1. In the Networks section of the Failover Cluster Manager, right-click on the network from the list. Set its new name if required to identify the network by its subnet. Apply the change and press OK.
NOTE: Please double-check that cluster communication is configured with redundant networks: https://docs.microsoft.com/en-us/windows-server/failover-clustering/smb-multichannel
2. Rename other networks as described above, if required.
3. In the Actions tab, click Live Migration Settings. Uncheck the synchronization network, while the iSCSI network can be used if it is 10+ Gbps. Apply the changes and click OK.
The cluster configuration is completed and it is ready for virtual machines deployment. Select Roles and in the Action tab, click Virtual Machines -> New Virtual Machine. Complete the wizard.