logo
logo
Sign in

How to Recover Virtual Machine Data on Hyper-V Server

avatar
Hetman Software
How to Recover Virtual Machine Data on Hyper-V Server

In this tutorial, we’ll explore installation and configuration of Hyper-V Server 2019 operating system. You’ll see how to create a virtual machine, recover data from a Hyper-V Server physical disk, from a virtual machine drive, and how to convert a virtual dynamic hard disk into a fixed-size one.


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.



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.

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.



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.



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.
  3. Change the server name
  4. The next item lets you add one more administrator. Give the name, and then the password.
  5. Adding the administrator
  6. 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…
  7. Enable remote access
  8. The fifth item is Windows Update settings.

  9. After that, you can install available updates.

  10. There is one more important thing – enable RDP access. Type E to enable it, and 2 for all clients.
  11. Enable RDP access
  12. 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.
  13. Network settings
  14. Set the date and time.

  15. 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.
  16. 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.

And then run this:


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


et-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 Services – Computers – My 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 Start – Apps and Features – Programs and Features – Turn 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 Start – Windows Administrative Tools – Hyper-V Manager – Connect 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.



Read the full article with all additional video tutorials.

collect
0
avatar
Hetman Software
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more