English (change)

Here is how to use VirtualBox to install & emulate virtual operating systems to run in Linux. Launch Windows, for example, rather like any other application, with no reboot requirement. Hey, Windows even loads faster than the real thing (not that that's hard.) Or compare alternative operating systems. You can add as many as you like.
Dual or multi booting is all well and good but, for many common tasks, you just need to switch between, say, Karmic and another OS for a few minutes, then go back. What a waste of time restarting your PC, twice, for that.
Cue VirtualBox.
Ubuntu & Debian, Nginx (beats Apache), MySQL, PHP-FPM, Xcache, WordPress, WP MU, Drupal etccccc
In simple copy/paste steps .. from zero to hero.
Scroll down for the full series index.
Wake up and smell the Ubuntu! Hope it helps. the_guv
Simply put, this is the bees-knees. Some may be tempted to call it the dog's danglies or the billy bollocks (neither of which, by the way, were Ubuntu editions). It gives second-to-none Windows virtualisation, and is open source. Sun of a gun, it's a Sun Microsystem thing. It supports casing most OS'es.
Let me say more ..
Install and run guest OS apps almost seamlessly. With Windows, boot up, shut down and reboot it in a fraction of the time it takes normally to load or unload within a dual boot system or on its own (because a rack of those pointless services don't get cranked up). With VB - and especially the recently launched VB3 - you may well wonder why on earth anyone would bother with dual boot anymore, or apps such as Wine (which in fairness has been darned handy in the past and, actually, I continue to use too).
I use Virtualbox for running non-Linux apps that to date have no equal, like Photoshop and Camtasia, and for testing Linux web and desktop setups. I tested early Karmic Koala Desktop release candidates on it, for example, before porting later builds to a dedicated partition.
Note the Dynamic Kernel Module Support (DKMS) that is installed alongside. That's so that, when we upgrade to a new Ubuntu kernel, VB isn't cocked up by the updated modules.
To install virtualbox, therefore, we do this:-
sudo aptitude install virtualbox-3.0 dkms
The latest version of VirtualBox is 3.0.12. I haven't tried, but you could try using sudo aptitude install virtualbox-3.0.12 dkms rather than sudo aptitude install virtualbox-3.0 dkms. Then again, most likely it's not yet available in Ubuntu's repositories.
Installation is dead simple, just follow the prompts.
Regarding the RAM allocation, it depends how much you've got to spare but, bear in mind, the RAM will only be allotted to the guest while it's running.
Re. Disc space, again, it depends how much you can afford, or need, to give.
For instance, of my Linux host's 4gB RAM, 128 mB video card and 500gB disc space, I allocate 512 mB, 36mB and 30gB respectively to guests.
One config screen will tell you a new user group is being set up, called "vboxusers" and, of course, you need to be a member of that group. No worries ..
When installation has finished, pop open a Terminal and type:-
sudo usermod -G vboxusers -a username
.. where username is your Linux username. So now you are a member of the Virtualbox group.
To start Virtualbox, goto Applications > System Tools > Sun Virtualbox
Once installed, open the app and click on "New", and follow the instructions to install your OS, just as you would normally.
F'rinstance, if it's Windows XP, you can use my Perfect Windows PC Install to ensure security.
If you're reinstalling VB, you needn't bother reinstalling operating systems if you don't want to. Just use the machine states from a previous Virtualbox installation, and save serious time.
Check out this cute-as tip:-
Guest Additions improve the performance of the guest OS, in a bunch of ways. Say, you want full screen? Course you do! Install Guest Additions.
To install them open Virtualbox, then one of the guest operating systems. The virtual OS dialogue appears:-
This is handy, for instance, if you want to create an image in Photoshop (via Virtualbox/Windows), before adding it to your local Linux-based web files.
If your guest Windows system is running:-
If the guest OS isn't running:-
Open Virtualbox > click on Settings > click on Shared Folders .. and follow the above procedure
Now, use your guest as normally you would, were it a primary system, and switch back and forth between the host Linux and however many guest systems.
Set up Koala .. tweak it to perfection .. & maximize productivity .. for work & play.
That's what the Karmic Koala Bible does, stepped out in easy copy/paste guides.
From Linux initiates to intermediates, here's what you need.
HOW-TO Install/Partition Ubuntu 9.10 [KARMIC KOALA BIBLE #4] - GUVNR November 4th, 2009 at 8:59 pm
[...] Add Windows & Other Systems with VirtualBox Here is how to use VirtualBox to install & emulate virtual operating systems to run in Linux. Launch Windows, for example, rather like any other application, with no reboot requirement. Hey, Windows even loads [...] [...]
Boris Matthews November 22nd, 2009 at 4:39 am
Hey, Gov!
Good stuff on your page(s). I have just moved up to Karmic, and want to a documents partition. Since I use Open Office (in Ubuntu and in Windows), I think I should be able to read Open Office files from either OS if they are on the common documents partition. Right? (Or am I out to lunch?)
Also wanted to thank you for your piece on VBox. I have used VBox previously with XP and Jaunty. Haven't gotten that far yet with Karmic and W 7 because I upgraded the CPU and HDD.
Anyway, thanks for your good info. Keep up the good work.
Boris
the_guv November 24th, 2009 at 12:38 pm
@Boris .. yes, you can do that. Open Windows in VB and then click on Devices > Shared Folders, and store your docs in there. But. Have to say, you'll be wanting a fairly beefy PC to access your Shared Folder quickly.
Big cheers m8.
HOW-TO Install & Perfect Ubuntu 9.10 [KARMIC KOALA BIBLE #1] - GUVNR November 30th, 2009 at 9:09 pm
[...] Emulate Virtual OSes with VirtualBox HOW-TO install & emulate virtual operating systems, Windows for example, to run just like any other application in Linux, with no need to reboot. [...]
Ken December 6th, 2009 at 4:41 am
Awesome stuff! Wish I'd read it before making my secondary HDD disappear messing about with gparted
Easily one of the best guides I've come across and amusing to boot.
Cheers mate, have a pint on me
the_guv December 7th, 2009 at 9:34 am
@Ken .. big cheers, appreciated, will drink it wisely, so that's after breakfast.
EAZY February 19th, 2010 at 2:21 pm
Hey the virtual OS does not recognise any usb devices.How do i go about it?
the_guv February 22nd, 2010 at 11:39 am
install guest additions as above, then:-
Devices > USB Devices > click on whatever you need to hook up.
Montandy May 1st, 2010 at 5:26 am
Great stuff here. One quibble -- I don't think VB is open source unless you go out of your way to install the open-source edition (OSE). I did so originally, but it wouldn't handle USB devices at all, and when I had to migrate to a new installation I couldn't find any coherent explanation of how to move my existing virtual machine. I wish the whole thing were open source, but it's a great program -- and I figure if I'm running Windows anyway (as my job requires), I shouldn't worry too much about using another proprietary (but free!) program to do it.
the_guv May 1st, 2010 at 6:20 am
cheers Montandy .. especially I agree with your first and last points
.. for a predominantly used OS, for sure it should not be virtual. That said, I use XP most days, but only ever within VB.
VB is 100% open source though and, I wonder, did you install Guest Additions (commonly there are USB problems without).
Montandy May 1st, 2010 at 10:51 am
I hate to be the bringer of sad tidings, and I am getting a little grey and fuzzy so maybe I'm all wrong about this, but I'm pretty strongly under the impression that there are two editions of VBox, closed and open-source, and the open-source version (which is the one Synaptic will install) does not include USB support. (See . This page itself is a little long in the tooth, which may say something about how much attention Sun/Oracle pays to the OSE edition.) I could be wrong about this -- it wouldn't be the first time. (I just spent an entire day recovering from a really stupid mistake in upgrading to Lucid.) So if there's a way to get OSE with full functionality, I'd sure like to hear about it! As I mentioned, the two big differences I've noticed are (1) USB support, and (2) ability to migrate machines/disks from previous installations.
the_guv May 1st, 2010 at 10:58 am
hey Montandy .. did you see this? ..
Restore Old Windows XP/Vista/7 in New VirtualBox Install
.. for the next time!
the_guv May 1st, 2010 at 11:21 am
hey Montandy .. got your email, tx ..
what version of VB are you installing from the linux repos? .. it may be that with older versions there was a problem, but this has worked for me, a/a.
I spose, in your vitual windows, you don't have any driver issues?
is a bit of a mystery .. you could try to *purge* remove and reinstall.