HPE OneView
1842835 Members
2926 Online
110210 Solutions
New Discussion

Re: HPE ONEView CommandLet New-OVClusterProfile

 
dave04
Regular Visitor

HPE ONEView CommandLet New-OVClusterProfile

 

I’m having an issue creating a Hypervisor Cluster Profile in HPE OneView using the PowerShell module. When I run the New-OVClusterProfile cmdlet, I immediately get this error:

New-OVClusterProfile: The "type" field content, "HypervisorClusterProfileV3", included in this request is not valid. Correct the content in the 'type' field of the JSON and retry the request.

When I check the PowerShell module source, it still uses HypervisorClusterProfileV3 as the cluster profile type (see screenshot).

Version 3 in psmVersion 3 in psm
However, when I look at existing cluster profiles created through the OneView GUI, they are all using HypervisorClusterProfileV6 (screenshot)Version 6 by gui-createdVersion 6 by gui-created.
So OneView clearly expects V6, but the PowerShell library is still hardcoded to V3.

I tried manually updating the PSM file so the cmdlet outputs “HypervisorClusterProfileV6”, but after doing that, the JSON that gets generated becomes invalid, and OneView returns errors saying there are “multiple problems with the JSON file.” So at this point V3 is rejected by the appliance, and V6 breaks the JSON structure if I try to force it.

problems with jsonproblems with json

My questions:

  • Is there official PowerShell support for HypervisorClusterProfileV6?

  • Is the OneView PowerShell module outdated compared to the REST API schema?

  • Is there a supported or documented method to create V6 Hypervisor Cluster Profiles via PowerShell?

  • Why does modifying the PSM file cause the JSON to become invalid—are there additional schema fields required for V6 that the module doesn’t know about?

Any help or clarification would be really appreciated. I’ll add screenshots below.

 

1 REPLY 1
Azr_geek
Regular Advisor

Re: HPE ONEView CommandLet New-OVClusterProfile

Hello @dave04,

As of OneView 6.7, the official HPE OneView PowerShell library does not support HypervisorClusterProfileV6. It is behind the REST API schema. The PowerShell module has been lagging behind since OneView 6.x. The REST API is on ClusterProfile V6, while the PowerShell module still assumes V3.

HPE recommends you use:

The Generic REST Calls
Invoke-OVRequest -Uri "/rest/hypervisor-cluster-profiles" -Method POST -Body $Json

You must build a V6-compatible JSON body yourself, according to the current OneView REST API. This is officially supported because OneView support fully accepts REST calls.

Use Generic REST via PowerShell (Recommended)

Export a known-good V6 profile from OneView GUI:

1. Export the profile (in GUI → Actions → Export → JSON)
You will get a fully valid V6 object.

2. Modify the JSON minimally
(change name, ESXi cluster, hosts…).

3. POST it back using PowerShell:

$json = Get-Content .\clusterV6.json -Raw

Invoke-OVRequest `
-Uri "/rest/hypervisor-cluster-profiles" `
-Method POST `
-Body $json

I hope this works. If it does, please mark this as a solution so other peers can also benefit.

Regards,
Azr_geek