The Beginner’s Guide To Creating Virtual Machines With VirtualBox

The Beginner’s Guide To Creating Virtual Machines With VirtualBox

Virtual machines can seem juuuuust a bit too geeky for most otherwise computer-friendly people. That’s sad, because it’s an easy, free way to try or use a separate OS without messing with your hard drive.

What’s virtualisation? Why get that nerdy?

Virtualisation is a whole computer concept unto itself, at least on the server/enterprise/big-fancy-corporate level. For home users, talk about “virtual machines” generally refers to x86 virtualisation. Basically, it’s software that allows an entire operating system (the “guest”) to run on another OS (the “Host”), whether in a container window, or full-screen, or in what’s sometimes called a “seamless” mode, where just one application is run from the “guest”

Why would you want to run a virtual machine on your computer? Plenty of reasons:

  • You like using one OS, but need just an app or two from another running in their natural environments—Office or Photoshop in Windows (nine times out of 10), a light-on-resources game, or maybe even some uber-cool Linux app.
  • You want to try out some new software, but would rather not chance it mucking up the pretty decent system you’ve got right now.
  • Web sites that don’t play nice with the operating system you’re running (we’re looking at you, almost every streaming site except YouTube).
  • You’re intrigued at the idea of trying out a Linux desktop, but the word “partitioning” doesn’t sound like how you want to spend a Saturday afternoon.

For those and many other good reasons, we’re going to walk through installing VirtualBox, a free, open-source virtualisation tool offered for Windows, Mac, and Linux desktops, and then get virtual copies of Windows XP and Ubuntu running inside them. Installing Windows Vista (Ultimate or Business only, unfortunately) or the Windows 7 beta is about the same process, and almost any Linux distribution is friendly as a virtual machine, but this will give you an understanding of the basic process. Before you even ask, by the way, you can’t run OS X as a guest system on Windows or Linux, but the VirtualBox can run most anything else—including those pre-rolled virtual images you find laying around the internet.

I have to note here that VirtualBox is far from the only competitor in this field—in fact, many in the tech community report that VMWare’s Workstation offers more features and handles multiple virtual machines better. But VirtualBox is relatively easy to set up, free to install, and works on all three major operating systems.

Setting up

VirtualBox’s Download page

Once VirtualBox is installed, launch it and you’ll arrive at a tauntingly empty screen:

Setting up

Let’s get something running in there. One big advantage of virtual machines over partitioning, dual-booting, and all that other hard-drive-tweaking stuff is the ability to install a system right from an ISO file. So if you’re testing out a Linux system, just download the ISO from Ubuntu, Fedora, or wherever. And if you’ve got an older XP installation disc, you can slipstream the latest service pack into it to create a minimal-hassle installation ISO image, and never bother burning it. While you’re at it, check out Adam’s guide to trimming down Windows to the bare essentials for a real speedy virtual installation ISO. If you’ve got your installation CD or DVD, however, that’ll play, too.

If you happen to have multiple SATA hard drives in your system, or a fast external SATA, the How-To Geek recommends placing your virtual machine image (the “guest”) on a separate physical drive from the machine running it (the “host”) for better multi-tasking and performance speed, plus a little less wear on a single hard drive. If not, don’t worry about it too much, and don’t go creating separate partitions for your machines, because you aren’t fooling anybody, least of all your system’s I/O bus.

Booting up

Assuming everything went well, you’ll see your new virtual system in the left-hand pane of the VirtualBox window. Huzzah! But before you hit “start,” let’s hit “Settings” and get it ready to roll the right way. The first category from the left-hand menu, General, lets you change how much base memory (or RAM) and video memory is given over to the virtual machine. Unless you’re planning to enable 3D effects, the default chosen for video memory should be fine, and the 3D acceleration box can remain un-checked. Let’s move down to “CD/DVD-ROM.”

Back at the main Settings window, head down to the Audio and/or USB menus and enable them if you’re going to be needing sound or access to thumb/external drives while you’re in your OS-in-a-box. Before we get to the “Shared Folders,” which is pretty darned convenient, let’s boot our system. Hit OK and close out your Settings window, then hit Start back at the main box to get rolling.

Whatever ISO or disc you’ve supplied VirtualBox with will load just like it’s on a machine for the first time, and you’ll go through the same installation process as if you were loading Windows/Linux/whatever on a hard drive for the first time. You’ll get occasional pop-ups from VirtualBox, “notifying” you that a mouse pointer is now in such-and-such a mode, the video display has changed, yada, yada—just hit OK and check the boxes so it doesn’t bother you further. Click through all the usual name/username/password/registration jazz you’re used to … All done? Great. After however many reboots, you’ll arrive at your fresh, clean desktop, which you could start using right away. You might notice, however, that the resolution is limited, the mouse might be jerky, and your sound or USB might not work out of the box. That’s where the Guest Additions come in.


installing VirtualBox Guest Additions in Ubuntu

You’ve got a well-oiled virtual machine at this point, but let’s make it real easy to pass files between your host and guest systems (terminology should be making sense at this point, no?). The VirtualBox makers have described the process for Windows and Linux users in a FAQ post, and I’ve described the virtual-Windows-inside-Linux process in more detail in our guide to running Windows apps seamlessly inside Linux. Giannis Tsakiris has also explained setting up sharing from an XP guest, and the process is much the same for any virtual Windows (although some of the network tools have changed names). Need a bit more? Here’s a quick video guide for a Windows guest system:

Now you’re up and running with a machine you don’t have to feel bad about messing with, or which lets your run the few apps you need in one OS while enjoying the benefits of the one you really want to work in.

Are you an experienced virtual machine user with suggestions on making the process smoother for beginners? Just starting out and need something clarified? Drop your questions and suggestions in the comments.


  • Hi
    I was introduced about the concept of virtual box from one of my friends a couple of days ago. I googled it and founf your article which is a fantastic introduction on virtual machines for dummies like me. I developed a research based web application on my ubuntu system. I am planning to make it live but at the same time because of resource constraints I want people to download an image of my machine and then run the application on their own machine.

    Is this possible to create virtual machine with some of the software (such as mysql, php, apache, ….) already installed.

    What is the best way (steps) to do it?

Log in to comment on this story!