Creating Virtual Windows

Ever since I got my current notebook computer (over three years ago), I have wanted to install Windows into a virtual machine. A virtual machine is a computer environment that runs inside of another operating system. For example, my main computer operating system is Linux. With a virtual machine installed inside of Linux I can run another operating system as if I had an extra computer. However, because I was not sure on how to set up a virtual machine I have continued to dual boot between Linux and Windows. This means that each time I turn on my computer I have to decide which operating system I want to use. I have just a couple of programs that I use in Windows that won’t work in Linux and therefore I have continued to dual boot just to run those programs.

Last weekend I finally decided to tackle the task of installing Windows into a virtual machine. And by doing this, I would also free up 150 GB of hard drive space that had been dedicated to my Windows installation. To get started I needed to do a complete backup of Windows and Linux. After doing a standard backup, I then cloned each one of my operating systems which were installed on two separate partitions of my hard drive. Cloning a hard drive means that I made an exact bit by bit copy of one hard drive onto another. In my case I cloned each partition on my internal hard drive onto an external hard drive. To do this I used the live CD made by Clonezilla.

VirtualBox imageThe virtual machine that I am using is a free piece of software called VirtualBox made by Oracle. I have had VirutalBox installed on my computer for almost 3 years but have never been brave enough to actually try to install Windows in the virtual machine.

After having both hard drive partitions backed up and cloned on the external hard drive I used Parted Magic to resize my Linux partition. The program Parted is a nondestructive hard drive partitioner. I was able to delete the 150 GB partition where Windows was installed and increase the size of my Linux partition to use the whole hard drive. I was very pleased to reboot my system and find that my Linux installation worked perfectly without having to make any adjustments.

My original plan was to create a virtual machine by installing the cloned a Windows partition. But I realized that there were many programs and add-ons that I have collected through the years. Therefore, I decided to install Windows from scratch into the virtual machine. I then installed the few programs that I needed.

While this probably sounds like it only took a couple of hours, it actually took me close to three days. Cloning the two partitions took several hours each. The Windows partition took over 10 hours, and the Linux partition took seven. In the end, I did not need to have cloned either partition since I installed Windows from scratch and my Linux installation continued to work after resizing the hard drive. However, having the partitions cloned gave me great security and confidence as I continued through the project. Another 6 hours were spent migrating data from the external hard drive into the Windows virtual machine. While there really wasn’t that much data to bring back into Windows, I was constantly fighting the system because Windows had to install more than 130 updates. If I wasn’t monitoring the computer it would randomly reboot to install updates which would break my data transfers. Fortunately only the virtual machine had to reboot, not the actual computer which was running Linux.

I won’t be doing any gaming with this Windows installation. A virtual machine runs on limited resources. The few programs that I use Windows for are neither real-time critical nor processor intensive.

It is nice to use Windows without having to reboot my computer. I would normally have to boot into Windows once a week to do certain tasks, but am now able to turn on Windows for a few minutes to do what I need to do whenever I want.

While VirtualBox seems to work well for my needs, it may not be for everyone. There was quite a bit of reading that I needed to do to understand how to get some of my hardware working inside Windows. If you are needing to use the virtualized operating system for processor intensive tasks, then a virtual machine may not be your best option. Since I have 3 GB of RAM on this computer, I dedicated 1/3rd of that to the Windows installation.

Have you played around with virtual machines? Run into any major reasons why you would tell people to avoid them? I was afraid some of my needed hardware would not work, but everything works as if I was running Windows natively on the computer.