top of page

Running Microsoft Windows inside Linux

It is popular to run Windows inside Linux by using a vm (virtual machine). A lot of Linux users, after they become proficient at using it, really dislike Windows. But some of us still need to support Windows or run it occasionally. The times that we can't get around using Windows, we would still prefer to do as much in Linux as possible as opposed to rebooting back and forth between Windows and Linux (as is possible with a dual boot system). So running Windows inside a vm can be a good alternative to a dual boot system.

​

Does that mean I can get Windows for free?

​

No. A virtual machine emulates a computer. Conceptually you can think of a vm as a computer. And just like with any computer, somebody is probably supposed to pay something if you install Windows on it.

​

Virtual Machine Options

​

The popular options are something from VMware (they have too many different offerings for me to phrase that any better, which for me tells me all I need to know to realize I should avoid them), VirtualBox, and KVM. I recommend using KVM via Virtual Machine Manager (also known as virt-manager). VMware is a commercial product and you are typically supposed to pay for it. There is a free version of something, but it has limitations in how you are legally allowed to use it. VirtualBox is a popular free alternative, but it also has limitations in how you are legally allowed to use a plugin that allows it to support USB 3.0. KVM is open source and fully free, but is typically considered hard to use compared to VirtualBox. But if you install Virtual Machine Manager and use KVM via that, it makes KVM much easier to use. Between VirtualBox and KVM, KVM probably has the most flexibility allowing a variety of use cases.

​

virt-manager Tips

​

File Sharing

​

It is highly convenient to setup file sharing between Linux and the OS running the virtual machine: https://unix.stackexchange.com/questions/86071/use-virt-manager-to-share-files-between-linux-host-and-windows-guest

​

Backups

​

One of the advantages of virtual machines is it makes it easier to make a backup of the entire machine and all its' files in a certain state. In order to understand how to do backups, you need to understand the different files that will be created by your virtual machine. Once you understand this, the simplest way to do a complete backup is to turn off all your virtual machines, and then just make copies of the files you want to back up. Of course that is only "simple" if you truly understand these different files. So without further ado:

​

Image Files

​

These are the most important files. They contain all the hardware and configuration information about the virtual machine that is used by virt-manager (I could be totally wrong about that part...), but they also contain a complete copy of the hard drive data for that machine. These are large files, so backing them up is not always convenient or fast, but it sure is a great way to make sure you really backed everything up and can restore again later. On my setup, these are qcow2 files, but you might be using a different image file type. By default your image files are contained at /var/libvirt/images/

​

VM files

​

This one person on the internet says there are also VM files. What are these mysterious files?  Do they need to be backed up? The world may never know...

​

Clone Files

​

Virt-manager also gives you ability to create multiple clones of your virtual machines. What files does doing this create? Where are those files and what information do they store? Should I back them up? How would I use these backups later if my whole computer got blowed up? I wish I had the answers to these questions, then this might actually be a helpful reference.

(inside a virtual machine)

bottom of page