Creating a Windows virtual machine allows us to run a complete Windows installation on Linux or Windows. It will have full support for Windows software, and can also recognize peripheral devices. In this guide, we will create a Windows virtual machine in Linux Mint, Ubuntu, and Windows, using VirtualBox.
We prepared this guide on Linux Mint 17.2, Ubuntu 15.04 using VirtualBox 4.3, and Windows 8.1 using VirtualBox 5.04.
It should work on recent earlier and later versions too. If you run into any problems, leave us a comment.
- 1 Hardware Check
- 2 VirtualBox Installation
- 3 Have a Windows CD/DVD or ISO
- 4 Creating the Windows virtual machine
- 5 Windows virtual machine settings
- 6 Using a Windows virtual machine
- 7 Does a Windows virtual machine need an antivirus?
- 8 What are your reasons for creating a Windows virtual machine?
As we mentioned on the "What is a virtual machine" guide, there are some hardware requirements to create a virtual machine. We need enough RAM and CPU cores to support both the primary and the virtual operating system. But it's also important that our CPU supports IOMMU.
IOMMU stands for Input/Output/Memory Management Unit. It's what allows the system to share the CPU, RAM, and input/output devices with the virtual machine. Intel calls this technology VT-x (VT-d or VT-t). AMD refers to it as AMD-V.
If our CPU doesn't support it the technology, or it is disabled, VirtualBox will throw an error.
Don't worry, though. Most current PCs will support virtualization, and many older systems too.
Does my CPU support IOMMU (VT-x / AMD-V)?
If our PC has an Intel CPU, checking for virtualization support is as simple as visiting the Virtualization Technology List.
Every Intel Core i3/i5/i7 supports virtualization. Some Celeron or Core 2 CPUs support it too. We will even find it on a few low-end Intel Atom models.
If we have an AMD CPU, it's even simpler. According to an AMD spokeswoman talking to CNET, since 2009 "All CPUs AMD is currently shipping, except Sempron, include AMD-V".
Another easy way to check our CPU's virtualization support is by running SecurAble.
This freeware and portable utility will show at a glance if our CPU supports virtualization.
Enabling VT-x (VT-d / VT-t) for Intel
On modern AMD motherboards, we will find the AMD-V virtualization enabled by default. However, for Intel processors and motherboards, VT-x is disabled on most systems.
We need to enter the BIOS/UEFI of our motherboard to enable it. To enter the BIOS, we usually have to press Delete or one of the F2-F12 keys when the system starts.
Just look for the "Press XX to enter setup" bit on the POST screen or the motherboard manufacturer's logo screen. On your system, you might find it with different wording.
Once inside the BIOS / UEFI, we need to search for the feature. We could find it in sections such as CPU Feature...
...or even System Security...
...and Security -> System. Probably the last place someone would look.
On some motherboards, it could even be buried under three or four sub-menus, such as Chipset -> North Bridge -> Tylersburg IOH Configuration -> Intel (R) VT for Directed I/O Configuration.
If you have trouble locating the option on your BIOS, check your motherboard's manual. You can also google your motherboard's model about virtualization.
How much RAM will I need?
We don't need 16GB RAM to set-up a Windows virtual machine on our computer. Usually, a 4GB system is enough for running a single virtual machine. Especially if our primary OS is Linux.
Ubuntu and Linux Mint need at least 1GB RAM to work properly and without much slowdown. Giving 2GB RAM to the Windows virtual machine will make sure that both the main and the virtual OS have enough of RAM.
In theory, we can run a Windows virtual machine on a system with just 2GB RAM. But it's far from the ideal scenario. It's easy to end up with a slow system and a slow VM, or even make the system crash because of low RAM.
To install VirtualBox on Windows, we just need to download and run the Installer.
The easiest way to install VirtualBox on Linux Mint and Ubuntu is through their software managers.
On Ubuntu, we can install it through the Ubuntu Software Center.
On Linux Mint, we will find it in the Software Manager.
For details on the installation, or a command line alternative, check out our guide: Install VirtualBox in Linux Mint / Ubuntu.
Have a Windows CD/DVD or ISO
Since we want to create a Windows virtual machine, it follows that we need a copy of Windows.
We can grab a free ISO for any version of Windows 7, using the Digital River mirror you can find here. The resulting installation will work for 30 days as a trial without activation.
If we prefer Windows 8.1 or Windows 10, we can download the Windows Enterprise Evaluation, which will last us 90 days.
Why are we talking about Windows trials and evaluations? You see...
A permanent Windows virtual machine needs Windows activation
A virtual machine is like "The Matrix" for the operating system inside. In other words, the OS doesn't know that it is in a virtual machine. It works like it would on any physical PC.
That means that if we want a permanent installation on our Windows virtual machine, we need to activate Windows. And, to keep it nice and legal, we need to buy a Windows license.
There are some options for corporations with volume license Windows Enterprise edition. But this scenario would be out of reach for most of us.
Of course, the free option is to keep the Windows virtual machine until the trial runs out. When this happens, we can delete the VM and remake it from scratch. There's no law against it. And it's a minor inconvenience, once every three months for the Windows 8.1 and Windows 10 Enterprise Evaluation.
Creating the Windows virtual machine
Once VirtualBox is up and running, we click on "New" to create our Windows virtual machine.
We need to give a name to the virtual machine. If the name is descriptive, e.g. Windows 8.1, VirtualBox will select the proper Type and Version.
We can create a Windows virtual machine with any version of Windows. To create a Windows 10 virtual machine on VirtualBox 4.3, we select Windows 8.1, 32bit or 64bit.
It's important to choose the correct version. If we try to install 64bit Windows on a 32bit Virtual machine, we will get an error screen.
On the next step, we select how much RAM the Windows virtual machine will use.
For 32bit Windows 7 and Windows 8/8.1 installations, the recommended amount is 1024MB. But if we have RAM to spare, 2GB (2048MB) would be better for the VM's performance.
We can change the memory size option anytime, even after we created the Windows virtual machine.
Next, we create a virtual hard drive. This will be a file on our systems disc that will contain the operating system and the Windows virtual machine's files.
The default file type for a VirtualBox disk image is VDI. If we don't plan to run our virtual machine on another virtualization platform (VMware, Parallels, QEMU, etc.), VDI is the best choice.
By selecting the virtual hard drive to be dynamically allocated, we save space on our physical hard drive. A 1TB dynamic virtual hard drive that only has 15GB of data will only take up 15GB on the physical disk.
On the last step before creating the Windows virtual machine, we select the virtual hard drive's capacity and location on the disk.
On Linux Mint and Ubuntu, the default location will be within the /home/VirtualBox VMs/ folder.
On Windows, the default location is the C:\Users\(username)\VirtualBox VMs folder
After we hit the "Create" button, our Windows Virtual Machine is ready.
Windows virtual machine settings
Our new Windows virtual machine is ready to install Windows. But it's good to change some extra settings before we start the virtual machine for the first time.
On General -> Advanced it is convenient to set the Shared Clipboard and Drag'n'Drop as "Bidirectional".
This way we can copy and paste text from and to the Windows virtual machine. We can also copy files to and from the VM with a simple drag and drop.
For these features to work, we need to install the Guest additions on the virtual OS, which we will cover later on the guide.
On System, we can change the amount of RAM the Windows virtual machine has available, as well as the boot order.
The chipset is important only if there is some incompatibility with the virtual OS. The same goes for the rest of the settings on this tab.
On the Processor tab, we can select how many of our system's cores and threads will the Windows virtual machine access. On a system with an i7 4670k, with four cores and four threads, we can allocate up to 8 CPUs. One or two CPUs are fine, though, for most cases.
On the Display section, we can enable 3D Acceleration and 2D Video Acceleration, and give up to 256MB to Video Memory.
These settings, of course, are not enough to play demanding games in a VM. But they will help with simple games and video playback.
The Video Capture feature is useful for anyone wanting to create YouTube tutorial videos. VirtualBox can create a video of the VM with no external screen-capture program required.
Storage is an important stop before starting the VM. If we have Windows as an ISO, we need to select the "Empty" DVD icon...
...and load the ISO with the "Choose a virtual CD/DVD disk file" option.
If we have Windows on a physical disk, we can leave the option as is, and VirtualBox will use our DVD drive.
Finally, on the USB section it's a good idea to enable the USB 2.0 controller.
For this feature to work, we need to install the Oracle VM VirtualBox Extension Pack.
How to install the Oracle VM VirtualBox Extension Pack
We just need to download the latest pack from
Then we go to File -> Preferences...
...click on the Add package button...
...and select the downloaded .vbox-extpack file.
To Install, we have to accept the license agreement, which requires us to scroll all the way down for the "I Agree" to activate.
And that's it. Now every virtual machine can have USB 2.0 functionality.
Using a Windows virtual machine
With the settings done, we only need to start our virtual machine.
The Windows virtual machine will boot from the ISO or the DVD, just like a physical PC. We then go through the Windows installation, which is identical to the installation on a physical machine.
Once the installation has finished, we have a complete Windows system within our primary OS.
If we try to close the Windows virtual machine from the "X", a prompt will ask us what we want to do.
We can Save the machine state, as is, so we can return to the exact point we were, with all the programs running.
The "Send the shutdown signal" will start the Windows' shutdown procedure.
We should never select the "Power off the machine". It's like pulling the plug on a physical PC, a violent way to shut it down that could damage the operating system's files.
Finally, if at any time the mouse cursor get's "stuck" within the Windows virtual machine, we can return the control to the primary OS by pressing the right ctrl button.
Installing Guest Additions
Guest additions is an application that we can install within the virtual operating system. It improves the virtual machine's video capabilities and supports the shared clipboard and drag'n'drop functions.
To install guest additions, with the Windows virtual machine up and running, we access the Devices -> "Insert Guest Additions CD image..." option on VirtualBox.
Since this is the first time we install guest additions, VirtualBox will ask to download the disk image - it's about 55MB...
...and then insert it into the VM's virtual DVD drive.
The guest additions installer shows up as a DVD inside the Windows virtual machine.
We run the VBoxWindowsAdditions application...
...and at the end of the installation we must reboot the virtual machine.
Creating and restoring snapshots
Snapshots are one of the best features of a virtual machine. What they do is that they "freeze" the virtual operating system exactly as it is, with all the software and all the settings.
After a snapshot of a clean and functional system, we can delete all the system files, or install every malware known to man, and it won't matter. Restoring the snapshot will bring back the clean and functional OS, in an instant.
One way to create a snapshot, that we mentioned earlier, is by clicking the virtual machine's "X" button, and select "Save the machine state".
We can also create a snapshot with the Windows virtual machine powered off, using the "Snapshots" button.
We click on the "Create snapshot" button, and we give the snapshot a name. The description is optional.
After that, anytime we want or need to refresh our Windows virtual machine, we select the proper snapshot and restore it.
We can also choose to restore a snapshot when closing a virtual machine. If there is a snapshot, the "Power off the machine" option includes restoring this snapshot.
This will not damage the operating system, like the plain "Power off the machine" can. And it's an easy way to keep a Windows virtual machine always fresh.
How to connect peripheral devices to the Windows virtual machine
Have you ever had a scanner that only has drivers for Windows XP? A Windows virtual machine is the perfect way to use hardware that demands a specific operating system.
If we are running VirtualBox on Linux, before we connect our first USB peripheral device we first need to add our username, to the vboxusers group.
We just fire up a terminal (ctrl+alt+T) and type:
sudo usermod -a -G vboxusers (our username)
Notice the capital "-G". We remind you that Linux commands are case-sensitive.
After that, we need to restart the primary operating system. Once restarted, on any active virtual machine we right-click the USB icon, and we can connect any device to the virtual machine.
We can do the same from the Devices menu.
For the device to work, we need to install the drivers within the virtual operating system, no matter if it has working drivers on the primary OS or not.
Also, we can have a device connected either to the virtual machine or the main operating system. We can't have it on both at the same time.
Still, this feature can give a new lease of life on any Windows XP only device.
Does a Windows virtual machine need an antivirus?
A Windows installation without an active antivirus is criminal negligence. Especially with drive-by download malware that can infect a system just by visiting a website.
And we 're not just talking about shady or x-rated websites, but legitimate pages too.
Our Windows virtual machine can be infected with malware, just like any other Windows installation. Whether it needs an antivirus or not ultimately comes down to how we will be using it.
If we restore a snapshot every time we shut down the VM, any malware infection will disappear. If we don't use snapshots, it would be a good idea to have at least a freeware antivirus solution on the VM.
What are your reasons for creating a Windows virtual machine?
Do you have hardware that requires an old version of Windows? Do you want to have a Linux distribution as your primary operating system, and still be able to run Windows applications? Do you wish to experiment with shady websites and programs, with the safety of the snapshot?
Whichever is your reason to create a Windows virtual machine, let us know in the comments section.