Powershell script

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

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

Post Reply
johnkapp
Posts: 5
Joined: Wed Oct 12, 2011 12:30 pm

Sat Sep 22, 2012 11:06 pm

Good afternoon,
I am working on a Powershell script using StarwindX. The script executes, allocates the drives, but gets an Error 104 Target name "..." is invalid according to RFC 3722! when creating the partner Target. I can manually create the same HA device and target with the same names, but the script gives me the error. I couldn't find anything regarding the errors. I would appreciate any suggestions. It is just the first phase of getting ready for new servers.

$server = New-SWServer -host 127.0.0.1 -port 3261 -user root -password starwind

$server.Connect()

$masterNode = new-Object Node

$masterNode.HostName = "SAN-1"
$masterNode.HostPort = "3261"
$masterNode.Login = "root"
$masterNode.Password = "starwind"
$masterNode.ImagePath = "My Computer\E\Virtual Disks"
$masterNode.ImageName = "ha-NGITest"
$masterNode.Size = 100
$masterNode.CreateImage = $true
$masterNode.TargetAlias = "ha-NGITest"
$masterNode.AutoSynch = $true
$masterNode.CacheBlockExpiry = 5000
$masterNode.CacheSize = 256
$masterNode.CacheMode = "wb"
$masterNode.HBInterface = "10.3.62.77:3260,10.3.72.77:3260"
$masterNode.SyncInterface = "10.3.6.107:3260,10.3.252.1:3260"
$masternode.SyncSessionCount = "4"

$partnerNode = new-Object Node

$partnerNode.HostName = "10.3.61.66"
$partnerNode.HostPort = "3261"
$partnerNode.Login = "root"
$partnerNode.Password = "starwind"
$partnerNode.ImagePath = "My Computer\E\Virtual Disks"
$partnerNode.ImageName = "ha-NGITestP"
$partnerNode.Size = 100
$partnerNode.CreateImage = $true
$partnerNode.TargetAlias = "ha-NGIBRTestP"
$masterNode.AutoSynch = $true
$partnerNode.HBInterface = "10.3.62.66:3260,10.3.66.3260:3260"
$partnerNode.SyncInterface = "10.3.6.104:3260,10.3.252.2:3260"


Add-HADevice -server $server -masterNode $masterNode -partnerNode $partnerNode -initMethod ?lear -verbose -debug

$server.Disconnect()
User avatar
Anatoly (staff)
Staff
Posts: 1675
Joined: Tue Mar 01, 2011 8:28 am
Contact:

Mon Sep 24, 2012 2:36 pm

Hello,

I think that this issue is related to the wrong target name (alias) spelling, as it is possible to see form next string:

Code: Select all

Target name "..." is invalid according to RFC 3722! when creating the partner Target.
And doublechecking with the corresponding RFC:
http://www.ietf.org/rfc/rfc3722.txt


Most likely that the issue was caused because you havent used lower-case only in the target name

Code: Select all

$partnerNode.TargetAlias = "ha-NGIBRTestP"
Try to use it and everything should work fine.
Best regards,
Anatoly Vilchinsky
Global Engineering and Support Manager
www.starwind.com
av@starwind.com
Post Reply