How to Install Ubuntu on Windows with Hyper-V

By
Milica Dancuk
Published:
February 25, 2025

Hyper-V offers a built-in way of creating and managing virtual machines on Windows. It allows you to install a virtual machine by utilizing a Windows native hypervisor.

This guide shows how to install Ubuntu on a virtual machine using Hyper-V on Windows.

How to install Ubuntu on Windows with Hyper-V

Prerequisites

  • A system running Windows (10 or 11).
  • An account with administrator-level privileges.
  • An ISO file for the Ubuntu installation (we're using Ubuntu 24.04).

Hyper-V Ubuntu Installation Guide

Hyper-V is not installed and enabled by default on Windows systems. The steps below outline how to enable Hyper-V and start using it to create an Ubuntu virtual machine.

Note: If you'd like to find out more about virtual desktop solutions, check our guide to VDI environments.

Step 1: Enable Virtualization in BIOS

Using Hyper-V requires virtualization enabled in the motherboard's BIOS. The exact steps for this process will vary depending on the motherboard:

1. Open the BIOS by rebooting your computer and pressing the BIOS button when prompted (F1, F2, F10, F12, or Delete, depending on the manufacturer).

2. The virtualization settings are located under the CPU or Advanced BIOS Settings category, depending on your system.

Note: The virtualization settings have different names on different systems. Look for items like Hyper-V, SVM, Vanderpool, VT-X, Intel Virtualization Technology, or AMD-V.

3. Once you enable the appropriate settings, use the Save and Exit option to confirm the changes.

Step 2: Enable Hyper-V

Before setting up the virtual machine, enable Hyper-V in Windows settings:

1. Open the Windows Start menu and search for Control Panel.

2. Select Programs.

Control Panel Programs

3. Click Turn Windows features on or off.

Turn on off Windows features

4. Check the Hyper-V option and click OK to confirm the changes.

Windows features Hyper-V

5. Wait for the installation process to complete before proceeding.

6. Click Restart Now to reboot your PC and apply the changes immediately.

Feature installed restart now

Step 3: Create Virtual Switch

After enabling Hyper-V, create a virtual network switch for the virtual machine to use:

1. In the Start menu, search for and open Hyper-V Manager.

Start Hyper-V manager search

2. Right-click the system name on the left-hand side of the window, and select Virtual Switch Manager.

Hyper-V Manager virtual switch manager

3. In the Virtual Switch Manager window, select the New virtual network switch option on the left-hand side. Set the virtual switch type to External and click Create Virtual Switch.

Create virtual switch button

4. Enter a name for the new virtual switch. In this example, we will use Ubuntu 24.04. Click OK to finish setting it up.

New virtual switch properties

5. A new window appears prompting you to apply network changes. Applying the changes can affect the network connection temporarily. Click Yes to confirm.

Changes may disrupt network warning

Step 4: Install Ubuntu

Hyper-V offers two options when creating a new virtual machine:

  • The Quick Create option lets you use a wizard to automatically download an operating system and install it on a virtual machine. It also allows you to add an ISO for systems that are not automatically available.
  • Alternatively, manually set up a new virtual machine and install an operating system from your hard drive or external media.

We will go over the process of installing Ubuntu 24.04 using both options.

Option 1: Quick Create

To use the quick create option, do the following:

1. In the Action drop-down menu, click Quick Create to start the wizard.

Hyper-V Manager action quick create

2. Select Local installation source option and locate the ISO.

Create virtual machine landing

3. Uncheck the Windows secure boot option. Click More options to set up a name for the new virtual machine. Select the Ubuntu 24.04 virtual switch in the Network menu.

Create virtual machine local options

4. Click Create Virtual Machine to start the setup process. Hyper-V automatically installs Ubuntu.

5. Once the installation is done, use the Connect button to start your virtual machine or the Edit setting button to change settings.

New virtual machine created successfully Ubuntu 24.04

Option 2: Manual Create

To manually set up an OS in Hyper-V, follow the steps below:

1. Before setting up a new virtual machine, download the Ubuntu 24.04 installation image from the official Ubuntu website.

2. In the Action drop-down menu, select New and click Virtual Machine.

Hyper-V Manager action new virtual machine

3. In the New Virtual Machine Wizard, click Next to start setting up the new virtual machine.

New VM wizard Hyper-V

4. Specify a name and optionally change the default install location for the new virtual machine. Click Next to proceed.

New VM wizard name and location

5. Choose the generation for the new virtual machine, then click Next.

New VM wizard generation 2

Note: Learn the difference between type 1 and type 2 hypervisors in our article What is a Hypervisor.

6. Assign the amount of memory to allocate to the virtual machine. Use at least 4GB of memory and enable dynamic memory. Click Next to continue.

New VM assign memory dynamic

7. Choose Ubuntu 24.04 as the virtual network switch, then click Next.

New VM configure networking switch

8. Use the Create a virtual hard disk option to create a new hard disk for the virtual machine. Assign at least 20GB of hard disk space and click Next to continue.

New VM connect virtual hard disk

9. Under the Install an operating system from a bootable CD/DVD-ROM option, choose Image file (.iso) and select the Ubuntu image you downloaded previously. Click Next to continue.

New VM installation options ISO file

10. The final step summarizes the new virtual machine setup. Click Previous to make changes, or click Finish to create the virtual machine.

New VM wizard completed

Step 5: Start the Virtual Machine

The new virtual machine appears in the Hyper-V Manager main window. Right-click the virtual machine name and click Connect to start it up.

Hyper-V manager VM connect

Conclusion

This guide showed how to enable Hyper-V and set up a new virtual machine with Ubuntu.

Next, see our in-depth comparison between Virtualbox vs. VMware.

Was this article helpful?
YesNo