I recently upgraded my kernel with apt-get dist-upgrade
.
When I try to boot my virtual machine with vagrant up
on my existing VM, I get the following error:
$ vagrant up
Bringing machine 'myvirtualmachine' up with 'virtualbox' provider...
==> myvirtualmachine: Clearing any previously set forwarded ports...
==> myvirtualmachine: Clearing any previously set network interfaces...
==> myvirtualmachine: Preparing network interfaces based on configuration...
myvirtualmachine: Adapter 1: nat
myvirtualmachine: Adapter 2: hostonly
==> myvirtualmachine: Forwarding ports...
myvirtualmachine: 8092 (guest) => 9000 (host) (adapter 1)
myvirtualmachine: 22 (guest) => 2222 (host) (adapter 1)
==> myvirtualmachine: Running 'pre-boot' VM customizations...
==> myvirtualmachine: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "8b5f97cb-b593-4610-989d-6445fbcb7d0e", "--type", "headless"]
Stderr: VBoxManage: error: The virtual machine 'myvirtualmachine' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
I tried to reload the VM to no avail. Even rebuilding the VM from scratch didn't help.
What can I do to get my VM back ?
Versions: virtualbox 5.1.10 r112026, vagrant 1.8.7, ubuntu 16.10, linux 4.8.0-28-generic
Here is how I solved it. It seems that dist-upgrade doesn't rebuild virtual box kernel modules. You have to reinstall virtualbox entirely:
sudo apt-get remove virtualbox-5.1 virtualbox-dkms
sudo apt-get install virtualbox-5.1
I also tried sudo apt-get --reinstall install virtualbox-dkms
(as suggested here) but it didn't works for me. The complete reinstallation of virtualbox seems the way to go.
User contributions licensed under CC BY-SA 3.0