Read More:

Beginners’ Guide for Microsoft Hyper-V: Hyper-V P2V Conversion – Part-55

There are many types of hard disks when working with a Hyper-V virtualization environment. We have previously taken a look at VHD and VHDX disks. However, you need to be aware of another type of Hyper-V disk: the AVHDX. It is a special-purpose disk that serves a special purpose in Hyper-V. Let’s look at Hyper-V AVHDX files for beginners.

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

Production vs. Standard checkpoints

Hyper-V provides two types of checkpoints: production checkpoints and standard checkpoints. Production checkpoints are used to create checkpoints with application consistency. The standard checkpoint is the legacy type that produces a consistent crash state.

Production checkpoints are point-in-time images of VMs that provide application consistency due to how it creates the Hyper-V checkpoint. When a production checkpoint is selected, Hyper-V leverages the Hyper-V Integration Services in the guest VM to coordinate with the Volume Shadow Copy Service (VSS) to flush all pending I/O operations and data in memory to disk, ensuring data consistency. This type of checkpoint is essential for workloads running database-driven applications.

Hyper-V AVHDX Files

A production checkpoint on a Hyper-V virtual machine

Download Banner

Standard checkpoints create an image of the VM consistent with the virtual machine’s memory and disk configuration at a specific point in time. However, it does not track consistency for the state of applications running inside the virtual machine.

The primary difference between production and standard checkpoints is that production checkpoints include application-consistent data, while standard checkpoints do not. Microsoft supports production checkpoints to run on virtual machines in production, whereas the standard checkpoints are not.

What is a Hyper-V AVHDX file?

The AVHDX file is a unique hard disk type used in the checkpoint process for a Hyper-V virtual machine. When you create a checkpoint on a Hyper-V virtual machine, it will write all the changes to this particular “differencing” disk. The differencing disk contains all writes for the virtual machine from the point of creating the checkpoint.

Hyper-V AVHDX Files

Viewing an AVHDX disk on a Hyper-V virtual machine

It tracks all the changes made to a VM’s VHD or VHDX disk. Once the checkpoint is created, the AVHDX houses the new data while the original VHD or VHDX disk remains unchanged.

How does a Hyper-V AVHDX file work?

Let’s consider the architecture of the AVHDX disk and how it works. When running a virtual machine with a checkpoint, Hyper-V uses the AVHDX file to house the changes in the form of new data written for the virtual machine. This way, the AVHDX contains all the latest data and leaves the base disk untouched for rolling back.

Starting a Hyper-V virtual machine with a checkpoint utilizes the AVHDX file to understand all the changes made to the virtual machine since making the checkpoint.

It is also essential to understand that you can have multiple AVHDX files associated with a Hyper-V virtual machine and create multiple checkpoints on a specific VM in Hyper-V. When multiple checkpoints exist, Hyper-V uses the latest AVHDX file associated with the virtual machine. The older AVHDX files are still needed as checkpoints are created in a “chain,” requiring the associated AVHDX in the chain to make up the current state of the data successfully.

It’s important to note that Hyper-V allows you to create multiple checkpoints for a VM, which means you can have various AVHDX files. When you start a VM with multiple checkpoints, Hyper-V uses the AVHDX file associated with the most recent checkpoint. The AVHDX files associated with older checkpoints are used to roll back to those checkpoints in chronological order.

Managing Hyper-V AVHDX files

It is essential to understand and manage AVHDX files appropriately. They are critical to data integrity and the overall architecture of the disk structure of your Hyper-V virtual machines. Therefore, understanding the implications and caveats of running a VM with AVHDX files is essential, and there are a few things you need to know to manage your Hyper-V VMs effectively with AVHDX. First, let’s look at the following with AVHDX files:

  • Monitor disk space usage
  • Performance considerations
  • Using checkpoints sparingly
  • Not backups

Monitor disk space usage

An important aspect of running checkpoints with the resulting AVHDX files on a Hyper-V virtual machine is ensuring you monitor disk space. AVHDX files can grow and consume a tremendous amount of space, especially if you have created multiple checkpoints on a VM.

Keeping a close eye on your storage is vital in this case. You can use Hyper-V Manager and PowerShell to monitor your AVHDX files’ size. Make sure to only keep AVHDX files around for only as long as they are needed. They should be rolled off after that.

Performance considerations

It is important to understand the disk I/O impact of AVHDX files. For example, running multiple checkpoints on a Hyper-V virtual machine can lead to significant disk I/O. In addition, it is crucial to consider which types of disks you are storing the AVHDX files on and how these are accessed. Finally, it is essential to consider using performant disks to house your AVHDX files to ease the burden of the extra disk I/O requirements.

AVHDX files can cause significant disk I/O, especially when running a VM with multiple checkpoints. Therefore, avoiding storing AVHDX files on slow disks is best to ensure the VM runs smoothly. If you need to store AVHDX files on slower disks, consider using storage spaces to create a disk pool that can provide better performance.

Performance monitoring is also essential for virtual machines running checkpoints. Tools such as the Performance Monitor tool in Windows monitor disk I/O and other performance metrics.

Checkpoints are Not backups

A dangerous misconception for Hyper-V administrators is assuming a Hyper-V checkpoint is a backup. However, they are not. Even with the production checkpoint, it is not the case. While production checkpoints keep application consistency, they still rely on the underlying infrastructure of the virtual machine for the data.

You can’t simply copy an AVHDX file from the Hyper-V VM and create a new virtual machine based on the AVHDX file. Instead, it relies on the chain of disks and their data. Never rely on any of the underlying disks as backups of your data. Instead, use a backup solution that allows copying your data and virtual machines outside of your production infrastructure, in line with the 3-2-1 backup best practice.

Use checkpoints sparingly

Checkpoints can be a valuable tool for managing VMs but can also cause performance issues if you create too many. Therefore, it’s best to use checkpoints sparingly and only create them when necessary. It’s also important to delete checkpoints that are no longer needed to free up disk space.

Conclusion

Hyper-V checkpoints create the special-purpose AVHDX files used to create point-in-time copies of virtual machines that can roll back to a previous state if needed. However, despite their very beneficial capabilities, checkpoints, along with the AVHDX files they create, need to be managed according to best practices. Therefore, monitor storage use and performance, and have a production-grade backup of your critical Hyper-V workloads.

Ensure your valuable data’s safety with the magic of Hyper-V backup—a powerful shield for protection. Try it for free!

Ensure your valuable data’s safety with the magic of Hyper-V backup—a powerful shield for protection. Try it for free!

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Rate this post