Skip to main content

Simplifying Veeam Backups Using VMware Tags

If you’re lazy like me, you hate having to open 26 different applications when you provision a new virtual machine. Lets eliminate the need to open one of those applications, Veeam.

Traditionally, when you provision a new virtual machine, you would open Veeam Backup & Replication Console and add that specific VM to one of the Backup Jobs you have configured. You’d have to make sure that you’ve correctly configured things like encryption, application-aware backups, exceptions and credentials for the VM you’ve provisioned.

Now, I don’t know about you, but I hate extra work. Here’s how you can solve this problem with a little bit of automation using VMware Tags and Veeam Backup & Replication.

Note: VMware Tags require vCenter version 5.1 and above. Reference

Step 1: Create Backup Tags in VMware vCenter
For my needs, I created quite a few VMware Tags. One for each of the Veeam Backup Jobs I needed, and a few to dynamically change the settings of the backup job for specific virtual machines. Here’s how they’re laid out:

  1. Create a new category for your backup tags called Backup. For this category, you should set Cardinality to Many tags per object, and you only need to select vApps and Virtual Machines under Associable Object Types.
  2. Plan out the tags that you need. I ended up creating one tag for each of my planned Veeam Backup Jobs, named like the Backup Job to avoid confusion. I also created two tags to control settings inside of the Veeam Backup Jobs. Finally, and most importantly, I created a tag to use when a virtual machine does not require a backup. We’ll talk more about that later.
  3. Create the tags in vCenter. Here’s what I needed to satisfy the business needs of my organization:

Step 2: Create or Modify Backup Jobs in Veeam Backup & Replication
At this point, I should tell you that your target doesn’t matter. This method works with every backup target that Veeam can use. If you need to create a new backup job, open the Veeam Backup & Replication Console and click on the Backup Job button on the Home menu, then choose VMware Backup. If you’re modifying an existing backup, you should know where to go. Either way, you’ll get a wizard.

  1. Name your backup job, and give it a description. The example I’m using is the backup job for my development environment machines with an Recovery Point Objective (RPO) of 24 hours.
  2. Click Next, and click the Add… button.
  3. To add tags, click the VMs and Tags button to search your attached vCenters for the backup tag you created.
  4. Now search for the tag you need using the search bar at the bottom of the window.
  5. Once you’ve selected the appropriate tag, click the Add button. The tag you selected should be the only thing that you see in the Virtual machines to backup list.
  6. Click Next until you’re on the Guest Processing screen. Click the Applications… button.
  7. Like before, we’re going to use tags to avoid application aware processing for virtual machines, in case we need it for specific virtual machines. Click the Add… button and search for your Disable Application Aware Processing tag, then click the Add button.
  8. Now that you’ve added the tag, select it and click the Edit… button, then select the Disable application processing radio button.
  9. Click OK, set the schedule for your job, and click Finish.

Step 3: Add the Backup Tags to Virtual Machines
And now for the easy part! All we have to do now is tag our virtual machines, and when the Veeam backup job runs, it will catalog the tagged virtual machines in the correct backup job.

  1. Select any virtual machine in your inventory and browse to the Summary tab.
  2. Assign the appropriate backup tag to your virtual machine. When the Veeam Backup Job runs, Veeam will catalog the tagged virtual machines and back them up.

Step 4: Keep Your Virtual Machines Tagged
Going forward, you’ll want to make sure that no virtual machine in your environment that should be included in your backup job is missed. This is why we want to create a No Backup Required tag, so that we can get an accurate report of what doesn’t have a backup tag assigned, and know immediately what virtual machines don’t require a backup at all. I use PowerShell to determine what virtual machines need to be tagged, and have a regular vCheck report sent to me including the relevant information about virtual machines without backup tags. Here’s the code:

$Category = Get-TagCategory -Name 'Backup'

Get-VM | Where{!(Get-TagAssignment -Entity $_ -Category $Category)} | Select Name

You can choose to do what I do and manually audit tags (if you forget to tag a virtual machine as part of your provisioning process, that is) or you can automate it so that new virtual machines are tagged automatically with the minimum RPO your business requires.

Remember, when you restore a virtual machine from a disk backup using Veeam Backup & Replication, you have to check the Restore VM tags check box in the Full VM Restore Wizard. If you don’t check that box, your restored VM will lose all of it’s assigned tags and you’ll have to manually add them back to the VM.

Spread the love!

Scott Forehand

Scott Forehand is an accomplished systems architect, engineer, and administrator with over a decade of experience designing and managing virtual environments, networks, storage and server infrastructures and operations with a proven ability to create and automate solutions to improve productivity, reliability and performance. He has achieved multiple certifications in virtualization, networking, cloud, storage and other technologies, and is honored to be a VMware vExpert in 2018.

VCP6-DCV VCP6-NV VCP6-CMA SCP ZCP