Using vSphere Custom Attributes with Veeam Backup & Replication

Most of my customers now use tag-based backup with Veeam Backup & Replication to protect their business-critical applications and services. This ensures that they no longer need to perform any configuration within the backup software to protect their workloads. Only the individual adjustments of the Guest Credentials for Application-Aware Processing have to be done in the Veeam Console. The added value you have by doing this I have already covered in another blog post.
In the ever accelerating IT world and the changes that come along with it, it is extremely important for my customers to be able to make fast and reliable statements about the data backup status of certain systems. Since we use vSphere tags to perform nearly all of our backup administration from within vCenter, it would be consistent to have the appropriate status information available at this location as well. This is where the Notification Settings within the Advanced Backup Settings come into play. How you can configure simple status updates in vCenter without installing additional plug-ins or tools, and what you should consider when doing so, I‘ ll show you below.

To demonstrate the configuration I first need a VM that needs to be backed up. In this case I simply use one of my web servers which is already tagged with an appropriate tag for the backup.

VM prepared for tag-based Veeam backup

In the console of my Veeam Backup & Replication installation I now edit the settings of the backup job associated with the backup tag „Gold“.

Veeam Backup job configured to backup up all VMs assigned the „Gold“ backup tag

You will find an additional configuration item under Storage -> Advanced -> Notifications below the options for SNMP and e-mail notifications.

Veeam Backup job default notification settings

By enabling Set successful backup details to this VM attribute you can use the vSphere Custom Attributes for your purposes. Once you have checked the box, you can assign any name for the attribute to which Veeam writes the information about the last successful backup and whether the existing value of the attribute should be retained or not. At this point I would like to point out the wording of this configuration option. Set successful backup details to this VM attribute must not be taken literally here. The attribute is created/updated after a backup has been completed with Success or Warning. Be aware of this characteristic if you want to use this function to monitor your backups within vCenter because, as you will see later, the actual status (Success, Warning or Failed) does not make it into the attribute description.

In the text field you can enter any name for the attribute. If the attribute does not exist yet, it will be created by Veeam Backup & Replication. In this case I decided to use a descriptive identifier (Backup) and unchecked Append to the existing attribute’s value.

New attribute „Backup“ to be created by Veeam Backup & Replication

After the next job run, we can view the result of our configuration in vCenter.

New custom attribute created after first successful backup run

As you can see, our attribute was created as expected and given the appropriate values. However, we can’t really say much about the state of backup in this view. We can’t see directly when the value was last changed and therefore can’t say when the last backup of this VM was created. It depends on your vCenter dashboard and screen size whether or not you can see the timestamp of the last backup. If you’re like me, you need to edit the attribute..

Editing the attribute and scrolling through the value provides some more details

If we scroll manually through the value of the attribute we get the desired information. Unfortunately not necessarily the easiest and smartest way to get the desired information. Falko Banaszak (Veeam Vanguard 2020) wrote a blog post on how to use the custom attributes with PowerCLI to do some reporting and inventory. You can find his post here on his blog. But we want to be able to read the information quickly and easily from the vCenter. Therefore, there are only two possible options for us: (A) We buy a larger monitor or (B) We look again if we can improve our configuration. Even if option A is not a bad idea, we will focus on option B in the following.

So back again to our Veeam Backup & Replication console. We return to the default settings and see how far we get with them.

Reverting to the default settings for notifications

Let us have a look at the attributes after another backup job run (I deleted the old custom attribute Backup prior to the job run).

Using the Notes section under VM Summary for backup reporting

This looks al lot more like something we can use in our day to day job. Sometimes you might want to try the default settings first before you try to tweak the whole thing immediately.

Wrap-Up

Using VM attributes in the advanced notification section of Veeam Backup & Replication looks like a promising way to provide insights into the backup status of a VM to the vSphere administrator. It doesn’t matter whether you use your own attributes (possibly with a large screen) or the predefined Notes field. Depending on what you want to achieve (keyword: PowerCLI) each option may have its own advantages or disadvantages. What is still missing in my opinion is the possibility to write the actual status of the last backup run into the attribute. In the current configuration you can only see that the backup was not completed with an error.