Hi Admin,
Please try using the following steps to merge:
- There is one checkpoint:
- Click "Edit Disk":
- Choose the .avhdx file to merge.
- Merge it into parent .vhdx file.
Best Regards
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a Windows Server 2016 Hyper-V server; and the VM has been deleted in hyper-v manager but I still have the VHDX and AVHDX files.
I am trying to merge them and setup a VM using the VHDX in Hyper-V, but unfortunately, it gives me an error every time. How can I fix this issue?
PS C:\export\prod-vm2\Virtual Hard Disks> dir
Directory: C:\export\prod-vm2\Virtual Hard Disks
Mode LastWriteTime Length Name
-a---- 24/02/2024 11:06 PM 117981577216 prod-vm2.vhdx
-a---- 15/03/2024 9:00 AM 65768783872 prod-vm2_8963AB8D-B980-494B-9981-098D02643149.avhdx
PS C:\export\prod-vm2\Virtual Hard Disks> Merge-VHD -Path .\prod-vm2_8963AB8D-B980-494B-9981-098D02643149.avhdx -DestinationPath .\prod-vm2.vhdx
Merge-VHD : Merging virtual disk 'c:\export\prod-vm2\virtual hard disks\prod-vm2_8963ab8d-b980-494b-9981-098d02643149.avhdx' to 'c:\export\prod-vm2\virtual hard disks\prod-vm2.vhdx' failed.
At line:1 char:1
+ CategoryInfo : NotSpecified: (:) [Merge-VHD], VirtualizationException
+ FullyQualifiedErrorId : OperationFailed,Microsoft.Vhd.PowerShell.Cmdlets.MergeVhd
PS C:\export\prod-vm2\Virtual Hard Disks>
PS C:\export\prod-vm2\Virtual Hard Disks>
PS C:\export\prod-vm2\Virtual Hard Disks> get-vhd .\prod-vm2_8963AB8D-B980-494B-9981-098D02643149.avhdx
ComputerName : AEXAC-HV1
Path : c:\export\prod-vm2\virtual hard disks\prod-vm2_8963ab8d-b980-494b-9981-098d02643149.avhdx
VhdFormat : VHDX
VhdType : Differencing
FileSize : 65768783872
Size : 129922760704
MinimumSize : 129920680448
LogicalSectorSize : 512
PhysicalSectorSize : 4096
BlockSize : 2097152
ParentPath : C:\export\prod-vm2\Virtual Hard Disks\prod-vm2.vhdx
DiskIdentifier : 125F2F18-94E6-4DDB-9397-7F7F2F5290F5
FragmentationPercentage :
Alignment : 1
Attached : False
DiskNumber :
Number :
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.
The VM has been deleted from Hyper-V Manager. Can I add both disks (VHDX & AVHDX) and set up the VM again in Hyper-V Manager?
How do I add the AVHDX file and set up the VM? Thanks,
Can anyone help with this issue?
VHDx & AVHD are in a chain like a UniDirectional linked list.
Propperties via aVHDx cant be changed & when you cant alter VHDx while aVHDx are in place.
First merge them all together then alter.
***Always keep a backup.