Windows Server 6d ago 11 views 3 min read

How to install the Hyper-V role on Windows Server

This guide walks you through installing the Hyper-V role on Windows Server 2022 using Server Manager or PowerShell. Follow these steps to enable virtualization on your host machine.

Roy S
Updated 15h ago
Sponsored

Cloud VPS — scale in minutes

Instantly deploy SSD cloud VPS with guaranteed resources, snapshots and per-hour billing. Pay only for what you use.

You will install the Hyper-V role to turn your Windows Server into a hypervisor capable of running virtual machines. These steps target Windows Server 2022 Datacenter or Standard edition with the latest cumulative updates applied. You must use a 64-bit system with virtualization support enabled in the BIOS.

Prerequisites

  • Windows Server 2022 (Datacenter or Standard edition).
  • BIOS/UEFI virtualization extensions enabled (Intel VT-x or AMD-V).
  • At least 4 GB of free RAM (8 GB recommended for production).
  • Administrator privileges on the server.
  • Stable network connection for downloading features.

Step 1: Check virtualization support

Open an elevated PowerShell window to verify that virtualization is supported and enabled in the firmware. Run the following command to check the status of the hypervisor platform.

Get-ComputerInfo | Select-Object -ExpandProperty VirtualizationFirmwareEnabled

You will see True if the hardware supports virtualization. If it shows False, you must enter your BIOS settings and enable the virtualization technology option before proceeding.

Step 2: Install the Hyper-V role using Server Manager

Launch Server Manager from the Start menu. Click Manage in the top right corner and select Add roles and features. In the wizard, select Role-based or feature-based installation and click Next. Select the server you want to configure from the list and click Next.

Check the box for Hyper-V under the Server Roles section. Expand the node to see sub-options like Hyper-V Management Tools and Hyper-V Administration Tools. Check both boxes to ensure you can manage VMs remotely. Click Next through the remaining pages until you reach the confirmation screen. Click Install to begin the process.

Wait for the installation to complete. Server Manager will display a progress bar and a success message when finished. Reboot the server if prompted to apply the changes.

Step 3: Install the Hyper-V role using PowerShell

Open an elevated PowerShell window. Run the following command to install the Hyper-V role and all management tools automatically.

Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart

The command will download the necessary files, install the role, and automatically restart the server. You will see a message indicating the restart is required. Wait for the server to reboot and log back in.

Step 4: Verify the role installation

After the server restarts, open PowerShell again. Run the following command to confirm the Hyper-V role is installed and active.

Get-WindowsFeature -Name Hyper-V

You will see a list of features with Installed set to True for the Hyper-V role. The output should look like this:

Name                : Hyper-V
Installed           : True
Description         : Enables Hyper-V role

Open Server Manager and navigate to Local Server. You will see the Hyper-V status listed as Installed with a green checkmark.

Verify the installation

Run this command to create a test virtual machine and ensure the hypervisor is functioning correctly.

New-VM -Name "TestVM" -MemoryStartupBytes 2GB -SwitchName "DefaultSwitch"

If the command returns without errors, the installation is successful. You can now access the Hyper-V Manager from Server Manager to create and manage virtual machines.

Troubleshooting

Error: "The operation completed successfully but the system will be rebooted." This is expected behavior. The server must restart to load the new drivers and services. Do not force a shutdown; let the system reboot automatically.

Error: "The installation of the Hyper-V role failed." This often occurs if virtualization is disabled in the BIOS. Reboot the server, enter the BIOS/UEFI settings, and enable Intel VT-x or AMD-V. Restart the server and retry the installation.

Error: "The feature is not available on this edition of Windows." Ensure you are running Windows Server 2022 Datacenter or Standard edition. Hyper-V is not available on Windows Server Essentials or Nano Server without specific configurations. Upgrade the edition or use a supported SKU.

Error: "The system cannot find the file specified." This indicates a corrupted installation package. Run the following command to repair the Windows component store before retrying the installation.

sfc /scannow

After the scan completes, reboot the server and run the installation command again.

Sponsored

Managed IT Services

Let our engineers run your servers, patch your stack and keep your infrastructure monitored around the clock.

Tags: System AdminVirtualizationWindows ServerPowerShellHyper-V
0
Was this helpful?

Related tutorials

Comments 0

Login to leave a comment.

No comments yet — be the first to share your thoughts.