Virtual machines allow you to run an operating system in a window on your desktop. Use them to run software made for other operating systems, experiment with different operating systems, and sandbox software.
There are several good free virtual machine programs, so setting up a virtual machine is easy. You’ll just need installation media for the operating system you want to install — this is free if you want to install Linux in a virtual machine, at least.
What’s a Virtual Machine?
A virtual machine program is a computer program that creates a virtual computer system, complete with virtual hardware devices. This virtual computer “machine” runs as a process in a window on your current operating system. You can boot an operating system installer disc (or live CD) inside the virtual machine, and the operating system will be “tricked” into thinking it’s running on a real computer. It will install and run just as it would on a real, physical machine. Whenever you want to use the operating system, you can open the virtual machine program and use it in a window on your current desktop.
Your virtual machine’s operating system is stored on a virtual hard drive — a big, multi-gigabyte file stored on your hard drive. The file is presented to the operating system as a real hard drive. This means you won’t have to mess around with partitioning.
Virtual machines add some overhead, so they won’t be as fast as if you had installed the operating system on real hardware. Demanding games that require serious graphics and CPU power are one particular problem, so virtual machines aren’t the ideal way to play Windows PC games on Linux or Mac OS X — not unless those games are much older or aren’t graphically demanding.
Why You’d Want to Create a Virtual Machine
Aside from being good geeky fun to play around with, virtual machines have a number of serious uses. They allow you to experiment with another operating system without leaving your current operating system. They’re a good way to play with Linux, or at least a new Linux distribution, without actually installing that Linux distribution on your current hardware or even just booting to a live CD or USB drive. When you’re done with an operating system, you can just delete the virtual machine. A virtual machine is also a great way to test out a new version of Windows. When the Windows 9 preview comes out, you can avoid potential system instability by installing it in a virtual machine to play with it rather than installing it as your sole operating system.
A virtual machine also gives you a way to run another operating system’s software. So, if you’re a Linux user, you can install Windows in a virtual machine and run Windows desktop programs in that virtual machine. Mac users can also use virtual machines to run Windows software. Even Windows users could benefit from a virtual machine allowing them to run Linux software in a virtual machine environment rather than dealing with Cygwin or using a dual-boot configuration.
Virtual machines are also “sandboxed” from the rest of your system, which means that software inside a virtual machine can’t escape the virtual machine and tamper with the rest of your system. A virtual machine can be a good place to rest out programs you don’t trust and see what they do. For example, when the “Hi, we’re from Windows” scammers came calling, we ran their software in a virtual machine to see what they would actually do — the virtual machine prevented the scammers from accessing the computer’s real operating system and files.
The sandboxing also allows you to run insecure operating systems more safely. If you still use an application that absolutely requires Windows XP, you could run it in a Windows XP virtual machine. Sure, it’d be ideal to leave Windows XP behind completely — but it’d be better to confine Windows XP to a virtual machine than to run it as a computer’s normal operating system.
Virtual Machine Programs
There are several different virtual machine programs you can choose from:
- VirtualBox (Windows, Linux, Mac OS X): VirtualBox is very popular because it’s open-source and completely free. There’s no paid version of VirtualBox, so you don’t have to deal with the usual “upgrade to get more features” upsells and nags. VirtualBox works very well, particularly on Windows and Linux where there’s less competition — it’s a good place to start out.
- VMware Player (Windows, Linux): VMware has their own line of virtual machine programs. You can use VMware Player on Windows or Linux as a free, basic virtual machine tool. More advanced features — many of which are found in VirtualBox for free — require upgrading to the paid VMware Workstation program. We recommend starting out with VirtualBox, but if it doesn’t work properly you may want to try VMware Player.
- VMware Fusion (Mac OS X): Mac users will need to buy VMware Fusion to use a VMware product, as the free VMware Player isn’t available on a Mac. However, VMware Fusion is more polished.
- Parallels Desktop (Mac OS X): Macs also have Parallels Desktop available. Both Parallels Desktop and VMware Fusion for Mac are more polished than the virtual machine programs on other platforms — they’re marketed to average Mac users who might want to run Windows software.
While VirtualBox works very well on Windows and Linux, Mac users may want to buy a more polished, integrated Parallels Desktop or VMware Fusion program. Windows and Linux tools like VirtualBox and VMware Player tend to be targeted to a geekier audience.
There are many more virtual machine options, of course. Linux includes KVM, an integrated virtualization solution. Professional and Enterprise version of Windows 8 and 8.1 — but not Windows 7 — include Microsoft’s Hyper-V, another integrated virtual machine solution. These solutions can work well, but they don’t have the most user-friendly interfaces.
Setting Up a Virtual Machine
Setting up a virtual machine is actually very easy. First, just download and install your virtual machine program of choice. Open it and click the button to create a new virtual machine. You’ll be guided through the process by a wizard that asks which operating system you’ll be installing. The wizard will choose the appropriate defaults for your operating system of choice, so you can go through the wizard just accepting the default settings if you like.
At the end, you’ll be prompted to insert installation media — for example, an ISO file with a Windows or Linux installer on it or a physical CD or DVD. The virtual machine will then boot and load the operating system from that installation media normally. The operating system installation process is normal, but it happens in a window on your desktop.
When you’re done with the virtual machine, you can shut it down or just close the window. When you want to use it again, open the virtual machine program and double-click the virtual machine.
Each virtual machine’s files are also stored in a folder on your hard drive, which you can copy to back them up or move them between computers. This is how the Portable VirtualBox allows you to take your virtual machines with you on a USB flash drive and use them on any computer you come across.