Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My virtualbox used to work, but now it is for some reason completely FUBAR: every time I try to start a VM, it crashes my host Ubuntu 12.04.1 system, I can't even bring it to reboot with the Magic SysRq key. I would like to clean up the mess and reinstall a working virtualbox.

I thought this would do:

sudo apt-get remove virtualbox
# reboot
sudo apt-get install virtualbox

But I get the same effect: even when downloading a fresh iso of any kind and starting the VM, it crashes the computer and I need to do a hard reboot.

EDIT: as per commented, I installed version 4.2 using these instructions:

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -  
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian precise contrib" >> /etc/apt/sources.list'  
sudo apt-get update && sudo apt-get install virtualbox-4.2  

Ran virtualbox, checked the version: 4.2.6 r82870

It didn't crash, so problem solved. (copy+paste to answer)

Any ideas?

share|improve this question
    
Have you tried the packages from virtualbox.org? It's offering packages with closed-source components, but it's a bit newer and might work better. (on that page scroll down to "Debian-based Linux distributions") And make sure you remove all regular Ubuntu-shipped virtualbox packages first. If that works, I'll post it as an answer. –  gertvdijk Jan 22 '13 at 11:58
    
@gertvdijk thanks, that solved the problem. If you copy paste from EDIT to the end as an answer, I'll click on 'accept answer'. –  213441265152351 Jan 22 '13 at 13:18

2 Answers 2

up vote 1 down vote accepted

As reported from the comments installing the packages from virtualbox.org solved the issue.

  1. Remove the currently installed packages from the Ubuntu repositories.

    sudo apt-get remove virtualbox\*
    
  2. Add a new file to the APT sources, e.g. /etc/apt/sources.list.d/virtualbox.list with just this one line where precise is for 12.04 in your case, but should be replaced with the version of Ubuntu it's installed on:

    deb http://download.virtualbox.org/virtualbox/debian precise contrib
    
  3. Add the repository key to your APT GPG keyring to trust it:

    wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
    
  4. Update the lists:

    sudo apt-get update
    
  5. Install the branch version you like by the package name, at this moment (virtualbox-4.2):

    sudo apt-get install virtualbox-4.2
    
  6. Add yourself and other users on the system to the vboxusers system group, by doing e.g.:

    sudo adduser username vboxusers
    
  7. Now log out and log back in (or reboot). Yes, this is ugly, but your current running session isn't aware of the additional group you belong to now.

  8. Optional: install the closed-source extension pack from the general download page for "Support for USB 2.0 devices, VirtualBox RDP and PXE boot for Intel cards.".

    • Download the .vbox-extpack file.
    • In Virtualbox main screen, hit menu File -> Preferences -> vertical tab Extensions
    • Add the package there.

Done!


The reason for why the Ubuntu ones weren't working and these packages are could be:

  • It's the open source version packaged, opposed to closed-source components from Virtualbox directly.

  • Ubuntu ships an older 4.1.12 version at the time of writing whereas 4.1.22 is already released in the 4.1.x branch.

  • You may have installed the completely newer 4.2 version of Virtualbox this way, not available in Ubuntu.

Either way, it's a bug in the Ubuntu packages. You might want to locate this bug on the Ubuntu bug tracker and report yourself affected.

share|improve this answer
    
Thanks, I reported the bug to launchpad. There is at least 1 more user that stumbled upon this: bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1083520 –  213441265152351 Jan 22 '13 at 16:57

Although you have a working solution, I'd like to give you some recommendations:

First of all, take a snapshot of your VMs.

When it's done, you should have used:

apt-get purge 

instead of:

apt-get remove

You should probably have some misconfiguration or wrong config parameter/s, and that will clean it.

After that, install Virtual Box as usual, and import your snapshot.

share|improve this answer
    
thanks for the comment, I didn't know about apt-get purge. –  213441265152351 Jan 22 '13 at 16:56
1  
@213441265152351 You might be interested in What is the correct way to completely remove an application? for a further read on this. –  gertvdijk Jan 22 '13 at 23:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.