Watch the video:
0:00 - Intro/Explanation
0:40 - How to merge avhdx (ignoring errors in Hyper-V)
3:05 - Fix errors
3:45 - Successfully merging AVHDX with VHDX
Introduction
Are you looking to merge checkpoints with virtual machines/VHDX files in Hyper-V? While it may seem straightforward to do it within the program, you might encounter errors along the way. But fear not! In this guide, we will show you how to manually merge checkpoints, skip errors, and even import AHVDX files from another system. So let’s dive in and learn how to merge checkpoints in Hyper-V.
What are Checkpoints in Hyper-V?
Checkpoints, also known as snapshots, are a feature in Hyper-V that allows you to capture the state of a virtual machine at a specific point in time. This feature is handy when you want to revert to a previous state or create backups of your virtual machines.
However, over time, these checkpoints can accumulate and take up valuable storage space. That’s why it’s essential to merge checkpoints with the original virtual hard disk (VHDX) files. Merging checkpoints allows you to consolidate changes made to the virtual machine and reduce the number of checkpoint files.
However, he may also find yourself in a situation where you need to merge AHVDX files into VHDX files without the need of hyper V because of some error or because you’re bringing virtual machines from another system. That’s the situation I found myself in and the reason that I need to merge AHVDX files because I had to recreate the virtual machine with just the hard drive.
Manual AHVDX Merge in Hyper-V
Navigation
Locate your checkpoints. These will be the same place as the VHDX (drive) file for your virtual machine. If you recreated a virtual machine using just this file, you’ve likely already seen these AHVDX files we’ll be merging.
When you’re in this folder, right click the pause bar at the very top and choose copy address.
Now open a powershell or terminal window.
In the Terminal or PowerShell, type the drive letter followed by a colon (e.g., “H:”) and press Enter. This will change the current directory to the specified drive.
Then, use the “cd” command followed by a space to change to the directory where your virtual hard drive files and checkpoints are located. Paste the copied address after “cd” to navigate to the correct folder.
Finding out information
To merge a checkpoint with the original virtual hard disk file, we first need to gather information about the checkpoint. Run the following command:
|
|
Replace “path_to_checkpoint” with the path of the checkpoint file you want to merge. Enclose the path in quotes if it contains spaces.
The command will provide information about the checkpoint file, including its type (differencing) and the paths of the checkpoint and parent drive.
Merge the Checkpoint with the Original Drive
Now that we have the necessary information, we can proceed to merge the checkpoint with the original virtual hard drive file. Use the following command:
|
|
Replace “path_to_checkpoint” with the path of the checkpoint file you want to merge and “path_to_original_drive” with the path of the original virtual hard drive file.
Make sure to enclose the paths in quotes if they contain spaces. Press Enter to initiate the merging process.
An important note, if instead of pointing to a dry, violet points to another checkpoint, you’ll need to follow the checkpoint chain, merging each checkpoint into the next until you finally merge into the drive file.
Handling Errors and Troubleshooting
During the merging process, you may encounter errors. If you see any error messages, carefully read through them to identify the cause. Common errors include files already in use or virtual machines running. In such cases, try closing any programs using the files or shutting down the virtual machine.
If errors persist, you can try rebooting your computer, as this often resolves issues related to file usage.
Verify the Merged Drive
Once the merging process is complete, you can verify the merged drive. You can either boot up the virtual machine or explore the drive as you usually would. You should now be able to access all the updated files within the merged drive.
Final Thoughts
Merging checkpoints in Hyper-V is a crucial step in managing your virtual machines effectively. By following the step-by-step guide provided in this article, you can merge checkpoints, skip errors, and even import AHVDX files from another system. Remember to always back up your files before performing any merging operations to avoid data loss.