VirtualBox is a good tool to virtualize a small linux server. But after upgrading, even if it is a minor version (e.g. from 4.3.10 to 4.3.30), it may happen that virtual machines do not start.
Checking VMs
Prior doing anything, it is a good idea to ensure the functionality of VirtualBox itself. In order to do so, simply list the the installed VMs. Please keep in mind, any action on VM needs to be done with the OS user who owns it. So either login (e.g. vbox) or simply execute the command as this user.
1 2 3 4 5 6 |
# Ensure vms are available # You need to be logged in as the vbox user / or run command as this user sudo su vbox VBoxManage list vms > "test_vm" {2530aa43-f420-434d-7e34-afenfdc37dfa} |
As seen in the example above, there is a VM with the name “test_vm” available. Now try to start it.
1 2 3 4 5 |
# Try to start vm VBoxManage startvm test_vm > Waiting for VM "test_vm" to power on... VM "test_vm" has been successfully started. |
The command informs that the virtual machine was successfully started. But by checking the running VMs a few seconds (it takes a few moments until the VM is taken offline again) later shows, that the VM is not online/offline again:
1 2 3 |
# VM Obviously not started: VBoxManage list runningvms > |
Problem
There is a good chance that this is caused by the installed VirtualBox Extension Pack. The installed version has to match the version of VirtualBox, otherwise the virtual machines will be unable to boot. In order to verify this, retrieve the installed VirtualBox version:
1 2 3 4 |
# CHeck virtual box version VBoxManage --version > 4.3.30r101610 |
And compare this version with the installed extension pack version:
1 2 3 4 5 6 7 8 9 10 11 12 |
# version mismatch sudo VBoxManage list extpacks > Extension Packs: 1 Pack no. 0: Oracle VM VirtualBox Extension Pack Version: 4.3.10 Revision: 93012 Edition: Description: USB 2.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM with E1000 support. VRDE Module: VBoxVRDP Usable: true Why unusable: |
As seen in the example above, the installed VirtualBox version is 4.3.30, but an extension pack with version 4.3.10 is installed. These two versions are incompatible.
Solution
After proofing the above problem description, the solution is rather simple. Firstly, the old version of the extension pack has to be uninstalled.
1 |
sudo VBoxManage extpack uninstall 'Oracle VM VirtualBox Extension Pack' |
Now, download the correct version of the extension pack from the VirtualBox Downloads. The example below downloads the extension pack required for version 4.3.30.
1 |
wget http://download.virtualbox.org/virtualbox/4.3.30/Oracle_VM_VirtualBox_Extension_Pack-4.3.30-101610.vbox-extpack |
Finally, simply install the previously downloaded extension pack.
1 2 3 4 |
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.30-101610.vbox-extpack > 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Successfully installed "Oracle VM VirtualBox Extension Pack". |
After the update is completed, simply start the VMs and everything should be working again.