Backing up VMs

Virtualized servers are becoming more common in today’s computing environment, so being able to back them up is often a requirement for backing up a customer’s data. This can be accomplished from within the virtual machines and from the host server.


Backing up Hyper-V VMs

For backing up entire Hyper-V VMs, our backup software relies on Microsoft’s VSS and the Hyper-V VSS Writer to provide a copy of the virtual machine files to the backup software. Selecting these for backup is done from the Backup > Selections tab, then navigating to Computer > VSS System Components section within the selections. Once you have loaded the list of VSS writers, you can select the Hyper-V VSS Writer as part of the backup selections.

One caution with having the backup client installed on a Hyper-V Host is that each time a VSS snapshot is being created, the Hyper-V VSS Writer will temporarily freeze all of the VMs so it can snapshot them. This will happen even if Hyper-V is not selected for backup, due to VSS calling all of its writers to prepare their data for the new snapshot.

Another caution is with the size of the VMs, and the time it will take to back them up. Often the .VHDX files for VMs can be rather large, they don’t compress well, and they often do not perform well under differential scans, so selecting them for backup often means backing them up entirely each day they are selected for backup.


Backing up VMWare VMs

VMWare does not lock its virtual machines in the same way that Hyper-V does, so it is technically possible to just select the folder that the VM files are in, or just to select the VM files themselves for backup. However, this will cause the backup client to be backing up dirty or “crash consistent” versions of the VM, which can sometimes lead to issues with restoring the VM.

A safer alternative is to set up a scheduled backup on the VMWare host server to create backup files of the virtual machines you need backed up, and then select those backup files as part of the remote backup selections.

Other virtual machine host software that is not VSS aware like Hyper-V is should be backed up the same way VMWare VMs.


Restore Scenarios

If you are backing up the full virtual machine from the VM host and need to restore data from the backed up VM image, the method for restoring data within it will require you to restore the full file(s) for the VM, and then either mount it on the VM host, or in cases where the VM is a mountable file (like .VHDX), it can just be mounted as a virtual drive.

If you are running the backups from within a VM, and the VM becomes damaged/corrupted, the way you will restore data from the VM is to install the backup client on to a different computer or VM, and re-use the backup account name and password for the backup account you need to restore from. You can then go to the Restore tab, click “Refresh”, and chose the “Computer@Domain” name for the computer to restore from, and do a standard restore. This will not allow you to bring back the full VM, but will allow you to retrieve the important selected data that can’t be recreated just by reinstalling the OS and applications.