VirtualBox 5.0.40 freezes on Ubuntu 16.04 LTS 64-bit for no clear reason
Starting last night, with no apparent changes to my system, VirtualBox now freezes my host OS when starting any virtual machine.
The host OS is Ubuntu 16.04 LTS 64-bit as is the guest OS and the version of VirtualBox is 5.0.40_Ubuntu r115130. It was working properly last night, but as of this morning, starting the VM freezes. I pulled it from the apt
repository just this morning. It is very unlikely to be a software issue, as I reinstalled the host OS this morning.
I tried a number of things:
- I tried creating a new VM, but it freezes immediately as soon as you select the ISO to mount.
- I tried a reinstall of the host OS this morning, thinking maybe I was having issues with running out of space on the hard drive. But still, it freezes the host as soon as you load a VM. Any VM seems to cause it.
- I have also tried installing VirtualBox on another laptop, and it has the same behavior: Freezing the host OS instantly as soon as any VM is started.
And because it’s happening also on another laptop from another vendor, I doubt it's a hardware-related issue. And because happens on even a blank VM install, it isn't anything to do with a corrupted image.
I’m stumped and I don't have any idea how to debug this. And the fact that it freezes my system also makes it very difficult to iterate through possible solutions.
Solution 1:
You state:
I pulled it from the
apt
repository just this morning. It is very unlikely to be a software issue, as I reinstalled the host OS this morning.
So you are running VirtualBox 5.0.40 from the default Ubuntu apt
repo, correct? The problem is some software packages in repos are out of date and are not regularly updated. It seems to me you have been bitten by the error reported here titled “Host with kernel 4.13 freezes when starting a VM with VirtualBox”:
This is a spin-off of bug 1729568. With Kernel 4.13 (from linux-generic-hwe-16.04-edge), the host system freezes completely when starting a VM using VirtualBox. A black boot window pops up right before the freeze.
Deeper in the bug report you can see issues connected directly to VirtualBox 5.0.40 with the recommended solution being to use VirtualBox 5.2.x.
I would recommend that you follow the steps here on Oracle’s official site to setup a PPA—a custom “Personal Package Archive”—that will allow your system to get the latest VirtualBox releases and patches.
First add this line to your sources.list
file located at /etc/apt/sources.list
:
deb http://download.virtualbox.org/virtualbox/debian xenial contrib
Now add the Oracle public keys to your system by running these Wget commands:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
With that done, make sure you have the dkms
package installed:
sudo apt-get install dkms
The run sudo apt-get update
like this:
And install VirtualBox 5.2 like this:
sudo apt-get install virtualbox-5.2