Back Up Hyper-V Virtual Machines: The Ultimate Guide

If you’re running Microsoft Hyper-V machines, there’s no shortage of backup approaches to ensure recovery in different scenarios – from recovering files and application objects to restoring full VMs in Hyper-V or on other platforms.

However, each approach to back up Hyper-V virtual machines (VMs) has its use cases and may differ in terms of resource efficiency and recovery options. This blog post covers methods of Hyper-V VM backup, explains how to back up Hyper-V VMs, and VM backup best practices.

NAKIVO for Hyper-V Backup

NAKIVO for Hyper-V Backup

Agentless, application-aware backups for Hyper-V. Anti-ransomware protection, instant VM boot from backup, other virtual/physical platform support and more.

Ways to Back Up Hyper-V VMs

Let’s start with the native tools for Hyper-V backup provided by Microsoft. Primarily, you can use Windows Server Backup and PowerShell cmdlets, which are integrated features that enable backing up Hyper-V VMs. There are also other solutions for large environments.

Below is a list of the main ways to back up a Hyper-V virtual machine using these native tools:

  • Windows Server Backup – you can select Hyper-V and choose VMs for backup
  • PowerShell with the Export-VM command or the Start-WBBackup command
  • System Center Data Protection Manager, which integrates with System Center Virtual Machine Manager (can be managed in PowerShell as well)

Alternatively, administrators can use special third-party backup solutions that support Hyper-V VM backup. These solutions can leverage Microsoft’s API to access advanced backup features on Hyper-V hosts.

Host vs. Guest Hyper-V VM Backup

Whether you’re using a native tool or a third-party backup solution designed to back up Hyper-V VMs, there are two main approaches: at the guest level or at the host level. Let’s look at the features of each approach in more detail.

Guest-level backup

Guest-level VM backup relies on the use of special agent-based software installed on the guest operating system (OS) to run the backup process. This backup approach is similar to backing up a physical host.

Guest-level backup allows application-aware processing using Microsoft’s Volume Shadow Copy Service (VSS – also known as Volume Snapshot Service) to create consistent data copies. Almost all backup software developed for Windows includes VSS to allow the creation of application-aware data backups. VSS is a technology that can create snapshots, that is, point-in-time “shadow” copies, of volumes even when the VM is running. VSS writers, which are components of VSS, are used for this process. In Linux, LVM (Logical Volume Manager) is used for this purpose to create application-consistent snapshots.

Agents: definition and role

An agent is a backup software component installed on a physical computer or virtual machine to interact with the file system and applications. Agents usually run as a system process inside a guest OS, establishing a network connection with the server used for managing backups. The backup software uses agents to create copies of the entire system or individual files or programs.

Note that using agents to run VM backups is considered a legacy approach, as it is not as efficient as using agentless backup solutions. However, there are some use cases for this approach in virtual environments, which we cover in the next section.

The legacy agent-based approach

Use cases for guest-level backup

You may have to resort to the guest-level backup approach in virtual environments in the following cases:

  • If the guest OS is not officially supported by the hypervisor, creating an application-consistent backup using the host-level method is impossible.
  • If the VM is connected to shared storage at the guest OS level or has a directly attached physical disk (including a pass-through disk) that is not supported by host-level backup software.

    For example, suppose a VM is attached to a SAN (Storage Area Network) LUN (Logical Unit Number) via the iSCSI protocol (by using an in-guest iSCSI initiator), and software such as a database server or a file server is using that volume. In this case, Hyper-V’s VSS writer won’t be able to create a completely consistent backup of all disks used by the VM (the volumes inside the VHD virtual disks and the volumes of the directly attached physical disks). This is because in order to make a proper backup, applications and both disk types must be quiesced when the snapshot is taken.

    VMs using volumes on VHD virtual disks and SAN LUNs for Hyper-V backup.

    To perform host-level backup instead, pass-through disks can be converted to VHD virtual disks. Note that the VM can be located on shared storage, such as a NAS (network-attached storage) device or SAN. These solutions are used to perform host-level backup with clustering.

Some organizations with small virtualized environments use the guest-level VM backup method to save costs. This strategy might have made sense in the past as agent-based legacy solutions were more economical for small environments with few VMs. However, today, this approach is not recommended as there are equally or more affordable host-level VM backup solutions for small Hyper-V environments.

Advantages

  • Can be used when host-level backup is impossible (in the cases mentioned above).

Disadvantages

  • Agents must be installed on each virtual machine, which is inconvenient and time-consuming.
  • The recovery process is more difficult. A new empty VM must first be created. Then you have to configure the VM’s settings (virtual CPU, memory, disks, network, etc.). Only then can you restore the VM, and you need to restore media in order to reboot.
  • Consumption of computing resources increases significantly, especially when several virtual machines residing on one Hyper-V host are being backed up at once.
  • Agent-based backup software requires the use of root or administrator credentials to configure the agents, potentially compromising security.
  • No VM-level snapshots.

Host-level backup

Host-level Hyper-V VM backups operate at the hypervisor level rather than the level of the guest VM and can back up VMs regardless of the OS running inside them. Virtual machines can be fully backed up, including the virtual disk files (indicated by the VHD or VHDX format in Hyper-V) and configuration files, in which the virtual hardware configuration, such as CPU, memory, network, etc., are stored.

There are two types of host-level backup: Saved State and Child VM Snapshot.

Diagram of the host-level Hyper-V backup method

Saved State method

The Saved State method is a partially offline backup method that is not application-aware. With this method, Hyper-V’s Volume Shadow Copy Service (VSS) assigns the VSS writer to perform the backup process. If the VM is running at the time, Hyper-V’s VSS writer puts the VM into a “saved state”. This means that the VM goes offline for a short period of time while the snapshot is taken. This ensures that open files can be saved and the state of running applications can be recorded on the virtual hard disk.

How does the Saved State method work?

This process consists of the following stages:

  1. PrepareForSnapshot event. The backup software initiates the preparation of the VM for backup, and the VM’s state is saved using the hibernation mode.
  2. Taking the snapshot. Hyper-V’s VSS writer, which runs as a VMMS.exe (Virtual Machine Management Service) process, is used. The snapshot, which is also referred to as a VM checkpoint in Hyper-V, is taken. The backup software creates a backup using the snapshot. The creation of the snapshot allows the VM’s data to be backed up while avoiding any data modification during the copying process. When this is completed, the next event, PostSnapshot, is triggered.
  3. PostSnapshot event. The VM is returned to its previous state.

Child VM Snapshot method

The Child VM Snapshot method is an application-aware method whereby the VM stays online during the backup operation, creating a transactionally consistent backup. This method is preferred over the Saved State method for backing up running VMs and can be used for high-availability production environments.

While the Saved State method uses Hyper-V VSS outside the child VMs, the Child VM Snapshot method uses the VSS mechanism within the child VM to create backups. In more detail, the Child VM Snapshot method utilizes the VSS mechanism within the Hyper-V host, not within the child VM itself, to create backups. The VSS Requestor Service within the child VM communicates with the host’s VSS writer to coordinate the snapshot creation. Note that the term “child VM” is synonymous with “guest VM”.

How does the Child VM Snapshot method work?

The event sequence is partially similar to the Saved State method:

  1. PrepareForSnapshot event. The Hyper-V VSS Requestor Service in the child VM triggers the PrepareForSnapshot event to initiate backup creation.
  2. Taking snapshot event. After receiving the request from the VSS Requestor Service, the snapshot is created. Then the control is returned from the Hyper-V VSS Requestor Service to the Hyper-V VSS Writer.
  3. PostSnapshot event. The VSS writer triggers the PostSnapshot event to inform the backup software that the VM snapshot creation has been completed. The backup software can then copy the snapshot as part of the VM backup process.

The role of Hyper-V Integration Services

Hyper-V Integration Services are used to provide special interaction between the hypervisor and the child VM when creating backups with the Child VM Snapshot method. These services comprise a collection of drivers and services that can be individually enabled or disabled depending on your needs. The VSS Requestor Service discussed above is part of the suite of Integration Services, which must be installed on the virtual machine in order to perform host-level backup.

Since Windows Server 2008 R2 and Windows 7, Integration Services are included in the operating system. If you want to install or update the Integration Services on the VM manually, you can do this by using Hyper-V Manager and mounting the vmguest.iso virtual disk image on the VM’s virtual drive. To update Integration Services manually on a Hyper-V host, you can download the services from Microsoft’s site and install them through PowerShell. Windows 10 and Windows Server 2016 can update Integration Services on hosts as well as on guests via the Windows Update service.

Hyper-V VSS Requestor service used for Hyper-V backup

Requirements for the Child VM Snapshot method

The following conditions must be met to create backups using the Child VM Snapshot method:

  • Hyper-V Integration Services, including the Hyper-V VSS Requestor, must be installed in the child VM.
  • All volumes inside the VM must be configured as basic disks rather than dynamic ones. The file systems of the disks inside the child VM must support snapshots (for example, the NTFS file system would meet this criterion).
  • The VM snapshot files must be located in the same volume as the VHD files.
  • The child VM must be running.

If any of these conditions are not met, the Child VM Snapshot method cannot be used. The Saved State method is used by default in this case.

Advantages

As shown above, host-level backup methods are preferred for backing up Hyper-V VMs and offer many advantages over the guest-level method. These advantages can be summarized as follows:

  • A hypervisor-level backup is easier to manage. No agents are needed. The backup product can manage the entire Hyper-V host and all the VMs residing on this host. You can select the specific VMs that you want to back up.
  • All the VM contents, including virtual disks, snapshots, and VM settings, are captured during the backup process. You only need to select the hypervisor along with a storage location for VM recovery without creating and manually configuring a new VM.
  • Ability to perform online application-aware backup of Hyper-V VMs using the Child VM Snapshot method. This is critically important for production environments, as there is no interruption of virtual machine operation, and the backup is transactionally consistent.
  • Efficient resource usage in terms of processor, memory, and disk space.

How to Back Up a Hyper-V VM with Native Tools

Microsoft System Center Data Protection Manager (DPM) is a native tool for Hyper-V backup that can be used in large environments. DPM integrates with Microsoft System Center Virtual Machine Manager (SCVMM) for VM backup. Ensure your Hyper-V hosts are properly configured and managed within SCVMM for a smooth backup experience.

Prerequisites

To back up Hyper-V virtual machines using System Center Data Protection Manager (DPM), certain prerequisites and conditions need to be met to ensure that the process is successful. These prerequisites can slightly vary depending on the versions of DPM and the Hyper-V host, but the key requirements generally include:

System level prerequisites

  • Both DPM and the Hyper-V host must be running on operating systems (OSs) that are supported by their respective versions. Ensure they are up to date.
  • Make sure the DPM version supports the Hyper-V version that you are using. There are specific DPM versions for every Hyper-V release.
  • The Hyper-V role must be installed and enabled on the host system that you plan to back up.
  • The DPM protection agent must be installed on all Hyper-V host machines that you intend to protect. If you plan to perform item-level recovery of data from within the VM, the agent should also be installed inside the VM.

Configuration requirements

  • Virtual machines should be configured with fixed-size disks or dynamically expanding disks. Differencing disks and pass-through disks have specific considerations and may not be supported for backup in certain configurations.
  • If your Hyper-V hosts are part of a cluster (Cluster Shared Volumes), ensure that DPM is properly configured to protect Hyper-V VMs in a clustered setup.
  • Ensure proper network connectivity and permissions between the DPM server and the Hyper-V hosts. The DPM server and the Hyper-V server must be able to communicate with each other.
  • DPM requires disk-based storage to back up data, so ensure that there is sufficient disk space in the DPM storage pool. For better performance and management, consider dedicating disks to DPM storage.

Software and security

  • The Windows Firewall must allow DPM activities. This often means adjusting firewall rules to permit DPM agent communication.
  • The DPM service account needs administrative permissions on the Hyper-V host to perform backups.

VM requirements

  • Integration Services (also called VM Guest Services) must be installed and running in the VMs for certain backup functionalities, especially for the online backup of the VM.
  • Make sure virtual machine snapshots (checkpoints) are supported and properly configured for your VM version and disk types.

Note that features and steps might vary between different versions of DPM.

Hyper-V VM backup procedure

Backing up Hyper-V virtual machines using System Center Data Protection Manager involves several key steps to ensure that your data is secure and can be recovered in the event of failure or data loss. The general workflow is as follows:

  • Add your Hyper-V hosts to DPM. Navigate to the Management tab in the DPM Administrator Console and add the Hyper-V servers you want to back up. This involves inputting server names and ensuring DPM can communicate with them through the appropriate agents.
  • Configure protection groups. Protection groups in DPM are essentially backup policies. You’ll define what to back up, how often to back up (backup frequency), and how long to keep those backups (retention policies).

Automating Hyper-V backup in DPM

You can use PowerShell to back up a Hyper-V VM using DPM. Microsoft provides a PowerShell module specifically for DPM that allows you to script and automate a wide range of DPM tasks, including creating and managing backups of Hyper-V virtual machines.

Below is a general outline of the steps to back up a Hyper-V VM using System Center DPM via PowerShell.

NOTE: Ensure that you have the DPM PowerShell module installed on your system. This module is typically installed by default with DPM. Make sure you are running the PowerShell commands or script with appropriate permissions to access DPM and perform backup operations.

  1. Launch PowerShell with the DPM module. First, you’ll need to launch a PowerShell session and import the DPM module. You may need to run PowerShell as an Administrator.

    Import-Module DataProtectionManager

  2. Connect to the DPM server. You need to establish a connection to your DPM server. Replace “YOUR_DPM_SERVER_NAME” with the name of your DPM server:

    $DPMServer = Connect-DPMServer -DPMServerName "YOUR_DPM_SERVER_NAME"

  3. Get the data source. Identify the VM you want to back up and get it. Replace “YOUR_VM_NAME” with the name of your Hyper-V VM:

    $VMToBackup = Get-DPMDataSource -ProtectionGroup $ProtectionGroup | Where-Object { $_.Name -eq "YOUR_VM_NAME" }

    NOTE: If you don’t know your protection group, use Get-DPMProtectionGroup -DPMServer $DPMServer to list all protection groups in your DPM server.

  4. Initiate the backup. Once you have the VM data source, you can trigger the backup. If you want to perform an express full backup, you can use:

    Start-DPMBackupJob -Datasource $VMToBackup

Combining the above steps, you can create a simple script to back up a specific VM in DPM:

# Import DPM PowerShell module

Import-Module DataProtectionManager

# Connect to DPM server

$DPMServer = Connect-DPMServer -DPMServerName "YOUR_DPM_SERVER_NAME"

# Get the list of protection groups (For illustration, you want to target a specific group later)

$ProtectionGroup = Get-DPMProtectionGroup -DPMServer $DPMServer

# Assuming you know which protection group your VM is in, filter to get that group

# For brevity, let's say it's your first protection group (adjust accordingly)

$ProtectionGroup = $ProtectionGroup[0]

# Get the VM to backup

$VMToBackup = Get-DPMDataSource -ProtectionGroup $ProtectionGroup | Where-Object { $_.Name -eq "YOUR_VM_NAME" }

# Start the Hyper-V backup

Start-DPMBackupJob -Datasource $VMToBackup

Take into account the following points when you configure Hyper-V VM backup with DPM:

  • This script assumes you are familiar with your DPM server’s setup and you know the names of the VMs you are targeting.
  • Depending on your environment, you may need to customize the script to suit your specific backup needs.
  • It is essential to regularly monitor the health and status of your backups through DPM’s management tools or additional PowerShell scripts.
  • For more detailed operations and options, you can refer to the DPM PowerShell documentation. Microsoft constantly updates its documentation and the PowerShell module.

How to recover VMs from backup

Recovering an entire Hyper-V virtual machine using System Center Data Protection Manager requires performing multiple steps. The workflow assumes that a DPM server is set up and an administrator is familiar with PowerShell basics. Adjustments might be required based on the specifics of your environment and the DPM version you are using.

To recover a Hyper-V VM:

  1. Open PowerShell with administrative privileges on the DPM server or on a workstation where the DPM Management Shell is installed and configured to communicate with your DPM server.
  2. Import the DPM module to your PowerShell session (if it does not automatically import). This step is sometimes necessary for older versions of DPM:

    Import-Module DataProtectionManager

  3. List the available DPM data sources to find the VM you want to recover. Use the Get-Datasource cmdlet to list VMs being backed up:

    Get-DPMProtectionGroup -DPMServerName "YourDpmServerName" | Get-DPMDatasource

    Replace “YourDpmServerName” with the name of your DPM Server. Look through the output to identify the VM you want to recover.

  4. List available recovery points for the selected VM. Once you’ve identified the VM, you can find the recovery points available by using the Get-DPMRecoveryPoint cmdlet:

    $vm = Get-DPMDatasource -DPMServerName "YourDpmServerName" | Where-Object {$_.Name -eq "YourVMName"}

    Get-DPMRecoveryPoint -Datasource $vm

    Replace “YourVMName” with the name of the VM you wish to recover.

  5. Select the recovery point to use for the recovery. Once you’ve identified the recovery point you need based on the date, you can store this recovery point in a variable. Example:

    $recoveryPoint = Get-DPMRecoveryPoint -Datasource $vm | Where-Object {$_.RepresentedPointInTime -eq "DateOfYourChoice"}

    Replace “DateOfYourChoice” with the actual date and time of the recovery point you need.

  6. Initiate the recovery. Use the Restore-DPMRecoverableItem cmdlet to start the recovery process, specifying the target location if necessary:

    Restore-DPMRecoverableItem -RecoverableItem $recoveryPoint -TargetServer "YourTargetHyperVHost" -RecoveryLocation HyperVHost -RecoveryType Recover

    Adjust the -TargetServer parameter to specify the Hyper-V host where you want the VM restored. The -RecoveryLocation and -RecoveryType parameters might vary depending on your exact recovery scenario (for example, restoring to the original location or to an alternate location).

  7. Monitor the recovery process. Depending on the size of the VM and the network speed, recovery may take some time. You can monitor the recovery jobs using the DPM Administrator Console or by using the Get-DPMJob cmdlet.

Restore an individual file from a Hyper-V VM

It is possible to restore an individual file from a Hyper-V VM backup using System Center Data Protection Manager (SC DPM) with PowerShell. This process is typically done by first restoring the virtual machine’s disk that contains the file you need and then extracting the file from the disk.

Below are the generalized steps to accomplish this:

  1. Identify the recovery point. First, you need to find the recovery point for the virtual machine that contains the file you want to restore. You can use the Get-DPMRecoveryPoint cmdlet to list the recovery points:

    $pg = Get-DPMProtectionGroup -DPMServerName "YourDPMServer"

    $ds = Get-DPMDatasource -ProtectionGroup $pg

    Get-DPMRecoveryPoint -Datasource $ds | ft -Property CreationTime, RepresentedPointInTime

    This lists the recovery points available for selection. You would replace “YourDPMServer” with the name of your DPM server.

  2. Restore the VM disk. Once you have identified the correct recovery point, you can use the Restore-DPMRecoverableItem cmdlet to restore the disk. This typically involves restoring the disk to a temporary location or directly accessing it, depending on your environment’s configuration.

    $recoveryPoint = Get-DPMRecoveryPoint -Datasource $ds | where-object { $_.CreationTime -eq "DateTimeOfRecoveryPoint" }

    $recoveryOption = New-DPMRecoveryOption -HyperVDatasource -TargetServer "TargetServerForDiskRestoration" -RecoveryLocation CopyToFolder -RecoveryType Recover -TargetLocation "PathToStoreRecoveredDisk"

    Restore-DPMRecoverableItem -RecoverableItem $recoveryPoint -RecoveryOption $recoveryOption

    Be sure to replace “DateTimeOfRecoveryPoint”, “TargetServerForDiskRestoration” and “PathToStoreRecoveredDisk” with the appropriate details for your specific recovery operation.

  3. Mount the VHD and extract the file. After the virtual disk is restored to a temporary location, you need to manually mount the VHD/VHDX file in Windows and then extract the needed file:
    • Mount the VHD/VHDX. You can mount a virtual disk by using the Disk Management tool (diskmgmt.msc) or by using the Mount-VHD PowerShell cmdlet.
    • Extract the file. Once the disk is mounted, it will appear as a new drive in your system, and you can navigate through this drive to copy the required file.

Automating the process of mounting the VHD, extracting the file, and then unmounting the VHD can be somewhat complex and may require custom scripting, depending on what exactly you need to accomplish. Be careful and ensure data integrity and security when performing such operations, especially if scripting the mount and extraction process to handle sensitive data.

NOTE: The specific commands and steps may vary depending on the version of SC DPM and PowerShell you are using, as well as on the configuration of your backup environment.

How to Use the NAKIVO Hyper-V Backup Solution

An effective way to back up Hyper-V VMs is using third-party solutions that integrate native Microsoft Hyper-V features. NAKIVO Backup & Replication supports agentless, application-consistent backup of VMs on standalone Hyper-V hosts and in Hyper-V clusters. The benefits of using the NAKIVO solution over the others are ease of implementation and management, multiple automation options, integrated disaster recovery features, etc.

With this backup method, when a VM migrates from one cluster node to another, this VM is tracked automatically without additional configuration or manual intervention. You can store backups on local storage on-premises and in the cloud, including immutable storage.

Let’s briefly go over the workflow for Hyper-V backup in the NAKIVO solution. You can download a Free Trial to test this Hyper-V VM backup in your environment.

  1. Open the web interface of NAKIVO Backup & Replication:
  2. Go to Jobs, click + to create a new job, and hit Backup for Microsoft Hyper-V. The New Backup Job Wizard for Microsoft Hyper-V opens.

    Creating a new Hyper-V backup job in NAKIVO Backup & Replication

  3. At the Source step, select the Hyper-V virtual machines you want to back up. You can select running VMs. You can select multiple VMs residing on different Hyper-V hosts and clusters. Hit Next at each step of the wizard to continue.

    Selecting Hyper-V VMs to back up

  4. Select a backup repository where to store your Hyper-V VM backup at the Destination step. An onboard backup repository is used in this example.

    Selecting destination storage

  5. At the Schedule step, configure a Hyper-V backup job schedule and retention settings. You can create multiple schedules flexibly and set the retention time for these recovery points. It is possible to configure schedule and retention settings to meet the 3-2-1 backup rule.

    Note that there is a checkbox to enable backup immutability for a certain period to increase the level of protection against ransomware for your Hyper-V backups.

    Configuring the schedule and retention

  6. Enter a Hyper-V backup job name and select other options. You can configure a wide set of features and options, including:
    • App-aware mode
    • Changed block tracking
    • Network acceleration
    • Encryption
    • VM backup verification
    • Periodic full backup options

    Hit Finish to save settings and close a job wizard. A job will start based on scheduling settings.

    Configuring Hyper-V backup job options

Hyper-V Backup Best Practices

There are certain Hyper-V backup best practices that you can follow to optimize your VM backup process. These guidelines can help shorten backup windows, save resources, improve security, and speed up recovery when needed.

1. Back up VMs at the host level

The days of streaming backup data from within guest operating systems by means of a backup agent are over. Today’s modern enterprise infrastructure is mostly virtualized, meaning we have literally hundreds of guest operating systems running on a few physical Hyper-V nodes in a cluster configuration. Trying to manage backups efficiently and effectively from every single guest operating system by means of an agent would be a management and administrative nightmare.

Using backup software like NAKIVO Backup & Replication that can interface with your Hyper-V hosts allows you to use a single entry point to back up multiple VMs. Additionally, it’s hugely beneficial if your backup software can back up Hyper-V virtual machines at the host level in that your backup will contain all the VM-specific settings and configuration. Restoring a host-level backup of a VM will recreate the virtual machine down to the very last detail, including the VM settings themselves.

Guest-level backups have no knowledge of the Hyper-V infrastructure housing the VMs. This means that if you need to restore the entire VM from a guest-level backup, you would first have to create a “shell” VM to receive the restored data from the original VM. This would require manually reestablishing the virtual machine settings.

2. Use resilient change tracking (RCT)

When thinking about the best way to back up Hyper-V virtual machines, you should make sure you take advantage of Hyper-V’s Resilient Change Tracking or RCT. This technology first came with Windows Server 2016 Hyper-V and allows us to perform true incremental backups. Resilient Change Tracking is Microsoft’s implementation of Changed Block Tracking (CBT) for Hyper-V. In short, this Hyper-V technology allows modern VM backup software to keep a mapping of blocks that have changed since the last backup.

You first create a full backup of your Hyper-V virtual machine, then instead of having to copy down the same data with each backup cycle, the backup software only copies the data that has changed. With RCT turned on, the next incremental backup knows by the “virtual block” tracking which blocks have changed and only copies those blocks. Between the full backup and each incremental backup with the changed blocks, you have a complete representation of the Hyper-V virtual machine.

The resilient component of the RCT acronym highlights Hyper-V’s ability to maintain consistency in the change block tracking process, even if you suffer a hard crash or the unexpected shutdown of a virtual machine. Using a total of three changed tracking files, with one in memory and two on disk, spreads this information out across multiple locations and media so we have redundancy in the RCT information. NAKIVO Backup & Replication is a modern VM backup solution that can easily back up Hyper-V environments and makes use of Hyper-V’s RCT.

Creating a new Hyper-V VM backup job with Resilient Change Tracking enabled

3. Never treat Hyper-V checkpoints as backups

Checkpoints are Hyper-V’s term for what many in the VMware world would refer to as snapshots. Many have had to learn the hard way how checkpoints/snapshots of virtual machines work. These are not backups and are not supported by Microsoft in Hyper-V as such. Checkpoints employ a mechanism to record delta changes from a point in time. However, they are dependent on the base disks they are created from.

A backup should be a completely autonomous mechanism to restore data and have no dependencies on its parent VM disks. Checkpoints/snapshots utilize files that reside on the same underlying storage infrastructure and in the same VM folder as the parent virtual machine disks. If we lose the parent disk, the checkpoint is unusable.

Creating a new checkpoint on a Hyper-V virtual machine

Checkpoints have their place, especially in situations where quick rollbacks to a known state are needed. A specific use case for checkpoints would be in a development scenario, where a developer needs to roll in code and continue the testing process. A checkpoint would allow rolling a server back to a state before the code was rolled in, and then reverting through each iteration of testing. The key point here however, is that checkpoints have a purpose, but that it does not encompass functioning as a form of backup. Thus, the best way to back up Hyper-V VMs is to always keep in mind that Hyper-V checkpoints cannot be used instead of backups.

4. Install Hyper-V Integration Services

Hyper-V’s Integration Services is a set of “VM tools” used in the Hyper-V world, which allows special interaction between the Hyper-V host and the guest operating systems loaded on Hyper-V virtual machines. This special bundled set of software installed on the VM is especially relevant when it comes to finding the best way to back up Hyper-V systems. One of the Integration Services that is installed is called Backup (volume checkpoint). This service enables backups of the guest operating system that are consistent when leveraged by a VM backup solution that can take advantage of the Integration Services capabilities.

Making sure the Integration Services bundle is installed, enabled, and running allows backups of the VM that are from the host and are live with zero downtime. Leveraging Hyper-V’s Integration Services means backups can utilize checkpoints and VSS to back up data consistently without disruption. Without Integration Services, VMs that are backed up are placed in Saved State while the VSS snapshot is taken. In Saved State mode, some Hyper-V virtual machines may go offline briefly during the initial backup process.

5. Use application-aware backup

Backing up business-critical resources generally includes applications such as Microsoft Exchange Server, Microsoft Active Directory, and Microsoft SQL Server. The aforementioned applications are generally found in most of today’s enterprise data centers. When backing up virtual resources that contain applications, it is important to make sure those VMs are backed up using “application-aware” backups.

Application-aware backups utilize the Microsoft Volume Shadow Copy service to make sure application transactions living in memory are properly flushed to disk before the backup is taken. This ensures the applications, and specifically their databases, are left in a transactionally consistent state.

Using the application-aware mode

There are major advantages to using application-aware backups and transactional consistency. It eliminates the risk of data corruption. It also ensures there is no additional process to perform after the backup is restored. If you were only restoring a “crash-consistent” backup or one that was unaware of the application data, you would need to follow additional processes to replay logs and carry out other tasks to ensure the database-driven application is consistent. When minutes count in a disaster recovery scenario, having a restored backup that is already consistent definitely fast-tracks your RTO time.

Specialized software solutions like NAKIVO Backup & Replication allow you to use the App-aware mode for Hyper-V jobs to make sure you are application-consistent when backing up your business-critical applications, which is the best way to back up a Hyper-V environment.

Try NAKIVO Backup & Replication

Try NAKIVO Backup & Replication

Get a free trial to explore all the solution’s data protection capabilities. 15 days for free. Zero feature or capacity limitations. No credit card required.

People also read