HPE OneView
cancel
Showing results for 
Search instead for 
Did you mean: 

HPOnewView.500 module New-HPOVServerProfileConnection not accepting -mac auto

 
SOLVED
Go to solution
Min Aung
Visitor

HPOnewView.500 module New-HPOVServerProfileConnection not accepting -mac auto

Hi,

Brand new to OneView powershell so apologies if this have been reported and resolved before but Google hadn't been as helpful as it has been previously.

Current P.O.C of Synergy 3 Frame Image Streamer solution returning errors for MAC settings when setting FC connection.  The following works manually on the GUI but struggling with scripts.

Scenario: Trying to set connection parameters from the fly for a SAN boot profile (unassigned: so no MAC) with profile template decalred.  Profile template had empty LUN IDs and TargetWwpn to allow for multiple storage controller not managed within Synergy.

Environment: Powershell core 6 on RHEL7, OneView version: 5.0.2152.1665

=====================================================================

$profileName = "profile-test22"
$EG = Get-HPOVEnclosureGroup -name <EG Name>
$HWType = Get-HPOVServerHardwareTypes -name "SY 480 Gen10 1"
$svr = Get-HPOVServer -ServerHardwareType $HWType -ErrorAction Stop | Select-Object -First 1
$con3 = Get-HPOVNetworkSet -Name "NetworkSet1" | New-HPOVServerProfileConnection -id 3 -type Ethernet -Name NetworkSet1-data-2
$con4 = Get-HPOVNetworkSet -Name "NetworkSet1" | New-HPOVServerProfileConnection -id 4 -type Ethernet
$con5 = Get-HPOVNetworkSet -Name "NetworkSet2" | New-HPOVServerProfileConnection -id 5 -type Ethernet
$con6 = Get-HPOVNetworkSet -Name "NetworkSet2" | New-HPOVServerProfileConnection -id 6 -type Ethernet
$con1 = Get-HPOVNetwork -Name "SAN-A" | New-HPOVServerProfileConnection -id 1 -type FibreChannel -bootable -priority Primary -TargetWWPn <Controller Wwpn> -LUN 1
$con2 = Get-HPOVNetwork -Name "SAN-B" | New-HPOVServerProfileConnection -id 2 -type FibreChannel -bootable -priority Secondary -TargetWWPn <Controller Wwpn> -LUN 1
$conList = $con1, $con2, $con3, $con4, $con5, $con6
$task = New-HPOVServerProfile -name $profileName -assignmentType "unassigned" -ServerProfileTemplate <Template Name> -sht $HWType -EnclosureGroup $EG -connections $conList -ManageBoot | Wait-HPOVTaskComplete

===========================================================================

When populating

 $con1 = Get-HPOVNetwork -Name "SAN-A" | New-HPOVServerProfileConnection -id 1 -type FibreChannel -bootable -priority Primary -TargetWWPn <Target WWN> -LUN 1 -mac

Returns:

New-HPOVServerProfileConnection : Missing an argument for parameter 'MAC'. Specify a parameter of type 'System.String' and try again.

===========================================================================

I thought (Wrongly) that this defaults to auto or user-defined?

Any help and direction much appreciated. Or if RTFM please forward links to previous resolution or the POSH wiki page?

Min Aung

 

1 REPLY 1
ChrisLynch
Neighborhood Moderator
Solution

Re: HPOnewView.500 module New-HPOVServerProfileConnection not accepting -mac auto

The `-MAC` parameter expects an address, not "Auto" or "UserDefined", as defined in the Cmdlet help.  That is specified in the call to New-HPOVServerProfile or New-HPOVServerProfileTemplate using the -MacAssignment, -WwnAssignment and/or -SnAssignment parameters.

 

Remember, PowerShell "manpages" are built-in and are called with Get-Help [CmdletName].  You can also get to the online help version of the Cmdlet by append -Online to the Get-Help call.


I am an HPE employee

Accept or Kudo