VMware Cloud Community
BillStreet00
Enthusiast
Enthusiast

Network Selection in the BP

I have multiple VLAN's and I need a way to allow my users to choose which VLAN they want to build a VM.  I did some research and found a blog posting and created a property definition called VirtualMachine.Network0.Address.  I created the dropdown and populated it.  Developers can choose which VLAN they want, looks nice and pretty.  The problem is that it only works half the time.  The other half, either the build errors out on a bad property (A specified parameter was not correct: spec.nicSettingMap.Adapter.ip) OR it assigns an IP in what appears to be a random fashion.

Has anyone else found a way to do this in a manner that still allows vRA to manage the IP?

0 Kudos
10 Replies
bdamian
Expert
Expert

Are you using vRA 6 or 7?

Have you "hard coded" the networks in the Property Dictionary?

D.

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
0 Kudos
BillStreet00
Enthusiast
Enthusiast

vRA 7.2

I found a solution.  I created a custom property called VirtualMachine.Network0.NetworkProfileName.  I added a drop down of all my VLAN names and requested users select which one they want to provision to.  Works like a charm.

0 Kudos
bdamian
Expert
Expert

You can do that in a "dynamic" way using the "com.vmware.vra.networks.getApplicableNetworks" action in the library of vRealize Orchestrator.

pastedImage_0.png

D.

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
0 Kudos
BillStreet00
Enthusiast
Enthusiast

I am using an external vRO 7.2 appliance.  When I add that piece to the BP, I get this error when opening the BP from the catalog.

Unable to start action 'com.vmware.vra.networks/getApplicableNetworks'. Reason 'Action 'getApplicableNetworks' in module 'com.vmware.vra.networks' failed : 404 (Dynamic Script Module name : getReservationTypeIdForComponent#2)'.

0 Kudos
bdamian
Expert
Expert

It seems to be a configuration problem. Please check that your vCAC infrastructure host is configured and be sure that the VCACCAFE host is configured "Per User Session".

pastedImage_1.png

D.

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
0 Kudos
BillStreet00
Enthusiast
Enthusiast

That is the way its configured but I still get the same error.  I do have the /vcac on my URL.  Do you?

0 Kudos
bdamian
Expert
Expert

I don't have the /vcac and I think it is wrong if you have it.

D.

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
0 Kudos
BillStreet00
Enthusiast
Enthusiast

Still no love.

0 Kudos
anba89
Enthusiast
Enthusiast

Hi

I have the same problem with vRA 7.2.

What do you mean with VLAN names? The name of the PortGroup? Or NetworkProfile-Name?

Thanks

Andi

0 Kudos
Atif_YNI
Enthusiast
Enthusiast

Did you find an answer to this?

0 Kudos