How to install Ubuntu Desktop 18.04 LTS in Hyper-V on Windows 10



In this blog post, I will show you how to install and setup Ubuntu Desktop 18.04 LTS in Hyper-V. Since Hyper V comes shipped with Windows OS (Except Home Edition), chances are that you already have Hyper V available in your system, ready to be used.

Please note that you can install only LTS version on Hyper-V. I tried to install non LTS version and it did not work.

What is Hyper-V

Hyper V is a virtualization software from Microsoft which allows you to run multiple Operating system on your Windows Machine. Hyper V is exactly like VMware Workstation or Oracle VirtualBox, except that Hyper V is from Microsoft and is available for free for almost all the versions of Windows except Home version.

Which Windows Version Supports Hyper V and how to Enable it

Since Hyper V is a part of Windows OS, separate installation is not required. But Hyper-V is not enabled by default and to use it, it needs to be enabled. To enable Hyper V, the following requirements must be met.

  • Windows 10 Enterprise, Professional, or Education
  • 64-bit Processor with Second Level Address Translation (SLAT)
  • CPU support for VM Monitor Mode Extension (VT-c on Intel CPU’s)
  • Minimum of 4 GB memory.
  • The Hyper-V role cannot be installed on Windows 10 Home.

For detailed discussion please go through my blog on how to enable Hyper V in Windows.

Enable Virtualization Technology either Intel VT-x or AMD-V

To enable Hyper V, system must have Virtualization Technology Enabled in BIOS. For AMD processors, Virtualization is enabled by default, but in the case of Intel, VT-x may not be enabled by default. So, there are steps to be followed to enabled Intel VT in BIOS or UEFI. Please follow my post on Step by step guide to enable Intel VT-x or AMD-V in BIOS or UEFI in Windows 10 and Windows 8.

Before you start installing Ubuntu Desktop, we will have to create network connection switch first. Please follow the steps below

  • Open Hyper-V Manager
  • Click Virtual Switch Manager under action on the right pane in Hyper-V Manger screen

    Hyper V- Virtual Switch Manager

    Hyper V- Virtual Switch Manager

  • Select External and click on create virtual switch.

    Hyper V Manager - Create New Virtual switch

    Hyper V Manager – Create New Virtual switch

  • In the Virtual Switch properties dialog box, specify the name of your choice of the virtual switch and under Connection Type -> External Network, select your system Ethernet card and not your WiFi card. Click on OK to complete the process.

    Hyper V Manger - Virtual Switch Properties

    Hyper V Manger – Virtual Switch Properties

Once you have Hyper V setup successfully, Please follow the below steps to Install Ubuntu Desktop

Step 1 – Open Hyper V Manager

First step is to open Hyper V manager. If you have setup everything correctly, you can search for Hyper-V Manager in Taskbar or you can find the shortcut in Start Menu under Windows Administrative tools.

On the right hand side you will see New-> Virtual Machine. Click on Virtual Machine to launch New Virtual Machine Wizard and click Next.

Hyper-V Manager Screenshot

Hyper-V Manager Screenshot

Hyper-V Manager - New Virtual Machine Wizard Screenshot

Hyper-V Manager – New Virtual Machine Wizard Screenshot

Step 2 – New Virtual Machine Wizard – Specify Name and Location

In this dialog box, please enter the name of the Virtual Machine. In Our case, we can name our Virtual machine as Ubuntu Desktop. But you can specify anything according to your preference. There is a checkbox to chnage the location where the Virtual Machine Files will be created. If you leave this unchecked, default location will be used. Else Check the box to change the location. I normally leave it as default. But if you have disk space constraints, it better to specify the location in a different disk drive.

Hyper-V Manager - New Virtual Machine Wizard - Specify Name and Location Screenshot

Hyper-V Manager – New Virtual Machine Wizard – Specify Name and Location Screenshot

Step 3 – New Virtual Machine Wizard – Specify Generation

These days you can create two versions(Generation) of Virtual Machines. The latest one is Generation 2. Before generation 2 type virtual machines came into existence, there was nothing like generation 1 virtual machines. All virtual machines were the same. But from generation 2 virtual machines, older virtual machines were called generation one virtual machines. Generation one virtual machines supports legacy hardware. Generation 2 Provides the following new functionality on a virtual machine:

  • PXE boot by using a standard network adapter
  • Boot from a SCSI virtual hard disk
  • Boot from a SCSI virtual DVD
  • Secure Boot (enabled by default)
  • UEFI firmware support

But lets not complicate things for ourselves and choose Generation 1 and click next.

Hyper-V Manager - New Virtual Machine Wizard - Specify Generation dialog box Screenshot

Hyper-V Manager – New Virtual Machine Wizard – Specify Generation dialog box Screenshot

Step 4 – New Virtual Machine Wizard – Assign Memory

In this dialog box you will have to specify the amount of RAM you want to allocate to the virtual machine once the virtual machine is turned on. By default it is 1GB(1024 MB), but I normally prefer 2GB(2048 MB). Also, check Use Dynamic Memory for this Virtual Machine. This will allow Hyper V to adjust RAM according to the requirement of the Virtual machine.

Hyper V Manager - New Virtual machine Wizard - Assign Memory dialog box screenshot

Hyper V Manager – New Virtual machine Wizard – Assign Memory dialog box screenshot

Step 5 – New Virtual Machine Wizard – Configure Network

For virtual machines to be be able to communicate with other virtual machines or internet, it should have a network adapter. In this dialog box you will have to specify the network adapter. Please choose connection(external virtual virtual switch) from the drop down menu and click on next.

Hyper V Manager - New Virtual machine Wizard - Configure Network dialog box screenshot

Hyper V Manager – New Virtual machine Wizard – Configure Network dialog box screenshot

Step 6 – New Virtual Machine Wizard – Connect Virtual Hard Disk

Virtual Machines require hard disk space. This is the place where you decide how much disk space you want to allocate to the virtual machine. For Ubuntu Desktop, its recommended to select around 60 GB of disk space. Give Virtual disk a name of your choice. Please note that, not all of the allocated disk space will be used during the installation process. It is dynamically created, that is it will expand as the usage grows with the maximum limit of what you specify as the virtual disk size. Give the name of the virtual hard disk, specify the disk space and click next.

Hyper V Manager - New Virtual machine Wizard - Connect Virtual hard Disk dialog box screenshot

Hyper V Manager – New Virtual machine Wizard – Connect Virtual hard Disk dialog box screenshot

Step 7 – New Virtual Machine Wizard – Installation Option

In this dialog box you will be asked to specify the setup media. Check Install an operating system from bootable CD/DVD-ROM -> Image File. Browse to the downloaded ISO image file and click next.

Hyper V Manager - New Virtual machine Wizard - Installation Options dialog box screenshot

Hyper V Manager – New Virtual machine Wizard – Installation Options dialog box screenshot

Step 8 – New Virtual Machine Wizard – Completing the New Virtual Machine Wizard

This dialog box will show you the summary of the options you have selected. Click Finish to create the Virtual Machine. You will see the process for creating new virtual machine will begin. At the end end you will see Hyper-V Manager with the newly created virtual machine under Virtual Machine Box.

Hyper V Manager - New Virtual machine Wizard - Completing the New Virtual Machine Wizard dialog box screenshot

Hyper V Manager – New Virtual machine Wizard – Completing the New Virtual Machine Wizard dialog box screenshot

Step 9 – Hyper-V Manager- Virtual Machine Settings

After the virtual machine is created, you will see the name of the virtual machine listed under Virtual Machines.

Hyper V manager

Hyper V manager

Right click on the name of the virtual manager and click on settings to change Virtual machine Options. You will also see settings option on the right hand side, as shown in the screenshot below.

Hyper V_manager - Virtual Machine settings

Hyper V_manager – Virtual Machine settings

You can change the following most common virtual machine startup settings such as memory, network, CPU and so on…

  1. Change Allocated Memory

    here you can specify the memory with which the Virtual machine will start or boot. I normally choose 2048 MB(2 GB) and always check Enable Dynamic Memory.

    Hyper V - Virtual Machine - Memory Settings

    Hyper V – Virtual Machine – Memory Settings

  2. Change the number of Virtual processor

    Here you can specify the number of Virtual processors. Normally I set it to 2. It depends on the actual CPU your system has. Since I have i7 CPU (Which has 8 cores), I Normally allocate 2 core to the Virtual Machine.

    Hyper V Manager - Specify Processors for Virtual machine

    Hyper V Manager – Specify Processors for Virtual machine

  3. IDE Controller

    Here you can create virtual Hard drives and DVD drives. By default, one Hard Disk and one DVD drive is created. If you want additional ones, you can create it here.

    Hyper V Manager - Virtual Machine Settings - IDE Controller

    Hyper V Manager – Virtual Machine Settings – IDE Controller

  4. Network Adapter

    Here you can specify the network adapter to use for the Virtual machine.

    Hyper V Manager - Virtual machine Network Adapter settings

    Hyper V Manager – Virtual machine Network Adapter settings

  5. Floppy Drive

    Here you can specify the floppy drive. Floppy drives and things of the the past and almost extinct. You can leave it as default which is none.

    Hyper V Manager - Virtual machine Floppy Drive settings

    Hyper V Manager – Virtual machine Floppy Drive settings

  6. Enable RemoteFX 3D Video Adapter

    Enabling RemoteFX 3D Video Adapter give you access to rich graphics such as enabling full screen mode. This step is optional, but recommended.
    Go to settings and click on Add hardware. You will see RemoveFX 3D Video Adapter. Click on that and click Add.

    Hyper-V Settings - Add hardware

    Hyper-V Settings – Add hardware

    Make your selection from the drop down boxes and click OK.

    Hyper-V settings - RemoteFX 3D Video Adapter settings

    Hyper-V settings – RemoteFX 3D Video Adapter settings

  7. Change Virtual machine name

    If you wish to change the name of the virtual machine, you can do it here.

    Hyper V manager - Virtual machine Name

    Hyper V manager – Virtual machine Name

Step 10 – Start virtual machine

Now lets get started with the installation process. Click on the Virtual machine name you have created and click on start. This will start the Ubuntu VM. If you don’t see a new window popup, select click on connect. You will see the Virtual Machine window.

Hyper-V - Connect to Virtual Machine

Hyper-V – Connect to Virtual Machine

If you don’t see a new window popup, select click on connect and click on start to start the VM. You will see the Virtual Machine window with Ubuntu 2018.10 welcome screen.

Hyper-V - Ubuntu Installation - Welcome Screen

Hyper-V – Ubuntu Installation – Welcome Screen

Select Language from the left side pane and click on install Ubuntu.

Step 11 – Select Keyboard Layout

In this screen, you will have to select the keyboard layout. Make a selection based on your location and language preference. I choose English(US). Click on continue.

Hyper-V - Ubuntu Installation - Select Keyboard Layout

Hyper-V – Ubuntu Installation – Select Keyboard Layout

Step 12 – Update and other software

Here you have to select how you want Ubuntu to be installed. I choose Normal install and also check Install third-party software for graphics and Wi-Fi hardware and additional media formats. Click Continue

Hyper-V - Install Ubuntu - select installation type and other software screenshot

Hyper-V – Install Ubuntu – select installation type and other software screenshot

Step 13 – Installation type

You have to select how you want the OS to be installed. For clean install, I normally select Erase disk and install Ubuntu. That is, select the default. Click on Install Now.

Hyper-V - Install Ubuntu Desktop - Select Installation type screenshot

Hyper-V – Install Ubuntu Desktop – Select Installation type screenshot

You will be asked if you want to write changes to disk. Click on continue

Hyper-V - Ubuntu Desktop Installation - Write Changes to Disk

Hyper-V – Ubuntu Desktop Installation – Write Changes to Disk

Step 14 – Current Location

Enter your current location or click on the map to specify location and click on Continue

Hyper-V - Ubuntu Desktop Installation - Specify Location screenshot

Hyper-V – Ubuntu Desktop Installation – Specify Location screenshot

Step 15 – Create User

This screen creates a user. Enter your name, computer name and password and click continue.

Hyper-V - Ubuntu Desktop Installation - Create User

Hyper-V – Ubuntu Desktop Installation – Create User

Step 16 – Installation begins

Installation will begin. Wait for it to complete.

Hyper-V - Ubuntu Desktop installation progress

Hyper-V – Ubuntu Desktop installation progress

You will be asked to restart after installation completion. Click on Restart now.

Hyper-V - Ubuntu Desktop installation - System restart

Hyper-V – Ubuntu Desktop installation – System restart

Step 17 – Remove installation media

You will be asked to remove installation media. Just press enter to continue.

Hyper-V - Ubuntu Desktop Installation - remove installation media screenshot

Hyper-V – Ubuntu Desktop Installation – remove installation media screenshot

Step 18 – Login to Ubuntu

After Ubuntu restarts, You will see the Login screen. Login using the user you have created in the previous steps.

Ubuntu User login

Ubuntu User login

Ubuntu Login Screen

Ubuntu Login Screen

Ubuntu Desktop Screenshot

Ubuntu Desktop Screenshot

That’s it you are done.

Thanks for visiting my blog.

Previous Post:

Next Post:

In Category: Hyper-V, Ubuntu




Latest Posts

Underneath a boring IT professional lies a passionate student of computer science. I love computers and this blog is about everyday computer issues that a common man faces. Through this blog I try to reconnect with my long forgotten self.

Show 0 Comments
No comments yet. Be the first.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.