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

OneView - HPOVProfile Assign Connection Help

Occasional Collector

OneView - HPOVProfile Assign Connection Help

I'm using the HP OneView 1.2 pack with OneView 1.2 and am having some issues with connecting networks to profiles from PowerShell. 


I copied an existing profile to a new profile via copy-hpovprofile (existing name) (new profile name)


Unfortunately none of the network connections copied over. 


I then attempted to use the new-hpovprofileconnection cmdlet to apply the connections but had no luck. After reviewing the wiki it appears that cmdlet should be used in tandem with new-hpovprofile or set-hpovprofile cmdlets... however the set-hpovprofile cmdlet doesn't appear to exist in the 1.2 module. 


So, is there anyway to apply network connections to existing profiles via powershell? 



Neighborhood Moderator

Re: OneView - HPOVProfile Assign Connection Help

Hello kruddy, and welcome to the HP OneView community.


What version of the HP OneView 1.20 PowerShell library are you using?  Connections are maintained when copying a Server Profile with the Copy-HPOVProfile cmdlet.


As for setting a Server Profile, you use the Get-HPOVProfile cmdlet, and you can then use the New-HPOVProfileConnection to then add the object to the connections property of the server profile (connections is an array, so you can use the += or .Add() method.)  Then, use the Set-HPOVResource cmdlet to update on the appliance.


If you would prefer, you can use the GitHub Issues tracker to report this issue.

Accept or Kudo

Occasional Collector

Re: OneView - HPOVProfile Assign Connection Help

about_HPOneView.120 has the latest release as Release 1.20.0078.0


Using verbose mode it doesn't look like it's passing any of the connections in the array:
VERBOSE: [COPY-HPOVPROFILE] New Server Profile name provided Profile_Profile_XXXXXXXXXXXX
VERBOSE: [COPY-HPOVPROFILE] New Server Profile object:
type : ServerProfileV4
name : Profile_XXXXXXXXXXXX
description :
serverHardwareTypeUri : /rest/server-hardware-types/E812A4BC-E75E-47D9-ADA6-1203902BB507
enclosureGroupUri : /rest/enclosure-groups/6dd4dc7a-c35c-4583-a8e2-f13225237eaf
affinity : BayAndServer
associatedServer : USEXXXXXXX
hideUnusedFlexNics : True
firmware : @{forceInstallFirmware=False; firmwareBaselineUri=/rest/firmware-drivers/bp-hp-service-pack-for-proliant-oneview-2014-11-30-05; manageFirmware=True}
macType : Virtual
wwnType : Virtual
serialNumberType : Virtual
category : server-profiles
connections : {}
bootMode :
boot : @{manageBoot=True; order=System.Object[]}
bios : @{manageBios=True; overriddenSettings=System.Object[]}
localStorage : @{logicalDrives=System.Object[]; manageLocalStorage=False; initialize=False}
serverHardwareUri : /rest/server-hardware/35323037-3235-5355-4535-31324D41434A



Thanks for the tip on the connections part being an array, using the += option does allow me to add connections (the .Add() method does not though, an error message something to the effect of 'collection of a fixed size' pops up).


However that has lead me to another issue... It's when copying profiles by way of the copy-hpovprofile, all ofthem come back with an error message in the OneView GUI of:
Set administrative server power lock for the server hardware enc 1, bay 1.
Release administrative server power lock for the server hardware enc 1, bay 1.


Unable to apply a profile to the server hardware.


Resolution Ensure network connectivity to the server is available. Try applying the profile again.



I have full connectivity to the server's iLO and if I copy the profile via the OneView GUI it works just fine.


Thanks again.

Neighborhood Moderator

Re: OneView - HPOVProfile Assign Connection Help

Two things:


  1. 1.20.78 is not the current version.  There was a bug where connections where being removed from the original server profile object and not being placed correctly into the server server profile object.  That was fixed in the 1.20.109 version.
  2. Please open a new Issue at the HP OneView GitHub Issues Tracker for the other issue.  Please include the appliance version, and your scripts.  It would also help to provide the entire Server Profile object that you are trying to apply the copied profile to (use Get-HPOVProfile 'name' | format-list *)



Accept or Kudo