Resolve vRA/vCAC VM to vCenter VM

If you want to perform configuration tasks against a VM during the deployment process or even for Day 2 operations then you will need to resolve the vRA managed VM to a vCenter VM of type VC:VirtualMachine in your vRO workflows. I initially required this when applying tags to a VM during the BuildingMachine LifeCycle POST state, which involved using the VAPI endpoint.

vRO with the vRA plugin installed will make available two modules with some pre-defined actions .

  • com.vmware.vcac.asd.mappings
  • com.vmware.vcac.asd

findvcvmbyuuid

The two actions that we are interested in are ‘mapToVCVM‘ and ‘findVcVmByUuid‘. Let’s take a look at these two actions.

mapToVCVM

Inputs: VMProperties(Properties)
Return type: VC:VirtualMachine

This action has an input ‘VMProperties‘ of type ‘Properties‘, which is passed to it by the calling workflow or action. If you don’t know what this is, it is the vRA payload sent to vRO by the Event Broker Service (EBS). I’ll post another article at a later date on how I am doing this if you’re not sure. The first line of the script extracts the custom property ‘VirtualMachine.Admin.UUID’, which returns the unique UUID of the virtual machine (in previous versions of this action, the MoRef was used which is not unique across multiple vCenter Servers) and stores the value in ‘vmUuid‘.

The second line returns the result of ‘System.getModule(“com.vmware.vcac.asd”).findVcVmByUuid(vmUuid)’ of type VC:VirtualMachine. This code calls another module/action and passes ‘vmUuid‘ as an input (refer to the previous image if you’re unsure what is happening here and it should make sense). The result of this is returned to the original calling workflow/action as a VC:VirtualMachine type, which will be the vCenter managed VM object.

findVcVmByUuid

Inputs: VmUuid(String)
Return type: VC:VirtualMachine

This action has an input ‘VmUuid‘ of type ‘String‘. As you saw from the ‘mapToVCVM‘ action, this string is passed over with the value of the UUID for the virtual machine. The action then discovers the configured vCenter endpoints and performs a search on each for the VM until a result is found and returns it.

At this point you have probably worked out that you don’t need to use ‘mapToVCVM‘ at all and we could simply extract the UUID ourselves and then make a call to the ‘findVcVmByUuid‘ action.

Continue reading

What vRealize Automation is trying to solve

Before purchasing or installing the software one of the first things you need to understand is what vRA is trying to solve. Unlike what VMware has released previously, vRA is a very different and tries to solve the problems related to managing multiple cloud platforms and the end to end delivery of IT services. Yes, there are a lot of tools out there that can help in the delivery of these services but it very quickly starts to turn into a complex mismash of applications and processes. It’s also important to point out that vRA is not exclusive to vSphere but is designed to be platform agnostic. Think of vRA operating as the management plane in your data centre that plugs into all the services around it.

So when I talk about ‘end to end delivery of IT services’ what exactly am I referring to? Well, consider the example process below of bringing a new virtual server into service:

  • End user requests new virtual server, provides details and submits request to IT support services;
  • A change is raised on the ITSM CMDB platform;
  • Wait for change to be approved before provisioning starts (alternatively the request could be rejected and process cancelled);
  • When approved, begin the provisioning process;
    • Get the next available hostname (i.e. using a prefix and the next available number increment);
    • Request and reserve the next available IP address from the IPAM software and update the record to reflect the new server being provisioned;
    • Provision the virtual server with specific hardware configuration;
    • Add/update DNS records;
    • Add server to the Active Directory domain and place into the correct Organization Unit;
    • Update OS with latest security patches;
    • Add to existing firewall rules;
    • Generate SSL certificates;
    • Install software such as Anti-Virus and applications;
    • Add new Configuration Item with server details;
    • Update server inventory;
    • Add to monitoring system;
    • Mark change as complete;
  • Email End user that requested the virtual server that it is now ready;

You’ll agree, that this is a lot of steps for provisioning something like a virtual server and will involve multiple different teams (and think about doing this on many different cloud platforms). Most of the time, a lot of these steps are performed manually using run books but are sometimes overlooked and can cause delays in fulfilling the request or lead to problems later, like outdated information. We have tools like Puppet which help us with deployments, software installations, etc. but most of these are very Linux focused. They also do not address the other steps, or at least not in a very friendly way.

Finally, and more interestingly, think about when the virtual server is taken out of service or decommissioned. This is almost always where things get messy. I have seen really well laid out and robust commissioning procedures but nothing to support the decommissioning. Often, it’s a case of ‘best effort’ and items get missed and are usually discovered later, often after they have caused a problem or identified with routine audits of DNS or firewalls. In some cases this could even pose a security risk. When we think of all of this what we are actually referring to is ComplianceGovernance and Life Cycle Management.

My advise here is that even before you touch vRA, you need to think about how IT services are being provisioned within your organisation. This will involve engaging with the various operations or development teams and weed out every single process that is involved, how services are delivered, maintained, monitored and secured. You will need to fully understand the manual process and any automation that exists. Secondly, you will need to understand all of the applications that are being used to support these teams and how you will potentially interface with these during automated deployments.

vRealize Automation is designed to solve all of these problems. it is a fully extensible platform that allows Administrators to create policy driven processes for the provisioning of IT services. It does this whilst providing a catalog of available services that end users can simply request by providing some details and a couple of clicks of a button. Administrators are armed with a powerful Advanced Service Designer tool that allows items such as Virtual Servers or Software Components to be drag and dropped onto the design canvas and later submitted to the catalog. These ‘designs’ are what vRA refers to as blueprints.

Continue reading