VHD (Virtual Hard Disk) and its successor VHDX are file formats used by Microsoft Virtual PC to represent a virtual hard disk drive (HDD). A VHD/VHDX file will have the same contents of a formatted physical hard drive, including a boot record, disk partitions, file systems, files, and folders. A VHD/VHDX file is typically used as a logical disk in a virtual machine, but it can also be attached directly to the Windows system (7 or later).
Just like physical hard drives, VHD/VHDX files are at risk for corruption, accidental deletion of their files, virus attacks, and other causes of data loss. As such, the ability to recover data from a VHD/VHDX image can be very valuable.
This article will show you how to use R-Studio for this task. All versions of R-Studio 9.3 and later can load VHD/VHDX files whereas R-Studio Technician/T80+ can create such files.
We'll start with the R-Studio version that can directly load VHD/VHDX files. The last part of this article will show how to work with R-Studio versions that cannot load such files.
Data recovery case: There's a VHDX file that earlier contained two partitions.
Click image to enlarge
Then the second partition (Disk F:, Test-2) was deleted and the first partition (Disk E:, Test-1) was extended to the whole disk.
Click image to enlarge
The task: Data recovery from the second partition of the VHDX disk.
Case 1: Data recovery from a healthy VHDX file (it can be attached to the system).
1. Open the VHDX file as an image.
Click image to enlarge
2. Scan the opened VHDX disk.
Click image to enlarge
Click the Scan button, then click the Change… button, leave only NTFS selected, and click the Scan button. You may read more about scan parameters in the on-line help: Drive Scan.
> R-Studio will start scanning the VHDX disk showing its progress.
Click image to enlarge
3. Inspect the scan result and locate the second partition.
Click image to enlarge
You can do that looking on the partition offset and size.
4. Enumerate files on the second partition (Recognized 2) by double-clicking it.
Click image to enlarge
You can perform all data recovery actions as if this is a real hard drive. For example, preview a file.
Click image to enlarge
Then you can mark all necessary file for recovery and recover them as if it was a real logical disk.
Case 2: Data recovery from a damaged VHDX file (it cannot be attached to the system)
This method can be used for all R-Studio versions, even those that cannot directly load VHD/VHDX disks.
1. Open the VHDX file as a byte-by-byte image.
Click image to enlarge
2. Scan the opened VHDX disk.
Click image to enlarge
Click the Scan button, then click the Change… button, leave only NTFS selected, and click the Scan button. You may read more about scan parameters in the on-line help.
> R-Studio will start scanning the VHDX disk showing its progress.
Click image to enlarge
3. Inspect the scan result and locate the second partition.
Click image to enlarge
You can do that by looking at the partition offset and size.
4. Enumerate files on the second partition (Recognized 2) by double-clicking it. You can perform all data recovery actions as if this is a real hard drive. For example, preview a file.
Click image to enlarge
Then you can mark all necessary file for recovery and recover them as it was a real logical disk.
Case 3: Data recovery from a healthy VHDX file by an R-Studio version that cannot load VHD/VHDX files
Virtual Hard Disks are healthy and can be attached in Windows.
Attaching a VHD file directly in a host operating system requires Windows 7 or later.
1. Attach the VHD image to the system from the Windows Disk Management utility.
Click image to enlarge
If successfully mounted, the partitions will be assigned drive letters. They will also appear as normal disks in R-Studio.
2. Process the attached VHD disks in R-Studio as regular disks.
Click image to enlarge
Conclusion
All versions of R-Studio have the capability to find lost partitions, recover data, and copy data from VHD/VHDX files.
If the R-Studio version you're using can load VHD/VHDX files (9.3 and higher), R-Studio can open a healthy VHD/VHDX file as a conventional disk image and process it in the same way you would process a normal hard drive.
For previous versions of R-Studio that cannot load such files, another technique should be used: the VHD/VHDX file can be attached to the system (Windows 7 and higher) and then R-Studio can process it as a real hard drive.
For a corrupted VHD/VHDX file, more advanced methods can be employed to locate and recover lost data. This file should be loaded as a byte-by-byte image and scanned for partitions, file systems, and individual files.