You can define a cloud template to obtain and manage IP address assignments from your external IPAM provider. This example uses Infoblox as the external IPAM provider.

In this final step in the external IPAM integration workflow, you define and deploy a cloud template that connects your previously defined network and network profile to your organization's Infoblox account to obtain and manage IP address assignments for deployed VMs from the external IPAM provider rather than from vRealize Automation.

This workflow uses Infoblox as the external IPAM provider and in some steps, the example values are unique to Infoblox, although the intent is that the procedure can be applied to other external IPAM integrations.

Note: For cloud templates that use Infoblox as the external IPAM provider, you can run up to 200 concurrent deployments within a 20 minute period. This scaling factor has been tested with cloud templates that contain a single VM deployed to vCenter on a network that uses Infoblox as the external IPAM provider, as seen in the sample code below.

video graphic symbol The Automate IPAM and DNS for VMs using VMware vRealize Automation and Infoblox DDI Infoblox blog provides related information.

After you deploy the cloud template and the VM is started, the IP address used for each VM in the deployment appears as a network entry in the Resources > Networks page, as a new host record in the IPAM provider network in your IPAM provider's account, and in the vSphere Web Client record for each deployed VM in the host vCenter.

Prerequisites

This sequence of steps is shown in the context of an external IPAM provider integration workflow. See Tutorial: Configuring a provider-specific external IPAM integration for vRealize Automation.

Procedure

  1. Click Cloud templates > New, enter the following information in the New cloud template page, and click Create.
    • Name = ipam-bpa
    • Description = Cloud template that uses Infoblox IPAM integration
    • Project = 123VC
  2. For this example, add a cloud agnostic machine component and a cloud agnostic network component to the cloud template canvas and connect the two components.
  3. Edit the cloud template code to add a constraint tag to the network component that matches the capability tag that you added to the network profile. For this example, that tag value is infoblox_abx.
  4. Edit the cloud template code to specify that the network assignment type is static.

    When using an external IPAM provider, the assignment: static setting is required.

    For this example, the specified (fictitious value) IP address xx.yy.zzz.0 is known to be currently available in the external IPAM address space that we selected for the network in the associated network profile. While the assignment: static setting is required, the address: valuesetting is not. You can choose to begin external IP address selection at a particular address value, but doing so is not required. If you do not specify an address: value setting, the external IPAM provider selects the next available address in the external IPAM network.

  5. Verify the cloud template code against the following example.
    Sample code:
    formatVersion: 1
    inputs: {}
    resources:
      Cloud_Network_1:
        type: Cloud.Network
        properties:
          networkType: existing
          name: ipam
          constraints: 
            - tag: infoblox_abx
      Cloud_Machine_1:
        type: Cloud.Machine
        properties:
          image: ubuntu
          flavor: small
          networks:
            - network: '${resource.Cloud_Network_1.id}'
              assignment: static
              address: xx.yy.zzz.0 (fictitious value)
              name: '${resource.Cloud_Network_1.name}'

    For examples of Infoblox properties that are available for specifying DNS and DHCP settings in cloud templates, see Using Infloblox-specific properties and extensible attributes for IPAM integrations in vRealize Automation cloud templates.

  6. Click Deploy on the cloud template page, name the deployment Infoblox-1, and click Deploy on the Deployment Type page.
  7. As the cloud template is being deployed, click the Extensibility tab and select Activity > Action Runs to see the Infoblox_AllocateIP_n extensibility action running.

    After the extensibility action is completed and the machine is provisioned, the Infloblox_Update_n action propagates the MAC address to Infoblox.

  8. You can log in to and open your Infoblox account to see the new host record for the IPAM address in the associated 10.23.117.0/24 network. You can also open the DNS tab in Infoblox to see the new DNS host record.
  9. To verify that the VM is being provisioned, log in to your host vCenter and vSphere Web Client to locate the provisioned machine and view the DNS name and IP address.

    After the provisioned VM is started, the MAC address is propagated to Infoblox by an Infoblox_AllocateIP extensibility action.

  10. To view the new network record in vRealize Automation, select Infrastructure > Resources > Networks and click to open the IP Addresses tab.
  11. If you delete the deployment, the IPAM address of VMs in the deployment are released and the IP addresses are again available to the external IPAM provider for other allocations. The extensibility action for this event in vRealize Automation is Infoblox_Deallocate.