Although Hyper-V backups are relatively straightforward, there are at least four serious gotchas that administrators must be on the lookout for. These gotchas might not be obvious at the time that the backup is created, but can prevent you from being able to restore the backups that you have created.
1. There is more to a VM than just a virtual hard disk
By far, the most common mistake that organizations make when performing a Hyper-V backup is to treat a VM backup as if it were a physical server backup by installing a backup agent within the virtual machine. The reason this approach is problematic is a backup agent that is installed inside the virtual machine can only backup the virtual machine's contents. Essentially, this means that the backup agent is backing up the contents of one or more virtual hard disk files. However, there is much more to a virtual machine than just the virtual hard disks.
Virtual machines are made up of many different components, including things like virtual hard disks, virtual machine configurations and snapshots. If you only backup the virtual machine contents then it will be impossible to restore the virtual machine as a whole. This means losing access to the virtual machine configuration and to any snapshots that might have been created.
There are situations in which guest-level backups are warranted (such as when the virtual machine is running an operating system that is not supported for host-level backups), but guest-level backups should be the exception rather than the rule.
2. VM contents and configurations matter
Hyper-V backups make use of the Volume Shadow Copy Services. In doing so, the Hyper-V VSS writer communicates with the VSS writer inside each individual virtual machine to facilitate the backup process. By using this method, Hyper-V is able to ensure that each VM is backed up in a reliable manner while also ensuring application consistency inside the individual VMs.
In order for the Volume Shadow Copy Services to be used to back up the virtual machines, each VM must meet a number of criteria including:
- The VM must be fully enlightened. This means that the Integration Services must be installed and that the Backup Integration Service must be enabled.
- Each VM must be configured to store snapshots on the same volume as its virtual hard disks.
- The volumes within each VM must be configured as basic disks (as opposed to dynamic disks) and must be formatted using NTFS.
- The VMs must be in a running state.
If a VM fails to meet even one of these criteria, then Hyper-V will resort to using the saved state backup method instead. This means momentarily placing the VM into a saved state, creating a VSS snapshot and then returning the VM to its normal state. Although this backup method works, it does cause an interruption in service.
3. A single VM backup failure can be catastrophic
Perhaps the most important thing to know about Hyper-V backups is that the backup process's dependency on the Volume Shadow Copy Services leads to one major weakness in the backup process. A backup can only be created after the VSS writer has been notified that VSS snapshots have been successfully created for each virtual machine. Therefore, if the VSS snapshot process fails for even a single virtual machine, then the entire backup will fail. Microsoft does not support creating partial backups of Hyper-V.
4. Pass-through disks need special consideration
The last critically important thing that you need to know about Hyper-V backups is that pass-through disks and iSCSI disks need special attention. These types of disk are not visible to the parent partition (the host operating system). As such, they cannot be backed up by the Hyper-V VSS writer. The only way to back up these types of disks is from within the virtual machine itself.
As you can see, there are a number of critically important factors that must be taken into account when planning for Hyper-V backups. The good news, however, is that some third-party backup vendors have come up with creative ways of getting around some or all of these limitations. When choosing a backup application for Hyper-V, it is important to talk to the backup vendor to see how their product addresses these limitations.
About the author
Brien M. Posey, MCSE, has received Microsoft's MVP award for Exchange Server, Windows Server and Internet Information Server. Brien has served as CIO for a nationwide chain of hospitals and has been responsible for the department of information management at Fort Knox. You can visit Brien's personal website at www.brienposey.com.