Microsoft Hyper-V

This Protected Item type backs up Microsoft Hyper-V virtual machines. Magnus Box supports Hyper-V backups in three modes: Latest VM state (Changed Block Tracking), Latest VM state (Standard), and All VM snapshots.

A Hyper-V virtual machine backup with Magnus Box includes:

  • its configuration file
  • all attached virtual drives
  • the contents of memory (if the machine was running)
  • the full tree of saved checkpoints

You can select individual virtual machines for backup or choose All virtual machines.

Latest VM state (Changed Block Tracking)

This option uses WMI/RCT as its underlying technology and is compatible with all versions of Hyper-V running on Windows Server 2016 or later and Windows 10 or later.

Magnus Box integrates with the Hyper-V WMI/RCT writer to back up virtual machines using WMI mode with RCT acceleration. This includes the latest snapshot data only.

Latest VM state (Standard)

This option uses WMI/RCT as its underlying technology and is compatible with all versions of Hyper-V running on Windows Server 2016 or later and Windows 10 or later.

Magnus Box integrates with the Hyper-V WMI/RCT writer to back up virtual machines using WMI mode. This includes the latest snapshot data only.

All VM snapshots

This option uses VSS as its underlying technology and is compatible with all versions of Hyper-V running on Windows Server, including Windows Server 2022 (the latest version at the time of writing).

This backup type is only applicable when running on Windows Server. Hyper-V on Windows Desktop is not supported when using the All VM snapshots option.

Magnus Box integrates with the Hyper-V VSS writer to perform a Hyper-V backup snapshot, including support for in-VM quiescence on supported guest operating systems. This includes all previous snapshots.

Consistency and guest integration services

When backing up a guest VM, it is important to maintain a consistent state. There are several ways to do this, depending on your host and guest configuration:

  • Production checkpoint (application-consistent). If the guest OS has all necessary Hyper-V integration services installed, the host can request the guest VM to take a VSS snapshot. The snapshot is then exposed to Hyper-V on the host for Magnus Box to back up. This should not interrupt the guest OS.
  • Standard checkpoint (crash-consistent). If the host OS is running Server 2012 R2 or newer but there are no integration services inside the guest OS, Hyper-V takes a checkpoint of the VM, Magnus Box backs up the checkpoint, and then the checkpoint is removed. This does not interrupt the guest OS. You can also force this behavior by disabling Production checkpoints in the Hyper-V settings for the VM.
  • Paused VSS snapshot (crash-consistent). If the host OS is older than Server 2012 R2 and there are no integration services inside the guest OS, the VM is paused, Windows takes a VSS snapshot of Hyper-V's files in the paused state, the VM is resumed, and Magnus Box backs up from the VSS snapshot. This causes a short interruption to the guest OS. You can also force this behavior by disabling checkpoints in the Hyper-V settings for the VM.

Replica VMs

If you are using Hyper-V replication, you can back up your virtual machines from either the primary or the replica host.

A backup taken on the primary VM host is application-consistent (if possible) by quiescing a VSS snapshot inside the VM guest, or crash-consistent otherwise. A backup taken on the secondary VM host is only ever crash-consistent, because the replica VM must not be running for guest integration services to take a VSS snapshot.

Current versions of Hyper-V do not allow backing up a VM that is currently replicating. If a VM is found to be replicating at the time of backup, Magnus Box will retry the operation a few times. If you repeatedly see errors of the form The virtual machine '...' cannot start a backup operation because it is currently executing a conflicting operation. Try the backup again., and you are running backups from the replica VM host, you could consider:

  • scheduling the backup job to run at a time when the VM replication is more likely to be up to date, or
  • using Before / After commands in Magnus Box to temporarily stop VM replication while the backup job is running.

For more information about backing up a replica VM, see Microsoft's guidance on backup of a replica VM. Please note this link leads to a page outside of Magnus Box's control. Please exercise caution when visiting this page and implementing the solutions recommended.

Pass-through disks

Hyper-V supports pass-through disks, which allow you to attach a physical disk from the host directly into the guest VM. This unmounts the disk from the host OS.

Hyper-V itself does not support backing up pass-through disks (nor replicating them). A Hyper-V backup of the guest machines can be taken from the host but does not include any data from pass-through disks.

You can work around this issue by either:

  • installing Magnus Box inside the guest VM and backing up the extra data at a file level (this will use an extra Device license), or
  • changing your pass-through disks to be a real disk containing a large ".vhd" or ".vhdx" file. The New Virtual Disk Wizard in Hyper-V Manager has the option to convert an existing disk to a ".vhd" or ".vhdx" file.

For more information about backing up pass-through disks in Hyper-V, see Microsoft's guidance on the pass-through limitations of the Hyper-V VSS writer. Please note this link leads to a page outside of Magnus Box's control. Please exercise caution when visiting this page and implementing the solutions recommended.

Restoring data from Hyper-V checkpoints

Granular file restore from Hyper-V requires Magnus Box 22.12.6 or later.

If your selected virtual machine used Hyper-V checkpoints, the Magnus Box backup job preserves these as-is within the Storage Vault.

When using the Restore as Hyper-V virtual hard disk files option, both the ".vhdx" (base checkpoint) and ".avhdx" (differencing disks) are present in the restore directory. Virtual disks are restored as thick-provisioned disks, expanding to their maximum disk size. Use the Import Virtual Machine wizard in the Hyper-V Manager application to import the VM fully. Once the VM is fully imported, you can select the most recent checkpoint as the active checkpoint.

When using the Granular restore option to restore single files from within a Hyper-V ".vhdx" file, only the base checkpoint (".vhdx" file) is processed. Any data from future checkpoints (".avhdx" files) is not supported by the Granular restore option. To recover individual files from a later checkpoint, first restore the vhdx and avhdx files in their entirety.

Importing a running VM into a different hypervisor

When using the Import Virtual Machine wizard in the Hyper-V Manager application, you can import the running state of a virtual machine. If you are restoring a VM to a different hypervisor that has a sufficiently different CPU, the VM may fail to resume its previous running state (".vmrs" / RAM snapshot) because of an incompatible CPU. To resolve this, either:

  • use the Power off option to shut down the imported VM, instead of the Shut down option, or
  • re-import the VM from its saved disk files without including the RAM running state.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us