Veeam Package for vRealize Orchestrator
December 7, 2015Veeam 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
The 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.
When prompted to import the package click “Import”.
Next, 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”.
Basic 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.
Fill out the information for your environment. The default port is 9399 and authentication is basic, but your configuration may be different.
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.
Click on the Attributes tab and then click the “Not found” entry.
Select the Veeam REST Host you just added.
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.
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.
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”.
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.
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.
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.
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.
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.
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!
[…] automatically, and depending on some variable they could also be added to a Veeam job. Because with this your Veeam and VRO get along. Very cool. Here is another announcement of this – from […]
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.
Thanks for those kind words. I hope you continue reading.
Anyone got this working with vRa/o 7 yet?
I haven’t tested it yet, but it should still work as long as you’re using a stub. If you are using an event subscription, then the vRO Package would need a wrapper.
Hi
is it possible to use this plugin with vrealize 7 please ?
is there any documentation somewhere ?
The package hasn’t been tested with vRA7 yet. However, it should still work with a stub workflow. Event subscriptions will not work until the package is modified.
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.
hi Eric
how to allow only users owned VM to be shown to them not all vcenter ?
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.
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.
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.
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?
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.
HI..
i am getting the below error when trying to add vm in “Veeam_AddVMToBackupJob” flow. and getting the below error.
please help.
item: ‘Veeam_GetHierRoots/item3’, state: ‘failed’, business state: ‘null’, exception: ‘Cannot execute the request: ; Read timed out (Dynamic Script Module name : veeam_GetVMHier#1)’
workflow: ‘Veeam_AddVMToBackupJob’ (c683309f-3c94-4d7b-87ba-b69f0fda150d)
| ‘attribute’: name=hierRootID type=string value=null
| ‘attribute’: name=desiredJobUID type=string value=456
| ‘attribute’: name=errorCode type=string value=0
| ‘input’: name=vCenter type=string value=IGA-POC-VC.indigo.in
| ‘input’: name=jobName type=string value=orangeest1
| ‘input’: name=virtualMachine type=VC:VirtualMachine value=dunes://service.dunes.ch/CustomSDKObject?id=’iga-poc-vc.indigo.in%2Cid:vm-102’&dunesName=’VC:VirtualMachine’
| ‘no outputs’
–workflow: ‘Veeam_GetHierRoots’ (aab1db72-2f8b-499a-92dd-86f0e47354c2)
| ‘attribute’: name=BRHost type=REST:RESTHost value=dunes://service.dunes.ch/CustomSDKObject?id=’4c9e907e-1661-44ed-8267-f6c4e19069c4’&dunesName=’REST:RESTHost’
| ‘attribute’: name=statusCode type=string value=Cannot execute the request: ; Read timed out (Dynamic Script Module name : veeam_GetVMHier#1)
| ‘input’: name=vCenter type=string value=IGA-POC-VC.indigo.in
| ‘output’: name=hierRootID type=string value=null
*** End of execution stack.