1

after upgrading from virtualbox 5.0 to 5.1 , when i try to run my old virtual machines i get this error

NS_ERROR_FAILURE (0x80004005)

I am using ubuntu 16.04 as my host machine

Looking at other tutorials i have tried running

sudo /etc/init.d/vboxdrv setup

But no command exists

2
  • Your answer seems to indicate that your original upgrade from 5.0 to 5.1 was incomplete or somehow broken. In order for this question to be useful to others, please elaborate on the method you used to upgrade.
    – user535733
    May 7 '17 at 13:41
  • 5.1 is already the default version on all releases of Ubuntu 16.10 and newer. Users with vbox from the Ubuntu repositories should not suffer from this particular problem. If you are using 16.04 or earlier, upgrading vbox using packages from non-Ubuntu sources is not recommended...and not supported (if it breaks, you are on your own).
    – user535733
    May 7 '17 at 13:43
2

Seeing this, I had to add to the last answer as there is some possible improvement.

If you removed virtualbox 5.0 and upgraded to 5.1, there may be some packages that were not fully removed.

Here is what works best if you want to keep everything fine without any corrupt packages:

  • close virtualbox

  • remove Virtualbox 5.1

    sudo apt-get remove virtualbox-5.1
    
  • Remove all unused packages, which will remove some Virtualbox packages. It may also remove more packages and previous linux headers if you upgraded and did not run this command before.

    sudo apt-get autoremove
    
  • Make sure there is nothing left from virtualbox

    sudo apt-get purge virtualbox virtualbox-qt
    
  • Reinstall virtualbox 5.1 (or virtualbox, if you want 5.0)

    sudo apt-get install virtualbox-5.1
    

    or

    sudo apt-get install virtualbox
    
  • Configure virtualbox

    sudo vboxconfig
    

If you want to rollback, you may use the same process, but install virtualbox instead of virtualbox-5.1, but if you add some virtualbox modules installed like guest additions, you may have to reconfigure it.

1

Fixed by running the following

Close virtualbox

sudo apt-get remove virtualbox-5.1

sudo apt-get install virtualbox

sudo apt-get purge virtualbox virtualbox-qt virtualbox-dkms

sudo apt-get install virtualbox-5.1

sudo vboxconfig

2
  • This answer can be improved by explaining what each command is expected to do. Be aware that this solution may break a user's system during a future release-upgrade, so an explanation of how to revert to 5.0 may also be worthwhile.
    – user535733
    May 7 '17 at 13:47
  • Did the answer actually work? It has no upvotes so far. Sep 1 '17 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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