We are committed to providing fast, efficient, and affordable software solutions that set new standards in the software development industry.
  • Data Recovery from Virtual Hard Disk (VHD) Files

VHD (Virtual Hard Disk) is a file format used by Microsoft Virtual PC to represent a virtual hard disk drive (HDD). A VHD file will have the same contents of a formatted physical hard disk drive, including a boot record, disk partitions, file systems, files and folders. A VHD file is typically used as a logical disk in a virtual machine. But a VHD can also be attached directly in Windows 7 (or later).

Just like physical hard drives, VHD files are at risk for corruption, accidental deletion, virus attacks and other causes of data loss. As such, the ability to recover data from a VHD image can be very valuable. R-Studio offers several ways to do that.

Scenario 1: 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.
VHD disks attached to computer
Fig. 1: VHD disks attached to computer
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.
Attached VHD disks in R-Studio's Drives pane
Fig. 2: Attached VHD disks in R-Studio's Drives pane
Click image to enlarge

Scenario 2: Virtual Hard Disk files are corrupted and cannot be attached to the system

These steps can also be used if your Windows versions cannot attach a VHD disk directly (e.g. Windows XP, Windows Vista or earlier).

1. Open the VHD files as disk images. You may have to change file types to "All files" on the Open Image File dialog box to see files with the default VHD disk file extension .vhd.
VHD disk files opened in R-Studio as disk images
Fig. 3: VHD disk files opened in R-Studio as disk images
Click image to enlarge

2. Process the opened VHD disk files in R-Studio as regular disk objects.

Scenario 3: Virtual Hard Disks are stored on a disk with damaged file system and cannot be accessed directly

This method will only work if the VHD disk files are unfragmented. See File Recovery Basics: How Data Recovery Works for details.

1. Scan the disk (the logical volume or the entire hard disk drive) on which the VHD disk files resided. In the Scan dialog, choose the appropriate file system for the partition you are searching for (NTFS in our case).

2. Locate the VHD disks among the recognized partitions. They will be marked in either red or green.
VHD disks as recognized partitions on the host disk
Fig. 4: VHD disks as recognized partitions on the host disk
Click image to enlarge

You may also be able to recognize the partition by its file system, size, or other disk parameters.

3. Double-click the found partitions to open them and recover the data. As with regular disk objects, you can perform deeper analysis, create copies of the images, etc. as necessary.

Scenario 4: Virtual Hard Disks found as recognized partitions require deep analysis

1. Determine the accurate offset and size (in sectors) of the partition to be analyzed on its Properties tab.
The VHD disk and its parameters
Fig. 5: The VHD disk and its parameters
Click image to enlarge

Tip: You can double-click the parameters to copy and paste them into Notepad for later use in the Create Region dialog box (Step 2).

2. Using the parameters from Step 1, create a region on the host disk. Make sure to set the units to Sectors in the Create Region dialog.
The VHD disk as a region on the host disk and recognized partition
Fig. 6: The VHD disk as a region on the host disk and recognized partition
Click image to enlarge

R-Studio has the capability to find lost partitions, recover data and copy data from VHD files. The file recovery and disk analysis methods vary depending on your scenario. If you are running Windows 7 or later and the VHD files are not corrupted, you can easily scan the VHD in the same way you would a normal logical volume. For other cases, more advanced methods can be employed to locate and recover lost data.