Recover Virtual Machine Data: Hyper-V Server 2019 Guide

Need to recover virtual machine data on Hyper-V Server 2019? Our comprehensive guide has got you covered! Learn step-by-step instructions and expert tips for successfully salvaging your data on Hyper-V. Say goodbye to data loss worries and hello to recovered files!

Recover Virtual Machine Data: Hyper-V Server 2019 Guide

Hyper-V Server 2019 is a free operating system by Microsoft for hardware virtualization that lets you create and run virtual machines, each of them working as a full-featured computer with its own operating system and programs.

With Hyper-V, you can create as many virtual machines as you want, and have them running various operating systems, and do it on a physical Windows server. Hyper-V’s hardware resources and computing power let you isolate the guest operating system of the virtual machine from the server’s operating system which guarantees its uninterrupted work.

Go to view
How to Recover Virtual Machine Data on a Server Running Hyper-V Server 2019

How to Recover Virtual Machine Data on a Server Running Hyper-V Server 2019

There are two versions of Hyper-V:

  • Hyper-V Server – an autonomous server that only contains a Windows hypervisor (Hyper-V).

  • And Windows Server with Hyper-V – an autonomous computer controlled by Windows Server operating system, where Hyper-V is enabled.

Criteria Hyper-V Server Windows Server with Hyper-V role
Operating System Hypervisor based on Windows Server Core, no graphical interface. Full version of Windows Server, can operate with or without graphical interface (Core mode).
Licensing Free product, but virtual machines must have their own OS licenses. Requires a Windows Server license, but includes rights for virtual machine usage.
Management Capabilities Managed via command-line interface or external tools like Hyper-V Manager or PowerShell. Managed through a graphical interface, PowerShell, System Center, or command-line interface.
Roles and Functions Supports only Hyper-V functionality. Can perform other roles beyond Hyper-V (file server, Active Directory, etc.).
Clustering Support Supports clustering and Live Migration. Supports clustering, Live Migration, and additional high-availability features.
Performance Minimal system resources, as there are no additional roles. Additional resources may be used for other roles, affecting Hyper-V performance.
Updates Fewer updates due to minimal component set. More updates due to the installation of multiple roles and features.

Now I’ll show you how to configure an autonomous Hyper-V Server containing only a Windows hypervisor.

Installing Hyper-V Server 2019

Microsoft official website

An ISO image of Hyper-V Server 2019 can be downloaded from the Microsoft official website. To download the image, log in to your account, and the ISO download link will become active. For the download to start, fill in these fields.

Logging in

I recommend choosing the English version as it will make the configuration process easier, help you avoid errors, and let you fix possible errors more quickly.

Choosing the English version of the operating system

When the download is complete, you need to create a bootable drive, or boot from this image in any other way possible.

Go to view
How To Create a Bootable USB Drive to Install Windows 10, 8, 7 💽💻🛠️

How To Create a Bootable USB Drive to Install Windows 10, 8, 7 💽💻🛠️

The installation process is typical and looks like the installation of Windows 10 – just follow the wizard’s directions. There are hardly any peculiarities in installing Hyper-V.

Go to view
How to Install Windows 10 on a Computer or Laptop From a USB Drive or DVD in 2019 💽💻🛠️

How to Install Windows 10 on a Computer or Laptop From a USB Drive or DVD in 2019 💽💻🛠️

When the process is over, the operating system will ask you to change the administrator’s password. As you enter it, the hypervisor console appears.

Changing the administrator’s password

Hyper-V Server doesn’t have the Windows graphical interface we have all got used to. Many settings will require using the Command Prompt.

The hypervisor console opens

Finding your way through Hyper-V Server settings

To change the operating system settings, you have two windows to work in, sconfig.cmd and the standard Command Prompt.

Initial configuration can be performed with the management console.

  1. The first item on this menu lets you connect a server to the domain or workgroup.

  2. Now change the server name – choose a name that is both short and informative, because you’ll be using it often during the configuration process. Agree to restart.

    Change the server name
  3. The next item lets you add one more administrator. Give the name, and then the password.

    Adding the administrator
  4. Another important thing to configure is to enable remote access to this computer. When you enable this option, you’ll be able to control your server remotely with Server Manager, MMC and PowerShell consoles, connect to it with RDP, check its availability with ping, and so on…

    Enable remote access
  5. The fifth item is Windows Update settings.

  6. After that, you can install available updates.

  7. There is one more important thing – enable RDP access. Type E to enable it, and 2 for all clients.

    Enable RDP access
  8. The next item is network settings. To select a specific adapter, type its index – in my case, it is 3. Now press 1, set a static IP address (by pressing S), enter IP address, subnet mask and default gateway. Then 2 – set DNS servers. When this configuration is over, type 4 to return to the main menu.

    Network settings
  9. Set the date and time.

  10. The last one is telemetry settings. Hyper-V doesn’t let you disable it, so select the mode you prefer. I choose the first option, Security.

    Configuring telemetry

That’s all about primary configuration, now let’s move on to connection settings.

Configure connection to Hyper-V

To manage a server with Hyper-V Manager, you’ll need a computer with Windows 10.

To establish a connection, you should set the host name for the server on the client computer. Find and edit the file “hosts” on the Windows 10 computer. Add the IP address, press Space, type the name of the Hyper-V server. This is how it looks like:

192.168.1.111 WHS2019

Set the server’s IP address in hosts

The account on the client computer should differ from the Hyper-V administrator account. Now you need to save your account data which is used to connect to the hypervisor. Launch the Command Prompt as administrator on the client computer and type this command:

cmdkey /add:server name /user:administrator name /pass:administrator’s password

Saving a new account

In my case, I type this:

cmdkey /add:WHS2019 /user:Administrator /pass:123456

It gives the server name, administrator name, and password.

Configuring firewall in Hyper-V Server

By default, a firewall is enabled for the hypervisor to block any external connections. You should either disable it completely by running the following command:

netsh advfirewall set currentprofile state off

Disable the firewall

Or add several permissions for remote management. Here are some commands to be typed in PowerShell. You can run this tool from the Command Prompt.

Type - powershell

powershell

And then run this:

Set-NetFirewallRule -DisplayGroup 'Windows Management Instrumentation (WMI)' -Enabled true -PassThru

Set-NetFirewallRule -DisplayGroup 'Remote Event Log Management' -Enabled true -PassThru

Set-NetFirewallRule -DisplayGroup 'Remote Volume Management' -Enabled true -PassThru

Setting permissions for remote connections

Now use the “ping” command to check the server availability by its name. Launch the Command Prompt as administrator on the client computer and type “ping” followed by the server name:

Ping WHS2019

Checking the server ping

The server can be pinged all right, so let’s move on.

Start PowerShell as administrator and run this command:

winrm quickconfig

Type “y” to agree. This way, we have just configured the winrm service to run automatically and enabled remote management rules in the firewall.

Enable automatic start for the winrm service

Now you need to add the Hyper-V server to the list of trusted hosts with this command:

Set-Item WSMan:\localhost\Client\TrustedHosts -Value "WHS2019"

The last element is the server name.

Adding the Hyper-V server to the list of trusted hosts

The next step is to set permissions for the Anonymous Logon group. To do it, you have to start Component Services by running the command dcomcnfg in the Command Prompt.

dcomcnfg

Go to Component ServicesComputersMy Computer. Right-click on My Computer and open Properties, jump to the tab COM Security.

Click Edit Limits in the Access Permissions section, scroll down and set remote access permission for the group Anonymous Logon - OK.

Add remote access permission for Anonymous Logon Group

Installing Hyper-V Manager to a Windows 10 computer. Right-click on StartApps and FeaturesPrograms and FeaturesTurn Windows features on or off. Find Hyper-V on the list, unfold it and check the box next to Hyper-V Management Tools - click OK.

Installing the Hyper-V component in Windows 10

Wait until the installation is complete, and then connect to the remote server .

Open StartWindows Administrative ToolsHyper-V ManagerConnect to Server. In this field, type the Hyper-V server name.

Connecting to the server

If you configured everything properly, you’ll be able to connect to the server and manage it.

Now that Hyper-V Server is installed, and the primary configuration for your connection is complete, the final step is to create a virtual machine.

Go to view
💻 How to Create a Microsoft Hyper V Virtual Machine and Recover Data from a VHDX Disk in 2021

💻 How to Create a Microsoft Hyper V Virtual Machine and Recover Data from a VHDX Disk in 2021

How to recover data from a Hyper-V Server and virtual machine

When the operating system is damaged, the Hyper-V server’s hard disk is formatted accidentally, or the virtual machine is out of order, you can still read and extract the required information from the disk if you use a specialized tool - Hetman Partition Recovery.

The tool recovers data from any devices, regardless of the cause of data loss.

Remove the hard disk from the Hyper-V server and connect it to a Windows computer. Download, install and run the program, open the disk and start the scan.

Scanning a disk from the Hyper-V server

If the Hyper-V operating system has crashed, you still have good chances to recover virtual machine files from this drive. By default, they are stored in this directory:

С:\Users\Public\Documents\Hyper-V\Virtual hard disks

Recover the virtual machine files

Select the files you want to recover, click Recovery select where you want to save them, and click Recovery again. When the recovery operation is complete, the files will be placed into the specified directory.

Hyper-V files are recovered

After that, you’ll be able to connect a virtual machine and boot it.

How to convert a dynamic virtual hard disk into a fixed-size one

When a virtual machine is created by the hypervisor, it receives a virtual hard disk which is dynamic by its type. Due to certain peculiarities of the file system and permanent defragmentation of such disks, deleted files are soon erased, so recovering data from images of such disks often ends in a failure. However, you can change the disk type in the virtual machine settings of your Hyper-V Manager.

Virtual hard disk of dynamic type

Select a virtual machine and open its Settings- in the window that opens, look to the left, select the hard disk, then look at the right side of the window, click Edit.

Converting a virtual hard disk

Select Convert and click Next, and don’t change the disk format. At the next step, select disk type as Fixed sizeNext.

Convert – Fixed size

In the process of conversion, the program will not change the main file of the virtual disk - instead, it will save its copy, but with the fixed size. Give the file name and click Next, and then hit Finish.

Setting the fixed size

Wait until the virtual disk is converted.

Now let’s check if we managed to change the disk type. Click “Inspect” and you can see that the disk type has changed to fixed-size.

Fixed-size virtual hard disk

How to recover data from a virtual disk image file

Now upload this file into our program. Open the tab ToolsMount Disk, specify the path to the fixed-size virtual disk file and click “Open.” After that, it will appear in the Drive Manager.

Mounting a fixed-size virtual hard disk

All you have to do now is to scan it, select the necessary files and recover them.

Recovering data

You will find the recovered files in the directory you have chosen.

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

Hello! This is AI-based Hetman Software virtual assistant, and it will answer any of your questions right away.
Start Chat