Install Ubuntu on Windows 10 using Hyper-V


Hyper-V is Microsoft’s hardware virtualization product. It lets you create and run a software version of a computer, called a virtual machine. Each virtual machine acts like a complete computer, running an operating system, and programs. When you need computing resources, virtual machines give you more flexibility, help save time and money, and are a more efficient way to use hardware than just running one operating system on physical hardware.

Hyper-V runs each virtual machine in its own isolated space, which means you can run more than one virtual machine on the same hardware at the same time. You might want to do this to avoid problems such as a crash affecting the other workloads or to give different people, groups, or services access to different systems. Ref.

Key features of the Hyper-V platform

  1. Portability – Features such as live migration, storage migration, and import/export makes it easier to move or distribute a virtual machine.
  2. Secure boot and shielded virtual machines help protect against malware and other unauthorized access to a virtual machine and its data.
  3. Hyper-V virtual machine provides a full-fledged computing environment such as memory, processor, storage, and networking. All these features and options can be configured in different ways to meet different needs.
  4. For disaster recovery, Hyper-V Replica creates copies of virtual machines, intended to be stored in another physical location, so you can restore the virtual machine from the copy.
  5. Hyper-V includes a remote connection tool for use with both Windows and Linux.

Steps to install Ubuntu on a Hyper-V

Download Ubuntu ISO-image from here (e.g., the “desktop” version).

Enable Hyper-V on Windows 10

Enable Hyper-V using PowerShell

  1. Open a PowerShell console as an Administrator.
  2. Run the following command:
If the command couldn’t be found, make sure you’re running PowerShell as Administrator.

When the installation has completed, reboot.

Enable the Hyper-V role through Settings

  1. Right-click on the Windows button and select ‘Apps and Features’.
  2. Select Programs and Features on the right under related settings.
  3. Select Turn Windows Features on or off.
  4. Select Hyper-V and click OK.

When the installation has completed you are prompted to restart your computer. Ref.

Create a virtual machine using hyper-v on windows 10

Start Hyper-V Manager from Administrative Tools.

Under the Actions pane, click on the ‘New’ > Virtual Machine option to launch the Virtual Machine Wizard.

New Virtual Machine Wizard will open, presenting the set of VM options that you need to configure. They include: Before You Begin, Specify Name and Location, Specify Generation, Assign Memory, Configure Networking, Connect Virtual Hard Disk, and Summary.

The Before You Begin section provides a short overview of what this wizard can do and how to use it. Read it and check the box Do not show this page again below if you want to skip this information in the future.

In the next section, you can configure the VM name and location. Ensure that the VM name is unique and allows you to easily identify the required VM. As for the VM location, you can either leave the default one, or you can create a folder and assign a new location of your choice. For this purpose, check the box below and click Browse.

On the Specify generation option, choose ‘Generation 1’.For more information on how to choose Generation 1 or 2, see here.

In the Generation section, you can choose the generation of the VM. The choice between Generation 1 and Generation 2 is mainly dictated by the guest OS that you want to install. Generation 1 VMs support 32-bit and 64-bit guest OSes and BIOS-based architecture. Also, they provide the functionality of the earlier versions of Hyper-V. Generation 2 VMs, on the other hand, support 64-bit Windows OSes and the latest versions of Linux and FreeBSD OSes and provide advanced virtualization features, such as Secure Boot. Take all aspects into account when choosing between the two generation types because you can’t change the VM generation after the VM has been created.

On the Assign Memory option, specify the amount of memory needed for the Virtual Machine. In the following section, you must specify the amount of memory (from 32 MB up to 12,582,912 MB) which will be assigned to the VM. The future performance of the VM will largely depend on the amount of allocated memory. Moreover, you can choose to use Dynamic Memory for this VM by checking the box below. This feature allows you to take a part of the memory available on a physical host and assign resources to the VM which needs it most.

On the Configure Networking option, choose the switch that you would want to use. A virtual switch allows virtual machines created on Hyper-V hosts to communicate with other computers. This setting can be changed later too.

The next step is to choose the storage, you can create or choose the virtual hard disk in this step. Configure the virtual hard disk requirements. In this section, you can create a new virtual hard disk, which requires specifying its name, location, and size. Or, you can use an existing virtual hard disk (of the VHD or VHDX format). Another option is to skip this step and attach a virtual hard disk later.

If you have decided to select Create a Virtual Hard Disk, the Installation Options section will appear where you can specify configurations right away or postpone it for later. Here, you can install a guest OS by choosing the ISO file. In this case, you can select one of the following variants:

  • Install an operating system later
  • Install an operating system from a bootable CD/DVD-ROM
  • Install an operating system from a bootable floppy disk
  • Install an operating system from a network-based installation server

Select one of the options and click Next.

Choose the operating system to install in this step, here you can use the iso file downloaded in the 1st step. There is also an option to install the operating system later.

The last section is Summary, which provides a short description of this VM. Look through it once again and check to make sure everything is correct. If so, click Finish to create the VM and close the wizard.

Once the virtual machine is created, right-click the virtual machine and select connect.

In the Virtual Machine Connection window, select Action > Start.

Ubuntu Virtual Machine would start booting up.

Install Ubuntu

Select ENGLISH and press Enter.

Select “Install Ubuntu” using up and down key and hit the Enter key.

If you want to customize your partitions, you can do that here.

Else select “erase the disk and install Ubuntu” and click on “Continue”.

Then click “Install Now” after selecting that it’s fine to erase the disk and install Ubuntu (this is for the virtual disk, so don’t panic).

The installation will take a while. Along the way, you’ll be asked a few easy questions that you have to answer (time zone, keyboard, etc.), as well as your name, hostname, user name, and password. These are for the Ubuntu machine, just like on a real system you’d be installing. Select the security options you want.

When all files have been downloaded/installed, which can take a while, you have to click on “Restart”. Just close the Ubuntu Window, and select the “Shutdown” option. Then double-click on your VM in the main VirtualBox window again (left panel). Ubuntu should start right away in a new window.

You’re now “in” Ubuntu.



Leave a Reply

Your email address will not be published. Required fields are marked *