Veeam Package for vRealize Orchestrator

Veeam Package for vRealize Orchestrator

Veeam is a popular backup product for virtualized environments but who wants to spend their days adding and removing machines to backup jobs?

Now available on github is a Veeam package for vRealize Orchestrator. This is my gift to you, just in time for the Hollow-days.

Available Features

veeamlogoThe following features are available with the plugin for it’s initial release.

  • Add a VM to an existing backup job
  • Remove a VM from a backup job
  • Start a backup job immediately
  • Add a Build Profile to vRealize Automation
  • Add a VM to a backup job from vRA
  • Remove a VM from a backup job from vRA

Some additional functionality could easily be added to your environment using the existing worfklows such as start a backup as a Day 2 operation in vRA, or change backup jobs etc. The world is your oyster.

Disclaimer – Veeam had no involvement with the creation of the vRO workflows and does not officially support their use. This software is to be used at your own risk and tested in your own environment.

Requirements

In order to use the package there are certain requirements that must be met before installation.

  • A working Veeam Backup and Replication Server with at least one backup job configured – (Tested with v8)
  • Veeam Backup Enterprise Manager (This provides the API)
  • Working vRealize Orchestrator appliance
  • Optional – vRealize Automation Solution

Installation

To begin, go to github.com and download the vRO Package. Once downloaded, open vRO and change to Design View. Select the Packages tab and then the import button. Select the package downloaded from github.

Veeam-ImportPackageWhen prompted to import the package click “Import”.

Veeam-ImportPackage2Next, the list of elements will be shown. You may import any you wish. Each of the elements is necessary for the package to fully work, but if you have existing elements already in your vRO appliance, you may choose not to import some of them. By default only the missing elements will be imported. Select “Import selected elements”.

 

Veeam-ImportPackage3Basic Configuration

Now that the package has been installed, navigate to your workflows and find the “Veeam” folder. Run the “Add_VeeamRestHost” workflow to add a REST endpoint. This should be your Veeam Enterprise Backup Server.

Veeam-SetRESTHostFill out the information for your environment. The default port is 9399 and authentication is basic, but your configuration may be different.


Veeam-SetRESTHost2
Once the Veeam REST Host has been added, go to your list of configuration elements. Find the “Veeam-Login” config item and click the pencil icon to edit it.

 

Veeam-SetRESTConfigItemClick on the Attributes tab and then click the “Not found” entry.

Veeam-SetRESTConfigItem2Select the Veeam REST Host you just added.

Veeam-SetRESTConfigItem3

 

Run a Job

It’s all configured now. You can run a job to test it out. If you run the Add a VM to Backup job workflow, you’ll be asked for the vCenter name, the job name and to select the VM.
Veeam-Add2BackupJob1

NOTE: the vCenter name must be identical to what is configured in Veeam Backup and Replication, including the case. As seen below from my lab.


Veeam-Hierarchy1
Setup for vRealize Automation

If you want to leverage vRealize Automation to have your VMs automatically added to a backup job after provisioning and removed during deprovisioning, then go to the vRA_Setup folder and run “Veeam_CreateBuildProfile”.

Veeam-vRABuild1

Provide the vRA Host, the build profile name and description and then the vCenter Name and Backup job that you’d want to add VMs to. Feel free to add multiple profiles if you have more than one backup job, just be sure to change the profile name and job.
Veeam-vRABuild2

Once the job has been run, you can go into vRealize Automation and see the build profile and the settings that have been configured. Just add the build profile to your blueprint to use it.


Veeam-BuildProfile1

Update for vRealize Automation 7

If you’re planning to use this package with vRealize Automation 7, there are two additional workflows available for use with “Property Groups” which are the replacement for the old vRA 6 “Build Profiles” and a workflow to be used with vRA 7 Event Subscriptions which are the replacement for the stubs found in vRA 6.

vra7-veeam-packageview

Once you run the “Veeam_CreatePropertyGroup” Workflow, you’ll have a new group listed in vRealize Automation 7. The screenshot below shows the results of the workflow.

vra7-propertygroup-veeam

From there, you can add the property group to any of your virtual machines in the design canvas. Be sure to set your vRO properties so that vRA is passing properties over to vRO during the machine provisioning events.

vra7-veeam-designcanvas

Summary

I hope that someone gets use out of this package. Automating your backup process can save a lot of time in dealing with mis-configurations or just forgetting to set a backup on a new machine. This package coupled with vRealize Automation should really save time for system administrators. This package is free for anyone to use and modify at your own risk. I won’t be responsible for the awesome stuff or bad stuff you may choose to do with it!

18 Responses to Veeam Package for vRealize Orchestrator

  1. I’m impressed, I must say. Truly rarely do I experience a blog that’s both educative and interesting, and I want to tell you, you’ve hit the nail to the head.

  2. hi
    I import the package and setup rest host and start to add vm to backup job but when i enter vcenter and backup job name and select the vm the below message shown :
    Invalid XML Document (Dynamic Script Module name : veeam_GetVMHier#31)
    can you help me?

    • i forget to setup Veeam Enterprise Manager and when add backup server and collect data the problem solved.
      thank you.

    • If using vRA assign the workflow as an action on the blueprints. They’ll only see their own servers in vRA. Otherwise the login for the Veeam API will be the permissions used, not the user who owns the VM.

      • hi Eric
        i use vRA to create blueprints and need a way to restrict users to see only owned machine. is there any way to modify workflow ?
        i need a script to find VM .
        thanks.

  3. I am trying to get the build Veeam_CreateBuildProfile running with VRO 7.1/VRA7/Veeam 9
    I have successfully used the basic workflows such as Veeam_AddVMToBackupJob however when I try to run the Veeam_CreateBuildProfile I get the following error.
    Cannot find workflow with ID ‘a6958d10-678b-48f8-a6a3-e7dcb9ee3a04’in the library
    It looks to be failing at the create / update many properties on Build Profile as it states Target Workflow – Workflow not found

    Can you help point me in the right direction

    Thanks for posting!!

    Eric

    • In vRA7 you don’t have build profiles any more. They’ve been replaced with Property Groups. I’ll look to see if I can replace the workflows or add some more for vRA7 specific things like property groups and event subscriptions instead of stubs which are also being phased out.

      Sorry for how long it took to get to this comment.

  4. I have been successfully used the Veeam_vRA_AddVMTobackup. So the vRealize Automation 7 automatically added VM to a backup job after provisioning. But don’t work remove VM during deprovisioning.

    Please provide more information about diprovisioning process.

    • Does the workflow run during de-provisioning? If it runs with an error I’ll try to take another look at it. If it isn’t running, check to make sure your event subscription or stub is properly executing during the de-provisioning phase.

  5. As veeam packet i saw only the Veeam_vRA_AddVMToBackup in EventSubscriptionWorkflows folder and that relate with Veeam_CreatePropertyGroup for automatically added VM to a backup job after provisioning.

    Could you please advise the workflow for removed during deprovisioning?

  6. More information. I try to duplicate workflow Veeam_vRA_RemoveVMFromBackup in vRA6_StubWorkflows and manual run that workflow. It occurred error as follwing

    2017-04-20 10:51:50.666] [I] Workflow started from workflow stub Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.Disposing on vCAC host Infrastucture – iaas.example.local [https://iaas.example.local/]
    [2017-04-20 10:51:50.667] [I] Got vCAC virtual machine VRA033
    [2017-04-20 10:51:50.668] [E] Error in (Workflow:Copy of Veeam_vRA_RemoveVMFromBackup / Log vRA Virtual Machine Properties (item1)#3) TypeError: Cannot read property “keyString” from null
    [2017-04-20 10:51:50.686] [E] Workflow execution stack:
    ***
    item: ‘Copy of Veeam_vRA_RemoveVMFromBackup/item1’, state: ‘failed’, business state: ‘null’, exception: ‘TypeError: Cannot read property “keyString” from null (Workflow:Copy of Veeam_vRA_RemoveVMFromBackup / Log vRA Virtual Machine Properties (item1)#3)’
    workflow: ‘Copy of Veeam_vRA_RemoveVMFromBackup’ (44b3db75-5850-452f-8325-5570c270f8fb)
    | ‘attribute’: name=vCenter type=string value=
    | ‘attribute’: name=jobName type=string value=
    | ‘input’: name=vCACVm type=vCAC:VirtualMachine value=dunes://service.dunes.ch/CustomSDKObject?id=’d37d6d87-af56-4409-8637-d697e56e63cc/e8e626ad-9518-48eb-9b8c-7e378f76b00f’&dunesName=’vCAC:VirtualMachine’
    | ‘input’: name=vCenterVm type=VC:VirtualMachine value=dunes://service.dunes.ch/CustomSDKObject?id=’poc-vc.example.local/vm-983’&dunesName=’VC:VirtualMachine’
    | ‘input’: name=vCACHost type=vCAC:VCACHost value=dunes://service.dunes.ch/CustomSDKObject?id=’d37d6d87-af56-4409-8637-d697e56e63cc’&dunesName=’vCAC:VCACHost’
    | ‘input’: name=externalWFStub type=string value=Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.Disposing
    | ‘input’: name=vCACVmProperties type=Properties value=null
    | ‘input’: name=vRAEntity type=vCAC:Entity value=null
    | ‘no outputs’
    *** End of execution stack.

Leave a reply