Hidden Linux : VirtualBox

VirtualBox is a
virtualisation manager. It allows you to install and run one operating
system inside
another. Here, for example, I'm running Windows XP
and the latest KDE 4 beta release of Kubuntu 8.04 inside
Kubuntu 7.10...
(Click for a larger view)
Both operating systems are fully functional. At the touch of a key I can flip them into full-screen mode and work with them as if they'd been natively installed. They boot up and shut down just like you'd expect -- except that all happens inside a window -- or I can simply tell VirtualBox to save their current state to disk. That not only means that WinXP essentially boots in about 4 seconds, but whatever I was working on at shutdown is exactly as I left it.
So how do you make all this magic work for you? Just follow these steps...
There are two versions of VirtualBox. You'll probably find the Open Source Edition (OSE) in your distribution's repositories. There's also a Personal Use and Evaluation License (PUEL) edition. The main difference between the two is that PUEL adds USB support. If you opt for OSE, USB devices won't work in your guest operating system.
Download either the binaries (PUEL) or OSE from here. It's also a very good idea to download the manual!
If you're going the binaries route, heed the instructions! Some additional libraries may need to be added to your system. In the case of Debian and Ubuntu, this is just a matter of adding a line to the /etc/apt/source.list file. (Details of what to add is at the bottom of the first download page.)
Select the appropriate platform and continue. You'll be offered the choice of using Sun's Download Manager (SDM) or just clicking to download the file. SDM didn't work for me. It started okay then got locked up displaying a license window so I just right-clicked on the .deb file and downloaded it manually.
After that a single click installed VB and all the required dependencies.
Up and running... almost
During installation, a new group is created called vboxusers. In order to run a virtual machine you have to make yourself a member of that group. Here's how to do so in Kubuntu;
- Choose System Settings / User Management
- Click the Administrator Mode button.
- On the Groups tab, select Show System Groups.
- Scroll down to find vboxusers, right-click it and choose Modify.
- In the Edit Group box, scroll down to find the names of the user(s) you want to add, select them, click Add then click OK.
- Log out an log back in.

From here on in it's pretty straightforward. The VirtualBox GUI guides you through the virtual machine installation process and you'll find extra information in the excellent User Manual.
A couple of things you may overlook in your haste to get started:
- You can install other operating systems from either CDs, DVDs or .ISO files. That means there's no need to burn that latest Linux distro to disk in order to try it out.
- Once you've got a guest operating system up and running, click on Devices and choose Install Guest Additions. That'll add a number of extra features and enhancements (see the User Manual for details), including the ability to properly utilise the OS in full-screen mode.
<--Previous Hidden Linux Next Hidden Linux -->



Comments
can you use this virtualization to access an EXISTING image of an OS instead of installing one from scratch? or is there a way to migrate an existing OS image into a virtualbox image?
Posted by: walter | August 31, 2008 12:57 PM
You only need to install an antivirus in your Windows guests if you use them on Internet as usual.
As they are "sandboxed" by the virtual machine, they cannot harm files on your host (Linux, for example).
Theoretically, they can damage files you share between the host and guest, but to be realistic, most people won't share executables. Even if you did share executables, the odds of running across a virus that could successfully infect an ELF binary (Linux) from an EXE (Windows) is practically nil in the real world. The two systems are just too different.
You should be aware, though that virtual machines cannot access the video card directly for DirectX 3D applications, so don't bother trying to run high performance games.
Seamless mode allows you to change which OS has control over your keyboard and mouse without using special key settings. You seamlessly move from one to the other.
Hope that helps answer a few questions! =)
Posted by: T.J. | August 23, 2008 4:00 AM
ka2, and neither did you in your comment. What is "seemless mode"?
Chris, Windows is always susceptible to viral infections no matter how it is installed, but the damage to your data should be limited to the Windows guest itself and would not affect your Linux host (UNLESS you share your files on your host to the Windows guest and give it full write access, or something else like this).
-c
Posted by: Chris | April 20, 2008 8:49 PM
I'm surprised that you didn't mention seemless mode which is one of the big advantages VirtualBox has over its competitors.
Posted by: ka2 | April 17, 2008 7:35 PM
Chris:I'd recommend it. Many of those How quick does Windows get infected tests use virtual machines just like this.
Posted by: Geoff | April 17, 2008 6:02 PM
Is it necessary to install antivirus if you run a windows OS with this?
Assuming its not going to be used for anything internet related - just to run the odd windows app (accounting software, which is still a bit of a sore point in linux).
Posted by: chris | April 17, 2008 2:10 PM