How to Recover VHD Files?

[SUMMARY]: A VHD file is just like a physical hard disk that has elements like, a boot record, disk partitions, file systems, saved data, etc. Corruption or loss of one such file means losing the entire data stored on the VHD. Here’s everything you might want to know about how to repair or recover VHD Files.

Since VHDs stored on your computer, they can get corrupt or even get deleted. Different factors that can render them non-functional include:

  • Virus Attacks
  • Storage Media Failure
  • Human Errors
  • Improper System Shutdown

Let’s have a look at the VHD Recovery/Repair methods given below:

How to Repair or Recover VHD Files?

VHD file recovery by using Hyper-V Manager

You can recover VHD by using Hyper-V Manager—a Windows 10 utility to create and manage Virtual Machines and VHDs

Here are the steps that you need to follow:

1. Launch the Hyper-V Manager and click Edit Disk.

Hyper V Manager

2. Select Locate Disk at the left pane, Browse the affected VHD or VHDX file and click Next.

Virtual Hard Disk Wizard

3. Select Compact to free-up the unused space. If you couldn’t see the Compact option, the Virtual Machine to which the VDH is attached is turned ON, or the affected VHDX file is a Fixed Disk VHD.

Hyper Virtual Hard Disk Wizard

4. Click Finish once the Compact process is complete.

Repair or recover vhd files

5. Rename the VHD file.

VHD recovery by using DiskPart Utility

You can use Windows in-built utility to recover the VHD file.

Follow the steps to repair VHD:

  1. Click the START button and type cmd.
  2. Right-click on Command Prompt.
  3. Click on Run as Administrator to launch command prompt as an Admin.
  4. Type DiskPart and hit Enter
  5. Type select vdisk file=”d:\folder\vdisk.vhdx” and hit Enter. Where d:\folder\vdisk.vhdx is the complete path of the corrupt VHD file.
  6. Type attach vdisk readonly and hit Enter
  7. Write compact vdisk and hit Enter
  8. Type detach vdisk and hit Enter
  9. Type Exit.

Recover VHD file using Windows PowerShell

This method utilizes Windows PowerShell to repair the VHDX file.

  1. Launch Windows PowerShell as an Admin (Run as administrator).
  2. Type Mount-VHD –path d:\folder\vdisk.vhdx –ReadOnly and hit Enter.
  3. Then type Optimize-VHD –path d:\folder\vdisk.vhdx -Mode Full and hit Enter.
  4. Type Dismount-VHD –path d:\folder\vdisk.vhdx and hit Enter.

Where, d:\folder\vdisk.vhdx is the complete path of the corrupt VHD file.

[NOTE]: The affected VHD must be disconnected, or the Virtual Machine to which it’s attached must be powered-off before performing the steps in all of the above methods.

Professional Data Recovery Service for VHD Recovery

If the above-mentioned methods didn’t work for you, it means the corruption is severe and needs to be taken care of by a Professional Data Recovery Service provider. Their help could not only repair the VHD file but also recover the deleted VHD file. You can get back your deleted VHD file by either availing our In-Lab Data Recovery Service or Remote Data Recovery Service.


VHDs play an essential role—whether you want to use them as a system image backup or as a different computer on a Virtual Machine.

In this blog post, we discussed various methods to recover VHD files. We emphasized the need for a Professional Data Recovery Service provider because there are no manual methods to recover a lost VHD file. Moreover, experts have solutions for almost any level of corruption.

If the given methods in this blog didn’t work for you, then don’t panic. As the Professional Data Recovery Service providers can quickly recover your VHD file.

Leave a Reply

Your email address will not be published. Required fields are marked *