Today, I couldn't start any virtual machines from Oracle Virtualbox. I don't know what went wrong. They were working perfectly fine until a few days ago. As soon as I started one of the Ubuntu VM from Virtualbox, I encountered with the following two error dialog boxes.
Error message box 1:
Failed to open a session for the virtual machine Ubuntu 18.04 LTS Server. Details: The virtual machine 'Ubuntu 18.04 LTS Server' has terminated unexpectedly during startup with exit code 1 (0x1).
|Result Code:||NS_ERROR_FAILURE (0x80004005)|
Error message box 2:
Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing '/sbin/vboxconfig' as root. If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information. where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.
After reading the above error messages, I ran the command that is suggested in the 2nd error message box.
$ sudo /sbin/vboxconfig
But it didn't help either. I got an another error message.
vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: failed: Cannot change group vboxusers for device /dev/vboxdrv. There were problems setting up VirtualBox. To re-start the set-up process, run /sbin/vboxconfig as root. If your system is using EFI Secure Boot you may need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.
After a quick google search, I found that I accidentally removed myself i.e. current user from the vboxusers group.
If you encountered with this error, you might also have unknowingly removed the current user from vboxusers group or deleted the vboxusers group or both.
Solve "Cannot change group vboxusers for device /dev/vboxdrv" Virtualbox Error
To fix this issue, first create vboxusers group using command:
$ sudo groupadd vboxusers
Then add the current user to the above group:
$ sudo usermod -a -G vboxusers sk
Replace sk with your current username.
Check if the user is added to the group:
$ grep vboxusers /etc/group vboxusers:x:1001:sk
Yes, the user sk has been added to vboxusers' group.
Finally, restart the virtualbox kernel module using command:
$ sudo /sbin/vboxconfig
$ sudo modprobe vboxdrv
$ sudo /sbin/rcvboxdrv setup
Now I can be able to start all virtual machines from Virtualbox. If the VMs still doesn't start, log out and log back in. They should work!
- How To Fix “Kernel driver not installed (rc=-1908)” VirtualBox Error In Ubuntu
- Solve “Result Code: NS_ERROR_FAILURE (0x80004005)” VirtualBox Error In Arch Linux
Thank you!! Happened exactly the same to me when upgrading from VirtualBox 5.2 to 6.1
Thank you. Saved my day! I also had to go and reinstall the Oracle VM VirtualBox Extension Pack from https://www.virtualbox.org/wiki/Downloads, but back up and running now 🙂
Thank you so much. I has been tearing my hair out until I found your article.
You helped me so much, Senthil! Thanks for the documentation, great work!
Thanks too 🙂
Thanks so much!!