What command-line tools can fix broken VHDX chains ?

Sarah 20 Reputation points
2026-08-10T03:29:12.8266667+00:00

After expanding a dynamic VHDX parent disk linked to differencing disks, the snapshot chain broke and all child disks became unreadable. This left the virtual machines unusable, since the parent-child relationship was no longer valid.

Now which command-line tools can re-link the parent-child VHDX disk chain so the differencing disks can be recovered ?

Thanks

Windows for business | Windows 365 Enterprise
0 comments No comments

Answer accepted by question author
Harry Phan 29,430 Reputation points Independent Advisor
2026-08-10T05:53:52.1633333+00:00

Hello,

Once a dynamic VHDX parent is expanded, the differencing chain breaks because the child disks reference the original parent’s block map and size metadata. There is no supported Microsoft command-line utility that can automatically re-link differencing disks after the parent has been modified. Hyper-V relies on the integrity of the parent-child relationship, and once that is disrupted, the differencing disks are effectively orphaned.

The only tool that can manipulate and inspect VHDX metadata at this level is Inspect-VHD and Set-VHD from the Hyper-V PowerShell module. Inspect-VHD -Path <child.vhdx> will show the parent path it expects. If the parent has been moved or renamed, you can use Set-VHD -Path <child.vhdx> -ParentPath <correct_parent.vhdx> to re-link. However, this only works if the parent’s internal structure is still identical to what the child expects. If the parent was expanded, the differencing disk will not mount correctly even after re-linking, because the block allocation tables no longer match.

There are no supported Microsoft utilities to rebuild or repair a broken differencing chain after a parent expansion. Third-party hex editors or forensic VHDX repair tools can theoretically patch the metadata, but this is not reliable and not recommended in production. The official guidance is to restore the parent VHDX from backup before the expansion and then reattach the differencing disks with Set-VHD. If no backup exists, the differencing disks cannot be recovered in a supported way.

In short:

Use Inspect-VHD to verify the expected parent.

Use Set-VHD to re-link if the parent is intact.

If the parent was expanded, recovery is not possible with Microsoft-supported tools. The only safe path is restoring the original parent from backup.

I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!

HP.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-08-10T03:30:46.6+00:00

    The supported command-line tool in the provided guidance is PowerShell with Hyper-V cmdlets.

    For a broken differencing chain, the documented commands are:

    1. Inspect the chain:
    Get-VMHardDiskDrive -VMName <VMName> | ForEach-Object { Get-VHD -Path $_.Path | Select-Object Path, ParentPath, VHDType }
    
    1. Merge an orphaned or broken .avhdx into its parent:
    Merge-VHD -Path <path-to-avhdx> -DestinationPath <parent-vhdx>
    
    1. List checkpoints:
    Get-VMSnapshot -VMName <VMName>
    
    1. Remove visible checkpoints if Hyper-V Manager cannot delete them:
    Get-VMSnapshot -VMName <VMName> | Remove-VMSnapshot
    
    1. Inspect a specific VHD/VHDX:
    Get-VHD -Path <full-path>
    

    Important limits and cautions from the guidance:

    • Merge-VHD is an offline operation. The VHD chain must not be attached when the merge starts.
    • Back up all VHDX/AVHDX files before attempting repair or merge. There is data loss risk if the chain is already corrupted.
    • The documented recovery path is to merge differencing disks one by one from child to parent.
    • If the VM still does not start after merging, create a new VM and attach the final merged .vhdx.
    • If a base or differencing disk is missing, restore it from backup if possible. Otherwise, create a new VM and attach the remaining healthy .vhdx.

    The provided guidance does not document a separate command-line tool that directly “re-links” or rewrites the parent-child relationship. It documents inspection with Get-VHD and recovery by offline merge with Merge-VHD.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.