Overview
This article will cover utilising Property Toolkit to dynamically allocate a second network card by validating against a property definition.
Prerequisites
- Licensed for SovLabs Property toolkit
- IPAM Profile for each additional NIC you want added
For each additional NIC you need an IPAM profile corresponding to the NIC index (number) you need.
Creating an IPAM profile for additional NIC
- In your catalog items, search for “Add IPAM Profile – SovLabs” and select REQUEST
- Fill in the form with the relevant information. The import part of this is ensuring that “NIC number:” is set to 1 if it is the second NIC.
- Take note of the configuration label you provided as it will be used where you see <IPAMprofileForNic1> later on in these instructions.
- Submit your request
Procedure
Create a property definition for your blueprint
- Create a property definition, you can name this anything ie; AddNic1
- Data type: Boolean
- Display as: Checkbox
- Label: <Meaningful label ie; “Add second network card?”
- Save your property definition
Add your property definition to your blueprint
- In your blueprint , go to Properties -> Custom Properties and add the property definition you created in the previous step
- Ensure “Show in request” has a check in it
- This will now add a check box to your blueprint
Add a custom property SovLabs_CreateProperties_ to your blueprint
- In your blueprint , go to Properties → Custom Properties
- Create a custom property that starts with SovLabs_CreateProperties_ (This will allow property toolkit to create the properties required for the additional NIC)
- Name: SovLabs_CreateProperties_<Meaningful Description> example: SovLabs_CreateProperties_AddNic1
-
Value:
Js{"name": "{% if <propertyDefinitionName> == 'true' %}SovLabs_IPAMProfile_nic1{% else %}NoNic1Required{% endif %}","value": "{% if <propertyDefinitionName> == 'true' %}<IPAMprofileForNic1>{% else %}NoNic1Required{% endif %}"}
- Example Code with properties completed:
Js
{"name": "{% if AddNic1 == 'true' %}SovLabs_IPAMProfile_nic1{% else %}NoNic1Required{% endif %}","value": "{% if AddNic1 == 'true' %}IPAM_Infoblox_NIC1{% else %}NoNic1Required{% endif %}"}
NOTE: <IPAMprofileForNic1> is the configuration label you have provided to your IPAM profile for this network card.
- Click OK and SAVE your blueprint
Validating your deployment adds the additional NIC
vRO property toolkit
- In vRO you can browse to Property Toolkit → Property Toolkit machineRequested
- Look for your VM and confirm the custom property has triggered
vRO IPAM
- In vRO you can browse to IPAM → IPAM machineBuilding
- Look for your VM and look for the value nic 1 . You should see that the IPAM profiles for both NICs are present, and IP addresses for both network cards are provided
vSphere web client
- In your vSphere web client, find your VM
- Under the heading VM Hardware you will see two network adapters
Additional information
For more information on property toolkit please see:
https://docs.sovlabs.com/latest/vRA/7.5/modules/vra-toolkits/property-toolkit/