Merging a Hyper-V child VHD/VHDX differencing disks with the parent VHD/VHDX.
I’ve recently had a requirement to merge some child differencing disks, with the associated VHD/VHDX in Hyper-V.
Thankfully this is very straight forward and can be done one of two ways(after a confirmed backup and/or export of your VM!):
1.) Using the edit disk option in Hyper-V:
2.) Using DiskPart from a command prompt.
select vidsk file=”C:\Temp\MT12-SC-H2-LON-AP1\Virtual Hard Disks\MT12-SC-H2-LON-AP1.vhd”
merge vdisk depth=1
Remember in either option, you will need to go back into your VHD location in the Hyper-V VM settings and change the path to point to the base disk.
Note: If you go with Option 2, you will need to manually remove the child differencing disk from your VHD storage location.