Hyper-V Backup
MSP360 Managed Backup supports Hyper-V backups and restores.
This chapter covers the following topics:
- About Hyper-V
- Hyper-V Checkpoints
- How Hyper-V Backup Works
- Application-Consistent Hyper-V Backups
- Changed Block Tracking
- Hyper-V Failover Cluster 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.
Hyper-V Checkpoints
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
How Hyper-V Backup Works
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
- 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
Current Checkpoint Backup
Note that this option is available for Hyper-V plans in the new backup format only
As of Backup Agent 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
Application-Consistent Hyper-V Backups
As of version 7.4, Backup Agent 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
Changed block tracking (Resilient Change Tracking in Hyper-V terminology) is a feature that implements changed block tracking for Hyper-V VM disks. Changed Block tracking can be enabled by users to optimize the backup procedure and save backup data reading time. Once the Changed Block Tracking option is enabled, only changed blocks of a virtual machine disk (vhdx) between two backup operations are read.
Changed Block Tracking is supported for the following Windows versions:
- Windows Server 2016 and later
- Windows 10 (Enterprise, Pro, Education editions)
Note that in order to apply the Changed Block Tracking, VM configuration version must be 6.2 or later
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 Failover Cluster Backup
As of Backup Agent Virtual Edition for Windows 7.4, Hyper-V Failover Cluster backup is supported in Backup Agent for Windows VM Edition.
For now, Backup for Windows VM Edition supports only local Failover Cluster backup. This means that the Backup Agent instance must be installed on the Hyper-V host with a Failover Cluster to be backed up.
Pass-Through Disks
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.