This is a use case description for some customer presentations about Backup as a Service using Veeam B&R v8. This article was originally posted January 2015 on

The main idea behind that is to enable VMware Administrators or Users directly to choose a Backup SLA for their VM without the need to communicate with the Backup team - sorry Backup teams :-) The Backup Team acts as a Service Provider and offers different SLA’s which could be used by VMware Admins or Users.

I know about the Veeam REST API which is availbable for Version 8 with Veeam Enterprise Manager. I also know about the Powershell implementations but hey - i love VMware so i build solutions in Orchestrator :-) and decided to test drive some use case workflows in vRealize Orchestrator and also bind them to vRealize Automation.

REST Host and vRealize Automation 6.2 built-in Orchestrator

When you tried to implement a REST Solution to vRealize Automation 6.2 with built-in Orchestrator you maybe know that there is a little problem with the Apache HTTP client. If not - read the Community article here. So i went with my vRO Appliance (5.5.2) which works fine for that use case.

For any information about Veeam REST API please have a look at the Veeam Help Center.

UPDATE 26.02.2015 :

There is a technical preview version of a new REST plug-in Version 1.0.6 available which i integrated to my vRA Appliance 6.2 with built-in Orchestrator v6. That fixes the Apache HTTP client issue and i was able to fully implement my solution to vRA 6.2 with integrated vRO.

Add REST Host

There are several informations and blogs on how to add a REST Host to your environment - i just wanted to name which is a great resource if you are using vRealize Orchestrator.

But adding a REST Host is - if everything works fine - as easy as these screenshots:

In vRealize Orchestrator Client navigate to Workflows - Library - HTTP-REST - Configuration - Add a REST host and start the workflow.

HandsOn: Veeam - Backup-as-a-Service in vRealize Automation

Please verify you’re Veeam Hosts URL and REST Port. By default HTTP protocol port 9399 is used and for HTTPS protocol, port 9398 is used.

I don’t use any Proxy so i “skip” Proxy Settings…

HandsOn: Veeam - Backup-as-a-Service in vRealize Automation

Host authentication is set to Basic with Shared Session mode and i used the Service Account configured for Veeam.

Workflows and Actions

For my sample use case i created two simple workflows :

  • Add a VM to an existing Backup Job
  • Restore VM from Restore Point

The main idea behind them is to browse the BackupJobs and RestorePoints directly by using the Predefined list of elements Property in the workflow presentation and let the user or administrator directly choose the BackupJob or RestorePoint which he needs for his VM.

Add VM to Backup Job

Add VM to Backup Job allows you to add a VM (VC:VirtualMachine) to an existing Backup Job.

HandsOn: Veeam - Backup-as-a-Service in vRealize Automation

At first select the VM in the Workflow or it maybe comes as input variable from vRealize Automation or as contextual menu from vRealize Orchestrator; but later more to both implementations.

HandsOn: Veeam - Backup-as-a-Service in vRealize Automation

In this BackupJob section i can’t see any backup jobs in the dropdown list SelectJob because the search field SearchJob is empty.

HandsOn: Veeam - Backup-as-a-Service in vRealize Automation

When i start typing a known backup job name (case sensitive) the dropdown list fills up with the backup jobs matching the search string and select the backup job to which i could add the VM.

HandsOn: Veeam - Backup-as-a-Service in vRealize Automation

The predefined list of available Backup Jobs by Filter comes from the Presentation configuration in my Workflow. I configured the SelectJob Input variable with the Predefined list of elements with a connection to an action which delivers me the Backupjobs in an array from a defined Search String.


As an example here the Script for Action getBackupJobs


  • veeamHost : REST:RESTHOST
  • SearchJob : String

Return type : Array/String

  var postResponse = veeamHost.createRequest("POST", "/api/sessionMngr/", null).execute();
  var backupJobResponse = veeamHost.createRequest("GET", "/api/jobs?type=job", null).execute();
  var xmlString = XMLManager.fromString(backupJobResponse.contentAsString);
  var xmlElement = xmlString.documentElement.getElementsByTagName("Ref");

  var backupJobs = [];

  for( i = 0; i < xmlElement.getLength(); i++ ){
    var backupJobName = xmlElement.item(i).getAttribute("Name")
    if ( backupJobName.indexOf(SearchJob) >= 0 ) {
  return backupJobs;

After selecting VM (VC:VirtualMachine) and BackupJob (String) the Workflow does some converts to add the VM Name to the BackupJob ID by using POST /api/jobs/{jobID}/includes.

Restore VM from Backup/RestorePoint

Restoring a VM brings you to one problem - what happens with an existing VM? In my first draft of the use case the answer is easy : i delete the existing VM and restore it from Backup (potential for improvements!!!).

HandsOn: Veeam - Backup-as-a-Service in vRealize Automation

I implemented a simple decision : does the VM still exist in vCenter Inventory and i want to restore it or has the VM been deleted and i want to restore it by using VM Name.

HandsOn: Veeam - Backup-as-a-Service in vRealize Automation

Selecting a VM from Inventory or typing the name to the field vmName returns the restorePoints as a Dropdown list where you can select the state you wanted to restore.

HandsOn: Veeam - Backup-as-a-Service in vRealize Automation

This is also solved by using the Predefined list of elements and an action that delivers exactly these RestorePoints.


Mapping into vRealize Automation

Bringing both Worflows to vRealize Automation through Advanced Services - Resource Actions gives the User direct access to add his virtual machine to a backup job or restore it from a backup job.

Think about a pre-defined list of backup jobs for as-a-Service offerings in Veeam (“CLOUD”) and pre-configure the SearchJob field in vRealize Automation with this (“CLOUD”) filter name gives the User only the pre-defined list of jobs where he can the right service for his VM.

HandsOn: Veeam - Backup-as-a-Service in vRealize Automation