Posts Tagged Avamar

Prompting the IaaS Portal User To Say “Yes/No” to VM Backup with EMC Avamar during Machine Request

In previous blog posts I have explained how to “intercept” vRealize Automation (previously known as vCAC) IaaS machine provisioning at its different machine provisioning steps to integrate with 3rd party systems (E.G. F5). In this example I would like to show how to prompt the user for input (E.G. Yes/No) in the request form, and then based on the user selection, get vCenter Orchestrator (vCO) to add the provisioned machine to a pre-defined Avamar backup group.

First we need to identify how to integrate with EMC Avamar. In this example we have selected to SSH to the Avamar server and run some MCCLI commands. For example:

1. mccli client add

2. mccli group add-client

3. mccli group remove-client

So the vCO Workflow will look like this:


In vCO, the first step will be to get the value from the property in vRealize Automation relevant blueprint which is capturing the user input (Yes/No). We use a vCO scriptable task for this which includes the following code:

var clientName = virtualMachineEntity.getProperty(“VirtualMachineName”);
var vmProps = virtualMachineEntity.getLink(vcacHost,”VirtualMachineProperties”);

for each (var prop in vmProps) {
var propertyName = prop.getProperty(“PropertyName”);
var propertyValue = prop.getProperty(“PropertyValue”);
if (propertyName == “avamar”) {
if (propertyValue == “Yes”) {
avamar_input = true; }

Note: “virtualMachineEntity” is input parameter of type “vCAC:Entity” coming dynamically from vRealize Automation during provisioning. “vcacHost” on the other hand is a vCO attribute we set in advance to point to our vRealize Automation server (previously known as vCAC). “avamar_input” will be defined as a boolean Output Parameter of the first scriptable task since we are going to use its value in the “Decision” object whether or not to perform the backup based on the user selection.

As you can see from the code “avamar” will be the property we are going to use in vRealize Automation blueprint to prompt the user and then based on that selection we can then use a vCO “Decision” object to perform the backup action or not.

To make the property selection more presentable we can use vRealize Automation Property dictionary. First let’s add the “avamar” property to the relevant blueprint and make sure that “Prompt User” is set to “Yes”:


Then create a Property dictionary with the same name (“avamar”) of type “DropDownList” and make sure that “Required” is set to “Yes”:


Make sure you click on “Edit” and type the value you want the user to choose from (Yes/No):


Now back to your vCO workflow, here is a table of the Attributes one needs to set before running the workflow:

Name Type Value Description
vcacHost vCAC:VCACHost Insert you vCAC Server here Your vCAC Server
hostNameOrIP String Hostname or IP address of the SSH host Hostname or IP address of the SSH host
username String SSH Root User SSH Root User
password SecureString Root User Password Root User Password
path Path /etc/vco/app-server/vco_key Path to private key (most probably /etc/vco/app-server/vco_key)
avamarGroup String Insert your group name/td> backupGroup on Avamar system
vcDomain String Insert your VC FQDN vCenter Server FQDN
virtualDC String Insert the Virtual DC the VM is deployed in Virtual DC the VM is deployed in
vmFolder String Insert the VC Folder the VM resides in< VC Folder the VM resides in

Now we need to associate these 2 workflows with a vCAC external Stub. More information about vCAC external stubs and how they can be associated with vCO workflows and triggered at runtime can be found here in Chris Alleaume’s excellent blog: Chris’s Blog

Make sure you associate your “a Add Client to Avamar” workflow with MachineProvisioned stub and  “Remove Client from Avamar Group” workflow with MachineDisposing stub as described in Chris’s blog.

Job Done.

We are now ready to request a machine. Note how the user is given a choice for the backup (Yes/No) at request time:


Then in VCO based on the user selection we should see the backup taking place or not:


For your convenience the two vCO workflows mentioned above can be downloaded from here:


, , , , , ,

Leave a comment