SovLabs Support

Submit a Ticket My Tickets
Welcome
Login

Dynamically add multiple NICs using Property Toolkit

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


  1. In your catalog items, search for "Add IPAM Profile - SovLabs" and select REQUEST
  2. 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.
  3. Take note of the configuration label you provided as it will be used where you see <IPAMprofileForNic1> later on in these instructions.
  4. Submit your request


Procedure

Create a property definition for your blueprint

  1. Create a property definition, you can name this anything ie; AddNic1
    1. Data type: Boolean
    2. Display as: Checkbox
    3. Label: <Meaningful label ie; "Add second network card?"
  2. Save your property definition


Add your property definition to your blueprint

  1. In your blueprint , go to Properties -> Custom Properties and add the property definition you created in the previous step
  2. Ensure "Show in request" has a check in it

  3. This will now add a check box to your blueprint


Add a custom property SovLabs_CreateProperties_ to your blueprint

  1. In your blueprint , go to Properties → Custom Properties
  2. Create a custom property that starts with SovLabs_CreateProperties_ (This will allow property toolkit to create the properties required for the additional NIC) 
    1. Name: SovLabs_CreateProperties_<Meaningful Description>  example:  SovLabs_CreateProperties_AddNic1
    2. Value: 

      {"name": "{% if <propertyDefinitionName> == 'true' %}SovLabs_IPAMProfile_nic1{% else %}NoNic1Required{% endif %}","value": "{% if <propertyDefinitionName> == 'true' %}<IPAMprofileForNic1>{% else %}NoNic1Required{% endif %}"}


    3. Example Code with properties completed:
      {"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.   

    4. Click OK and SAVE your blueprint


Validating your deployment adds the additional NIC

vRO property toolkit
  1. In vRO you can browse to Property Toolkit → Property Toolkit machineRequested
  2. Look for your VM and confirm the  custom property has triggered
vRO IPAM
  1. In vRO you can browse to IPAM → IPAM machineBuilding
  2. 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
  1. In your vSphere web client, find your VM
  2. Under the heading VM Hardware you will see two network adapters

Additional information

For more information on property toolkit please see: 

http://docs.sovlabs.com/latest/vRA/7.5/modules/vra-toolkits/property-toolkit/


 


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.