• Skip to primary navigation
  • Skip to content

www.open902.com

My own Knowledge Base made public ..

  • Home
  • vRealize Automation 7
    • vRA & vRB 7.2
      • Installation
        • vRA 7.2 – Installation
        • vRA 7.2 – Unattended Enterprise Install
        • vRA 7.2 – Unattended Install Answer File Generator
        • vRB 7.2 – Installation
      • Configuration
        • vRA 7.2 – Initial Configuration
        • vRA 7.2 – Endpoints and AD Integration
        • vRA 7.2 – Fabric and Business Groups
        • vRA 7.2 – Reservations, Reservation Policies and Network Profiles
        • vRA 7.2 – Blueprints and Entitlements
        • vRA 7.2 – Email Config and Approval Policies
      • Advanced Configuration
        • vRA 7.2 – Guest Agent and Software Components
        • vRA 7.2 – Custom Property RegEx
        • vRA 7.2 – Make IP in Network Profile unavailable for deployments
      • Integrations
        • vRA 7.2 – Azure Integration
        • vRA 7.2 – vRB 7.2 Configuration
        • vRB Cloud without vRA by using vIDM
    • vRA 7.0 & 7.1
      • Installation & Configuration
        • vRealize Automation 7 – Simple install
        • vRealize Automation 7 – Enterprise install
        • Upgrade vRealize Automation 7.0 to 7.0.1
        • vRA7 – Initial Configuration
        • vRA7 – Endpoint
        • vRA7 – Business Groups
        • vRA7 – AD Integration
        • vRA7 – Fabric Group
        • vRA7 – Network Profile
        • vRA7 – Reservations
        • vRA7 – IaaS Blueprint
        • vRA7 – Mail and Approvals
      • Advanced Configuration
        • vRA7 – Customize Hostname, VLAN and IP during deployment
        • vRA7 – Custom Property Relationships using Actions
        • vRA7 – vRealize Orchestrator 7
        • vRA7 – VAMI Certificate
        • vRA7 – Gugent on Linux
        • vRA7 – Gugent on Windows
        • vRA7 – Import Unmanaged Virtual Machines from vSphere
      • Integrations
        • vRA7 – NSX 6 Integration
        • Ubiquiti EdgeRouter X, NSX and vRealize Automation in network kinda harmony
        • vRA7 – vRealize Business Standard
        • vRealize Business for Cloud – Change Time zone
        • vRB Cloud without vRA by using vIDM
      • Troubleshooting
        • vRA7 – Delete stuck ‘In Progress’ Deployments
        • vRA 7 – Remove Stuck Approval Process
        • Remove Orphaned Network Profiles
        • vRA7 – Remove Stuck or Orphaned Managed Machines
  • vRA / vCAC 6
    • Installation
      • 1. Requirements
      • 2. Identity Appliance
      • 3. vCAC Appliance
      • 4. IaaS Server
    • Configuration
      • 5. Add a Tenant
      • 6. Agents & Endpoints
      • 7. Resource Allocations
      • 8. Blueprints
      • 9. Services & Catalogs
      • 10. Entitlements & Test
    • Advanced Configuration
      • Enable vCenter Orchestrator in vCAC
      • Configure External vCenter Orchestrator for vCAC
      • vCAC – Create Active Directory Endpoint & Test
      • vCAC – Refresh Inventory
      • vCAC – SMTP Settings
  • NSX
    • Ubiquiti EdgeRouter X, NSX and vRA7 Configuration
    • NSX 6 Integration into vRA7
    • NSX Authentication in Web Client using Sub-Domain users
  • vCloud Director 8.x
    • Install vCloud Director 8.0 for SP
    • NSX 6.2 for vCloud Director 8.0 SP
    • Configure vCloud Director 8.0 for SP – PVDC
    • Configure vCloud Director 8.0 for SP – Organization
    • vCloud Director 8.0 with NSX 6.2 – Final Testing
  • vCloud Director 5.x
    • 1. Installation of vCD 5.5
    • 2. vShield Manager
    • 3. VXLAN Configuration
    • 4. Initial vCloud Config
    • 5. Create a Provider vDC
    • 6.External Network
    • 7. Organization VDC
    • 8. vShield Edge & Organization Network
    • 9. Final Testing
    • 10. Installing an additional vCloud cell
    • Upgrade 1.5 > 5.5
      • 1. vCloud Director Binaries
      • 2. vShield Manager
      • 3. Final Touches
  • Lego NUC vSAN Cluster
  • Vembu
  • About Me

vRA7 – Customize Hostname, VLAN and IP during deployment

There are different ways to do this. But first, I want to do this without the use of vRO. So I rely on Custom Properties (which isn’t always as pretty unfortunately).

A reference can be found HERE

I will go through two options here.

Option 1 – IPs being managed outside of vRA (has gotchas)

What that means is, the Virtual Machine will get an IP address but vRA will keep no record of it. Essentially similar to deploying a VM from a template outside of vRA just by using vCenter templates and customizations.

First, the Blueprint itself does not have any networks attached. We do this via Custom Properties.

vRA-272

First custom property is called Hostname. Once set in a Blueprint, it will ask for a hostname and also overwrites the prefix.

This is essentially useful if your have a specific naming convention where prefixes just won’t work.

So here I create a custom property definition called Hostname and provide a textbox to enter the details.

vRA-295

The second property we add is VirtualMachine.Network0.Address.

vRA-296

If you only set those two properties, it will look nice and probably ‘just the way you like it’. BUT .. and there is a ‘but’ unfortunately

vRA-298

If you deploy a VM like that, you will be greeted with the error ‘Cannot complete customization’

vRA-286

The reason is simple – you cannot customise a virtual machine with an IP only. You require also a Gateway, Subnet etc.

You therefore need to add some more custom properties to allow an IP configuration during the deployment

  • VirtualMachine.Network0.SubnetMask
  • VirtualMachine.Network0.Gateway
  • VirtualMachine.Network0.PrimaryDns
  • VirtualMachine.Network0.DnsSuffix

These seem to be the minimum required (pretty much what vCenter Customizations require).

You can of course add additional ones (secondary DNS, WINS etc.)

Add these properties the same way you added the IP Address, example:

vRA-279

The only difference here is for the VLAN / Port Group.

As you can see I allow two port groups here. One is called External – which does not have a VLAN associated with it and IP range 192.168.1.0/24 and one which is called Internal.

This is backed by VLAN 10 and IP range 10.10.0.0/24

vRA-270

The custom property therefore is not a simple textbox (could be if you can be sure to spell them right every time you deploy a VM), but a drop down.

Name can be anything – as you can see I named just specific to the VLAN, and not port group.

Value is the actual port group vRA can see (see above screenshot).

vRA-301

Next step is to create a group and add these properties to it. A group can be added to a Blueprint so any additional custom properties added to the group will automatically show in the blueprint

If you followed the above guide you should now have 7 Custom Property Definitions

  • Hostname
  • VirtualMachine.Network0.Name
  • VirtualMachine.Network0.Address
  • VirtualMachine.Network0.Gateway
  • VirtualMachine.Network0.SubnetMask
  • VirtualMachine.Network0.PrimaryDns
  • VirtualMachine.Network0.DnsSuffix

vRA-302

Make sure you tick Show in Request for each property

vRA-303

Now add the group to the Blueprint

vRA-273

Let’s deploy the blueprint.

So the above group of properties should now ask for

  • VLAN / Portgroup
  • Hostname
  • IP Address
  • Gateway
  • Subnet Mask
  • Primary DNS
  • DNS Suffix

vRA-304

Here I add some valid details and click Submit

vRA-305

Once deployed, the VM has its custom hostname – without prefix – and its static IP set during the deployment

vRA-306

As mentioned – this approach has some gotchas … some could be significant (depending on your environment). Why is that ?

For starters, imagine you have multiple NICs. The amount of custom properties you don’t just have to create, but to maintain, can be crazy. vRA is supposed to make things easier, not harder.

Another issue is IPAM .. Unless you use Orchestrator workflows to add each IP to an IPAM solution, you have no view of what IPs are in use. At least not from within vRA. Another issue is human error.

You can of course add subnetmask / Gateway etc. to a drop down or fix the value hidden away. But as soon as you add a different network / vlan / port group into the mix, you will need to add custom property relationships to ensure VLAN X gets the Gateway for VLAN X and not VLAN Y.

It quickly gets complicated and harder to manage. One solution here is to use Network Profiles and let vRA manage IPs

Option 2 – IPs being managed by vRA

Here I got two profiles

  • External mapped to 192.168.1.0/24
  • Internal mapped to 10.10.0.0/24

vRA-307

The profiles are attached to its respective VLAN / Port group (Sorry, I call either External / Internal so not always easy to catch what is what)

vRA-308

Again I want to be able to specify Hostname. IP Address, VLAN

I will now use only three properties (this time you specify the ProfileName attached to the VLAN in question)

  • Hostname
  • VirtualMachine.Network0.ProfileName
  • VirtualMachine.Network0.Address

vRA-314

The ProfileName property is configured similar to the port group name

vRA-317

Again, Name can be anything (VLAN / IP Range etc.) , whereas Value is the Network Profile Name. 

This time I mix things up and just name them based on IP range, rather than the VLAN itself…

vRA-316

Because the Network Profiles now provide the details such as Gateway, DNS etc., we don’t need to specify them unless we really want to overwrite.

The LITTLE gotcha here : The IP you want to set manually must be part of the Network Profile Range.

For example, my Internal Range is quite empty .. So I select 10.10.0.100, which is free

vRA-310

For my external test I will be using 192.168.1.80, which is also unallocated

vRA-311

The advantage of this approach: It looks cleaner.

Internal Test:

vRA-318

External Test:

vRA-319

Once deployed, you can see that the VMs got their custom hostname and IP Address

vRA-320

You can of course make it even simpler – don’t use custom IPs 🙂 But I have seen requests to do this, so there we go.

Another reason to keep things simple, in some areas of vRA you cannot add PROPERTY GROUPS when needed.

Example – Approval Policies. You could create an approval policy where the approver has to enter an IP, and the requestor only sets the VLAN.

But approval policies don’t allow pre-configured property definitions or even groups

vRA-321

So you’d have to enter all the IP properties in there as well and it gets easily cluttered ..

Using above example – I created an approval policy where the approver has to enter an IP before the VM is being deployed

vRA-322

The requestor just selects a hostname and VLAN / Network

vRA-323

Which will require approvals

vRA-324

The approver can then enter the IP

vRA-325

Annoyingly the approver has to click the View request link to see which VLAN has actually been requested

vRA-326

So the approver enters an IP, hits Approve

vRA-327

And VM is now deployed with an approved IP.

vRA-328

Why would you do this ? Well there are actually requirements like that – where for example vRO is no option due to internal processes / skills and therefore certain steps in external systems (DNS, IPAM etc.) need to be done manually, still.

Using the approval process, a developer can request a VM in a VLAN, but the IT department dictates which IP etc., so there aren’t any conflicts. Especially useful if you use Option 1 and manage IPs outside of vRA.

Custom properties are great to some extent .. you can even give requestors the option to select NSX Security Groups etc.

vRA-332

Example:

vRA-329

vRA-330

vRA-333

 

But let’s leave that for another time 🙂

Copyright © 2019 · Genesis Sample on Genesis Framework · WordPress · Log in