Home Oracle VirtualBox Solve “Cannot change group vboxusers for device /dev/vboxdrv” Virtualbox Error

Solve “Cannot change group vboxusers for device /dev/vboxdrv” Virtualbox Error

By sk
Published: Last Updated on 5.9K views

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)
Component:MachineWrap
Interface:IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
virtualbox error - Failed to open a session for the virtual machine Ubuntu

virtualbox error - Failed to open a session for the virtual machine Ubuntu

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.
virtualbox error - Kernel driver not installed (rc=-1908)

virtualbox error - Kernel driver not installed (rc=-1908)

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.
vboxdrv.sh: failed: Cannot change group vboxusers for device /dev/vboxdrv

vboxdrv.sh: failed: Cannot change group vboxusers for device /dev/vboxdrv

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

Or,

$ sudo modprobe vboxdrv

Or,

$ 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!


Related read:


You May Also Like

6 comments

michorradas April 4, 2020 - 6:01 pm

Thank you!! Happened exactly the same to me when upgrading from VirtualBox 5.2 to 6.1

Reply
Hugeworm December 18, 2020 - 3:38 pm

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 🙂

Reply
John Howard January 15, 2021 - 4:58 pm

Thank you so much. I has been tearing my hair out until I found your article.

Reply
David January 13, 2022 - 11:49 pm

You helped me so much, Senthil! Thanks for the documentation, great work!

Reply
Luc November 19, 2022 - 5:43 am

Thanks too 🙂

Reply
Jhon jader April 28, 2023 - 8:15 am

Thanks so much!!

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More