Installing Sun Microsystems VirtualBox On Ubuntu 8.10 With USB and Audio Support

By Randy Jensen | Dec 30, 2008

Sun VirtualBox LogoSo after I switched over to Ubuntu, there were still some things that I absolutely had to have Windows for. Primarily Photoshop (I do run CS2 inside Crossover, but I much prefer CS4), Dreamweaver and until Songbird learns how to not suck at podcast management, iTunes (that one just feels dirty everytime I type it).

Today I’m going to show you how to install Sun xVM VirtualBox on Ubuntu 8.10. I’m using Sun’s version as opposed to the 100% open source version, simply because it has some proprietary support for USB. I’m also not sure how much weight this holds any more, as I’ve not used the open source version for quite some time.

What We’ll End Up With

  1. Install Sun xVM VirtualBox on Ubuntu 8.10
  2. Install Windows XP inside VirtualBox (you can choose to install just about any OS you would like however)
  3. Enable USB Support
  4. Enable audio

Installing VirtualBox

Download Sun xVM VirtualBox from their site. Choose the option to open with ‘GDebi Package Installer

Ubuntu 8.10 VirtualBox Download

Once it’s done, click ‘Install Package’, enter your password and the installer will begin.

Install VirtualBox

You will get a couple of prompts, simply leave everything as is and hit ‘Forward’.

Install VirtualBox Screen 1

After you hit ‘Forward’ to compile the VirtualBox kernal, it will probably take some time. Just be patient.

Install VirtualBox Screen 2

Close out of everything after it’s done. Log out of Ubuntu and log back in. VirtualBox is installed and ready for our guest OS to be installed.

Preparing VirtualBox

Now that VirtualBox is installed, let’s get an empty VM setup that we will later install Windows inside of. This is a simple process, but has a few steps that might be foreign to you at first.

  1. To open VirtualBox go to ‘Applications’ –> ‘System Tools’ –> ‘Sun xVM VirtualBox’ (If you don’t see it, Log out and log back in)
    Applications VirtualBox
  2. You will be presented with their EULA next. Scroll to the bottom and click ‘Accept’
    VirtualBox EULA
  3. Now you’ll see a registration screen. Enter your information and click ‘Confirm’
    VirtualBox Registration
  4. You will now be presented with the main VirtualBox screen
    VirtualBox Main Screen

Creating the Virtual Machine

Alright, VirtualBox is ready to go. Now it’s time to install the guest OS. In my case, it’s going to be Windows XP. However, you can install just about any operating system with VirtualBox. This is a great way to try different Linux distros without having to wipe your computer, or run off a live cd.

  1. Go ahead and put your install disc in the drive. If any prompts come up, just cancel them or ignore them.
  2. Click the ‘New’ button in VirtualBox
    Create New VirtualBox
  3. When the first window pops up, click ‘Next’ and then name your new VM. Also choose the Operating System and Version below.
    Windows XP Virtual Machine
  4. The next screen wants to know how much RAM you are going to allocate to the VM. For most OS’s I would recommend a minimum of 1GB (or 1024MB). For this example, let’s enter 1024MB.
    VM RAM Memory
  5. Just for reference, this choice really depends on several factors.

    • Are you going to be using it for memory intensive programs? Photoshop, Video editing, etc.
    • How much RAM do you have in your computer? You need to remember to leave Ubuntu at least a Gig of RAM to run itself.
    • What OS are you installing? Windows XP uses less memory than Windows Vista and most Linux distros can function quite well on a Gig or less of memory
    • If you’re going to be running your VM quite a bit, I would recommend upgrading your RAM to 4Gigs. This way you can easily allocate at least a Gig or two to your VM and have plenty left over for Ubuntu. Plus 4 Gigs of RAM is much cheaper than buying a whole new computer :)

    Creating the Virtual Hard Drive

  6. On the next screen, click the ‘New’ button to begin the creation of our virtual hard drive.
    Setting Up a Virtual Hard Drive 1
  7. Click ‘Next’
    Setting Up a Virtual Hard Drive 2
  8. On the next screen, leave the radio button on ‘Dynamically Expanding Storage’, unless you know you want a fixed size.
    Setting Up a Virtual Hard Drive 3
  9. Now you need to tell VB how big you want the virtual hard drive. Again, this really depends on what all you’re going to be doing in your VM. If you’re going to be doing a lot of work, you’ll probably want to make it bigger. If it’s just for basic purposes, you don’t need much storage. I wouldn’t go lower than 4 Gigs. For this example I’m going to make it 10 Gigs.
    Setting Up a Virtual Hard Drive 4
  10. You’ll see a summary, click ‘Finish’
    Setting Up a Virtual Hard Drive 5
  11. You should now be taken back to the main Virtual Hard Drive screen, except now it should have our new virtual drive in the drop down box
    Setting Up a Virtual Hard Drive 6
  12. You’re done with this part. Click ‘Finish’ and you’ll be brought back to the main VirtualBox screen, but you’ll now see our Windows XP virtual machine in the left hand column.
    Windows XM VM Ready To Go

    Installing Windows XP In the Virtual Machine

  13. Make sure the Windows XP VM is highlighted orange and click the ‘Start’ button
    Start the Windows VM
  14. You’ll be presented with a window about the ‘Auto capture keyboard’ option in VB. Read through this and click ‘OK’. You will now see the First Run Wizard.
    First Run Wizard
  15. You’re more than likely installing from a cd/dvd, so leave that radio button selected. Then choose the correct drive below.
    First Run Wizard 2
  16. If you happen to get an error that says no media present, do this:

    • Go to ‘Devices’ –> ‘Mount CD/DVD Rom’ –> Choose the drive where your cd is located
      Mount CD
    • Once that’s done, go to ‘Machine’ –> ‘Reset’
      Reset Virtual Machine
    • This should reboot the virtual machine and boot from the newly mounted media
  17. Click ‘Finish’. If all went well, you should see VB begin to install Windows XP just as if you were installing it on your computer.
    Windows VM Install
  18. Install Windows as you would normally (commands: Enter, F8, Enter, Enter, Grab a cup of coffee, write a short story…then you will start the actual Windows install)
  19. After a bit, the VM will reboot and you should now boot into Windows!
    Windows Running In VM
  20. Once you’ve gone through all the prompts and are at the Windows desktop, go ahead and click the ‘x’ on the virtual machine. You will be prompted with a dialogue box. Leave the radio button as the default ‘Send the shutdown signal’. This should shutdown Windows and close the VM.
    Send Shutdown Signal
  21. Enabling USB Support

    Since I’ve yet to find a good way to manage my iPod natively on Linux, I still use iTunes (primarily for the podcast support). So next we’re going to enable USB support so we can handle iPods, external hard drives, etc.

  22. With the VM closed, and Windows XP highlighted, select ‘Settings’
    Windows Settings
  23. Now click on the ‘USB’ tab on the right side. Check both of the boxes
    USB Support
  24. That’s really all there is to enabling USB support. One thing I like to do is force my iPod to mount when it’s plugged in and I turn the VM on. You can do this by having your device plugged in and clicking the USB plug with the green plus symbol on the right side. This will bring up a list of devices. Just choose the one you want and it should add it to the USB Device Filters box. Click OK.
    Mount iPod USB Device

    Enabling Audio In Your VM

    You’ve already enabled USB support, audio is very similar.

  25. Again, go in the Settings box, but click ‘Audio’ this time.
  26. Check the box to enable the audio, and in the screenshot below you’ll see my settings. These may not work for you since audio in Linux is pretty much in limbo, but play around with it until you get it working. You’ll know when you hear the Windows boot up sound.
    Enable Audio

There’s a ton of other stuff you can do with VirtualBox but this should get you started. In a later post I’ll describe how to create a shared folder between your Ubuntu machine and you Windows VM. However, this post has already gotten too long and out of hand so I’ll save that for another day.


  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Design Float
  • DZone
  • Ping.fm
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis
  • Yahoo! Buzz
Copy the code below to your web site.
x 

Related posts:

  1. VirtualBox VERR_VM_DRIVER_NOT_INSTALLED (rc=-1908) Error I recently installed the updated kernel in Ubuntu 8.10. Everything...
  2. Using Pandora’s Windows Vista Gadget I recently bought a new computer that is running Windows...
  3. Why I Love Ubuntu 8.10 After Four Months Of Use I recently wrote a post about some issues I was...
  4. Install Woopra 1.3 RC2 On Ubuntu 9.04 If you’re not familiar with Woopra, it’s an amazing real-time...
  5. Dead Simple File Sharing Between Any Operating System Since my switch to Ubuntu, my biggest hurdle has consistently...

Related posts brought to you by Yet Another Related Posts Plugin.

blog comments powered by Disqus
© 2009 Randy Jensen Online, - PassionDuo WordPress Theme