Virtual Hard Disk or VHDX is a disk image file format of virtual type. The role of VHDX is to create provisions for virtual/logical disk storage space for machines virtually. Hyper V which is a built-in Windows 10 manager stores all its data in VHD or VHDX format. The file format has features that allow it to provide support for larger sizes files as well as a disk resizing option. The major advantage of having VHDX is the increase in storage capacity of 64 TB. Having learned about VHDX it seems unlikely to have any trouble with it, but even these files are not prone to corruption.
What are the reasons for VHDX file corruption?
- A virus or Malware attack is the most common way for any file to get corrupted. Once attacked by a virus all the files are useless or inaccessible.
- System shutdown abruptly can be very common nowadays with users using old machines or maybe due to some other reason. This leads to corruption of files and loss of data.
- Storage media corrupted – It is obvious to state that if you are having corruption issues with your storage media, VHDX files corruption is also very likely.
- Crashing of the Hard disk makes it very difficult for the users as the VHDX files are going to have corruption if the hard disk is crashed.
What are you able to recover from corrupted VHDX files?
- Lost data, deleted files & folders all can be recovered.
- Recovery of data from severely corrupted VHD files.
- Important image files, internet files, archives, etc. can be recovered from the corrupted or damaged VHDX files.
- Restoration of any particular type of file such as word document, PDF, XLS, etc. is also possible.
Methods to recover VHDX file on Windows Machines
There are a few manual methods that can help well in recovering the VHDX files. We will discuss them in detail with step-by-step instructions.
1st Method: Recovery using Hyper-V manager
- Launch Hyper-V manager on your windows and click on Edit Disk.
- From the left pane in the appeared window, select Locate Disk. Now, in Browse, select the VHDX file that has to be recovered before clicking Next.
- In the appeared window, you have to choose an action for your file. So choose Compact and click Next. If you are unable to see the option either the virtual machine to which VHDX is attached is turned on or the affected VHDX is a fixed disk VHD.
- Click on Finish to complete the recovery process.
- Now Rename the file to use it.
2nd Method: Recovery using DiskPart Utility
- Type cmd after clicking the Start button on your system.
- Right-click on the command prompt and click on Run as administrator. This will launch the command prompt as an Admin.
- Type DiskPart and hit Enter. Type Select vdisk file=”d:\folder\vdisk.vhdx” and hit Enter. Here, d:\folder\vdisk.vhdx is the file path of the corrupt VHDX file.
- Now, type attach vdisk readonly and then push Enter.
- Type compact vdisk > Enter.
- Write detach vdisk > Enter.
- Type Exit.
3rd Method: Recovery using Windows Powershell
- Launch Windows Powershell on your system as an admin (Run as administrator).
- Type Mount-VHD –path d:\folder\vdisk.vhdx –Readonly before hitting Enter.
- Now type Optimize-VHD -path d:\folder\vdisk.vhdx –Modefull before hitting Enter.
- Then write Dismount-VHD-path d:\folder\vdisk\vhdx before hitting Enter. path d:\folder\vdisk.vhdx is the path of the corrupted VHDX file.
3rd Method: Recovery using third-party tools
Manual methods are easily available and work most of the time. In case they don’t work we recommend you to use third-party tools such as
VHD recovery software. They are needed when the corruption or damage is severe and no manual method is working on it.
Wrapping it up
VHDX is a virtual disk file format that is important for windows and helps in storing Hyper-V data in its format. However, similar to other file types VHDX files are also prone to corruption. This leads to the solutions mentioned above for recovering data from corrupted or damaged VHDX files. In case manual methods don’t work we recommend you use third-party tools to ease your job.