Fun with Tags, Episode 2: Tags and Veeam

Fun with Tags and VeeamFun with Tags, Episode 1: Basics and PowerCLI
Fun with Tags, Episode 2: Tags and Veeam
Fun with Tags, Episode 3: Tags and vRealize Operations Manager

In the first episode of “Fun with tags” I wrote about some vSphere tag basics and the charming PowerCLI integration.

In this episode, I will introduce you some possibilities of vSphere Tags in combination with Veeam Backup and Replication, respectively Veeam ONE.

Part 1: Tags + Veeam Backup and Replication

 

If you are used to Veeam Backup and Replication you may know, that you can add objects to a backup job based on different criteria’s:

  • if you need a job for one or more dedicated VMs you can add them individually. This is a static collection and you have to add or remove VMs manually.
  • if you are looking for a job that is adjusting dynamically to any change, you can add an entire cluster or even an entire vCenter Server to a backup job (Host and Clusters).
  • or you prefer to select the objects based on folders (VMs and Templates) or datastores (Datastores and VMs).

So one may ask, why the heck should I use tags when there are so many other possibilities to select objects for a backup job?

The answer is, that using tags provides significantly greater flexibility besides other advantages. Here are some reasons why I believe in tags:

A virtual machine can only reside in one folder. So if you already use the folder structure to classify your VMs for a given task (eg. permissions) it is not possible to add the VM to a second folder for another task.

When using tags, you can assign multiple tags to the same object. Furthermore, folders are usually maintained by administrators. In contrast, tags can also be applied by users (if they are allowed to do so).

The same reasons apply in similar ways for datastores and clusters. They are maintained by administrators and above all not intended for use as selection criteria. It’s nice if it works for you, but sooner or later you will hit some limits 🙂

Other advantages of using tags eg. in filters and searches or in combination with scripts I already described in “Fun with Tags, Episode 1: Basics and PowerCLI“.

But let’s come back to the backup jobs with an…

Every-day-work example for Veeam backup jobs + tags

 

Imagine your boss wants you to classify the virtual machines based on different RPO times. Building on this information, the backup jobs should run as often as necessary to fulfill these requirements.

Using tags, you can manage this task really easy and you make your boss happy:

  • create a vSphere category “RPO Level” and as many tags as necessary. Here an example with three backup policies:

RPO_Standard  -> run backup every 24 hours
RPO_High         -> run backup every hour
RPO_NoBackup -> no Backup necessary (eg. Test)

As soon as the category and the tags are available and assigned to your VMs, you can create the corresponding backup jobs:

  • open Veeam Backup and Replication
  • select Backup & Replication -> Jobs
  • start the “Backup Job” Wizard
  • select “Add…” and change to “VM and Tags” view
  • select eg. the Tag “RPO_High” (Backup every hour)

Veeam New Backup Job

  • when the wizard asks you to define the schedule, select “Run the job every 1 hour”:

Define one job per desired RPO time related to the created tags. If a new VM is deployed, it will be added to the respective backup job dynamically, as soon as it is tagged. No need to take care of backup jobs and associated VMs anymore!

Stop! What if one forgets to tag the VM? No protection?

Indeed, if somebody deploys a new VM and forgets to assign the necessary tag it will not be included in a backup job.
For that reason, we created the backup policy “RPO_NoBackup” in the example above.

The tag “RPO_NoBackup” is not associated with any backup job and should be assigned to every VM, where no backup is needed/wanted (eg. for Test-VMs). Doing so enables us to identify untagged VMs very easy with the help of Veeam ONE.

You will learn more about this in the next part.

Part 2: Veeam ONE + tags

 

Before you can use vCenter Server tags within Veeam ONE you have to perform an initial object categorization in Veeam ONE Business View.

To map your defined categories to Veeam ONE Business View categories, follow these steps:

  • Review/edit your Veeam ONE Categories
  • log-in to Veeam ONE Business View
  • open the Configuration Tab
  • select “Categories” from the left side of the window
  • Add/Remove/Edit the categories if necessary

Map tags from VI Management Server

  • select “Import/Export” from the left side of the window
  • select “Map tags from VI Management Server -> Run Wizard”

  • define Tag to Category mapping
  • review the detected tags
  • Finish

If you now take a look at “Groups” (left side of the window) you can see the imported tags in the corresponding group:

And of course they are also available in the Business View containing all objects assigned with the respective tag:

Important note:
This example is kept very simple for easier understanding. If you want to use Veeam ONE Business View Categories, Groups and Tags in production I recommend you to take care of the Veeam Help Center | Business View User Guide.

Using Veeam ONE to identify VMs with no RPO Tag

 

As I wrote in part one of this article, it is necessary to take care of untagged virtual machines if you use them for backup jobs. As the vSphere tags are now mapped with Veeam ONE, you can filter/search for uncategorized VMs very easy.

If you play around with the Veeam ONE Business View dashboard you will find the following graph:

 

If you take a look at the RPO_Level graph: Ten percent of the VMs are not categorized.

That means they are not protected in our use case!

To identify the uncategorized VMs, change to the Tab “VM” and select “Uncategorized” as requested status. This will display all uncategorized VMs. If necessary, you can export them to Excel, too:

Assign the corresponding tag to the uncategorized VMs – and your backups will work like a charm!

I hope I was able to give you an idea, how powerful vSphere tags can be in combination with third party vendor software like eg. Veeam!

Read more in the other episodes of “Fun with Tags”:

Fun with Tags, Episode 1: Basics and PowerCLI
Fun with Tags, Episode 2: Tags and Veeam
Fun with Tags, Episode 3: Tags and vRealize Operations Manager

2 Comments

  1. Pingback: VMware vSphere Tags and Categories - all you need to know about it

  2. Pingback: Fun with Tags, Episode 3: VMware vRealize Operations Manager

Leave a Comment

Your e-mail address will not be published. Required fields are marked *