Closed ericholton closed 3 years ago
Sorry, but the log file you provided does not contain any helpful indication to what your issue is. Can you please be specific in what commands you are trying to execute, and what exact error message you are getting? Please try to copy and paste text and not create screenshots, as they tend to be blurry and hard to read in most cases.
I don't understand Chris. I only attached text files. No screen shots. This is the command that isn't working:
Get-HPOVServerProfile | ConvertTo-HPOVPowerShellScript
The verbose output of the command is attached in the original issue.
Thanks, Eric
But without the error message captured, I have nothing to go on to identify what the issue is. And simply providing the Cmdlet used here unforatunately is not enough. There is something specific about the server profile that is probably causing the issue that I otherwise cannot reproduce.
One other way to help here is to provide the generated JSON file in the following:
Get-HPOVServerProfile | ConvertTo-Json -Depth 99 | Out-File $env:Temp\server-profiles.json
I could then attempt to figure out what is causing the issue with the ConvertTo-HPOVPowerShellScript
Cmdlet.
Here you go. Thanks! server-profile.txt
Sorry, I didn't notice the slight difference between the requested command for this issue and the other one. Here is the requested output. Thanks! server-profiles.txt
I'm not finding anything particularly wrong here. I still cannot identify where the issue is. Can you try capture this again using the following:
$ScriptBlock = { Get-HPOVServerProfile | ConvertTo-HPOVPowerShellScript }
Get-HPOVCommandTrace -ScriptBlock $ScriptBlock
Then attach the file created.
Here you go. Thanks! 2010301923_HPOV_transcript.log
Thanks. And one more, which should help me stitch together the pieces:
$Error | fl * -force | clip
Then paste your clipboard.
Here you go. Thanks! error.log
I see what the problem is. There are profiles where the connection contains unassigned connections. Is that intentional? The Cmdlet doesn't support that today, as its use case is very specific and not very broad. Can you remove that connection, or assign it a network?
For instance, server profile HA-DRS-Cluster-Node1
connection ID 4 is not assigned to a network (the networkUri
property is null
):
{
"id": 4,
"name": "Management-B",
"functionType": "Ethernet",
"networkUri": null,
"portId": "Mezz 3:2-a",
"requestedVFs": "0",
"allocatedVFs": 0,
"interconnectUri": "/rest/interconnects/45457745-744b-4394-b2bc-dd771845bf1f",
"macType": "Physical",
"wwpnType": "Physical",
"mac": "94:40:C9:6B:BF:2D",
"wwnn": null,
"wwpn": null,
"requestedMbps": "0",
"allocatedMbps": 0,
"maximumMbps": 0,
"ipv4": null,
"boot": {
"priority": "NotBootable"
},
"state": "Reserved",
"status": "Disabled",
"managed": true,
"networkName": null,
"lagName": null,
"interconnectPort": 4,
"isolatedTrunk": false,
"privateVlanPortType": "None"
}
I just checked and all connections do have an assigned network. However, the get-hpovserverprofile -name HA-DRS-Cluster-Node1 | ConvertTo-HPOVPowerShellScript now works. I am assuming someone changed the config.
I am very sorry to have wasted your time on this one but thank you very much for your help!
Well, it was because there were connections without networks assigned, which is allowed. But the library just didn't handle that correctly. I'm adding support for it, which in the future shouldn't cause this again.
This is now addressed in the following releases:
Closing.
Expected Behavior
I was hoping to capture the powershell equivalent of a server profile to make generating a new profile easier.
Actual Behavior
The function fails.
Steps to reproduce
Get-HPOVServerProfile | ConvertTo-HPOVPowerShellScript
See the attached output file. convert-output.txt
Version Information
HPE OneView PowerShell Library Version (
Get-HPOVVersion
or$PSLibraryVersion
): HPE OneView Appliance Version (Get-HPOVVersion -ApplianceVer
):Output from
$PSVersionTable
on your Windows Host: