Summary
This article discusses an issue in which you can't restore a virtual machine (VM) from a checkpoint in a Hyper-V environment that runs on Windows Server 2016. The issue typically occurs after an operating system (OS) upgrade, and it often involves checkpoint corruption or misalignment.
Symptoms
- Error message: "An error occurred while attempting to export the data from checkpoint."
- The VM can't be restored from the latest checkpoint.
- Multiple checkpoints are present, but none can be used to successfully restore the VM.
- Data loss is reported, requiring urgent recovery.
- The issue begins immediately after an OS upgrade, such as from Windows 10 to Windows 11.
- Hyper-V VM Management Service (VMMS) admin logs and checkpoint chain integrity are analyzed, revealing irregularities.
- Attempts to merge checkpoints fail, causing concerns about possible data loss.
Cause
The issue occurs because of one or more of the following reasons:
- The checkpoint wasn't merged correctly before you ran the OS upgrade, or the upgrade was run without using the latest checkpoint in the VM.
- Changes were made directly to the original virtual hard disk (VHDX) file after creating a checkpoint, causing a misalignment in the checkpoint chain.
- The VM became inconsistent with the checkpoint structure and caused corruption or breakage in the chain.
- A corrupted or missing VM configuration file further contributed to the inability to restore the VM from the checkpoint.
Resolution
To resolve the issue, follow these steps:
-
Back up VM files:
- Before you try any recovery steps, back up all checkpoints and VHD files to a secure location. This step minimizes the risk of permanent data loss.
-
Inspect the checkpoint chain:
- Run the following PowerShell script to verify the chain of differencing disks:
Get-VHDChain -Path <path to vhd file></path>- Analyze the output to identify any inconsistencies or corruption in the chain.
-
Manually merge checkpoints:
-
Try to manually merge the checkpoints by using PowerShell commands. For example:
Merge-VHD -Path <Path to AVHDX file> -DestinationPath <Path to merged VHDX file> -
Notify the customer of potential risks, including data loss, before you proceed to merge.
-
-
Re-create the VM:
- If merging checkpoints fails, re-create the VM by using the backed-up files. Make sure that you configure the new VM to point to the merged VHDX file.
-
Follow proper checkpoint management practices: - Always merge checkpoints before you perform OS upgrades. - Avoid direct changes to the original VHDX file if checkpoints exist. - Regularly maintain and verify checkpoints to make sure of integrity.
-
Confirm resolution:
- After the recovery steps are completed, verify with the customer that the VM is operational and data was restored.
By following these steps and recommendations, you can resolve the checkpoint restoration issue and prevent similar problems in the future.
Data collection
Before you contact Microsoft Support, you can gather the following information about your issue.
- Hyper-V VMMS admin logs. These logs can be collected from the Event Viewer under Applications and Services Logs > Microsoft > Windows > Hyper-V-VMMS.
- Results from running the Get-VHDChain PowerShell command to inspect the integrity of the VHD chain.
- Any additional error messages or logs that provide insight into the checkpoint issue.
References
- Using checkpoints to revert virtual machines to a previous state
- Windows Server 2012 Hyper-V Best Practices
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors (upstream author metadata: kaushika-msft). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
