2-Node vSAN Free on Hyper-V Server 2019

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

arorris
Posts: 10
Joined: Thu Aug 20, 2020 6:19 am

Thu Aug 20, 2020 6:43 am

Hello everyone,

I have found many guides regarding settings up Starwind vSAN on ESXi and Windows Server OS, but almost nothing regarding vSAN with Free license and Hyper-V Server (2016 nor 2019).

On my laptop I am running 2 Hyper-V Server 2019 as VM's , which I manage to install Starwind vSAN successfully, with a free license.
Also on my laptop I installed the vSAN Management Software but after i added the servers, a dialog box appears stating that there is no GUI because the license is free. Fair enough, not surprised!

But the official guide I am following
(https://www.starwindsoftware.com/resour ... rver-2016/)
point me to go ahead and "add device". If not from the GUI, how else I am going to do it?

I have read that some scripts exist but I have no luck finding them. Yes, i know how to use Google and i tried, but i am not so lucky the last 5 days...

Now a little backstory of what I am trying to achieve. I have used in the past the Starwind P2V - V2V converter and I WAS AMAZED how easy it was to use and how many options i have with one simple program. Previously i was using either Microsoft or VMware converter.
The last 2 weeks i discovered Starwind vSAN and i read a lot about it. I am giving it a try to use it at my lab but before that, i try to use it on my laptop as 2-node VM's.
I want to see what i can achieve with a totally budget free solution (Hyper-V Server 2019 and vSAN Free) and what i can achieve with a license (licensed vSAN / VMware ESXi / Windows Server 2019) - and more importantly how big I can go with all scenarios. I already have licensed ESXi products (vCenter also) and access to enterprise Windows Server 2019 so I can test the vSAN on every possible platform.

Please someone to point me to a guide or some help, regarding setting up free vSAN @ Hyper-V 2016 / 2019.
And one of the stuff to PM me with the licensing costs.

Kind regards
yaroslav (staff)
Staff
Posts: 2355
Joined: Mon Nov 18, 2019 11:11 am

Thu Aug 20, 2020 7:42 am

Hi,
Wow, thanks for warm words!
point me to go ahead and "add device". If not from the GUI, how else I am going to do it?
Use StarWindX scripts from C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell. To add a device you need CreateHA_2.ps1 here is the guide how to use it https://www.starwindsoftware.com/help/H ... ategy.html. Let me know if the folder is missing for some reason.

What you can do is request a 30-day Trial license and try VSAN with GUI. Please send an email to support@starwind.com to request a Trial license, or contact the person who sent you the Free key (you can also learn about licensing from him/her). While contacting support, use link at this thread as a reference.
arorris
Posts: 10
Joined: Thu Aug 20, 2020 6:19 am

Thu Aug 20, 2020 8:48 am

Wow, that was a quick reply, thanks!

Can I create everything with a 30-day trial, and upon completion reverse to free mode? Or it is not the way to go? :D
Of course i also want to learn the hard way, which means without GUI, but the moment i stuck i suddenly lost all hope. The guide is not small, because the initial setup seems to take quite some time and all steps use the GUI !!!

By the way the free license says 3 nodes, while i read on forums that it is for 2 nodes only. Is it 2 nodes + management (monitor) or I can create a 3rd VM as a node?

Also, I need someone to send me a pricelist. I believe it is something affordable and worth spending, so please, don't forget me.
Yesterday while i try to download a Free key, I have downloaded a Trial one by mistake, which i didn't use - and Valerie Riabchun follow up with an email. I have sent my questions and I wait for an answer.

I will check the power shell scripts and get back to you.

Thank you so much.
yaroslav (staff)
Staff
Posts: 2355
Joined: Mon Nov 18, 2019 11:11 am

Thu Aug 20, 2020 9:19 am

Can I create everything with a 30-day trial, and upon completion reverse to free mode? Or it is not the way to go?
Yes, you can replace the Free key with the Trial one, BUT you cannot do it other way around. Once you use the Trial key, there is no way to use Free again unless StarWind VSAN is re-installed.
The guide is not small
Just scroll all way to the end: there is the script :) There they discuss the old script, but the principles remain the same.
The only thing you are to do is create a HA device from script. The rest (setting up iSCSI Initiator, presenting storage to WS, and configuring Failover Cluster) is done in ESXi/Windows server which doees not require StarWind GUI.
Let me know if you encounter any issues.
By the way the free license says 3 nodes, while i read on forums that it is for 2 nodes only. Is it 2 nodes + management (monitor) or I can create a 3rd VM as a node?
Free license is for 3 nodes indeed. You can configure a 3-way mirror (use CreateHA_3.ps1 for that purpose). You cannot configure Node Majority in free version now, but we have plans on bringing the script with the next build.
I have downloaded a Trial one by mistake
Please do not apply the Trial key... You won't be able to go with Free one without reinstalling StarWind VSAN otherwise. Please re-fill the form to get the Free key. If it does not work just contact StarWind Support (use this thread as the reference) or the person who shared the Trial key with you.

Let me know if there is anything else I can assist you with.
arorris
Posts: 10
Joined: Thu Aug 20, 2020 6:19 am

Thu Aug 20, 2020 10:06 am

I understand the reason to not be able to revert from Trial to Free.
Just scroll all way to the end: there is the script :) There they discuss the old script, but the principles remain the same.
I prefer to read all guides till the end since i am the person who believes to RTFM :) :)
Free license is for 3 nodes indeed. You can configure a 3-way mirror (use CreateHA_3.ps1 for that purpose).
That would be really nice in case a node fails while the other is down for maintenance.
Please do not apply the Trial key...
Already deleted! :wink:

Please, pm me the price list. I see there is good support on forums, I guess it would be the same quality of support with people who purchased a license.

Regards
yaroslav (staff)
Staff
Posts: 2355
Joined: Mon Nov 18, 2019 11:11 am

Thu Aug 20, 2020 10:20 am

I cannot send it here...
Please log a support call (send email to support@starwind.com), or contact your account manager directly.

P.S. Thanks for warm words :) do not hesitate to contact me if any technical assistance is required.
arorris
Posts: 10
Joined: Thu Aug 20, 2020 6:19 am

Thu Aug 20, 2020 12:23 pm

Subject: 2-Node vSAN Free on Hyper-V Server 2019
yaroslav (staff) wrote:I cannot send it here...
Please log a support call (send email to support@starwind.com), or contact your account manager directly.

P.S. Thanks for warm words :) do not hesitate to contact me if any technical assistance is required.

And here we are!
I have modified the script according to my VM's but it seems to not running.

HV1 has 192.168.128.21 (Mgmt) / 10.10.10.11 (Sync) / 11.11.11.11 (HB)
HV2 has 192.168.128.22 (Mgmt) / 10.10.10.12 (Sync) / 11.11.11.12 (HB)
These two belong to a workgroup, not a domain. The E:\ partition has 120GB free space and a subfolder named "starwind" is present on both machines.

Here is the script - please tell me what I am missing.

param($addr="192.168.128.21", $port=3261, $user="root", $password="starwind",
$addr2="192.168.128.22", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=1200,
$sectorSize=512,
$failover=0,
#primary node
$imagePath="HV1\E\starwind",
$imageName="masterImg21",
$createImage=$true,
$storageName="Storage21",
$targetAlias="targetha21",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=10.10.10.12:3260" -f $addr2,
$hbInterface="#p2=11.11.11.12:3260" -f $addr2,
$createTarget=$true,
#secondary node
$imagePath2="HV2\E\starwind",
$imageName2="partnerImg22",
$createImage2=$true,
$storageName2="Storage22",
$targetAlias2="partnerha22",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$true,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=10.10.10.11:3260" -f $addr,
$hbInterface2="#p1=11.11.11.11:3260" -f $addr,
$createTarget2=$true
)

Import-Module StarWindX
yaroslav (staff)
Staff
Posts: 2355
Joined: Mon Nov 18, 2019 11:11 am

Thu Aug 20, 2020 2:10 pm

Could you provide me with the error you have stumbled into?
Try this one

Code: Select all

param($addr="192.168.128.21", $port=3261, $user="root", $password="starwind",
$addr2="192.168.128.22", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=1200,
$sectorSize=512,
$failover=0,
#primary node
$imagePath="My computer\E\starwind",
$imageName="masterImg21",
$createImage=$true,
$storageName="Storage21",
$targetAlias="targetha21",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=10.10.10.12:3260" -f $addr2,
$hbInterface="#p2=11.11.11.12:3260,192.168.128.22:3260" -f $addr2,
$createTarget=$true,
#secondary node
$imagePath2="My computer\E\starwind",
$imageName2="partnerImg22",
$createImage2=$true,
$storageName2="Storage22",
$targetAlias2="partnerha22",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$true,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=10.10.10.11:3260" -f $addr,
$hbInterface2="#p1=11.11.11.11:3260,192.168.128.21:3260" -f $addr,
$createTarget2=$true
)

Import-Module StarWindX
arorris
Posts: 10
Joined: Thu Aug 20, 2020 6:19 am

Fri Aug 21, 2020 8:15 am

The first error i received, was "200 Failed: internal error..." and now i understood it was because i changed the $path from "My Computer\E\starwind" to "HV1\E\starwind" :(

With your code, it progress but I get a new error (please see attached).

The file is created in the first node (E:\starwind\masterImg21_HA.swdsk) but not in the second.

Thank you
Attachments
Capture.PNG
Capture.PNG (22.99 KiB) Viewed 8457 times
yaroslav (staff)
Staff
Posts: 2355
Joined: Mon Nov 18, 2019 11:11 am

Fri Aug 21, 2020 8:34 am

Did you already initialize the E:\ drive in the system? I mean is My computer E:\ already a path?
arorris
Posts: 10
Joined: Thu Aug 20, 2020 6:19 am

Fri Aug 21, 2020 9:26 am

yaroslav (staff) wrote:Did you already initialize the E:\ drive in the system? I mean is My computer E:\ already a path?
Yes of course, on both hosts! Otherwise how the *.swdsk file would be created in the first host?

Attached are the files with the path - please do check there is a file created on first host, but not on the second.
Attachments
HV2.PNG
HV2.PNG (12.53 KiB) Viewed 8451 times
HV1.PNG
HV1.PNG (40.5 KiB) Viewed 8451 times
yaroslav (staff)
Staff
Posts: 2355
Joined: Mon Nov 18, 2019 11:11 am

Fri Aug 21, 2020 9:55 pm

Hey, sorry for the delayed response...
Will be happy to see the diskpart outputs too.
Please try clearing the directories and run creation from scratch.
If that does not work, let me know.
arorris
Posts: 10
Joined: Thu Aug 20, 2020 6:19 am

Sat Aug 22, 2020 9:20 am

Disk 0 is the boot drive with Starwind, Disk 1 has only one partition, the E drive. NTFS formatted.
Attachments
diskpart.PNG
diskpart.PNG (56.31 KiB) Viewed 8422 times
arorris
Posts: 10
Joined: Thu Aug 20, 2020 6:19 am

Sat Aug 22, 2020 12:49 pm

UPDATE

I made a clean installation of both Hyper-V Server 2019. I prepared the hosts as previous, that means:
Installed Hyper-V Server
Installed all updates
Changed IP's and hostnames as previous (HV1 / 192.168.128.21 / 10.10.10.11 / 11.11.11.11) - (HV2 / 192.168.128.22 / 10.10.10.12 / 11.11.11.12)
Enabled Jumbo frames on all 3 adapters and ping each side successfully, with 3 different switches, one for every connection
Disabled firewall and enabled all roles / features
This time I have one disk, with 2 partitions - check screenshot. Second partition is GPT / NTFS
Installed Starwind with all options checked
I run the script you gave me, and still receive the same error :cry: :cry: :cry: :cry: :cry:
File is created in E:\starwind folder.

I am getting crazy....

Full code is here

Code: Select all

param($addr="192.168.128.21", $port=3261, $user="root", $password="starwind",
	$addr2="192.168.128.22", $port2=$port, $user2=$user, $password2=$password,
#common
	$initMethod="Clear",
	$size=1200,
	$sectorSize=512,
	$failover=0,
#primary node
	$imagePath="My computer\E\starwind",
	$imageName="masterImg21",
	$createImage=$true,
	$storageName="Storage21",
	$targetAlias="targetha21",
	$autoSynch=$true,
	$poolName="pool1",
	$syncSessionCount=1,
	$aluaOptimized=$true,
	$cacheMode="wb",
	$cacheSize=128,
	$syncInterface="#p2=10.10.10.12:3260" -f $addr2,
	$hbInterface="#p2=11.11.11.12:3260,192.168.128.22:3260" -f $addr2,
	$createTarget=$true,
#secondary node
	$imagePath2="My computer\E\starwind",
	$imageName2="partnerImg22",
	$createImage2=$true,
	$storageName2="Storage22",
	$targetAlias2="partnerha22",
	$autoSynch2=$true,
	$poolName2="pool1",
	$syncSessionCount2=1,
	$aluaOptimized2=$true,
	$cacheMode2=$cacheMode,
	$cacheSize2=$cacheSize,
	$syncInterface2="#p1=10.10.10.11:3260" -f $addr,
	$hbInterface2="#p1=11.11.11.11:3260,192.168.128.21:3260" -f $addr,
	$createTarget2=$true
	)

Import-Module StarWindX

try
{
	Enable-SWXLog

	$server = New-SWServer -host $addr -port $port -user $user -password $password

	$server.Connect()

	$firstNode = new-Object Node

	$firstNode.HostName = $addr
	$firstNode.HostPort = $port
	$firstNode.Login = $user
	$firstNode.Password = $password
	$firstNode.ImagePath = $imagePath
	$firstNode.ImageName = $imageName
	$firstNode.Size = $size
	$firstNode.CreateImage = $createImage
	$firstNode.StorageName = $storageName
	$firstNode.TargetAlias = $targetAlias
	$firstNode.AutoSynch = $autoSynch
	$firstNode.SyncInterface = $syncInterface
	$firstNode.HBInterface = $hbInterface
	$firstNode.PoolName = $poolName
	$firstNode.SyncSessionCount = $syncSessionCount
	$firstNode.ALUAOptimized = $aluaOptimized
	$firstNode.CacheMode = $cacheMode
	$firstNode.CacheSize = $cacheSize
	$firstNode.FailoverStrategy = $failover
	$firstNode.CreateTarget = $createTarget
    
	#
	# device sector size. Possible values: 512 or 4096(May be incompatible with some clients!) bytes. 
	#
	$firstNode.SectorSize = $sectorSize
    
	$secondNode = new-Object Node

	$secondNode.HostName = $addr2
	$secondNode.HostPort = $port2
	$secondNode.Login = $user2
	$secondNode.Password = $password2
	$secondNode.ImagePath = $imagePath2
	$secondNode.ImageName = $imageName2
	$secondNode.CreateImage = $createImage2
	$secondNode.StorageName = $storageName2
	$secondNode.TargetAlias = $targetAlias2
	$secondNode.AutoSynch = $autoSynch2
	$secondNode.SyncInterface = $syncInterface2
	$secondNode.HBInterface = $hbInterface2
	$secondNode.SyncSessionCount = $syncSessionCount2
	$secondNode.ALUAOptimized = $aluaOptimized2
	$secondNode.CacheMode = $cacheMode2
	$secondNode.CacheSize = $cacheSize2
	$secondNode.FailoverStrategy = $failover
	$secondNode.CreateTarget = $createTarget2
        
	$device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -initMethod $initMethod
    
	while ($device.SyncStatus -ne [SwHaSyncStatus]::SW_HA_SYNC_STATUS_SYNC)
	{
		$syncPercent = $device.GetPropertyValue("ha_synch_percent")
	        Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow

		Start-Sleep -m 2000

		$device.Refresh()
	}
}
catch
{
	Write-Host $_ -foreground red 
}
finally
{
	$server.Disconnect()
}

Attachments
createha_2.PNG
createha_2.PNG (37.06 KiB) Viewed 8419 times
yaroslav (staff)
Staff
Posts: 2355
Joined: Mon Nov 18, 2019 11:11 am

Sun Aug 23, 2020 12:37 pm

Greetings,

Please log a new call with StarWind support. Use this forum thread as a reference.
Post Reply