EDIT:
Looks like this affects quite a lot of Properties. Just found the same problems with VMware.VirtualCenter.Folder and VirtualMachine.Network0.Name
HI all,
you have probably noticed that when you are using vRA custom forms that the ReservationPolicyID isn't working and throwing you the following error.:
(vRA 7.5 plus https://kb.vmware.com/s/article/59378 )
The following component requests failed: smallRHEL. Allocation request [Composition RequestId: [969dfad8-52b4-4f39-8e68-ba9c6dcba281], CompTypeId: [Infrastructure.CatalogItem.Machine.Virtual.vSphere], BlueprintId: [smallRHEL], CompId: [smallRHEL], BlueprintRequestId: [5cb0a374-982c-454a-8cc7-c38eb0517dd4], RootCafeRequestId: [9da8ba9d-63ef-4a73-8a16-421f51d9fa5a], SubtenantId: [06890147-51f7-4857-98c7-e5b6ca2d9dcd]] with binding id [20fd1dba-3807-4ece-8b1a-6ad5dc1a5ce2] failed with [Infrastructure service provider error: A server error was encountered. Error requesting machine. Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).].
I finally found the workaround that fixes this issue. The problem seems to be caused by the element coming onto the canvas as an DataGrid, Switching it to DropDown will solve the problem. Here is how to do this:
- Create a ReservationPolicyID Property Definition and link it to the action : com.vmware.vra.reservations/getApplicableReservationPolicies
- Assign the ReservationPolicyID to the Blueprint
- Create a Custom Form
- Drag the ReservationPolicyID onto the canvas
- save the form
- export the form to JSON
- Open the JSON (I use Notepad++ and JSTool)
- Look in the schema section (scroll down) for your ReservationPolicyID it should look like this:
"CentOS_7~ReservationPolicyID": { "label": "Cluster", "type": { "dataType": "complex", "isMultiple": false }, "default": "", "valueList": { "id": "com.vmware.vra.reservations/getApplicableReservationPolicies", "type": "scriptAction", "parameters": [] }, "placeholder": "No data found", "constraints": { "required": true } },
- Exhange the "type": { "dataType": "complex", "isMultiple": false } to "type": { "dataType": "string", "isMultiple": false} so only this is left "type": { "dataType": "string"}
- Save the file
- Import the JSON into customForms
- DONE