Linux Windows

How to Set Up a Windows Virtual Machine in Linux

Christian Cawley 20-07-2016

Need to run Windows software in Linux? One of the typical answers is to install Windows in a virtual machine. If that sounds scary or overwhelming for you, don’t worry. Here’s a step-by-step guide to doing just that.


To get started, you’ll need the following things:

Now, the first two things are pretty easy for you to get. It’s rare to own a PC without a Windows license, even when you’re running Linux, but you’ll need one that has a virtualization feature.

Virtualization, if not enabled by default, can be switched on in the system BIOS. The path to doing this will depend on the hardware you’re using. For the best results, boot into your system BIOS How to Enter the BIOS on Windows 10 (And Older Versions) To get into the BIOS, you usually press a specific key at the right time. Here's how to enter the BIOS on Windows 10. Read More and look for references to Intel VT (on an Intel architecture PC) or AMD-V (on a PC with AMD CPU and motherboard).

This video explains what you should be looking for:

With regards to system RAM, while you might get away with some virtualization on old operating systems with 4 GB, you should be starting with 8 GB for the best results. The laptop used for this tutorial has 12 GB RAM.


Choosing Virtualization Software

Before installing Windows, you need to decide on your preferred virtualization application. Three are available for Linux:

  1. Oracle VirtualBox (Free) — Probably the most popular choice, and free, released as open source software under the GNU General Public License, version 2.
  2. VMWare Player (Free or $250) — The free version of the popular corporate virtualization tool VMWare Workstation. VMWare Player is free for domestic users.
  3. QEMU (Free) — Short for Quick Emulator, QEMU is capable of running a wide selection of operating systems, including many fringe and forgotten platforms.

While QEMU is arguably the superior option for Linux systems, we want a solution that can run Windows with a minimum of fuss and can be installed quickly. You’re free to choose any of the above, of course, but for this tutorial we’ll be using Oracle VirtualBox.

Install VirtualBox from the Software Center in Ubuntu 5 Great Tips for the Ubuntu Software Center [Linux] Read More  or from the corresponding application on your Linux distro. You can also use the command line. For Debian-based systems:

sudo apt-get install virtualbox 

Then install the VirtualBox guest utilities:

sudo apt-get install virtualbox-guest-dkms 

This will help you with moving data between the host system (your Linux PC) and the guest system (your virtual Windows environment).

Set Up Windows in Oracle VirtualBox

With VirtualBox installed on your Linux PC, launch the software.

Because we want a usable version of Windows, we’ll be selecting the options for Windows 7, but you should choose the settings that match the version you’re installing.



Start by clicking New, then give the virtual device a name. In the Type drop-down menu ensure that Windows is selected, and in Version, the correct Windows version. You can run pretty much anything from Windows 3.1 to date.

Click Next to continue, and in the subsequent screen, select the Memory size for the virtual machine. A default recommended size will be suggested based on the OS you chose and the hardware of your physical computer.


Click Next to create your virtual hard disk drive, again choosing the default option unless you have a particularly large amount of data to run in the VM.



Once done, hit Create, then select your prefered file type. If you’re just going to use the virtual hard disk with VirtualBox, hit Next, otherwise choose a different format as appropriate. You must then specify whether the virtual HDD should be dynamically allocated (i.e. it increases in size as required, to the pre-selected upper limit) or a fixed size. In most cases, you’ll want dynamic.

Click Next to continue, confirm (or change) the file name, location and size, then Create again to continue.

Installing Windows on Linux

With the virtual machine configured — think of it as building a PC but with virtual components — you’re now ready to install Windows. Whether you’re using a disc or a USB stick to deliver the ISO, now is the time to insert the media holding the ISO file.


Now, click the green Start arrow, and select the location of the source data — the Windows installer disc. Click Start, then wait as the virtual computer loads the Windows setup.


If you’ve installed Windows before, you should be familiar with this — if not, the wizard will help you through the process.

Launch Windows and Install Software!

If you’ve made it this far, you’re done. You should be able to boot into Windows and install software, either via DVD (thanks to the VirtualBox tools) or by downloading and installing.

All of your usual Windows applications should run as normal, restricted only by the hardware of your host computer — the physical PC onto which you installed VirtualBox. Using a virtual machine is probably the best way to get Windows apps and games running if things like Wine and PlayOnLinux 7 Ways to Play Old Windows & DOS Games on Linux Gaming on Linux is on the rise, but if you don't want to turn your PC into a game server then the answer is with old games, retro classics from the Windows platform. Read More  fail you.

Having a Windows VM that you can easily switch on and off at your convenience, while continuing with your daily Linux computing, is a massive advantage. If you need to run Windows software and have the hardware to support virtualization, then this is a great solution.

Do you run Windows in a virtual machine on Linux? Is this your preferred method for running Windows software? Tell us about it in the comments!

Related topics: Linux, Ubuntu, Virtual Machine, VirtualBox, Virtualization, Windows.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

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

  1. Melissa
    June 21, 2018 at 9:57 pm

    I have the new Ubuntu MATE 18.04 and had Wine 3.8. They won't run together because Wine configuration has not caught up with Ubuntu. Therefore, I can't run World of Warcraft. I have more than enough RAM and an 8 core processor. Gotta do something to have the best of both worlds.

  2. Naks Nag
    April 3, 2017 at 1:14 am

    Will my docs be physically written on the hdd... For eg. any cpp program i write on devC++ ? And do i really need a valid win license? Can I emulate(clone) dad's oem vista(show that the serials no.s are same)?
    Plz email me.

    • Christian Cawley
      April 7, 2017 at 7:39 pm

      Hi - the documents are on the HDD, but they're stored within a software HDD, virtualized hardware. To run Windows, you would need a valid licence -- you may get away with using a licence you have already, but possibly not if they're both online at the same time.

      Try it and find out!

  3. Barz
    February 9, 2017 at 9:24 pm

    It would be useful to run a Virual Machine with Mac. . . I never got sucess on running some software very useful on Mac

    • Christian Cawley
      February 10, 2017 at 4:54 pm

      We'll see what we can do about that...!

  4. Lazza
    July 22, 2016 at 11:26 pm

    Very good tutorial, although it should be noted that OEM licenses might give some issues.

    BTW as a Linux user, most likely you will need Windows once or twice a year, e.g. for upgrading a TomTom device to new purchased maps (or similar "things" with various devices). For this kind of situation, I find it much easier to download a legal and OFFICIAL virtual machine directly from Microsoft, no license required.

    You can find all of them here:

    You can choose between Windows 7, 8.1 and 10. The VMs are free, they run for up to 90 days and can be reinstalled (with one click) after they expire.

    • Christian Cawley
      February 10, 2017 at 4:54 pm

      Great tip, Lazza, thanks for sharing.