How to recover files from a damaged encrypted VMware disk

After the NTFS boot sector and its backup were damaged, the Windows 10 guest stopped opening one of the encrypted VMware disks. We will show you how to use the virtual machine password to open the VMDK in Hetman Partition Recovery, find its files and retrieve earlier versions from snapshots. The virtual machine does not need to be started for recovery.

How to recover files from a damaged encrypted VMware disk

In our test, some files had already been deleted before the volume was damaged. We will compare the current disk state, after the deletion, with two earlier snapshots. We perform the scan and save the files in Windows. Hetman Partition Recovery is also available for Linux and macOS.

Go to view
How to Recover Files from a Damaged Encrypted VMware Disk

How to Recover Files from a Damaged Encrypted VMware Disk

The Windows 10 guest reports that drive E: is inaccessible and the file system is unrecognized

File Explorer cannot open volume E: after NTFS corruption.

What happened to the VMware disk

In VMware Workstation, we enabled full encryption for the Windows 10 virtual machine. This includes the data on the virtual disks. While the machine is running, VMware decrypts data on reads and encrypts it on writes, and the Windows guest sees ordinary disks. To open them outside the VM, we need the password set in VMware.

The All the files (.vmdk, .vmx, etc.) option in the Encrypt Virtual Machine dialog

The selected VMware encryption mode covers both the VMDK files and the VM configuration.

We attached a 20 GB system disk and two additional 2 GB disks to the machine. We created an NTFS volume on each additional disk. The disks differed in how space was allocated on the host.

Virtual diskSpace allocationWhat we are testing
Preallocated, 2 GBAll space is allocated in advanceFiles on the damaged volume and their versions in two snapshots
Sparse, 2 GBThe disk file grows as data is writtenDeleted files on a volume with a recognized NTFS file system
The 20, 2 and 2 GB disks in VMware Workstation and the settings for Windows 10 x64 Sparse.vmdk

The Sparse disk has a maximum size of 2 GB. The other additional disk is marked Preallocated.

First, we copied test files to both volumes and created a snapshot named Files Uploaded. We then added the Video folder to both volumes and created a second snapshot named Additional Files Uploaded. Only after the second snapshot did we delete some files from both volumes.

Two consecutive snapshots and the current You Are Here position in VMware Snapshot Manager

Both snapshots precede the current state of the virtual machine.

To reproduce NTFS corruption, we overwrote the volume’s boot sector and the sector containing its backup with zeros on the Preallocated disk in the test VM. File Explorer could no longer open that volume. Both sectors on the Sparse disk remained intact.

Sector 32768 at starting offset 0x01000000 is filled with zeros in HxD

The primary boot sector of the test volume after it was overwritten.

If Windows asks to format the inaccessible volume, cancel the prompt. Perform the scan on a copy of the entire powered-off VM folder, preserving its file structure. Prepare another storage device for the recovered data.

Windows prompt to format drive E: with the Format disk and Cancel buttons

Click Cancel to leave the contents of the volume unchanged.

How to mount encrypted VMDKs using the VMware password

Launch Hetman Partition Recovery. Click Mount Disk and select VMware Workstation / Fusion / vSphere (*.vmdk) from the list of image types.

The all-purpose choice for recovering files from deleted, formatted, damaged, or inaccessible storage devices.
VMware Workstation / Fusion / vSphere (*.vmdk) is selected in the Mount Disk wizard

VMDK image type in Hetman Partition Recovery.

Specify the entire virtual machine folder. In our test, it is Corrupt-test-Windows10-x64 on drive D:. The program looks for the virtual disks, the configuration containing the data needed to unlock them, and the snapshot files. This lets you open both the current state and the desired earlier state of the same disk.

The folder Corrupt-test-Windows10-x64 is selected in the Select the virtual machine folder dialog

We provide the wizard with the path to the VM folder containing its configuration, disks and snapshots.

When the wizard asks for a password, enter the VMware encryption password. In our VM, a single password worked for both additional disks. After mounting them, the program used that password automatically during the scan.

The Unlock dialog in Hetman Partition Recovery with a masked password for Windows 10 x64

Enter the VMware encryption password and click Unlock.

Each disk has its own group in the list. The Snapshot column displays snapshot names, and the Active row corresponds to the current state. The Encrypted label in the Description column indicates encryption. For the first scan, select Active in the two 2 GB groups, Windows 10 x64-Allocated (Preallocated) and Windows 10 x64-Sparse. The screenshot also shows the selected 20 GB system disk. Next, we focus on the two additional disks.

Active rows and Encrypted labels in the Windows 10 x64-Allocated, Sparse and system disk groups

Active is selected for three disks. This test uses the two additional 2 GB disks.

Once mounted, view both disks in the main window. The Disk2 volume on the Sparse disk is labeled NTFS. On the Preallocated disk, the program sees the disk but fails to identify the file system because the file system metadata sectors were damaged.

Mounted Disks shows Basic data partition without a file system name and Disk2 labeled NTFS

Both partitions are 1.98 GB. Disk2 was the only partition on which the program immediately recognized NTFS.

How to find files in the current disk state

The scanning mode depends on whether the program recognizes the file system. In this test, a quick scan was sufficient for one disk, while the NTFS structures had to be found first on the other.

Fast scan of the Sparse volume

Double-click the NTFS volume Disk2 on the Sparse disk, select Fast scan and start scanning. Open the results and navigate to the folder where the required file was previously stored. The Fast scan report shows 12 folders and 134 files. Both existing and deleted files are visible in the results. A red cross next to a name marks a deleted file.

The Fast scan report for Disk2 with NTFS shows 12 folders and 134 files

Result of the quick scan of the current Sparse disk.

Contents of Disk2 after Fast scan, with thumbnails and crosses on deleted files

File names and thumbnails help compare existing and deleted files.

Full analysis of the damaged Preallocated volume

Open the Preallocated disk. Because the program could not identify the file system, the wizard offers Full analysis. Select NTFS in the search settings, since that was the file system of the formatted volume. Start the analysis and wait for the search to complete.

Full analysis and NTFS are selected for Basic data partition in the File Recovery Wizard

We selected NTFS for the test. Content-aware analysis is disabled.

In our test, the wizard found one NTFS volume, 12 folders and 137 files. Open NTFS Partition in the scan results. The folder tree and files from the volume that Windows could not open are accessible again. The results include files marked as deleted. You can check their contents before saving.

The Full analysis report shows one NTFS volume, 12 folders and 137 files

Full analysis results for the volume with the damaged boot sector.

The discovered NTFS Partition contains the Video folder and both existing and deleted files

Contents of the damaged volume after opening the detected NTFS file system.

How to retrieve files from a snapshot without reverting the entire VM

Reverting in VMware Workstation restores the earlier state of the machine and the disks included in the snapshot. If you need a single file or folder, you can open a snapshot of an individual disk in Hetman Partition Recovery and copy the required data. The current state of the other disks is preserved.

Open Mount Disk again, select VMware Workstation and specify the same VM folder. In the Preallocated group, select Files Uploaded and Additional Files Uploaded. Both snapshots were created before NTFS was damaged, so the program recognized the file system in each one.

Two snapshots are selected in the Windows 10 x64-Allocated group and the Active row is deselected

Mount the two earlier states of the same disk to compare them.

First snapshot with the original files

Open Files Uploaded and run Fast scan. Here you can see the original set of files. Even those that were deleted later appear as ordinary files without a red cross. The Video folder did not yet exist when this snapshot was created.

Root of the first Disk1 snapshot with the General folder and test files without crosses

Files Uploaded shows the original files. The Video folder was added later.

Second snapshot with the Video folder

Open Additional Files Uploaded, run Fast scan and go to the same directory. It now contains the Video folder. If you need a file from this folder, open it in the second snapshot. For a file deleted later, you can preview the copies in both snapshots and choose the version you need.

The Video folder is selected at the root of the second Disk1 snapshot

The Video folder can already be opened in the Additional Files Uploaded snapshot.

How to check and save the files found

Preview and search

Return to the full analysis results for the current Preallocated disk. Select an image and open it in the preview. For a video file, start playback. Expand the window to full screen if necessary. In our test, we checked the contents of the files found, including deleted files, this way.

The Preview pane displays an image from a deleted BMP marked with a cross in the file list

A BMP from the current damaged volume opened in the preview.

Expanded preview of a deleted MP4 with a frame from an underwater video and 1920 × 1080 parameters

The preview window lets you check video playback before saving.

To find a file by name, click Find File, enter part of its name and select Find. If you cannot remember the name, the Advanced window offers size, creation or modification date, and hidden and system file search options. For example, with Search by Size → Big, the program searched for files larger than 1 MB.

Search by Size and Big are selected in Find File for files larger than 1 MB

The size filter helps find files when their names are unknown.

Recovery list and saving to another disk

To recover files from different folders, you can create a single list. From the context menu of the first file, select Add for recovery. The Recovery list pane opens on the right. Drag the remaining files you need into it and click Recover below the list or Recovery on the toolbar.

The Recovery list pane is open on the right next to the contents of the Video folder

Files from different directories can be added to one list.

In the wizard, select Save to hard disk and specify a folder on another storage device. In our test, the files were saved to C:\Restored Files\. Start saving. The same procedure applies to files found on the Sparse disk or in either snapshot.

Save to hard disk is selected in the recovery wizard

Choose to save to a disk and proceed to the folder selection.

The Path field contains C:\Restored Files\ and the options to restore the folder structure and NTFS streams are selected

In the test, we opened the VMDK from drive D: and saved the recovered files to C:.

When recovery is complete, open the destination folder in File Explorer and check the files from there. In our test, all files selected for recovery from the damaged volume were saved and opened correctly.

File Explorer shows five saved files in the Restored Files folder on drive C:

The five recovered files include images, a document and two video files.

Vladimir Artiukh

Author: , Technical Writer

Vladimir Artiukh is a technical writer for Hetman Software, as well as the voice and face of their English-speaking YouTube channel, Hetman Software: Data Recovery for Windows. He handles tutorials, how-tos, and detailed reviews on how the company’s tools work with all kinds of data storage devices.

Oleg Afonin

Editor: , Technical Writer

Oleg Afonin is an expert in mobile forensics, data recovery and computer systems. He often attends large data security conferences, and writes several blogs for such resources as xaker.ru, Elcomsoft and Habr. In addition to his online activities, Oleg’s articles are also published in professional magazines. Also, Oleg Afonin is the co-author of a well-known book, Mobile Forensics - Advanced Investigative Strategies.

Recommended For You