Enabling and Configuring Hyper-V in Windows Server 2022

Posted on 18th June 2023

Introduction

Hyper-V is a native hypervisor that can be installed on Windows Server systems. It enables you to create virtual machines and run multiple operating systems on a single server. In this article, we will show you how to enable and configure Hyper-V in Windows Server 2022.

Prerequisites

Before you begin, you will need to have the following:

  • A Windows Server 2022 system
  • An administrative account with privileges to enable Hyper-V

Enabling Hyper-V

Hyper-V can be enabled in two ways: using the graphical user interface (GUI) or using PowerShell.

Enabling Hyper-V using the GUI

To enable Hyper-V using the GUI, follow these steps:

  1. Log in to your Windows Server 2022 system with an administrative account.
  2. Open the Server Manager console.
  3. In the left pane, expand the Local Server node and click on the Hyper-V role.
  4. In the Hyper-V role pane, click on the Add Roles and Features link.
  5. On the Before you begin page, click on the Next button.
  6. On the Installation Type page, select the Role-based or feature-based installation option and click on the Next button.
  7. On the Server Selection page, select your server from the server pool and click on the Next button.
  8. On the Server Roles page, expand the Hyper-V role and select the Hyper-V Management Tools checkbox. You can also select other Hyper-V related roles if needed. Click on the Next button.
  9. On the Features page, click on the Next button.
  10. On the Hyper-V page, click on the Install button to start the installation.
  11. Once the installation is complete, click on the Close button.

Enabling Hyper-V using PowerShell

To enable Hyper-V using PowerShell, follow these steps:

  1. Log in to your Windows Server 2022 system with an administrative account.
  2. Open the PowerShell console.
  3. Run the following command to install the Hyper-V role:

    Install-WindowsFeature -Name Hyper-V -IncludeManagementTools

  4. Once the installation is complete, you will see the following output:

    Success Restart Needed Exit Code Feature Result
    ------- -------------- --------- --------------
    True No Success {Hyper-V}

Configuring Hyper-V

Now that Hyper-V is enabled, we can start configuring it.

Creating a Virtual Machine

To create a virtual machine, follow these steps:

  1. Log in to your Windows Server 2022 system with an administrative account.
  2. Open the Hyper-V Manager console.
  3. In the Actions pane, click on the New and then Virtual Machine links.
  4. On the Before You Begin page, click on the Next button.
  5. On the Specify Name and Location page, enter a name for your virtual machine and select a location for the virtual machine files. Click on the Next button.
  6. On the Assign Memory page, specify the amount of memory to assign to the virtual machine. Click on the Next button.
  7. On the Configure Networking page, select a network adapter from the list of available adapters. Click on the Next button.
  8. On the Connect Virtual Hard Disk page, select the Create a virtual hard disk option and specify a location for the virtual hard disk. Click on the Next button.
  9. On the Installation Options page, select the Install an operating system from a bootable image file option and click on the Browse button to select the image file. Click on the Next button.
  10. On the Summary page, review your settings and click on the Finish button.

Configuring Virtual Machine Settings

Once the virtual machine is created, you can configure the settings for the virtual machine such as CPU, memory, networking, storage, etc.

Conclusion

In this article, we have shown you how to enable and configure Hyper-V in Windows Server 2022.

Hyper-V is a native hypervisor for Windows Server that enables you to create and run virtual machines on a physical server. With Hyper-V, you can create virtual machines with a variety of operating systems, including Windows, Linux, and FreeBSD. You can also use Hyper-V to create virtual private servers (VPSs), test environments, and more.

In this article, we’ll show you how to enable and configure Hyper-V in Windows Server 2022. We’ll also show you how to create your first virtual machine.

Before you begin, you’ll need to make sure that your server meets the minimum hardware requirements for Hyper-V. For more information, see the Microsoft documentation.

Enabling Hyper-V

To enable Hyper-V, open the Server Manager and click on the “Local Server” tab. In the “Properties” section, scroll down to the “Hyper-V” entry and click on the “Edit” button.

In the “Hyper-V” dialog box, select the “Enable Hyper-V” check box and click on the “OK” button.

You’ll be prompted to restart your server. Click on the “Restart now” button to restart your server and enable Hyper-V.

Configuring Hyper-V

Once Hyper-V is enabled, you can begin configuring it. To do so, open the Hyper-V Manager and click on the “Action” menu. In the “Action” menu, select the “Hyper-V Settings” option.

In the “Hyper-V Settings” dialog box, you can configure the default location for your virtual machines, the default memory and processor settings, and more. Once you’ve made your changes, click on the “OK” button.

Creating a Virtual Machine

Now that Hyper-V is enabled and configured, you’re ready to create your first virtual machine. To do so, open the Hyper-V Manager and click on the “Action” menu. In the “Action” menu, select the “New” option and then click on the “Virtual Machine” option.

In the “New Virtual Machine” wizard, you’ll need to specify a name and location for your virtual machine. You’ll also need to specify the amount of memory and the number of processors for your virtual machine.

Once you’ve specified the basic settings for your virtual machine, click on the “Next” button. On the “Connect Virtual Hard Disk” page, you’ll need to specify the location of your virtual hard disk. You can either create a new virtual hard disk or use an existing one.

Once you’ve specified the location of your virtual hard disk, click on the “Next” button. On the “Installation Options” page, you can choose to install an operating system from a CD or DVD, from a network location, or from a local ISO file.

If you choose to install an operating system from a CD or DVD, you’ll need to insert your installation media into your server’s CD or DVD drive. If you choose to install an operating system from a network location, you’ll need to specify the network location. If you choose to install an operating system from a local ISO file, you’ll need to specify the location of the ISO file.

Once you’ve specified the installation options for your virtual machine, click on the “Next” button. On the “Completion” page, review your settings and click on the “Finish” button.

Your virtual machine will now be created. To start your virtual machine, select it in the Hyper-V Manager and click on the “Action” menu. In the “Action” menu, select the “Start” option.

Conclusion

In this article, we’ve shown you how to enable and configure Hyper-V in Windows Server 2022. We’ve also shown you how to create your first virtual machine.