About Hyper-V Backup
As of version 7.4, Backup for Windows features backup and restore of Hyper-V virtual machines including Hyper-V Failover Cluster using Shared Volume Storage (SVC). Hyper-V backup and restore are supported for both backup formats: new and legacy.
This chapter covers the following topics:
- What is Hyper-V
- Hyper-V Checkpoints
- Application-aware Hyper-V backups
- Changed Block Tracking
- Hyper-V VM Backup
- Pass-Through Disks
What Is Hyper-V
Hyper-V is a Microsoft hardware virtualization product. Hyper-V allows to create and run a software version of a computer called a virtual machine. Each virtual machine acts like a computer running an operating system and programs.
Hyper-V runs each virtual machine in its own space, which allows running more than one virtual machine on the same hardware at the same time.
A Hyper-V checkpoint is a restore point of a virtual machine. Hyper-V checkpoints allow to keep existing states of virtual machines, so in case of any crash, it is easy to roll a virtual machine back to a previous state.
Windows 10 Hyper-V has two general types of checkpoints:
- Standard checkpoints
- Production checkpoints
Standard Hyper-V Checkpoint
Standard checkpoint takes a snapshot of the virtual machine and virtual machine memory state at the time the checkpoint is initiated. A snapshot is not a full backup and can cause data consistency issues with systems that replicate data between different nodes such as Active Directory. Hyper-V only offered standard checkpoints (formerly called snapshots) prior to Windows 10.
Production Hyper-V Checkpoint
A production checkpoint is a consistent state of a Hyper-V machine. A snapshot of the virtual machine memory state is not taken when using a production checkpoint.
Production checkpoints do not include information about running applications, while standard checkpoints contain the current state of current applications.
To learn more about Hyper-V checkpoints, refer to the Work with Checkpoints chapter at docs.microsoft.com
Application-Aware Hyper-V Backups
Backup for Windows supports the application-aware backups of Hyper-V virtual machines. Application-aware backups are crucial for so called transactionally overloaded backups. Good examples may be virtual machines that run Microsoft SQL Server, SharePoint, or Oracle databases.
Application-aware backup of virtual machines on Hyper-V environment is based on independent checkpoint type selection.
Checkpoint creation depends on Hyper-V configuration. The following cases are possible:
- Production checkpoint creation is enabled
- Standard checkpoint creation is enabled
- Checkpoints are disabled (no checkpoint type)
As a backup plan runs, an attempt to create a checkpoint of a specified type first is made. If a checkpoint is not created, a recovery inconsistent checkpoint is created instead. This checkpoint type does not contain a VSS snapshot of a virtual machine.
If no checkpoints are available (the Enable Checkpoints check box is unselected in the virtual machine properties), an attempt to create a recovery consistent checkpoint with a VSS snapshot of a virtual machine is made. If a recovery consistent checkpoint failed to create, a recovery inconsistent checkpoint is created instead: it does not contain a VSS snapshot of a virtual machine.
For recovery consistent checkpoints, input/output activities that are quiesced in the moment of VSS snapshot creation will be resumed.
Changed Block Tracking
Backup for Windows supports now the Changed Block Tracking for Hyper-V virtual machines.
Changed Block Tracking is supported for the following Windows versions:
- Windows Server 2016 and later
- Windows 10 (Enterprise, Pro, Education editions)
On a virtual machine incremental backup with enabled Back up Current Hyper-V Checkpoint only and Use Changed Block Tracking options, a new checkpoint is created of the VM disk, and the snapshot contents are uploaded to the backup storage. The checkpoint is deleted automatically on Hyper-V after the backup plan is completed.
After the backup plan is completed, the checkpoint differencing file (.avhdx) is frozen. This is a difference compared to VSS snapshot processing on Windows Server 2012 and 2012 R2 operating systems, in which the snapshot difference file is retained on the virtual to keep incremental changes.
On the next backup plan run, a new checkpoint is created and compared against the change-tracking information from the previous backup operation to determine the data that has changed. Then, only the changed blocks are backed up.
Changed Block Tracking block IDs are unique, so no block interference problems occur in case of simultaneous use of another backup software.
Hyper-V VM Backup
The basics of Hyper-V VM legacy backup consist of the following steps:
- As Hyper-V backup plan is started, a Hyper-V host is accessed
- New checkpoints are created for virtual machines specified in a backup plan. Virtual machines are always backed up sequentially. The new checkpoint is created while a virtual machine is being processed
As of Backup for Windows 7.4 version, you can select whether to back up a current checkpoint only or all previously created checkpoints in Hyper-V backup plans in the new backup format. This can be done on the Select Virtual Machines step, under Advanced Settings.
Select the Back up current Hyper-V checkpoint only check box to back up the checkpoint created at the moment of the backup plan execution. Previous checkpoints are not backed up. If you intend to back up all checkpoints, leave this check box unselected
- Once checkpoints are read, they are uploaded to backup storage along with VM configurations
- As the checkpoint is uploaded, it is deleted on a Hyper-V host
Currently, virtual machines with pass-through disks are not backed up. If such a virtual machine is included in the backup plan, only recovery snapshots are backed up.
As a workaround, you can install another Backup for Windows instance on a virtual machine with pass-through disks and create an image-based backup plan for this VM.
Note that the new Backup for Windows instance requires a separate license