SIGN UP LOGIN

Hyper-V data recovery: rescuing VMs, VHDX files and checkpoints

A VM no longer starts, has disappeared from Hyper-V Manager, or its disk will not open. This page sorts out the common cases, shows what you can recover and repair with the tools built into Hyper-V, and is honest about when only a backup outside the host will do.

As of 29 November 2026 · Windows Server 2016 to 2025 with the Hyper-V role · all commands in PowerShell as administrator

First: overwrite nothing

Every write to the affected volume can permanently overwrite data that could still be recovered. Before you repair anything:

  1. Do not create anything new. No new VM in the old folder, no formatting, no recovery program installed on the affected volume.
  2. Make a copy. With the VM switched off, copy all of its files (.vhdx, .avhdx, .vmcx, .vmrs, .vmgs) to another drive. Every repair attempt runs on this copy.
  3. Do not delete checkpoints. Deleting a checkpoint starts merging the differencing disks. A merge into the wrong parent disk cannot be undone.
  4. Look at the event log. Hyper-V almost always records the reason, often together with the path of the file that is missing or does not match.

Where a VM's files are and what Hyper-V reported last:

Get-VM -Name FILESRV01 | Select-Object Path, ConfigurationLocation, SnapshotFileLocation
Get-VMHardDiskDrive -VMName FILESRV01 | Select-Object ControllerType, ControllerLocation, Path
Get-WinEvent -LogName 'Microsoft-Windows-Hyper-V-VMMS-Admin' -MaxEvents 30 |
  Format-Table TimeCreated, Id, Message -Wrap
Get-WinEvent -LogName 'Microsoft-Windows-Hyper-V-Worker-Admin' -MaxEvents 30 |
  Format-Table TimeCreated, Id, Message -Wrap

The copy, with all subfolders and without endless retries on read errors:

robocopy 'D:\Hyper-V\FILESRV01' 'E:\Recovery\FILESRV01' /E /R:1 /W:1

If disks are stored outside the VM folder, Get-VMHardDiskDrive lists them; copy those folders as well.

Which case applies?

What you seeGo to
The VM is missing from Hyper-V Manager, but its files are still on the disk.VM missing
The VM does not start, and the message mentions a differencing disk, a parent disk or mismatched IDs.Checkpoint chain
The VM's status ends in “Critical”, in PowerShell for example OffCritical or PausedCritical.Status “Critical”
The .vhdx will not mount, or the file system in the guest is damaged.Damaged VHDX
Individual files in the VM were deleted or overwritten.Individual files
Ransomware, failed hardware, or the VM's folder has been deleted.Total loss

The VM has disappeared, but its files are still there

This happens after the host has been reinstalled, after a data drive has been moved, or when Hyper-V has lost the registration. As long as the configuration file (.vmcx) still exists, register the VM in place. It keeps its ID, its disks and its checkpoints, and nothing is copied.

# The configuration is under "Virtual Machines", not under "Snapshots"
$cfg = Get-ChildItem 'D:\Hyper-V\FILESRV01\Virtual Machines\*.vmcx' | Select-Object -First 1

# Check whether Hyper-V can take the VM over as it is
$report = Compare-VM -Path $cfg.FullName -Register
$report.Incompatibilities | Format-Table MessageId, Message -Wrap

# No incompatibilities: register
Import-VM -CompatibilityReport $report

The most common incompatibility is a virtual switch that does not exist on this host. In that case, disconnect the network adapter in the report, have the report generated again, import, and then connect the adapter to an existing switch. If the list contains several messages, adjust the index:

$report.Incompatibilities[0].Source | Disconnect-VMNetworkAdapter
$report = Compare-VM -CompatibilityReport $report
Import-VM -CompatibilityReport $report
Connect-VMNetworkAdapter -VMName FILESRV01 -SwitchName 'LAN'

The configuration is missing, the disks are still there

If the VM was deleted in Hyper-V, its configuration is gone. The virtual hard disks remain; Hyper-V first merges any existing checkpoints into the disks. Create a new VM of the same generation and attach the existing disk. Set processors, memory and any further disks as they were before.

New-VM -Name FILESRV01 -Generation 2 -MemoryStartupBytes 4GB `
  -VHDPath 'D:\Hyper-V\FILESRV01\Virtual Hard Disks\FILESRV01.vhdx' -SwitchName 'LAN'

The generation must match: generation 2 for guests that boot with UEFI from a GPT disk, generation 1 for older guests with BIOS. A generation 2 Linux guest only boots with Secure Boot once you set the matching template: Set-VMFirmware -VMName FILESRV01 -SecureBootTemplate MicrosoftUEFICertificateAuthority.

The checkpoint chain is broken

From the moment a checkpoint is taken, writes go to a differencing disk (.avhdx). It contains only the changed blocks and points to its parent disk. If a link is missing or sits somewhere else, or if the parent disk has been modified, the VM no longer starts. Typical causes: files moved or renamed by hand, an .avhdx deleted because it seemed superfluous, the parent disk restored from an old copy.

First establish where things stand: which file is attached to the VM, what does it point to, and is the chain usable from there?

$folder = 'D:\Hyper-V\FILESRV01\Virtual Hard Disks'
$child  = "$folder\FILESRV01_8C1D3F2A-6B7E-4E55-9C2B-0D5A1F3E7B91.avhdx"
$parent = "$folder\FILESRV01.vhdx"
Get-VHD -Path $child | Format-List Path, VhdType, ParentPath
Test-VHD -Path $child

If ParentPath points to a location where the parent disk no longer is, but that disk still exists unchanged somewhere else, enter the new path. This only works while the chain is not mounted, so the VM must be off:

Set-VHD -Path $child -ParentPath $parent
Test-VHD -Path $child

Mismatched IDs are a warning sign. If Hyper-V reports that the parent and the differencing disk do not match, the parent disk was modified or replaced after the checkpoint. Set-VHD has the -IgnoreIdMismatch switch for this. Microsoft warns explicitly: use it only if the content of the old and the new parent disk is identical block for block, otherwise data is lost. If at all, then on a copy, and check the data before the VM goes back into service.

Do not simply start the VM with the parent disk alone either. It then runs with the state of the oldest checkpoint, and every change to the parent disk makes the differencing disks permanently unusable.

If all you still need from an intact chain is a single disk, for example to attach it to a new VM, merge it on the copy. This only works offline. The source files remain afterwards, but they are no longer valid disks.

Merge-VHD -Path $child -DestinationPath $parent

Leftover checkpoints

Checkpoints of type Recovery are created by backup software. If they are left behind after an aborted run, the chain grows with every write. Remove them through Hyper-V, not in the file system; Hyper-V then merges them into the disk.

Get-VMSnapshot -VMName FILESRV01 | Format-Table Name, SnapshotType, CreationTime -AutoSize
Get-VMSnapshot -VMName FILESRV01 -SnapshotType Recovery | Remove-VMSnapshot

Status “Critical”: Hyper-V cannot reach the storage

If a VM's status ends in “Critical”, in PowerShell for example OffCritical, SavedCritical or PausedCritical, the data is usually undamaged. Hyper-V cannot reach the storage location or cannot write there. Common reasons: the volume is full because dynamically expanding disks and checkpoints filled it unnoticed, a drive is offline or has a different letter, an iSCSI target is not connected.

Get-VM | Format-Table Name, State, Status -AutoSize
Get-Volume | Format-Table DriveLetter, FileSystemLabel, HealthStatus, SizeRemaining, Size -AutoSize

Free up space or make the storage reachable again. A paused VM then continues with Resume-VM -Name FILESRV01; start a VM that is off as usual. Do not delete any .avhdx files to make room: they are part of the disk.

Repairing a damaged VHDX

Check first, then work on the copy. Test-VHD tells you whether Hyper-V can use the file (for a differencing disk, the chain from this file on) and answers with True or False.

$copy = 'E:\Recovery\FILESRV01\Virtual Hard Disks\FILESRV01.vhdx'
Test-VHD -Path $copy

If the file is fine but the file system in the guest is damaged, mount the copy read-only and first save everything that can still be read. The first output shows the drive letter; in the example it is G:.

Mount-VHD -Path $copy -ReadOnly -Passthru | Get-Disk | Get-Partition | Get-Volume |
  Format-Table DriveLetter, FileSystemLabel, HealthStatus, Size -AutoSize
robocopy 'G:\Shares' 'E:\Rescued\Shares' /E /R:1 /W:1
Dismount-VHD -Path $copy

Only then repair, on a second copy, mounted writable. -Scan only reports, -OfflineScanAndFix repairs like chkdsk /f and may discard damaged files in the process.

Mount-VHD -Path $copy -Passthru | Get-Disk | Get-Partition | Get-Volume
Repair-Volume -DriveLetter G -Scan
Repair-Volume -DriveLetter G -OfflineScanAndFix
Dismount-VHD -Path $copy

If Test-VHD answers False and the file can no longer be mounted either, the container itself is damaged. Hyper-V ships no repair tool for that. What remains is a backup or a specialized data recovery lab, and the less that has been written to the volume since the damage, the better the chances.

Recovering individual files

If only one file in the VM is missing, you do not have to roll back the whole VM. Applying a checkpoint would do exactly that: everything that has happened in the VM since then would be gone. Export the checkpoint instead. The running VM stays untouched, and you mount the disk from the export read-only, as in the previous section.

Get-VMSnapshot -VMName FILESRV01 | Format-Table Name, CreationTime -AutoSize
Export-VMSnapshot -VMName FILESRV01 -Name 'before-update' -Path 'E:\Export'
Get-ChildItem 'E:\Export' -Recurse -Include *.vhdx | Select-Object FullName

If there is no suitable checkpoint, the file comes from the backup. With lionbackup, you restore the VM's backup to a folder and mount its disk read-only in the same way. You do not need to import the VM for that. If the guest has its own shadow copies switched on, you will also find older versions there under “Previous Versions”.

Total loss: ransomware, hardware, deleted folder

If the files themselves are gone or encrypted, no built-in tool recovers the data. Checkpoints do not either: they are on the same host, often in the same folder, and ransomware that reaches the host encrypts them along with everything else. Then the only thing that counts is a copy outside the host, one that the host itself cannot delete.

With lionbackup, restoring a Hyper-V VM takes three steps. How they play out in a simulated total loss, with screenshots from the test, is shown in the post Restoring a Hyper-V VM from the cloud.

1

List the backups

With a read token that you create in the portal only at this point. The host itself only has a write token, and that cannot read anything.

C:\lionbackup\bin\lionbackup-client.exe --config C:\lionbackup\conf\restore.yaml --list
2

Restore and decrypt

With the file_id from the list and your private key. Only you have it; without it nobody can read the backup, not even us.

C:\lionbackup\bin\lionbackup-client.exe --config C:\lionbackup\conf\restore.yaml `
  --restore YOUR-FILE-ID --identity E:\lionbackup.key --target D:\Restore
3

Check and import

The backup is then laid out like a Hyper-V export. Compare-VM checks whether Hyper-V can take it over, Import-VM creates it. Finally, remove the checkpoint that Hyper-V created only for the backup.

$target = 'D:\Restore\FILESRV01'
$cfg  = Get-ChildItem "$target\Virtual Machines\*.vmcx" | Select-Object -First 1
$report = Compare-VM -Path $cfg.FullName -Copy -GenerateNewId `
  -VhdSourcePath "$target\Virtual Hard Disks" `
  -VirtualMachinePath 'D:\Hyper-V\FILESRV01' `
  -VhdDestinationPath 'D:\Hyper-V\FILESRV01\Virtual Hard Disks' `
  -SnapshotFilePath 'D:\Hyper-V\FILESRV01'
$report.Incompatibilities.Count
$vm = Import-VM -CompatibilityReport $report
Get-VMSnapshot -VM $vm -SnapshotType Recovery | Remove-VMSnapshot
PowerShell: Compare-VM reports 0 incompatibilities, Import-VM creates FILESRV01, the backup checkpoint is removed, the VM's own checkpoints are back (German user interface)
From our restore test on Windows Server 2025: 0 incompatibilities, the VM is back along with its checkpoints.

Every backup is a full backup of the whole VM. So each version in the list can be restored on its own, without a chain of increments. How to set up the backup is described on the page Hyper-V backup to the cloud.

To make it faster next time

Frequently asked questions

Can you recover a deleted Hyper-V VM?

If it was only deleted in Hyper-V, its virtual hard disks are still there: Hyper-V removes the configuration, not the disks, and merges any existing checkpoints into the disks. Create a new VM of the same generation and attach the existing .vhdx. If the folder has been deleted too, restore the VM from a backup and write nothing more to the volume until then.

Are Hyper-V checkpoints a backup?

No. Checkpoints are differencing disks on the same host and depend on their parent disk. If the host or the volume fails, or ransomware encrypts the files, the checkpoints are affected as well. A backup is kept outside the host and can be restored on its own.

How do I restore individual files from a Hyper-V VM?

Export a suitable checkpoint with Export-VMSnapshot instead of applying it, or restore the VM's backup to a folder. Then mount the disk read-only with Mount-VHD -ReadOnly and copy the file out. The running VM stays untouched.

Can an .avhdx be recovered without its parent disk?

No. A differencing disk only contains the blocks that have changed since the checkpoint. Without the unchanged parent disk, the rest of the file system is missing. The chain can only be recovered if the parent disk still exists or is contained in a backup of the whole VM.

How long does it take to restore a Hyper-V VM from the cloud?

That depends on the size of the backup and your bandwidth. At 100 GB packed size and 1 Gbit/s, the transfer alone takes about 14 minutes on paper; checking, decrypting and unpacking come on top. Because every backup is a full backup, you only ever fetch a single version, not a chain of increments.

Does this also apply to older versions of Windows Server?

The Hyper-V commands on this page are available from Windows Server 2016 on; older versions store the configuration as .xml instead of .vmcx. We support and test Hyper-V backups with lionbackup on Windows Server 2025 and 2022.

We tested the lionbackup steps on this page on Windows Server 2025 and 2022. The other commands are built into Hyper-V and Windows; their behavior as described here follows Microsoft's documentation of the Hyper-V and Storage modules.

May we support you?

We set up the backup of your Hyper-V host together with you and run through the first restore test once, by video call.

Book an appointmentView Hyper-V backup