RecoverySoftware

Restoring data from Hyper-V virtual machines

How to recover data from Hyper-V virtual machines? Data loss can occur due to hypervisor failure, Windows failure, or user actions. In this article, we will discuss what can be done in such situations. We will cover topics such as troubleshooting when a Hyper-V virtual machine fails to start, recovering important data from a non-starting machine, restoring deleted data within the machine, and more.

Restoring data from Hyper-V virtual machines

Contents

  1. Hyper-V virtual machine does not start
  2. Where does Hyper-V store files?
  3. Rebuilding a Hyper-V virtual machine
  4. Migrating a Hyper-V virtual machine to VMware Workstation Player
  5. How to restore data from a virtual machine using Windows?
  6. How to recover data from a Hyper-V virtual machine using data recovery programs?
  7. How to recover deleted data from a Hyper-V virtual machine?

Hyper-V virtual machine does not start

If a Hyper-V virtual machine fails to start, there can be various reasons behind it.

One common reason is incorrect machine settings. In such cases, it is necessary to correct the settings and cancel any changes made before starting the machine. It is also important to verify the correct settings and consider rolling back to previous control points (Snapshots) if available.

Hyper-V virtual machines may also fail to start due to problems with the hypervisor itself. This is especially true for Hyper-V in Windows 11, which receives frequent functional updates, including updates related to the system kernel. For stable operation of Hyper-V on client Windows, it is recommended to use Windows 10 and avoid immediate updates after a new version is released.

Hyper-V is a system component and cannot be reinstalled like a regular program. However, if there are issues with its operation, you can check the integrity of Windows files by performing a Windows file integrity check.

Another reason for Hyper-V virtual machines failing to start is problems with their content – when the files that make them work are damaged or deleted. This can happen due:

In such situations, if control points were created for the machine, you can try rolling back to them. However, if the machine’s files are damaged or deleted, success may be limited. In such cases, it is recommended to try rebuilding the machine based on its disk file (if available).

Alternatively, if the machine cannot be restored but contains important data, you can try extracting that data.

We will discuss these solutions in detail below, including how to recover deleted data from a Hyper-V virtual machine.

Where does Hyper-V store files?

In order to restore a Hyper-V virtual machine or its data, it is important to know where the machine’s files are stored in Windows. These paths can be found in the hypervisor settings. Go to the computer options and click on “Hyper-V Settings”.

There are two storage methods – separate machine files and separate disk files. The storage path for machine files is listed in the “Virtual Machines” section, but we won’t need it for this purpose. The path we need is the one for storing virtual hard disk files, which is listed under “Virtual Hard Disks”. The default path is:

C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks

While this is the default path, machines can be stored in different locations on the computer. To find the storage path of a specific machine’s virtual disk files, go to the machine’s settings and click on “Settings”.

In the disk controller section, select the disk and look at the “Virtual hard disk” column. It will indicate the location path of the disk file.

Hyper-V works with virtual hard disk files in its own formats – VHD and VHDX. These are the files we need to restore the machine or extract important data from it.

Rebuilding a Hyper-V virtual machine

If the files of a Hyper-V virtual machine are deleted or damaged, but the disk is intact, you can try rebuilding the machine using its disk. In the Hyper-V computer options, start the creation of a new machine by clicking on “New” and then “Virtual Machine”.

Click “Next”.

Enter the name of the new machine.

Select the generation of the machine that was used previously.

Specify the amount of RAM.

Select the network device.

In the virtual disk configuration stage, select “Use an existing virtual hard disk” and specify the path to the disk file of the old machine.

Click “Finish”.

Try starting the rebuilt machine.

Migrating a Hyper-V virtual machine to VMware Workstation Player

If rebuilding the machine using Hyper-V does not work, you can try restoring the machine using a different hypervisor. This can potentially fix any issues with the machine’s disk file during the conversion process.

If the machine starts on another hypervisor, you can back it up and then return to Hyper-V by restoring the backup on a new machine.

One alternative hypervisor you can use is VMware Workstation Player. This is a Windows hypervisor that can be used for personal use free of charge.

Important: To work with VMware hypervisors, you must disable the low-level Hyper-V shell. To do this, open the command line as an administrator and enter the following command:

bcdedit /set hypervisorlaunchtype off

To enable the low-level Hyper-V shell, use the following command:

bcdedit /set hypervisorlaunchtype auto

To run the problematic virtual machine in VMware Workstation Player, create a new machine in VMware Workstation Player based on the disk of the problematic machine.

VMware Workstation Player supports virtual hard disks in its native VMDK format as well as Hyper-V VHD format. However, it does not support the newer Hyper-V VHDX format drives. If your machine has a VHDX format disk, it needs to be converted to VHD format first using Hyper-V.

In the Hyper-V computer options, start the function to edit virtual hard disks by clicking on “Edit Disk”.

Click “Next”.

Specify the path to the disk file of the Hyper-V virtual machine.

Select the disk conversion option – “Convert”.

Select the format to which you want to convert the disk – VHD.

Select the type of disk – fixed or dynamic. In this example, we will choose dynamic – “Dynamically expanding”.

Specify the name and path to save the file of the new converted disk.

Click “Finish”.

Wait for the conversion process to complete. Once done, in the VMware Workstation Player window, create a new virtual machine by clicking on “Create a New Virtual Machine”.

Select “I will install the operating system later” as we will install the guest operating system later.

Select the type and version of the guest operating system installed on the problematic Hyper-V machine.

Specify the name of the VMware machine and choose a different save path if desired.

Next, create a machine disk. We will remove this drive later and add the converted VHD.

Click “Finish”.

The VMware machine is created. Open its settings by clicking on “Edit virtual machine settings”.

Set the desired values for the allocated RAM and processor resources in the “Memory” and “Processors” sections, respectively.

Go to the “Hard Disk” section. Remove the machine disk using the “Remove” button.

Click the “Add” button below to add a new machine device.

Select “Hard Disk”.

Choose the controller – NVMe, SCSI, or SATA.

Select “Use an existing virtual disk”.

Specify the path to the disk file of the problematic Hyper-V machine converted to VHD format. Make sure to set the file types to “All files” to display the VHD format in the overview.

Click “Finish”. VMware Workstation Player will prompt you to convert the virtual hard disk to a format supported by the hypervisor. Click “Convert”.

Finally, click “Play virtual machine” and try starting the machine in VMware Workstation Player.

How to restore data from a virtual machine using Windows?

If the above solutions do not work or if the Hyper-V virtual machine disk file is corrupted, you can try opening the machine’s drive in Windows Explorer to recover data. Windows 8.1, 10, and 11 systems, as well as modern Windows Server versions, natively support mounting VHD and VHDX format virtual disks.

To do this, simply locate the virtual disk file on your computer and double-click on it.

You can then browse the contents of the Hyper-V virtual machine disk in Windows Explorer and copy the data to a physical hard drive.

How to recover data from a Hyper-V virtual machine using data recovery programs?

If the Windows tools fail to mount the disk of the Hyper-V virtual machine or access the data, you can turn to specialized data recovery programs with support for virtual disks. One such program is RS Partition Recovery.

RS Partition Recovery can mount virtual disks of various formats, including Hyper-V VHD and VHDX formats, and extract data from them. The program specializes in data recovery and is designed to work with damaged information devices, including virtual disks.

RS Partition Recovery can not only see virtual hard disks directly but also their snapshots (checkpoints) in Hyper-V terminology. This means that if data cannot be recovered from the virtual disk, you can try recovering it from the checkpoint snapshots (if available).

To recover data from a Hyper-V virtual machine, download and install RS Partition Recovery.

RS Partition Recovery

All-in-one data recovery software

Launch the program. In the program window, click on “Tools” and then “Mount disk”.

Select the virtual disk type as “Hyper-V (*.vhd, *.vhdx)“.

Specify the path to the Hyper-V disk file, and the program will display the drive itself and any available snapshots (checkpoints). Select the desired disk or snapshot.

The disks and snapshots will be visible in the program window. Open each of them one by one to see if the required data is present. Click on the disk or snapshot to access its contents.

Perform a Fast scan to search for data.

Review the search results and select the required data to restore using the “Recovery” button.

Choose a convenient method to save the data and proceed with the restoration process.

How to recover deleted data from a Hyper-V virtual machine?

If the required data is not found on the disk or in the checkpoint snapshots, it may have been deleted when the Hyper-V virtual machine crashed. In such cases, RS Partition Recovery can still help.

The program is a convenient solution for recovering deleted data from virtual machines. It works in the host system environment and mounts machine disks using its own means. There is no need to install recovery software in each virtual machine, and data recovery can be performed for any machine from a single center.

In addition to convenience, data recovery with virtual disk mounting in a host system environment can provide higher performance compared to normal data recovery in a guest operating system environment.

To recover deleted data from a Hyper-V virtual machine, mount the machine’s drive in the RS Partition Recovery program as described in the previous section. Follow the same steps, but if the deleted data is not found during a quick scan, start a full analysis to search for recoverable data.

A full analysis is a deep scan of recoverable data. It takes longer than a quick scan but is more thorough.

Deleted data will be marked with a cross icon in the search results. Look for the desired data in the folder with this icon and click “Recovery” to save it.

Exit mobile version