Virtualization done easily with VirtualBox

Date February 11, 2008

VirtualBox is a great program I’ve been exploring these past few weeks. The folks at Download Squad wrote a good article about VirtualBox. With it you can run your own virtual machines inside your operating system of choice. Do you want to run Windows inside Linux (or vice-versa)? Or, do you want to learn how to setup a small network inside your own computer? The possibilities are great with Virtualbox.

The program is open source, a great alternative to the free (but closed) VMWare. You can run it on Windows, Mac OSX, and Linux (for Ubuntu it is already inside Synaptic).

How does it work? With VirtualBox you create a virtual computer with all the specifications you want to set: the amount of HD space, RAM, video memory, internet connection, if it’ll have a floppy disk, CDROM, and much more. Tweak it however you want. Once this virtual machine has been created, you can install an operating system and run it like you normally would on a desktop. You’re safe to try out whatever you want, if you do something wrong don’t worry your actual computer is safe.

At the moment I’m using it inside my Ubuntu Linux to test other Linux distros, without the need to reboot. My goal is to later install Windows and be able to work with both simultaneously.

Want to learn how to set it up? It is very easy to do.

1) Create your new virtual machine: press the button “New” (note: if you’re on Linux, run Virtualbox on root)

VirtualBox create new machine

2) Follow the simple, holding-by-the-hand wizard: choose the base OS.

Virtual box wizard

Virtualbox set OS

(you can even install Vista!)

3) Choose how much RAM

Virtualbox

4) Setup the HD: I always choose dynamically expanding image so it takes up just the amount of space it’ll need.

Virtualbox HD

5) Tweaking your virtual machine: here you can remove or install the peripherals you know you’ll need (I always remove floppy and mount CD/DVD-ROM drive). That way you can set realistic computer specs for your trials. To get to this screen, just select the newly created machine and click on Settings.

 

VirtualBox tweaking

6) Review all the details about your virtual machine

Virtualbox review machine

7) Done! Just click on Start. Please note that you’ll still need the original CD/DVD of the OS you’d like to run or install. Most likely it’ll run from your CD/DVD drive so insert the media before you click on Start. In this test I ran Xubuntu.

 

VirtualBox Xubuntu

Virtualbox Xubuntu 2

Now just have fun experimenting! To get your mouse pointer inside the virtual space just click on top of the window or press the right-Ctrl key. Hit the right-Ctrl key again to get your mouse pointer back outside your virtual machine. The OS can run a bit slower then you’d hope but that can be changed through the Settings, allocating more HD and memory.

Have you used virtualization? If so, share with us some of the cool things you can do with it.

 

 

If you enjoyed this post, make sure you subscribe to my RSS feed!

28 Responses to “Virtualization done easily with VirtualBox”

  1. LisaNo Gravatar said:

    Bought a Toshiba laptop a few months ago. A215-S7422. It was a retail purchase and I couldn’t find one with Windows XP at the price I got it for, about $500 after rebates (didn’t get the rebates yet). So I got stuck with Windows Vista, with 1GB ram, a speedy AMD Turion dual-core processor, and supposedly decent graphics. My last laptop was a Toshiba with a 133 MHz processor. That one came with the IBM mouse pointing stick in the middle of the keyboard. This new laptop has the Synaptics Touchpad instead, something I knew I would detest before I bought the laptop, but price trumps features in my case. After I brought the laptop home, I tried Windows Vista for a few days and detested it so much I installed Debian Etch in a dual boot setup. Anyone considering purchasing a Toshiba laptop to run Linux…don’t. It was a freakin nightmare to get the AMD/ATI proprietary video driver working after I finally found it on the AMD/ATI site. This is after months of google searching over the video issue and trying the very few blog tips I found. In the meantime, the laptop was using the default vesa driver and automatically logging me out of and killing the X server every few days, losing all my work and open browser tabs.

    I installed KVM so I could use Windows Vista when I have to without shutting down Linux, but KVM appears to be command line only and the necessary switches/flags required to initially set it up looked a bit too complicated for my taste. Then I saw someone else mention Virtualbox. I installed that, and the setup was a breeze. I downloaded the netinstall iso for Debian testing and tried to create an image using that, but I can’t get X to work all because of the detested Synaptics Touchpad. I’m using the laptop as a temporary web server until I replace a crashed web server, and wanted to create a sandbox to try out Drupal and Joomla (and get a handle on security issues since I see Drupal and Joomla probes in my web server logs) without messing with the web sites the laptop is currently serving.

    So…here’s the error messages if anyone has a clue…

    $ startx...
    ...
    (==) Using config file: "/etc/X11/xorg.conf"
    (II) Module already built-in
    (EE) AIGLX: Screen 0 is not DRI capable
    Synaptics Touchpad no synaptics event device found (checked 14 nodes)
    Query no Synaptics: 6003C8
    (EE) Synaptics Touchpad no synaptics touchpad detected and no repeater device
    (EE) Synaptics Touchpad Unable to query/initialize Synaptics hardware
    (EE) PreInit failed for input device "Synaptics Touchpad"
    expected keysym, got XF86KbdLightOnOff: line 70 of pc
    expected keysym, got XF86KbdBrightnessDown: line 71 of pc
    expected keysym, got XF86KbdBrightnessUp: line 72 of pc

    waiting for X server to shut down FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

    $

    If I could get this working, I plan on trying/installing Kubuntu, WinVista (keeping the dual boot strictly for BIOS updates and a GPS that requires Windows to load maps and performing other tasks/utilities, and any other tasks requiring Windows that won’t work with Linux will be virtualized if it works that way) and installing/trying a few other linux distros, something I used to do when I could pick up a desktop and use as a desktop or server for $200 back in the AMD 1 GHz days, these days those old computers are dead (dead power supply, motherboard problem, a few other problems, too many to swap around hardware anymore). Virtualization will enable me to experiment once again with different Linux distros and create some web development environments with Drupal, Joomla, ezPublish, and try out SugarCRM and other applications I’m interested in trying.

  2. GregNo Gravatar said:

    This will not work with most 3D games.

  3. GaryNo Gravatar said:

    It works very well. I have win98, XP, ubuntu, memphis. On the network adapter use “NAT” then you can use your internet connection in the virtual computer. Great way to experiment with different operating systems.

  4. baracudaNo Gravatar said:

    So, Since I am in Kubuntu, would I have to ” install” Win XP while I am in linux, or does it just start, like a liveCD does? I don’t think I want to sit through a Windows install procedure just to use XP, only here and there( mostly never).
    Would games be able to be played, instead of WINE? or is this feasible?

  5. Smith Data Processing Services » Blog Archive » links for 2008-02-12 said:

    […] Virtualization done easily with VirtualBox | (tags: virtualbox) […]

  6. JohnNo Gravatar said:

    Tried this on XP last year. Complete nightmare. Wouldn’t work and completely messed up the XP installation requiring a format and reinstall as every fix created another error. Learnt my lesson though. Now I wouldn’t touch it with a bargepole and if anybody is considering it I suggest you back EVERYTHING up and definitely don’t install it on your main computer. I know that this works for some but it definitely doesn’t work for all.

  7. K1 | Web · Resources · Networks » Blog Archive » My del.icio.us bookmarks February 12th said:

    […] Virtualization done easily with VirtualBox | - “With it you can run your own virtual machines inside your operating system of choice. Do you want to run Windows inside Linux (or vice-versa)? Or, do you want to learn how to setup a small network inside your own computer? The possibilities are great wit […]

  8. monkey2000No Gravatar said:

    VBox has… issues. Didn’t work at all on my brother’s Mac, had some really crazy and undocumented issues on my Vista laptop, wasn’t about to test it on my desktop.

    I’ll side with John here that it may work for some, but surely not all. I haven’t seen it run anything from Linux but I bet that has its shortcomings as well. If VBox starts making serious competition for the more reliable ones I may consider a retest, but for now it looks a little flaky.

  9. Sun purchases VirtualBox | said:

    […] Speaking of VirtualBox, Sun Microsystem has just announced that it has purchased innotek (the makers of Virtualbox). […]

  10. wizardforceNo Gravatar said:

    gee that’s funny, it works fine on my computer… then again I run linux not Mac or Windows. just a note though, virtualbox *does not* need to be run as root as is suggested, all that is required is adding your userid to the vboxusers group. to baracuda: you will need to sit through the entire install process for XP unless you can find a virtualized image of XP somewhere. also, because you’re effectively running XP on a virtual drive with virtualbox acting as a go between- you can play any game on the virtual XP install that you could with any normal XP install. to Lisa, Debian like you’ve noticed, requires a bit more work [understatement] to get the proprietary drivers working- you *might* have better luck w/ kubuntu although apparently some who run ubuntu varients also have problems with this particular set of drivers. try booting w/ a kubuntu live cd to check how it deals with your hardware.
    -cheers

  11. MetathioneNo Gravatar said:

    great post. i liked it…

  12. DaniloNo Gravatar said:

    @Metathione Thanks!

    @wizardforce great tips! I’m also running it on my Linux so no problems with it (yet). Should get even better since it got purchased now by Sun.

    @Lisa, these are very nice ways to use virtualization. For the error log, you might try VB’s own resources, at the moment I haven’t come across errors for troubleshooting. Their link is http://www.virtualbox.org/wiki/Community

  13. timbNo Gravatar said:

    Been using this for over a year on kubuntu/ubuntu works great, one of the easiest to use, recommend getting the one off there web site. The seamless mode is also great, you get a windows task bar a the bottom of your screen “Start menu and such” just like running it on your desktop, Qemu is also good, but i haven’t used since i found vbox

  14. raduNo Gravatar said:

    Virtual Box has been working for quite some time on my Sidux (Debian Sid derivative) computer.

    Most of the time it has worked well, although I guess its special way of folder sharing might occasionally confuse the guest Windows on how to get to the network folders. Sometimes it times out on shared folders or the software working with network files chrashes, with potentially unpleasant consequences. This is why I avoid using shared folders for my work. Internet on the other hand works perfectly with the NAT option.

    I haven’t tried demanding games on it, and for obvious reasons I preferred to listen to music and to watch movies etc. in the host OS, but the software I did use worked as well as on a real box.

    And indeed, the seamless mode is awesome: being able to toggle almost
    transparently between KDE (browser, messenger, music player etc.) and Windows (special proprietary soft) windows is quite helpful.

  15. Mr SurbadeNo Gravatar said:

    Exactly what i was searching for !

  16. 2 » Blog Archive » Fotnot från Stumble Upon said:

    […] det här kommer att funka som jag vill på min dator, så är jag en lyckans man. Då kan jag njuta av […]

  17. bambangNo Gravatar said:

    ihave eroor mesage:

    the virtual box say : FAILED TO START THE VIRTUAL MACHINE

    THENKS
    REGARDS

  18. RebengaNo Gravatar said:

    @bambang:

    I know the solution, it is: PROBLEM FIXED.

    And if you don’t understand sarcasm, then here it is in plain text: We need to know what the problem is to fix it.

  19. LucasNo Gravatar said:

    Awesome. Dude, I had messed with vmware without luck, this worked like a charm. In 5 minutes I was loading Windows 2k! Great Job.

    Here are some additional notes…

    I did:
    sudo apt-get install virtualbox

    after installation I had to do:
    sudo /etc/init.d/vbdrv start

    to start the driver then I launched virtualbox from commandline:
    sudo virtualbox

    Loading windows 2k now. Thanks for the heads up. Awesome.

  20. MaxNo Gravatar said:

    Great program for anyone who isn’t a complete doorknob. It works great on Windows, provided you actually install an OS… lol. Not sure why all these people are having trouble, it’s virtually foolproof! Great program!

  21. RobocopNo Gravatar said:

    Thanks for the great info

  22. Cesar D. RodasNo Gravatar said:

    I prefer qemu… :)

  23. viceNo Gravatar said:

    good post here, thanks for the good read

  24. Link Log: March 5, 2008 | dBlogIt by Dustin Boston said:

    […] Virtualization done easily with VirtualBox | Run virtual machines with the open source VirtualBox […]

  25. VLNo Gravatar said:

    vector linux 5.8 std gold has a few testing instances of virtual box sources for certain kernels
    after figuring out how to get the virtualbox to run on vector linux i was able to install my .iso of “win xp sp2 corp performance july 2007″ and finished installing in 18 minutes
    the boot time on the virtual box was amazingly fast 20 seconds or less to a stable desktop
    problems i had with this version of vbox was the ability to access anything outside the virtualbox itself
    such as hard drives and internet

    PROs:
    after much tweaking and testing i found that virtualbox XP works AMAZINGLY fast
    almost even faster than does native XP

    CONs:
    setup can be horrid if not using Ubuntu, often failing to fully use virtualbox on other linux distros

  26. darrenNo Gravatar said:

    One bug I would like to see fixed in all virtualization software is how they cannot recognize iPods properly. I have no way of easily loading songs onto my iPod Touch without jailbreaking it at the moment.

  27. ThainNo Gravatar said:

    Great Point, Excellent Post, Great Blog, Cool Info

  28. noelNo Gravatar said:

    I also had a hard time trying to make my usb flash drive to work with VirtualBox where winXP is the guest os…. :(

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>