[SOLVED] Ubuntu 16.04 freezes on vagrant up

I work on different kind of projects for different clients, mostly freelance work. Each on of them have different technologies going in their projects and most of them need specific environment setup. Some of the required software do conflict with each other, not a big thing. To avoid such things I use vagrant. A new project? Needs different environment setup? Not a problem. It’s perfect, it’s flexible and of course OS.

I had this PHP 5 project that I was working on and all of sudden I decided to upgrade to Ubuntu 16.04, voola! Everything seemed perfect, I was enjoying the every bit of it, until I opened up the terminal and hit vagrant up. Ubuntu just crashed and only the option that worked was a hard restart 🙁 .

After repeating the same thing a couple of times, I started digging up the issue and then went onto the askubuntu.com. As it turned out, the Virtualbox 5.0.40 won’t work with the new kernel (4.13.0-26), but the new version of Virtualbox 5.2 seems to work just fine.

Here are the steps that you need to upgrade your Virtualbox to run in smoothly on Ubuntu 16.04.

Download the Virtualbox from here or add the  add the source to your /etc/apt/sources.list via following terminal command:

deb http://download.virtualbox.org/virtualbox/debian xenial contrib

If you are using a different version of Ubuntu, use the proper name instead of xenial.

Now, you need to add the Oracle public key. Here’s how to do that:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

Update repositories and install virtualbox-5.2:

sudo apt-get update
sudo apt-get install virtualbox-5.2

If you see an error, that VM won’t start without removing virutalbox-dkms, here’s how to fix that:

sudo apt-get remove virtualbox-dkms

People reported that there are still errors after the upgrade. If that’s the case with you too, you might need to rebuild the Virtualbox kernel modules:

sudo /sbin/vboxconfig

That’s it. Your Virtualbox and vagrant should be up and running again without any problem.

If you still see issues, here’s a list of questions asked on askubuntu.com which might be helpful for you.

Ubuntu 16.04 freezes on vagrant up [duplicate]

virtualbox crash on kernel 4.13.0-26 [closed]

VirtualBox – RTR3InitEx failed with rc=-1912 (rc=-1912)

There’s also a bug reported on Launchpad, if you into that sort of thing 😉


That’s it for now. Happy Hacking!

Leave a Reply