Hyper-V is a hypervisor that provides hardware virtualization. Each virtual machine operates on virtual hardware. Hyper-V allows you to create virtual hard disks, virtual switches, and other devices that can be added to virtual machines.
The installation involves activating the corresponding role in Windows Server 2019 Datacenter or Standard.
Launch the Server Manager.
Select Add Roles and Features.
Choose Hyper-V from the menu.
Click Add Features to add all necessary Microsoft Hyper-V components.
Next, configure the roles. This is done in three sections.
First, Virtual Switches: Select a network interface. It will serve as the virtual switch for the hypervisor. Do not use the primary interface for this, as you will need it for physical access to the server.
The next section is Migration. You can leave the default settings as they suit our purposes.
On the Default Stores tab, also leave the standard parameters. You can change the directories where the virtual hard disk and VM configuration files are stored at any time in the hypervisor settings.
You have prepared the configuration for installation. To start it, click on Install.
The next step in working with Hyper-V is configuration. But first, check the server configuration. Launch the Run window (press Win+R) and execute the command sconfig.
In response, a window displaying the configuration will appear. There is a lot of information, so pay attention to these key parameters:
Domain/Workgroup — specified when creating the server.
Computer Name — also set in the previous step.
Configure Remote Management — enabled by default. This feature will be useful later for management through special utilities or the PowerShell console.
Remote Desktop — an option that allows you to manage the machine remotely, enabled by default.
Network Settings — network parameters of the virtual switch. You specified these when configuring the server while working with the Virtual Switches section.
You do not need to change or configure anything further if you created virtualization servers according to the previous section. You can proceed to remotely manage the server.
You can manage the server in two ways. The most convenient method is through the Windows Admin Center (WAC) web interface. You can download it for free from the Microsoft website: Windows Admin Center Overview.
When installing WAC, use the default settings; there is no need to change any configurations. After installation, you will gain access to the web interface, which should be opened by the name or IP address of the remote host.
Another management method is through the PowerShell console. You enabled this capability when you installed several components along with the hypervisor. To verify that everything is working, launch the PowerShell console and execute:
Get-Command –Module Hyper-V | Measure-Object
In response, you will receive the number of cmdlets designed to manage the infrastructure. These cmdlets duplicate the capabilities of WAC. The difference is that with the web interface, you click buttons, while in PowerShell, you input commands.
For example, you can check network settings through the console with:
Get-NetIPConfiguration
The same information is displayed when connecting to the server through WAC.
Another example is checking for IPv6 support. Execute the following command in PowerShell:
Get-NetAdapterBinding -InterfaceDescription "Hyper-V Virtual Ethernet Adapter" | Where-Object -Property DisplayName -Match IPv6 | Format-Table -AutoSize
If the Enabled
field shows True
, then IPv6 support is enabled on the Hyper-V Server. You can try to disable it using the command:
Disable-NetAdapterBinding -InterfaceDescription "Hyper-V Virtual Ethernet Adapter" -ComponentID ms_tcpip6
After executing this cmdlet, there will be no output; it simply quietly disables IPv6 support. You can check the status with another command:
Get-NetAdapterBinding
All of this can also be done using Windows Admin Center.
The choice between WAC and PowerShell depends on the tasks you need to accomplish. For example, WAC is good for quickly changing settings, while PowerShell cmdlets are convenient for automation. Suppose setting up a virtual machine is a routine task. It can be tedious to configure another host through WAC each time. In that case, you can write a script executing the required commands through PowerShell.
To manage the Windows Server 2019 firewall, you can use Advanced Firewall rules. It’s more convenient to configure them through PowerShell. To see the list of available requests for regulating the firewall, execute:
Get-Command -Noun *Firewall* -Module NetSecurity
Set the rules for remote access. To do this, execute the following commands sequentially in PowerShell:
Enable-NetFireWallRule -DisplayName "Windows Management Instrumentation (DCOM-In)"
Enable-NetFireWallRule -DisplayGroup "Remote Event Log Management"
Enable-NetFireWallRule -DisplayGroup "Remote Service Management"
Enable-NetFireWallRule -DisplayGroup "Remote Volume Management"
Enable-NetFireWallRule -DisplayGroup "Windows Defender Firewall Remote Management"
Enable-NetFireWallRule -DisplayGroup "Remote Scheduled Tasks Management"
You can conveniently check the status through the Windows Admin Center web interface. Launch it, connect to the server, and go to the Firewall section. The rules are divided into three tabs: General, Inbound, and Outbound.
You have already created disk storage. Remember the Default Stores section when installing Microsoft Hyper-V Server? In that section, you needed to specify a folder where all the data would be stored.
If you left the default settings, that’s okay. They can be changed at any time through the web interface.
The Hyper-V settings are located in the Settings section. Here, the same two folders that were available when creating the server can be modified.
The first directory is the Virtual Hard Disk Path. This is the path to the folder that serves as the virtual hard disk.
The second directory is the Virtual Machines Path. This is where the configuration files for the virtual machines are stored.
You can specify any directories to use for storing data and configuration files.
Hyper-V virtualization is needed to create virtual hosts on a single physical server. Let’s finally move on to this part.
Download a trial virtual machine for Hyper-V from the official Microsoft website. In it, you will find a trial version of the OS, Visual Studio, an included Linux subsystem with pre-installed Ubuntu, developer mode enabled, and a Windows terminal: Microsoft Developer Downloads.
The Windows 11 virtual machine can be created through the Windows Admin Center in just a few clicks.
Launch the WAC web interface.
Go to the Virtual Machines section.
Create a new virtual machine.
Specify the path to the extracted files of the trial image.
Add the hard disk image.
Click Create to start the virtual machine creation process.
You can also start the VM through WAC.
For security and data preservation, it is necessary to create backups of virtual machines. Typically, the built-in utility wbadmin
is used for this purpose. However, the default installation of Hyper-V does not add it to the server. To fix this, add a new role — Windows Server Backup.
Open the Server Management Console.
Click Add Roles and Features.
Select Windows Server Backup from the list.
After adding the role, the wbadmin utility will be available on the server. To check that it is working and to get a list of all virtual machines, execute the command:
wbadmin get virtualmachines
The command will return a list of virtual machines. Note the host name for which you want to create a backup. You need to add it to the command syntax:
wbadmin start backup -backuptarget:D: -hyperv:"Windows11" -quiet
Replace "Windows11" with the name of your virtual machine. This command will initiate the backup creation process. After completing the process, a log will be saved in the backup folder.
You can also manage backups on Microsoft Hyper-V through the Windows Server Backup application.
Open the Server Management Console.
In the Tools menu, select Windows Server Backup.
Open the Action tab and start a one-time backup — Backup Once.
Select Different Options.
Choose the Full Server configuration to back up all data on the server, including applications and even the system state.
Specify a remote shared folder as the destination.
Enter the address of the remote shared folder. Enable inheritance (the Inherit option) if you want the backup to be accessible to everyone who has access to the remote shared folder.
Provide the credentials of a user with write permissions to the shared network directory.
Confirm the backup configuration.
After the process is complete, open the remote shared folder you specified as the destination for the backup using File Explorer. You should see a directory named WindowsImageBackup
containing the backup data.
The utility for backups on MS Hyper-V Server can also be used to create backups on a schedule.
You can flexibly configure the scheduled backup settings: change the time, store backups on separate disks, or transfer them to a network folder. The key is to ensure that the data is easy to restore. Windows Server Backup provides all the necessary tools for this.