How to install Windows 10 in a Virtual Machine on Ubuntu Linux 16.04 LTS

There are different virtual machines available for Linux/Ubuntu, but in this tutorial we are using Oracle VM VirtualBox. VirtualBox is a free and open source virtualization software from Oracle.

This post was written on November 2018, so instructions may vary in later versions. I installed VirtualBox 5.2 on Ubuntu 16.04 LTS (Xenial Xerus). The official (and hopefully responsibly updated) instructions are located on this external link.

1. Add VirtualBox to Ubuntu repository

On this step, you need to know the distribution codename of your Ubuntu version. To know it, open a terminal and type this command:


You will find the distribution codename after the field “Codename”.

To add VirtualBox to Ubuntu repository, go to Start > Software & Updates > Other Software > Button ‘Add…’

Enter the following APT line in the input box, substituting <mydist> by your distribution codename (in my case it was xenial):

deb <mydist> contrib

Enter password and close dialog.

2. Download Oracle signature

Download Oracle public key for apt-secure:

  • Here for Debian 8 (“Jessie”) / Ubuntu 16.04 (“Xenial”) and later (including at least Ubuntu 22.10 “Kinetic”)

You may have to right click on link and select “Save as”.

3. Apply Oracle signature

Go to the terminal and enter the command below:

sudo apt-key add oracle_vbox_2016.asc;

In my case, file was in Downloads folder so I used this command:

sudo apt-key add ~/Downloads/oracle_vbox_2016.asc;

If everything is fine, you will get this output:


4. Install VirtualBox

Open terminal. Go to Start > Terminal.
sudo apt-get update
sudo apt-get install virtualbox-5.2

5. Download Windows 10 ISO image

Visit Microsoft Media Creation Tool from this link.

Download “Microsoft Media Creation Tool”.

Run the tool from a Windows computer and follow these ISO creation steps:

  1. Accept Terms & Condition
  2. Select ‘Create installation media (USB flash drive, DVD, or ISO file) for another PC.
  3. Select language, architecture and edition.
  4. When askw which media to use, select “ISO file
  5. Wait until the process is finished.
  6. When it proposes to burn ISO on CD, just click on “Finish”.

Find the newly created “Windows.iso” file and copy or send it to your Linux/Ubuntu computer. I used a USB memory stick (filesize is 3,90 GB).

6. Configure Windows 10 on VirtualBox

Open Virtual Box by going to Start > Oracle VM VirtualBox.

Click on “New” button.

Name your OS and select the correct OS version (in my case it was “Windows 10 (64-bit)”.

Select memory size. I accepted the recommend amount.

Create virtual hard disk.

Select hard disk file type. I chose the proposed VDI.

Select “Dynamically allocated”.

Accept File Location and size.

It takes back to main screen. Select OS and click on Settings.

Go to “Storage” option.

Remove any empty optical drive that may exist.

Click on button “Adds new storage attachement” > “Adds optical drive”.

Select “Choose disk”  in dialog.

Select ISO file download in previous step.

7. Run Windows 10

Select Windows 10 OS from VirtualBox main screen and click “Start”.

Enter Windows registration key.

Windows installation screen will be displayed.

I chose the advanced option of just installing Windows.

Wait until Windows installation is finished.


Main sources:


  1. Is there an updated version of this process? I’m having trouble with getting VirtualBox running on Ubuntu 22.04 (jammy) with Windows 7 or 10. I need to segregate the Windows apps for a client I’m working with! I’ve already had to reinstall Ubuntu (backups failed me) and don’t have time to do it again!

Leave a Reply

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