Windows

Creating a Virtual Machine in Hyper-V: A Detailed Guide

In this guide, you'll learn how to create and configure a virtual machine using Hyper-V on Windows. We cover all stages: from checking virtualization support to installing the operating system in a virtual environment.

Updated at February 16, 2026
10-15 min
Medium
FixPedia Team
Применимо к:Windows 10 ProWindows 10 EnterpriseWindows 11 ProWindows 11 Enterprise

Introduction

Hyper-V is a built-in Windows hypervisor that allows you to create and manage virtual machines (VMs) without installing third-party software. With it, you can run multiple isolated operating systems on a single computer: test software, explore new OSes, create test environments, or isolate potentially dangerous applications.

This guide provides a detailed explanation of how to create a virtual machine in Hyper-V from scratch, configure its settings, and install a guest operating system. The step-by-step instructions are suitable for Windows 10 and 11 professional editions.

Requirements and Preparation

Before you begin, ensure your system meets the following requirements:

  1. Operating System: Windows 10/11 Pro, Enterprise, or Education. Home editions do not support Hyper-V.
  2. Processor: 64-bit processor with virtualization support (Intel VT-x or AMD-V). Enable virtualization in BIOS/UEFI (usually under Advanced → CPU Configuration).
  3. Memory: Minimum 4 GB, 8 GB or more recommended. Remember that memory is shared between the host and guest system.
  4. Disk Space: Sufficient free space for virtual hard disks (e.g., 40–60 GB per VM).
  5. Installation Media: ISO image of the guest OS (Windows, Linux, etc.) or a physical disk.
  6. Administrator Privileges: Enabling components and configuring Hyper-V requires administrator rights.

💡 Tip: Check if virtualization is enabled by running in PowerShell:
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
If the state is Disabled, enable the feature via Control Panel.

Step 1: Enable Hyper-V and Verify Virtualization Support

Hyper-V is disabled by default in Windows. You need to activate it as an operating system component.

  1. Open Control PanelProgramsTurn Windows features on or off.
  2. Find Hyper-V in the list and expand it. Check the boxes:
    • Hyper-V
    • Hyper-V Management Tools
    • Hyper-V Platform
  3. Click OK and wait for the installation to complete. The system will prompt for a restart—perform it.

After restarting, Hyper-V will be available. For a quick check, open Hyper-V Manager via Windows search (type "Hyper-V").

Step 2: Create a Virtual Switch for Networking

By default, virtual machines are isolated from the network. To provide them with internet and local network access, create an external virtual switch.

  1. In Hyper-V Manager, select Virtual Switch Manager from the right-hand pane.
  2. Under Virtual Switches, click Create Virtual Switch.
  3. Select External as the type and click Create.
  4. In the External network field, select your physical network adapter (e.g., "Ethernet" or "Wi-Fi").
  5. Check Allow management operating system to share this network adapter (this is optional but simplifies setup).
  6. Click OK. The switch will be created, and the host system may temporarily lose network connectivity (it will automatically reconnect).

⚠️ Important: If you have a laptop, an external switch may not work correctly when switching between Wi-Fi and Ethernet. In such cases, consider using an Internal switch and configuring a bridge in the guest OS.

Step 3: Create a New Virtual Machine

Now let's create the actual virtual machine using the wizard.

  1. In Hyper-V Manager, click NewVirtual Machine in the right-hand pane.
  2. Before you begin: click Next.
  3. Specify name and location:
    • Name: e.g., Windows10-VM.
    • Location: leave the default or specify another drive with sufficient space.
  4. Assign generation:
    • Generation 2 (recommended): supports UEFI, faster boot, bootkit protection. Compatible with Windows 8/10/11 and modern Linux.
    • Generation 1: for older OSes (Windows 7, older Linux). Only choose if required.
  5. Assign memory:
    • Startup RAM: e.g., 4096 MB (4 GB) for Windows 10.
    • Enable Dynamic Memory: can be enabled to allow the VM to use memory as needed (but for performance, allocating a fixed amount is better).
  6. Configure networking:
    • Select the previously created external virtual switch (e.g., External Virtual Switch).
  7. Connect virtual hard disk:
    • Select Create a virtual hard disk.
    • Name and location: leave default or specify your own.
    • Size: for Windows 10, minimum 20 GB, but 40–60 GB is recommended. For Linux, 10–20 GB is sufficient.
  8. Install an operating system:
    • Select Install an operating system from a bootable CD/DVD-ROM.
    • Under DVD drive, select the ISO file (click Browse and specify the path to your ISO, e.g., D:\ISOs\Win10_22H2.iso).
  9. Click Finish. The virtual machine will appear in the Hyper-V Manager list.

Step 4: Configure Additional VM Settings (Optional)

Before the first boot, you can fine-tune settings for optimal performance.

  1. In the VM list, right-click the created machine and select Settings.
  2. Processor:
    • Number of virtual processors: 2–4 for Windows 10/11. Do not assign more than physical cores.
    • Processor weight: leave default.
  3. Memory:
    • If you didn't use dynamic memory, you can increase Startup RAM (but not more than 80% of physical RAM).
  4. Security:
    • For Windows 10/11 guest OSes, enable Secure Boot only if required (e.g., for Windows Sandbox). Usually not necessary.
  5. Automatic Start Action: can be configured to start the VM when Hyper-V starts, but for the first time, leave it disabled.

Click OK to save.

Step 5: Boot and Install the Guest Operating System

Now we'll boot from the installation media and install the OS inside the VM.

  1. In Hyper-V Manager, select the VM and click Start (or right-click → Start).
  2. After the VM starts, double-click it to open the console window (Virtual Machine Connection).
  3. In the VM window, press any key to boot from DVD (if it doesn't boot automatically).
  4. The installation process is standard:
    • Select language, keyboard layout, time format.
    • Click Install now.
    • Enter the product key (if required) or select "I don't have a product key".
    • Select the OS edition (e.g., Windows 10 Pro).
    • Accept the license agreement.
    • Choose installation type: Custom (to remove unnecessary components) or Upgrade.
    • Select the disk (virtual) and click Next. Installation will begin and may take 15–30 minutes.
  5. After reboot, complete the OOBE (Out-of-Box Experience) setup:
    • Set up an account (local or Microsoft).
    • Set a password.
    • Configure privacy settings (can be disabled).

Step 6: Install Hyper-V Integration Services

After installing the guest OS, install the integration components to improve performance and functionality (e.g., dynamic memory management, time synchronization, shared folders).

  1. In the VM console window, go to the Action menu → Insert Integration Services Setup Disk.
  2. In the guest OS, the autoplay should start. If not, open This PC and run setup.exe from the virtual DVD drive.
  3. Follow the installer instructions. For Windows guest OSes, the process is automatic.
  4. Restart the VM after installation.

💡 Tip: For Linux guest OSes, install the linux-azure or hyperv-daemons packages via your distribution's package manager (e.g., apt install linux-azure for Ubuntu).

Step 7: Configure Networking and Test

After OS installation, check network connectivity.

  1. In the guest OS, open Control PanelNetwork and InternetNetwork and Sharing Center.
  2. Ensure the adapter is connected (usually named "Ethernet" or "vEthernet (External Virtual Switch)").
  3. Test internet access by opening a browser.
  4. If the network doesn't work:
    • In the VM settings (Settings → Network Adapter), ensure the correct switch is selected.
    • In the guest OS, update the network adapter driver (for Windows, these usually install automatically with integration services).
    • Restart the VM.

Verify the Result

You have successfully created a virtual machine if:

  • The VM starts and boots into the guest OS.
  • The guest OS runs stably (no freezes, responsive interface).
  • Networking functions: you can open websites and ping external addresses.
  • You can install programs inside the VM.
  • Integration services are installed (on Windows, check "Programs and Features" for "Hyper-V Integration Services").

Additionally, check performance: open Task Manager in the guest OS and verify that allocated resources (CPU, memory) match the settings.

Common Issues and Solutions

1. Hyper-V fails to enable or shows an error

  • Cause: Processor doesn't support virtualization, it's disabled in BIOS, or Windows Home edition is used.
  • Solution:
    • Enter BIOS/UEFI (during boot press Del/F2/F10) and enable Intel VT-x / AMD-V.
    • Check Windows edition: winver. If Home, Hyper-V is unavailable—use VirtualBox instead.
    • Ensure there are no conflicting hypervisors (e.g., VirtualBox with Hyper-V enabled). Disable them.

2. "Not enough memory" error when creating VM

  • Cause: More memory allocated than physically available, or dynamic memory with incorrect settings.
  • Solution: Reduce VM memory (e.g., to 2048 MB) and/or close other applications on the host.

3. Network in VM doesn't work

  • Cause: Incorrect virtual switch, missing drivers in guest OS.
  • Solution:
    • Verify the external switch is selected in VM settings.
    • Install Hyper-V integration services (see Step 6).
    • For Linux: ensure hv_netvsc modules are loaded (lsmod | grep hv).

4. OS installation freezes or is slow

  • Cause: Insufficient VM resources, ISO image issues, outdated components.
  • Solution:
    • Increase the number of virtual processors (but not more than physical cores).
    • Verify ISO integrity (redownload or use a different one).
    • Enable Memory Buffer or Memory Weight only if needed (can slow down performance).

5. "Failed to initialize hypervisor" error

  • Cause: Hyper-V service not running, or conflicting features enabled (e.g., Hyper-V and VirtualBox simultaneously).
  • Solution:
    • Restart the Hyper-V service: in PowerShell as admin Restart-Service vmms.
    • Disable other hypervisors: in "Turn Windows features on or off", uncheck VirtualBox/VMware if present.

6. VM fails to start after creation

  • Cause: Incorrect ISO path or VM configured for wrong boot order.
  • Solution:
    • In VM settings → FirmwareDVD drive, specify the correct ISO.
    • Ensure in FirmwareBoot order the DVD drive is above the hard disk.

F.A.Q.

Can I create a virtual machine in Hyper-V on Windows 10 Home?
How much RAM can I allocate to a virtual machine?
How to install a guest operating system on a virtual machine?
What to do if Hyper-V won't enable in Windows?

Hints

Enable Hyper-V and check virtualization support
Create a virtual switch for networking
Create a new virtual machine
Configure the virtual hard disk
Prepare the installation media and start the VM
Install the guest operating system
FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community