Online Backup

Online backup is the recommended backup method for Microsoft Hyper-V VMs. This type of backup requires no downtime. VMs remain running for the whole backup period, and users can access them without any interruption.

Online backup can be performed if Microsoft Hyper-V VMs meet a number of requirements. For more information, see Microsoft Hyper-V documentation.

The procedure of online backup depends on the Microsoft Hyper-V Server version:

Microsoft Hyper-V Server 2012

For online backup of VMs on Microsoft Hyper-V Server 2012, Veeam Backup & Replication uses a native Microsoft Hyper-V approach. To quiesce VM data, Microsoft Hyper-V employs two Microsoft VSS frameworks that work at two different levels and communicate with each other:

Online backup for VMs on Microsoft Hyper-V Server 2012 is performed in the following way:

  1. Veeam Backup & Replication interacts with the Microsoft Hyper-V host VSS Service and requests a backup of a specific VM.
  2. The Microsoft VSS Writer on the Microsoft Hyper-V host passes the request to the Microsoft Hyper-V Integration Components (HV-IC) installed inside the VM guest OS.
  3. The HV-IC acts as a VSS Requestor for the framework inside the VM. It communicates with this framework and requests a backup of Microsoft VSS-aware applications running on the VM.
  4. VSS Writers for Microsoft VSS-aware applications on the VM are instructed to quiesce application data.
  5. After the applications are quiesced, the framework inside the VM takes an internal snapshot using a Microsoft VSS software provider in the VM guest OS.
  6. The VM returns from the read-only state to the read-write state, and operations inside the VM are resumed. The created snapshot is passed to the HV-IC.
  7. The HV-IC notifies the hypervisor that the VM is ready for backup.
  8. The Microsoft Hyper-V host VSS provider takes a snapshot of a volume on which VM disks are located (external snapshot). After that, Microsoft VSS triggers the auto-recovery process. For more information, see Auto-Recovery.
  9. The volume snapshot is presented to Veeam Backup & Replication. Veeam Backup & Replication reads VM data from the volume snapshot in one of two backup modes — on-host backup or off-host backup.
  10. After the backup is complete, the volume snapshot is deleted.

Online Backup 

Auto-Recovery

Internal and external snapshots are taken one after another, with a little time difference. During this time interval, the VM on the volume is not frozen — its applications and OS are working as usual. For this reason, when the external snapshot is created, unfinished application transactions may remain inside the VM, and this data can be lost during backup.

To ensure the VM data is consistent at the moment of backup, Microsoft Hyper-V VSS Writer performs additional processing inside the created external snapshot. This process is also known as auto-recovery.

Auto-recovery is performed after a volume snapshot is taken. The auto-recovery process is performed in the following way:

  1. Right after the snapshot of a volume is taken, Microsoft Hyper-V host VSS allows the Microsoft Hyper-V host VSS Writer time to update data inside the external snapshot before it is permanently put into the read-only state.
  2. The volume snapshot is temporarily mounted to the Microsoft Hyper-V host as a new volume with read-write access.
  3. The Microsoft Hyper-V host VSS Writer rolls back a VM on the external snapshot to the state of the internal snapshot. All changes that took place after the internal snapshot was taken are discarded. This way, VM data inside the external snapshot is brought to a completely consistent state.

At the same time, the internal snapshot inside the VM guest OS is deleted.

As a result, you have a VM on the production volume and a consistent volume snapshot that Veeam Backup & Replication can use for backup.

Note

Auto-recovery may take up to several minutes.

Microsoft Hyper-V Server 2012 R2

For backup of VMs on Microsoft Hyper-V Server 2012 R2, Microsoft VSS uses backup and auto-recovery checkpoints.

To quiesce VM data, Veeam Backup & Replication leverages two Microsoft VSS frameworks that work at two different levels and communicate with each other:

Online backup for VMs on Microsoft Hyper-V 2012 R2 is performed in the following way:

  1. Veeam Backup & Replication interacts with the Microsoft Hyper-V host VSS Service and requests a backup of a specific VM.
  2. The Microsoft VSS Writer on the Microsoft Hyper-V host passes the request to the Microsoft Hyper-V Integration Components (HV-IC) installed inside the VM guest OS.
  3. The HV-IC acts as a VSS Requestor for the framework inside the VM. It communicates with this framework and requests a backup of Microsoft VSS-aware applications running on the VM.
  4. VSS Writers for Microsoft VSS-aware applications on the VM are instructed to quiesce application data.
  5. After the applications are quiesced, Microsoft Hyper-V VSS takes a backup checkpoint of the VM. Every virtual disk of a VM receives a temporary file named vm_disk_name_GUID.avhdx. For example, the name of the received file can be: disk_1_A1C3FDA5-5DFE-4001-A6D7-EBE18195A85C.avhdx. All new writes that occur to the VM until the volume snapshot is taken are redirected to this file.
  6. Right after taking the backup checkpoint, Microsoft Hyper-V VSS takes another auxiliary checkpoint — the auto-recovery checkpoint. Every virtual disk of a VM receives a temporary file named vm_disk_name-AutoRecovery.avhdx. For example, the name of the received file can be: disk_1-AutoRecovery.avhdx. The auto-recovery checkpoint helps make sure that VM data is consistent during backup.

The auto-recovery checkpoint does not depend on the backup checkpoint — it is taken independently in a new checkpoint chain.

  1. The framework inside the VM takes an internal snapshot using a Microsoft Hyper-V Integration Services Shadow Copy provider in the VM guest OS.
  2. The created internal snapshot is passed to the HV-IC.
  3. The HV-IC notifies the hypervisor that the VM is ready for backup.
  4. Microsoft Hyper-V VSS performs auto-recovery — it mounts the auto-recovery checkpoint to the VM, rolls back data on the VM to the consistent state.
  5. The Microsoft Hyper-V host VSS provider takes a snapshot of a volume on which VM disks are located (external snapshot).
  6. The auto-recovery checkpoint is merged with the original VM.
  7. The volume snapshot is presented to Veeam Backup & Replication. Veeam Backup & Replication reads VM data from the volume snapshot in one of two backup modes — on-host backup or off-host backup.
  8. After the backup is complete, the volume snapshot is deleted, and the backup checkpoint is merged with the original VM.

Microsoft Hyper-V Server 2016 and Later

Online backup of VMs on Microsoft Hyper-V 2016 and later relies on production checkpoints.

Production checkpoints are point-in-time images of VMs. When producing production checkpoints, Microsoft Hyper-V does not put VMs to the saved state. Instead, it quiesces data on VMs with the help of Microsoft VSS technology (for Microsoft Windows VMs) or file system freeze (for Linux VMs). The resulting checkpoints are application-consistent, so you can recover VMs without any data loss.

Veeam Backup & Replication performs online backup with the help of production checkpoints only if the following conditions are met:

Online backup is performed in the following way:

  1. Veeam Backup & Replication requests a production checkpoint of a specific VM.
  2. Microsoft Hyper-V Virtual Machine Management Service (for Microsoft Windows VMs) or file system freeze (for Linux VMs) brings data on the VM guest OS to a consistent state.
  3. Microsoft Hyper-V Virtual Machine Management Service creates a production checkpoint for the VM. Every virtual disk of a VM receives a temporary AVHDX file. All new writes are redirected to temporary AVHDX files.
  4. Further activities depend on the backup mode:

Online Backup 

Related Topics

Page updated 4/4/2024

Page content applies to build 12.3.0.310