Exception Plugin is not supported

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

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

Post Reply
tig_jeff
Posts: 36
Joined: Fri Apr 07, 2017 6:18 pm

Wed Jan 17, 2018 4:33 pm

I've been trying to write some scripts to get this all working in a 1, 2, 3 then 4 scenario.
I wrote and tested a bunch of scripts and they all worked.

Now, I'm getting an error when I try to create a 2 node HA volume... with scripts I have tested before without issue...
2018-01-17_10-29-46.jpg
2018-01-17_10-29-46.jpg (47.26 KiB) Viewed 15925 times
My configuration is:
VSAN001
- Windows Server 2016 Standard Core with all updates applied
- C:\VSAN is the directory for all volumes
- NIC 1 @ 10.1.1.10 - Managment/iSCSI
- NIC 2 @ 10.1.4.10 - Heartbeat
- NIC 3 @ 10.1.5.10 - Sync
VSAN002
- Windows Server 2016 Standard Core with all updates applied
- C:\VSAN is the directory for all volumes
- NIC 1 @ 10.1.1.20 - Managment/iSCSI
- NIC 2 @ 10.1.4.20 - Heartbeat
- NIC 3 @ 10.1.5.20 - Sync

The firewall is disabled on each machine.

Here is my script
--- START ---
# +------------------------------------------+
# | |
# | Starwind vSAN Free 2 Node Setup Script |
# | Original script by: Starwind Software |
# | Modifications by: Jeff Morlen |
# | |
# | This script will setup a 2 node HA |
# | cluster on Microsoft Windows Hyper-V |
# | server or Microsoft Windows Server |
# | versions 2012, 2012R2 and 2016 with |
# | PowerShell installed and configured. |
# | |
# | ---- DEFAULTS FOR THIS SCRIPT ARE ---- |
# | |
# | Host 1 configured as: |
# | NIC1: 10.1.1.10/24 - System Data |
# | NIC2: 10.1.4.10/24 - Heartbeat |
# | NIC3: 10.1.5.10/24 - SAN Data Sync |
# | |
# | Host 2 configured as: |
# | NIC1: 10.1.1.20/24 - System Data |
# | NIC2: 10.1.4.20/24 - Heartbeat |
# | NIC3: 10.1.5.20/24 - SAN Data Sync |
# | |
# | vSAN data location is (both systems): |
# | C:\VSAN\[data files] |
# | |
# | Primary Image on Host 1: |
# | HA_MASTER_IMG1 |
# | Backup Image on Host 2: |
# | HA_BACKUP_IMG1 |
# | |
# +------------------------------------------+


Import-Module StarWindX

try
{
# --------------------------------------------------------------------------------------------------------------------
# START OF CONFIGURATION OF 1ST HOST
# --------------------------------------------------------------------------------------------------------------------
# IP address (below) is the address of Host 1.
# The default for this script, as noted above, is 10.1.1.10.
#
$server = New-SWServer -host 10.1.1.10 -port 3261 -user root -password starwind

$server.Connect()

# Define the object $firstNode using "new-Object Node"
$firstNode = new-Object Node

# The ImagePath is written in a sudo-linux style.
# Whereas "C:\VSAN" = "My Computer\C\VSAN" or "D:\Data" = "My Computer\D\Data"
$firstNode.ImagePath = "My computer\C\VSAN"

$firstNode.ImageName = "HA_MASTER_IMG1"

# 102400 = 100GB; 51200 = 50GB; 20480 = 20GB; 1024 = 1GB (based on 1024=1GB)
$firstNode.Size = 20480

# Sets the active command to create the image upon running of script. (DUH)
$firstNode.CreateImage = $true

# Sets the "TargetAlias" to "targetha1"
$firstNode.TargetAlias = "targetha1"

# Sets the Sync to "AUTO" (DUH)
$firstNode.AutoSynch = $true

# HBInterface (below) is the target interface on the 2nd system, Host 2.
# The default for this script, as noted above, is 10.1.4.20.
$firstNode.HBInterface = "#p2=10.1.4.20:3260"

# SyncInterface (below) is the target interface on the 2nd system, Host 2.
# The default for this script, as noted above, is 10.1.5.20.
$firstNode.SyncInterface = "#p2=10.1.5.20:3260"

$firstNode.CacheSize = 128

# CacheMode: wb = write back; wt = write through
# If you are going to store virtual machines on this SAN, use WT.
$firstNode.CacheMode = "wt"

$firstNode.PoolName = ""
$firstNode.SyncSessionCount = 1
$firstNode.ALUAOptimized = $true

#
# Device sector size. Possible values: 512 or 4096(May be incompatible with some clients!) bytes.
# For Hyper-V use 4096 sector size. (suggested by Starwind)
#
$firstNode.SectorSize = 4096
# --------------------------------------------------------------------------------------------------------------------


# --------------------------------------------------------------------------------------------------------------------
# START OF CONFIGURATION OF 2ND HOST
# --------------------------------------------------------------------------------------------------------------------
# Define the object $secondNode using "new-Object Node"
$secondNode = new-Object Node

# IP address (below) is the address of Host 2.
$secondNode.HostName = "10.1.1.20"
$secondNode.HostPort = "3261"
$secondNode.Login = "root"
$secondNode.Password = "starwind"

# The ImagePath is written in a sudo-linux style.
# Whereas "C:\VSAN" = "My Computer\C\VSAN" or "D:\Data" = "My Computer\D\Data"
$secondNode.ImagePath = "My computer\C\VSAN"

$secondNode.ImageName = "HA_BACKUP_IMG1"

# 102400 = 100GB; 51200 = 50GB; 20480 = 20GB; 1024 = 1GB (based on 1024=1GB)
$secondNode.Size = 20480

# Sets the active command to create the image upon running of script. (DUH)
$secondNode.CreateImage = $true

# Sets the "TargetAlias" to "partnerha1"
$secondNode.TargetAlias = "partnerha1"

# Sets the Sync to "AUTO" (DUH)
$secondNode.AutoSynch = $true

# HBInterface (below) is the target interface on the 1st system, Host 1.
# The default for this script, as noted above, is 10.1.4.10.
$secondNode.HBInterface = "#p1=10.1.4.10:3260"

# SyncInterface (below) is the target interface on the 1st system, Host 1.
# The default for this script, as noted above, is 10.1.5.10.
$secondNode.SyncInterface = "#p1=10.1.5.10:3260"

$secondNode.ALUAOptimized = $true
# --------------------------------------------------------------------------------------------------------------------

# Starts the process off with the creation of "Clear" volumes on both the first and second nodes.
$device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -initMethod "Clear"

# --------------------------------------------------------------------------------------------------------------------

# Captures the sync status to variable $syncState and it is displayed later.
$syncState = $device.GetPropertyValue("ha_synch_status")


while ($syncState -ne "1")
{
#
# Refresh device info
#
$device.Refresh()

$syncState = $device.GetPropertyValue("ha_synch_status")
$syncPercent = $device.GetPropertyValue("ha_synch_percent")

# Adds a pause of 2 seconds (I think)
Start-Sleep -m 2000

# Writes the syncstate to the screen.
Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow
}
}
catch
{
# Error handling and display of error in the event of an issue.
Write-Host "Exception $($_.Exception.Message)" -foreground red
}

# Terminate session and close "server"
$server.Disconnect()
--- END ---

What am I missing?
Hope this helps.
- Jeff Morlen

Follow me on Twitter (@tig_jeff)
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Wed Jan 17, 2018 5:16 pm

Is StarWindX installed on the system where you try to run this?
tig_jeff
Posts: 36
Joined: Fri Apr 07, 2017 6:18 pm

Wed Jan 17, 2018 6:50 pm

Boris-
Yes, it is/was.

I did figure out that the license file didn't get applied correctly in my script.

I used the command line:
..\..\starwind-v8_build_11456.exe /SILENT /COMPONENTS="service,service\starflb,service\starportdriver,StarWindxDll,StarWindXDll\powerShellEx" /LICENSEKEY="..\..\StarWind_Virtual_SAN_Free_License_Key.swk"

An uninstall and re-install with this:
..\..\starwind-v8_build_11456.exe /SILENT /COMPONENTS="service,service\starflb,service\starportdriver,StarWindxDll,StarWindXDll\powerShellEx" /LICENSEKEY="..\..\StarWind_Virtual_SAN_v8_no3_Free_License_Key\StarWind_Virtual_SAN_Free_License_Key.swk"

And it worked.
Not sure how I dropped part of the path from the script... but fixing the install script fixed the issue.

And, from what you mentioned...
It seems that this error is related to proper installation of the StarWindX modules on the system... and licensing thereof.
Correct?

Thanks.
Hope this helps.
- Jeff Morlen

Follow me on Twitter (@tig_jeff)
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Wed Jan 17, 2018 9:30 pm

That's great you managed to figure out the issue with the license not applied properly.

Generally, that error might have been caused rather by incorrect operation of StarWindX instead of StarWindX being not installed on the system where you run the installation script. The worst thing you would need to do in that case is reinstalling StarWindX using the two components "StarWindxDll,StarWindXDll\powerShellEx".
Post Reply