How to Recover VHD/VHDX Files?

Summary: A VHD file is just like a physical hard disk which 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.

VHD or Virtual Hard Disk is a logical disk that’s visible as a VHD/VHDX file. It can exist as a System Image created by Windows Backup and Restore utility or from Windows Disk Management utility. Or, it could be created and used as a hard disk on a Virtual Machine. You can have multiple Virtual Machines on a computer and hence multiple VHDX files, making it possible for various Operating Systems to exist on a single computer.

Contact a Professional Data Recovery expert in the first place if your VHDX file is missing. The recovery experts have the best VHD Recovery and Repair solutions based on the root cause. However, there are some methods which you can try to fix VHDX corruption. If you’re unable to repair corrupt VHDX file by using the below methods, you’ll have to get the help of a Professional Data Recovery Service provider.

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:

Repair or Recover VHD Files by using Hyper-V Manager

You can repair the corrupt or damaged VHD by using Hyper-V Manager—a Windows 10 utility to create and manage Virtual Machines and VHDs.

Prerequisite: The affected VHD must be disconnected, or the Virtual Machine to which it’s attached must be powered-off before performing these steps.

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 or VHDX file.

Repair VHD by using DiskPart Utility

You can use Windows in-built utility to compact the VHD file to repair it. The compact process frees-up the unused space—the space that remains unused after deletion of data.

Prerequisite: The affected VHD must be disconnected, or the Virtual Machine to which it’s attached must be powered-off before performing these steps.

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
  5. Type select vdisk file=”d:\folder\vdisk.vhdx” and hit. Where d:\folder\vdisk.vhdx is the complete path of the corrupt VHD file.
  6. Type attach vdisk readonly and hit
  7. Write compact vdisk and hit Enter
  8. Type detach vdisk and hit
  9. Type Exit.

Recover VHD file using Windows PowerShell

This method utilizes Windows PowerShell to repair the VHDX file.

Prerequisite: The affected VHD must be disconnected, or the Virtual Machine to which it’s attached must be powered-off before performing these steps.

  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.

Professional Data Recovery Service for VHD/VHDX Recovery and Repair

If none of the above-mentioned methods worked 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 VHDX file but also could recover it if you’ve lost one.

Conclusion

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. A corrupt or lost VHDX file is the loss of entire disk data.

In this blog post, we discussed various methods based on compacting the VHD to free-up the unused space to repair corrupt VHD files. We emphasized the need for a Professional Data Recovery Service provider because there are no manual methods to recover a lost VHDX 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 or repair your VHDX file.

Leave a Reply

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