Veeam Backup and Recovery Plugin

About the Veeam Backup and Recovery Plugin

There are a couple of important concepts to understand before working with the Veeam plugin.

  1. Backup Provider Offerings for the Veeam B&R plugin are Template backup jobs.

  2. Veeams API does not allow for the creation of backup jobs. Therefore, a backup job must be created which will act as a Template for all ‘backups’ which are based on it. You will need to create backup job Templates for each of the Backup Offerings which you will be presenting to your users, be they a default Template for ad-hoc/scheduled backups or ‘SLA’ specific Templates (ie Gold offering). Refer to the general B&R for information regrading the B&R job types.

  3. The backup job Templates will be zone specific as they will contain the backup destination, and this will be different in each zone (unless you have extremely fat links between zones).

  4. Veeam backup jobs are not allowed to be empty (i.e. they must backup something); therefore a dummy tag which is not assigned to any Instance must be created via vCenter. The initial backup target of the backup job Templates is then ‘any VM with the dummy tag assigned’ i.e. no Instances

  5. Veeam’s API is not complete and therefore a mix of API commands and powershell commands (via SSH) are employed.

  6. Veeam cannot explicitly reduce the number of backups that are kept, nor can it remove individual partial backups and ‘coalesce’ the remaining image(s)

Installing Veeam Backup and Recovery for use with CloudStack

The B&R Veeam plugin has been tested against Veeam Backup and Recovery 11 and 12. The enterprise edition is required for the Enterprise Manager API. The final tested version of Veeam was on a Windows Server 2019 (with desktop), although much of the development work was done against a Windows Server 2016 OS (with desktop).

The following steps give a minimal installation, they do not cover Veeam integrations with backup, storage or virtualisation hardware. A number of the steps below may already have been carried out if you are already using Veeam Backup and Replication, however please read the steps below carefully to ensure that your installation meet all requirements for compatibility with the B&R Veeam plug-in.

  1. Install Backup and Replication Manager - inc console - default settings

  2. Install Enterprise manager

  3. Install an SSH server on the ‘Veeam Backup and Replication Manager’ server. Windows Server 2019 has ‘OpenSSH Server’ as a builtin optional feature which is compatible.

  4. Powershell 5.1 is the default version on Windows Server 2019

Once these components are installed, then Veeam services can be configured. Please see the VM documentation for details, but at a high level you need to have done the following;

  1. License the Enterprise Manager & Backup and Replication servers (this can be done purely through the Enterprise Manager)

  2. Connect Enterprise Manager to Veeam backup server(s)

  3. Connect Enterprise Manager to vCenter server

  4. Add your ‘vSphere’ infrastructure to ‘Managed Servers’ in the Veeam Backup & Replication Console

  5. Setup your ‘Backup Repositories’ in the Veeam Backup & Replication Console. Remember that you will likely want a different target in each zone.

Creating Template jobs

  1. As noted above, a dummy VM tag is required in order to create Template jobs which don’t contain any Instances. This is done via vCenter by navigating to the ‘Tags and Custom Attributes’ section, and first creating a category (if you dont already have a suitable one).

    Create Tag Category.

  2. Then, create a dummy tag in that category. Be sure to make it clear that it is not to be used anywhere.

    Create Dummy Tag.

  3. Now create the Template job in Veeam Backup and Replication Manager. Using the New Backup Job (Instance) wizard.

    1. Give the job a name that describes what the job does ie template_job_zone1_default or template_daily_job-14_kept (the end user will not see this name).

    2. In the Instances section of the wizard, click ‘Add’ and select the ‘VMs and Tags’ filter (top right of the ‘Add Objects’ dialog box). And then select your dummy tag and click on Add.

      Select Dummy Tag.

    3. In the Storage section is the correct Backup repository for the zone and number of restore points. (note there are a number of other advanced options which can be set, these are transparent to CloudStack. CloudStack will clone this job ‘as-is’ including all advanced settings. However changing these settings will only effect NEW jobs created from the Template, existing jobs will be unchanged.

    4. The same is true for the Guest Processing section.

    5. In the Schedule section you, if you are creating an ‘SLA’ based backup Template, you would set the job to run automatically and select ‘Periodically every’ 24hrs and then in the ‘Schedule’ dialog set the hours in which the job is allowed to run. This allows Veeam to choose the best time to run the backup within a given window. If you are creating a Template for adhoc/scheduled backups, do not tick ‘Run the job automatically’ as CloudStack will trigger jobs as and when required.

      Set recurring SLA schedule.

    6. Finally, save the job.

Connecting CloudStack to Veeam

Once Veeam is configured with SSH enabled and at least one Template job, we can connect CloudStack to your Veeam server.

To do this, you simply update the global settings listed below:

Plug-in specific settings:

(all settings can be global or per-zone)




Veeam B&R server URL. Default: http://<VEEAM_SERVER_IP>:9398/api/


Veeam B&R server version. CloudStack will get Veeam server version via PowerShell commands if it is 0 or not set


Veeam B&R server username. Default: administrator


Veeam B&R server password. Default:


Whether to validate Veeam B&R server (SSL/TLS) connection while making API requests. Default: false


Veeam B&R API request timeout in seconds. Default: 300


The time interval in seconds when the management server polls for Veeam task status. Default: 5


The max number of retrying times when the management server polls for Veeam task status. Default: 120