createHA_2.ps1 to CVM's

Software-based VM-centric and flash-friendly VM storage + free version
Post Reply
Bob-Check
Posts: 4
Joined: Sun Jun 14, 2026 1:13 am

Fri Jul 03, 2026 4:14 am

Hi Team,

How do you stop the \ in the name of the image file when running the PS against a pair of CVM's ? I've read the https://www.starwindsoftware.com/blog/s ... ing-guide/ and followed the default syntax as well as escaping the characters, single quoting, adding a / in the $imagePath (as shown in this one) - in each case the backslash is added.

PS C:\WINDOWS\system32> C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell\20260622-HA-LUN.ps1
Request to : 3261
-
control FileBrowser -GetFileSize:"/mnt/storage/\ha-storage-01.img"
-
200 Failed: invalid path provided.



excerpt from the script is below (without the appended forwardslash) shown in error above.

param($addr="10.20.0.251", $port=3261, $user="root", $password="starwind",
$addr2="10.20.0.252", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="NotSynchronize",
# $size=23552000,
$size=1024,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="/mnt/storage",
$imageName="ha-storage-01",
$createImage=$true,
$storageName="",
$targetAlias="target-ha-storage-01",
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="none",
$cacheSize=0,
$autoSynch = $true,
$syncInterface="#p2=172.18.1.12:3260",
$hbInterface="#p2=172.19.1.12:3260",
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="/mnt/storage",
$imageName2="ha-storage-01",
$createImage2=$true,
$storageName2="",
$targetAlias2="target-ha-storage-01",
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$autoSynch2 = $true,
$syncInterface2="#p1=172.18.1.11:3260",
$hbInterface2="#p1=172.19.1.11:3260",
$createTarget2=$true,
$bmpFolderPath2=""
)

Cheers,

Lee.
Post Reply