VMware Cloud Community
Czernobog
Expert
Expert

vRA 7.6 - Select network depending on custom property values , during provisioning and reapply settings during reprovisioning

In our env there are multiple networks available to each tenant and which network gets assigned, depends on the values of some parameters selected by the user in the request.

This is done for a few reasons:

- there can be multiple networks a client can use, but I do not want them to directly select a network, only a datacenter location.

- vRA is not capable of telling, if an ip range from a network profile is exhausted; this has prompted some complaints form clients, when requests failed due to no IPs being left and the user hat to guess which network has to be chosen.

- some networks are managed by the vRA IPAM, some are provisioned by dhcp and thus have no network profile assigned. I aim for replacing the vRA IPAM with DHCP reservations (using NSX), sicne I can work with them better

Example of the implementation:

A user selects an item (vm) from the catalog. A few values have to be selected from drop-down fields. Afterwards the request is submitted. During provisioning a vRO workflow is triggered in the Request PRE phase (MachineBuilding PRE for reprovisioning), where the inputs from the request form are parsed and network parameter values (VirtualMachine.Network0.Name, .Address etc.) are assigned to the vm. This generally works, there are some unique challenges though:

  1. the VirtualMachine.Network0.Name property cannot be set in the request form, because it gets populated later BUT if the VirtualMachine.Network0.Name is not present at all in a blueprint, vRA randomly selects one of the networks available in a reservation and assigns an ip from the network profile. Problem: This can create a situation, where an ip is allocated in a network profile, but the vm gets another network assigned by a workflow. Also, during reprovisioning, a random network is assigned each time.
  2. to mitigate 1., VirtualMachine.Network0.Name gets a static value assigned in the request form, the value is a network name (port group) present in vsphere, that has no profile assigned. The network settigns are later applied but a problem arises during reprovisioning - the network settings assigned via the workflow are deleted and the static value gets assigned again.
  3. VirtualMachine.Network0.Name cannot be assigned to a blueprint and be left empty, since it looks for a network name with the assigned value; this would end with an error right after submitting a request

My question is: is it possible the prevent vRA from assigning a random network from the reservation, if VirtualMachine.Network0.Name is not present in the blueprint?

Tags (2)
Reply
0 Kudos
0 Replies