VMFS Recovery™
Recover data from damaged or formatted VMFS disks or VMDK files
Last updated:

Merge VHDX and AVHDX: Hyper-V checkpoint merge guide

To merge VHDX and AVHDX files, first determine whether Hyper-V still manages the checkpoint. If the checkpoint appears in Hyper-V Manager, deleting it through the manager normally lets Hyper-V merge the associated differencing data. Use a manual disk merge only after identifying the complete chain and confirming that the disks are offline and unattached.

A checkpoint is a dependency chain, not an independent backup. Preserve a verified backup before consolidation. Do not delete AVHDX files in File Explorer, select a child by timestamp alone, or reconnect the VM to the base disk while newer changes remain in a child.

VHDX and AVHDX: what each file contains

VHDX: the virtual hard disk format

A VHDX stores virtual disk data for Hyper-V. It can be a fixed, dynamic, or differencing disk, so the extension alone does not determine its role in a chain. The base disk supplies blocks that later differencing disks have not changed. See how to Mount VHDX when you need to inspect a disk separately.

  • VHDX supports virtual disks up to 64 TB, subject to the host and storage configuration.
  • Generation 1 VMs can use VHD or VHDX. Generation 2 VMs use VHDX for virtual hard disks. Disk format and VM generation are separate concepts.

AVHDX: changed blocks in a checkpoint chain

When a checkpoint creates a new active differencing disk, subsequent writes go to that child. Reads combine its changed blocks with data from its parent. An AVHDX can depend on a VHDX or another AVHDX, and every required ancestor must remain available.

  • Each child stores blocks changed while it is active.
  • Its ParentPath identifies the next dependency. Filenames and creation dates are not enough to determine merge order.

A simple linear chain might be:

VM.vhdx (base) → VM_GUID.avhdx → VM_GUID2.avhdx → VM_GUID3.avhdx (current leaf)

For a manual merge that preserves the current leaf state, work from the verified leaf toward its ancestors. A supported merge can target an ancestor across several levels. Branching chains or uncertain parent relationships require further analysis before any write operation.

AVHD and AVHDX follow the underlying disk format

  • AVHD is associated with the older VHD disk format.
  • AVHDX is associated with VHDX and is supported by hosts that support that format.
  • A Generation 1 VM can use the VHDX family on a suitable host. Generation 2 does not make an AVHD disk compatible by simply renaming its extension.

Check the actual disk type, parent relationships, and host support before attempting to merge AVHDX and VHDX. Merging differencing data is distinct from converting a disk format.

Tip: VHDX to VMDK, VMDK to VHDX and VHDX to VDI

VHDX and AVHDX checkpoint chain reference

File TypeRoleCreated WhenContains
.vhdxBase parent diskVM creationDisk data at the baseline; newer blocks may be in children
.avhdx (first)Child of VHDXFirst checkpoint takenChanged blocks until the next child becomes active
.avhdx (second)Child of first AVHDXSecond checkpoint takenChanged blocks until the next child becomes active
.avhdx (nth)Child of (n‑1) AVHDXNth checkpoint takenChanged blocks while this child is active
.vmrsRuntime stateRuntime or saved-state operationRuntime state; contents depend on the operation and checkpoint type
.vmcxConfigurationVM creation and configuration changesVM configuration; not a virtual disk

Why you may need to merge Hyper-V snapshots

Performance of long checkpoint chains

Reading a differencing disk can require Hyper-V to search parent disks for blocks absent from the current child. The effect depends on the workload, storage, and chain. A chain does not mean every read requires one disk access per file, and no universal three-checkpoint threshold makes a merge urgent. Keep checkpoints only as long as the task requires, and investigate slow storage or unexpectedly growing chains.

Storage consumption

AVHDX files grow as the VM writes changed blocks. Check free space on the host volume, including the space needed while a merge runs. A full volume can interrupt VM operations or consolidation. A failed backup may leave a recovery checkpoint that needs attention from Hyper-V or the backup provider.

Backup application failures

A backup can fail when a required parent disk is missing, a chain is inconsistent, or another operation locks a disk. Check the backup and Hyper-V logs before choosing a repair. Do not merge every AVHDX file simply because it appears old: it may still belong to the active chain or another checkpoint branch.

AVHDX files after checkpoint deletion

Deleting a checkpoint through Hyper-V Manager normally starts a background merge. An AVHDX file may remain while that operation runs, so its presence alone does not prove that it is orphaned. Check progress, the VM's attached disk path, and the complete parent chain. If consolidation fails, resolve the reported cause before attempting a manual merge. Never delete an AVHDX file directly in File Explorer to reclaim space.

Method 1: Merge AVHDX and VHDX with Hyper-V Manager

Prerequisites for a manual Edit Disk merge

Use checkpoint deletion in Hyper-V Manager when Hyper-V still manages the checkpoint. Use the manual Edit Disk procedure only after confirming the intended chain and recovery plan:

  • Shut down the VM fully. Do not use Saved state. The manual merge requires an offline chain that is not attached to a running VM or mounted on a host.
  • Identify the complete chain. Record the VM's attached disk and follow each disk's ParentPath with Get-VHD. Filenames and modification times do not establish the chain.
  • Make a consistent backup. Preserve all disks in the chain and the VM configuration before changing them. Keep the backup on separate storage and confirm that it is usable.
  • Check free space and competing operations. Allow for parent disk growth, and stop if another merge, backup, replication, or storage fault remains unresolved.

Merge a verified child into its immediate parent

  1. Open Hyper-V Manager and select the correct host. Confirm that the VM is fully shut down and that no disk in the chain is mounted elsewhere.
  2. In the host Actions pane, select Edit Disk.
  3. Browse to the disk directory using the chain map you recorded.
  4. Select the verified child disk you intend to consolidate, normally the current leaf when consolidating a single linear chain. Do not select it by timestamp alone.
  5. On the Action page, select Merge and continue.
  6. Select To the parent virtual hard disk. Review the source and destination paths before starting the operation.
  • The parent can be another AVHDX file or the base VHDX. Merging changes that parent. Stop if there are branches, missing parents, or other children whose relationship you have not established.
  1. Wait for completion, then inspect the remaining chain. Repeat only for the next verified child-to-parent relationship if further consolidation is needed. Do not manually delete leftover files until you know their role and retention requirements.
  2. Confirm that the VM configuration references the intended consolidated disk before starting it. Keep the original backup until guest files and applications have been checked.

Method 2: Merge VHDX and AVHDX files using PowerShell

Check that Merge-VHD is available

  • Merge-VHD belongs to the Hyper-V PowerShell module. Run these commands on the appropriate Hyper-V management host with administrator permissions.
  • If PowerShell reports that Merge-VHD is not recognized, check the module and Windows edition before installing optional components.

Use the command appropriate for the host. Feature availability depends on its Windows edition; follow any restart prompt during a planned maintenance window.

  • On a Windows 10 or Windows 11 edition that supports the Hyper-V management feature:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell
  • On Windows Server:
Install-WindowsFeature -Name RSAT-Hyper-V-Tools
  • Confirm availability before continuing:
Get-Command Merge-VHD

Step 1: Map the complete chain with Get-VHD

Start with the disk attached to the intended VM, then inspect its ParentPath. Substitute your verified path in this read-only example:

Get-VHD -Path "C:\VMs\VMname\Virtual Hard Disks\VMname_GUID.avhdx"
  • A differencing disk reports its VhdType and ParentPath. Record both the child and parent paths.
  • Follow ParentPath until the base disk has no parent. Stop at a missing or unreadable file; do not guess a replacement parent or choose files by date.

The following read-only helper lists the disks attached to a named VM and follows their parents. It stops on a Get-VHD error. It does not validate every branch or repair the chain:

function Get-VHDChain {
  [CmdletBinding()]
  param(
    [string]$ComputerName = $env:COMPUTERNAME,
    [string[]]$Name = '*'
  )
  $VMs = Get-VM -ComputerName $ComputerName -Name $Name
  foreach ($vm in $VMs) {
    $VHDs = ($vm).harddrives.path
    foreach ($vhd in $VHDs) {
      $VHDInfo = $vhd | Get-VHD -ComputerName $ComputerName -ErrorAction Stop
      $i = 1
      while ($VHDInfo.parentpath -or $i -eq 1) {
        if ($i -gt 1) { $VHDInfo = $VHDInfo.ParentPath | Get-VHD -ComputerName $ComputerName -ErrorAction Stop }
        [pscustomobject]@{
          Name    = $vm.name
          Depth   = $i
          Type    = $VHDInfo.VhdType
          Path    = $VHDInfo.path
        }
        $i++
      }
    }
  }
}
Get-VHDChain -Name "YourVMName"

Step 2: Merge a verified child into its parent or ancestor

Before running Merge-VHD, fully shut down the VM and ensure that the entire chain is not attached to a VM or mounted on a host. Saved state is not sufficient. Preserve a consistent backup and confirm free space. Do not run a merge while a backup, replication, or another consolidation operation is using these disks.

The source Path must be a child in the verified chain, and DestinationPath must be its parent or an ancestor. For a linear chain, you can consolidate from the current leaf toward the base, one relationship at a time. A supported multi-level merge can also target an ancestor. Branches require a separate plan because changing a shared parent can affect other children.

These examples change disk contents. Replace the sample paths with your verified paths; use -WhatIf to inspect the intended operation and review the paths before executing. WhatIf does not prove that the chain or backup is valid.

  • Merge a verified child AVHDX into its immediate parent AVHDX:
Merge-VHD -Path "C:\VMs\VMname\VMname_GUID_newest.avhdx" -DestinationPath "C:\VMs\VMname\VMname_GUID_parent.avhdx" -Confirm
  • Merge a child into its verified base VHDX:
Merge-VHD -Path "C:\VMs\VMname\VMname_GUID.avhdx" -DestinationPath "C:\VMs\VMname\VMname.vhdx" -Confirm
  • Microsoft's multi-level example merges Child4 and the intervening Child3 into ancestor Child2:
Merge-VHD -Path "C:\test\Child4.vhdx" -DestinationPath "C:\test\Child2.vhdx" -Confirm

Microsoft notes that Child4 and Child3 remain after this example but are no longer valid virtual disks. File existence does not establish whether a disk is usable. Do not reattach a merged child or delete files without checking the resulting chain. See the Merge-VHD reference for the offline requirement and parameter behavior.

Step 3: Check the configuration and validate the guest

After the merge reports completion:

  • Verify the destination disk and any remaining ParentPath relationships. In VM settings, confirm that each virtual hard drive points to the intended valid disk before startup.
  • If the configuration itself is damaged, restoring its backup may be appropriate. Creating a replacement VM requires matching its generation, firmware, controllers, networking, and other settings; it is not automatically safer.

Start the VM only after those checks.

  • A successful boot is one check. Also verify recent guest files, application consistency, and the expected data state before retiring the backup.
  • If boot or disk errors occur, stop and review the recorded chain, configuration, and logs. Do not blindly repeat a merge or overwrite a parent to fix an unrelated boot problem.

Method 3: Delete checkpoints through Hyper-V Manager

Let Hyper-V manage automatic consolidation

For a checkpoint shown in Hyper-V Manager, select the intended checkpoint and choose Delete Checkpoint. This removes that restore point and lets Hyper-V consolidate the required disk data; it does not delete the guest's current files. Confirm that you no longer need the checkpoint before proceeding.

  • Hyper-V can perform supported checkpoint consolidation in the background while the VM is running. This managed operation differs from the offline Merge-VHD cmdlet.
  • Consolidation uses storage I/O and may affect the workload. Check space and schedule it with backup or storage operations in mind.
  • This is normally the preferred approach for checkpoints that Hyper-V still manages. Let it finish and inspect errors before considering manual file operations.

Choose the scope deliberately:

  • Delete Checkpoint removes the selected checkpoint while Hyper-V manages the remaining relationships.
  • Delete Checkpoint Subtree also removes its descendant checkpoints. Those restore points will no longer be available.
  • Delete All Checkpoints removes all checkpoint restore points for that VM. Use it only when that is the intended scope.

When automatic consolidation needs attention

Possible causes of failure include:

  • Insufficient free space for consolidation and parent growth.
  • Storage I/O errors or unavailable parent disks.
  • A host or Hyper-V service interruption.
  • A competing backup or other process holding a disk open.

Check progress and logs rather than relying on filenames alone:

  • An AVHDX can remain while a merge runs or because the active chain still requires it.
  • Unchanged storage use alone does not prove failure; inspect the operation state and disk relationships.
  • Hyper-V and backup logs can identify a failed or blocked operation and its cause.

Resolve the reported issue with the host or backup provider. Move to manual consolidation only after confirming the full chain, preserving a backup, and meeting the offline prerequisites. Microsoft's checkpoint merge troubleshooting guidance explains how to inspect chains and managed checkpoints.

Hyper-V snapshot merge: troubleshooting common failures

Merge-VHD is not recognized

The Hyper-V PowerShell module may be unavailable or not installed in the current session. Confirm the host's Windows edition and supported management features. In an administrator session, the relevant optional-feature command on a supported Windows client is:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell

On Windows Server:

Install-WindowsFeature -Name RSAT-Hyper-V-Tools

Follow any restart requirement, reopen PowerShell, and check Get-Command Merge-VHD before considering a disk operation.

The virtual disk is currently in use

Merge-VHD is offline only. A VM, host mount, backup, or another process may have the disk open.

  • Fully shut down the VM and check that the chain is not attached to another VM or mounted on a host. Saved state does not meet this requirement.
  • Inspect Hyper-V and backup logs to identify an active merge or lock. Do not kill a storage process merely to release a file.
  • If a backup owns the disk, coordinate with the backup application and allow its supported cleanup to finish before retrying the verified operation.

OperationFailed or VirtualizationException

These are broad errors. Possible causes include access permissions, storage faults, an unavailable parent, or an inconsistent chain. Read the complete error rather than assuming corruption.

Get-VHD -Path "C:\VMs\VMname\VMname_GUID.avhdx"
  • Check that ParentPath resolves to the expected disk and that the host can read it. Compare it with the original chain map and logs.
  • A missing path may reflect a moved file or unavailable volume; it does not by itself prove corrupted metadata. Stop before changing parent relationships. Preserve copies and seek recovery help if the chain cannot be established.

A parameter cannot be found that matches parameter name 'vmname'

Merge-VHD accepts disk paths, not -VMName. This read-only command lists attached disk paths:

Get-VM -Name "VMName" | Get-VMHardDiskDrive

Inspect each path and its parents first. Only after the offline and backup checks should the merge use the verified source and destination:

Merge-VHD -Path "AVHDX_Path" -DestinationPath "Parent_Path" -Confirm

The VM does not boot after a merge

An old disk attachment is one possible cause; firmware, controller, guest boot, or incomplete-data problems can also prevent startup.

  • Check the VM's hard drive path against the valid consolidated disk. Review its generation, boot order, firmware, and controller settings before changing them.
  • If configuration recovery requires a replacement VM, match the original settings and retain the original configuration and disks. Creating a new VM is not a substitute for validating the chain.

Do not repeat a merge based only on a boot failure. Preserve the error, compare the recorded disk relationships, and use a known-good backup or specialist guidance when the result is uncertain.

Snapshot merge error reference

Error or symptomPossible causeNext check
Merge-VHD not recognizedModule or management feature unavailableCheck Windows edition, module, and Get-Command Merge-VHD
The virtual disk is currently in useVM, mount, or another process has the chain openFully shut down the VM; resolve the identified lock through its owning application
OperationFailed / VirtualizationExceptionPermissions, storage, parent, or chain problemRead the full error; inspect Get-VHD and ParentPath without changing them
VM will not boot after mergeDisk attachment, configuration, or guest data problemVerify the intended disk and original VM settings; do not blindly repeat a merge
AVHDX remains after checkpoint deletionMerge still running, disk still needed, or operation blockedCheck progress, active chain, free space, and logs before acting
Unsupported vmname parameterWrong parameter for Merge-VHDUse verified -Path and -DestinationPath after the offline checks

Recovery when AVHDX or VHDX files are damaged or missing

Preserve the chain before recovery attempts

Storage faults, interrupted writes, or missing files can make a chain unreadable. A merge error does not establish how much data is recoverable. Stop writes to affected storage, retain the VM configuration and every available disk, and work from verified copies or images where possible. If the storage is physically unstable, seek specialist help before further scans.

  • A child contains changed blocks from the period when it was active. Missing child data can mean missing recent changes even if the base disk still opens.
  • Renaming AVHDX to VHDX does not merge it or replace a missing parent. Keep original filenames and paths recorded so recovery does not lose the chain context.

Distinguish Hyper-V recovery from VMware VMFS recovery

Mixed environments can contain different disk formats and storage layers:

  • Hyper-V uses VHD or VHDX virtual disks and AVHD or AVHDX checkpoint children.
  • VMware commonly stores VMDK files on VMFS datastores.
  • VMware snapshot delta disks have their own descriptors and parent relationships. An AVHDX merge command does not apply to them.
  • VMFS datastore recovery requires software that understands VMFS. Recovering guest files is separate from repairing a host's checkpoint chain.

DiskInternals recovery options

DiskInternals VMFS Recovery™ provides read-only analysis of supported VMFS storage and virtual disk images. The VHDX Recovery Tool guide discusses VHDX data access. Preview the files you need before deciding to export; recovery depends on the surviving data and does not guarantee that a VM will boot.

  • Scan supported damaged or inaccessible VMFS storage without saving recovered files back to it.
  • Look for recoverable VMDK images and retain associated descriptors and snapshot files.
  • Inspect supported virtual disk contents without requiring the original VM to boot.
  • Assess recoverable VMFS structures rather than formatting or rebuilding the affected datastore.
  • Preserve recoverable configuration files with the disks for later validation.
  • For a separate migration task, see Restores VHDX to Physical Disk. Migration does not repair a missing checkpoint parent.
  • Remote ESXi access is available for supported recovery scenarios; use the documented connection and permissions for your environment.

For a VMware datastore recovery workflow:

  1. Identify the affected storage and connect through a supported read-only recovery path, or use a verified image.
  2. Scan the intended VMFS object and review what the software can read.
  3. Locate the relevant VMDK, descriptor, snapshot, and configuration files.
  4. Preview needed guest files. A preview is evidence of file access, not a complete application-consistency test.
  5. Export recoverable data to separate healthy storage and validate the exported files.
  6. Consider conversion to another format only as a separate, verified migration after recovery. Preserve the recovered originals.

Preventing AVHDX chain problems

Keep checkpoints only as long as needed

  • Set a retention policy suited to the workload. No universal two- or three-checkpoint limit can substitute for monitoring.
  • Remove checkpoints through Hyper-V Manager once their purpose is complete and the restore points are no longer needed.
  • Review dev and test checkpoints regularly. Do not schedule Delete All Checkpoints without confirming the restore points and backup retention that would be lost.
  • Monitor host volume capacity and unexpected disk growth. Check backup-created recovery checkpoints as well as manually created ones.

Monitor consolidation through completion

  • After checkpoint deletion, check Hyper-V operation progress and the relevant event logs.
  • Watch free space and disk relationships while the background merge runs. Parent growth and active writes mean storage use may not fall immediately.
  • Investigate reported errors, stalled operations, or unexpectedly persistent chains with the backup provider or host administrator before attempting manual repair.

Back up before manual changes

  • Preserve a consistent copy of every disk in the chain and the VM configuration on separate healthy storage. A checkpoint is not a substitute for a backup.
  • A merge changes its destination disk and can invalidate source children. Record the original paths and parent relationships before starting.
  • If recovery is needed, restore or test the original chain on separate storage without overwriting the only surviving copy. Verify guest data and application consistency before retiring backups.

FAQ

Related articles

FREE DOWNLOADVer 4.28, WinBUY NOWFrom $699