So a bit of background:
I am building a two node hyper-v cluster, using two CVM's as discussed in the link in the email, all of this has been going fine, and I have volumes showing up, so yay. BUT I'm now at the part where I move to powershell and command line. I have a few issues here, but I'll start with the smallest and then on to the larger config file issue.
so specs are:
server 2022 x 2
ample networking, and multiples of, so that side is all fine
server one
management 10.27.0.27
data 172.16.10.11
Sync 172.16.20.11
Server two
management 10.27.0.25
data 172.16.10.12
sync 172.16.20.12
both are directly connected to each other (no switch), and verified in the HA networking section.
right so problem 1:
I'm unable to login to the VM interface, or via SSH (I've turned on SSH), I've tried root/starwind, and also user/rds123RDS, neither of which seem to work. I haven't changed the root account, but I did setup an account on the web interface called cvm_admin, but this doesn't seem to work either. So I'm only able to access logs by doing a support dump at the moment, which is a pain for troubleshooting config.
problem 2
I'm using the HA2 node powershell file, and I've filled it in, as best to my knowledge, but I'm getting the following:
Code: Select all
PS C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell> C:\temp\CreateHA_2.ps1
Request to 10.27.0.27 ( 10.27.0.27 ) : 3261
-
control ImageFile -CreateImage:"VSA Storage\mnt\crypted1\quorum.img" -Size:"1200" -Flat:"True" -DeferredInit:"True" -Password:"starwind"
-
200 Failed: operation cannot be completed..
So in this script, I really just want to provision a basic quorum LUN for HV Failover cluster manager, I have two other luns to create, both at around 2.9tb each, and these are separate volumes in starwind. I'm not sure if I need to modify this script for each lun, or if I can create them all in one go.
Any help/suggestions would be massively appreciated

Code: Select all
param($addr="10.27.0.27", $port=3261, $user="root", $password="starwind",
$addr2="10.27.0.26", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=1200,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="VSA Storage\mnt\crypted1",
$imageName="quorum",
$createImage=$true,
$storageName="",
$autosynch=$true,
$targetAlias="quorum",
$poolName="sda1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="none",
$syncInterface="#p1=172.16.20.11:3260" -f $addr,
$hbInterface="#p1=172.16.10.11:3260" -f $addr,
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="VSA Storage\mnt\crypted1",
$imageName2="quorum2",
$createImage2=$true,
$storageName2="",
$autosynch2=$true,
$targetAlias2="quorum2",
$poolName2="sdc1",
$syncSessionCount2=1,
$aluaOptimized2=$true,
$cacheMode2="none",
$cacheSize2=0,
$syncInterface2="#p2=172.16.20.12:3260" -f $addr2,
$hbInterface2="#p2=172.16.10.12:3260" -f $addr2,
$createTarget2=$true,
$bmpFolderPath2=""
)
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.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
$firstNode.BitmapStoreType = $bmpType
$firstNode.BitmapStrategy = $bmpStrategy
$firstNode.BitmapFolderPath = $bmpFolderPath
#
# 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.SyncInterface = $syncInterface2
$secondNode.HBInterface = $hbInterface2
$secondNode.SyncSessionCount = $syncSessionCount2
$secondNode.ALUAOptimized = $aluaOptimized2
$secondNode.CacheMode = $cacheMode2
$secondNode.CacheSize = $cacheSize2
$secondNode.FailoverStrategy = $failover
$secondNode.CreateTarget = $createTarget2
$secondNode.BitmapFolderPath = $bmpFolderPath2
$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()
}