VMware Cloud Community
Hitesh31
Contributor
Contributor

Requirement for user to select CPU and Memory as dropdown at request time vRA 7.6

Hi All,

Need some assistance with providing the user to input the CPU and Memory in the IAAS request form as dropdown.(unable to use custom forms as Servicenow integration is not supported for custom forms)

The custom properties "VirtualMachine.CPU.Count" and "VirtualMachine.Memory.Value" cannot be directly added as custom properties as that approach does not work.

Only option is to create a property definition and then have a vRO workflow at building machine phase to get the property and update the value of the CPU and Memory.

I have created a vRO workflow to gather the created custom property input via payload and then when I am trying to update the property on the VM from vRA entity, I am receiving the below error message.

"Cannot call method of get "null"

Below is the script used to update the CPU

System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(vCACHost,virtualMachineEntity,"VirtualMachine.CPU.Count",CPU.toString(),false,false,false,false);

var props = new Properties();

props.put("VMCPUs", CPU);

actionResult = System.getModule("com.vmware.library.vcac").updateVCACEntity(vCACHost.id,virtualMachineEntity.modelName,virtualMachineEntity.entitySetName,virtualMachineEntity.keyString, props,new Properties(),new Properties());

Reply
0 Kudos
0 Replies