Use PowerShell and Pester for Operational Readiness Testing of Altaro VM Backup

I’ve recently been working with Altaro VM Backup and I must say that I’ve been very impressed with the ease and simplicity of the product. The back-end portion of the product can run on a virtual or physical server with or without the GUI (Server Core is supported). It can backup to just about any type of drive (local disk, UNC path, USB drive, etc). It doesn’t require SQL Server. In my environment, adding a Hyper-V server (running Windows Server 2012 R2) installed a service on the Hypervisor, but did not require a reboot. There’s no agent to install on the VM’s themselves. Recovering an entire VM or specific files within the VM is simple enough. There’s a mode where automated scheduled restores can be performed to validate the end-to-end backup and restore process. Even their licensing model is straightforward. This is how backups and restores are suppose to work <period>.

One very important thing to keep in mind is that Altaro VM Backup is designed to backup VM’s which means that all of the data that you intend on backing up needs to reside in a virtual file (VHD or VHDX for Hyper-V). If some of your VM’s have pass-through drives or you’ve passed through iSCSI network cards and made direct connections to iSCSI targets from VM’s, those drives won’t been seen or backed up by Altaro VM Backup.

There are a number of reasons why a backup taken with Altaro VM Backup may be crash consistent instead of application consistent so I decided to write an operational readiness test using PowerShell and Pester as shown in the following code example to validate all the items listed in one of their support articles.

To run the operational validation test, point the ComputerName parameter to a Hyper-V host virtualization server and it will automatically determine all of the VM’s on the host and run the test on each of the VM’s. You can specify specific VM’s to test via the VMName parameter. Use the credential parameter to specify a userid and password with admin privileges on the Hyper-V host and VM’s if you’re running PowerShell as a user who doesn’t have sufficient access.

You could use the PowerShell console or ISE (Integrated Scripting Environment) to run the test from, but the syntax highlighting and progress indicator of Visual Studio Code look amazing:


See my previous articles on how to setup Visual Studio Code for use with PowerShell if that’s something you’re interested in.

The Test-MrVMBackupRequirement function shown in this blog article can be downloaded from my PowerShell repository on GitHub. Found a bug or a better way of accomplishing a task shown in the example code? Feel free to contribute by forking the repository and submitting a pull request.


Leave a Reply

%d bloggers like this: