Network Profiles On The Fly

Joshua Andrews
by Joshua Andrews

Categories

SovLabs version 2019.14.0 drops this week and with it comes a new way to assign vRealize Automation network profiles that use the vRealize Automation IPAM endpoint. Leveraging the approvals lifecycle stage, this feature builds on the same framework we talked about in Automate Renaming Your vRA Deployments a couple of weeks ago.

With this feature, you can set the network policy for a NIC on a virtual machine at request time instead of statically in the blueprint. While that functionality has been available for years with SovLabs IPAM profiles, this new functionality doesn’t require the SovLabs IPAM modules or a third-party IPAM solution.

This scenario will work well for deploying into smaller test/dev environments or onto other networks not managed by a full-fledged IPAM solution.

 

Requirements

Like the Automate Renaming Your vRA Deployments feature, this functionality requires a license for the SovLabs Property Toolkit module and SovLabs version 2019.14.0.

You’ll also need a blueprint with a virtual machine, and a network profile that uses the vRealize Automation IPAM endpoint.

 

You also need to associate the network profile with a specific network on your reservation.

The process also requires an approval policy, but we’ll create that first.

 

Create or update an approval policy

You’ll need an approval policy set in order for Property Toolkit to work its magic.

While you can manually add the level and custom properties to a new or existing Approval Policy, it's easiest to use the Manage Property Toolkit Approval Policies catalog item for managing approval policies, which was introduced in version 2019.10.0 and updated for 2019.14.0.

To create a new approval, launch the Manage Property Toolkit Approval Policies catalog item.

Network Profiles on the fly-3

Set the Action to Create and the Approval Policy Type to Service Catalog - Catalog Item Request - Virtual Machine. (If you are Renaming your vRA Deployments, that leverages the Service Catalog - Catalog Item Request type.)

Note: If you don’t see Manage Property Toolkit Approval Policies in the catalog, or if it doesn’t have an option for Catalog Item Request - Virtual Machine, run the Configure the SovLabs Plugin part of the Upgrade process.

Add a meaningful name and Submit the request.

If you check your Approval Policies you’ll see the new policy with its Pre Approval level added at Order 1.

 

If you take a look, the level will have a bunch of VirtualMachine.Networkx.NetworkProfileName custom properties set.

 

 

Entitle the blueprint with the Approval Policy

In order for the approval policy to trigger on the catalog item, you need to associate the policy with the item using an entitlement. Here’s how to do that.

Open your entitlement and go to Items & Approvals.

Hit the + next to Entitled Items and select your blueprint and the Approval policy created above.

 

If your Approval doesn’t show up in the list, click "Show All" and the approval should show up.

 

Add the Network Profile trigger to the Blueprint

Back on your blueprint, add a custom property of SovLabs_VM_NetworkProfileName0 with a value of the name of the network profile you created.

 

Note: I’m using the SovLabs_DisableDNS property also as the network I’m deploying to isn’t serviced by a DNS server. This works on any virtual machine where you don’t want SovLabs to attempt a DNS registration.

 

If you get an error message about Error requesting machine. No reservation available that has all specified network profiles: dev-las assigned to any network paths make sure there are no typos in the SovLabs_VM_NetworkProfileName0 and that you added the network profile to your reservation.

A deployment will show the injected network profile value.

Then the virtual machine with have a NIC0 added and set to the network assigned to the network profile.

 

End Game

Where this functionality really shines is when you start using the Template Engine to set the SovLabs_VM_NetworkProfileName0 value using properties from the vRA Business Group, Property Groups, the deployment itself or machine properties (note that you cannot leverage properties from the Compute Resource, Reservation or Endpoint). You can also set any of the network profiles (0-9) using this method and even use Property Toolkit to create the SovLabs_VM_NetworkProfileName# as needed.

Note that for best results you should make sure to set a value for VirtualMachine.Network0.NetworkProfileName0, either by adding a network to the blueprint or using SovLabs_VM_NetworkProfileName0 to set it.

The documentation page has more information on the expected behavior in vRA 7.6 and 7.5 if you try skipping 0.

 

The first step in providing reliable self-service automation for your CMP is starting a free trial.

Free Trial
Wave One Wave One
Wave Two Wave Two