解决“Cannot change group vboxusers for device /dev/vboxdrv” Virtualbox 错误

今天,我无法从 Oracle Virtualbox 启动任何虚拟机。 我不知道出了什么问题。 直到几天前,它们都工作得很好。 从 Virtualbox 启动其中一个 Ubuntu VM 后,我遇到了以下两个错误对话框。

错误消息框 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).
结果代码:NS_ERROR_FAILURE (0x80004005)
零件:机器包装
界面:iMachine {85632c68-b5bb-4316-a900-5eb28d3413df}

virtualbox 错误 – 无法打开虚拟机 Ubuntu 的会话

错误消息框 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 错误 – 未安装内核驱动程序 (rc=-1908)

阅读上述错误消息后,我运行了第二个错误消息框中建议的命令。

$ sudo /sbin/vboxconfig

但这也无济于事。 我收到另一条错误消息。

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:失败:无法更改设备 /dev/vboxdrv 的组 vboxusers

vboxdrv.sh:失败:无法更改设备 /dev/vboxdrv 的组 vboxusers

快速谷歌搜索后,我发现我不小心删除了自己,即当前用户 vbox用户 团体。

如果您遇到此错误,您可能还无意中从 vboxusers 组中删除了当前用户或删除了 vboxusers 组或两者兼而有之。

解决 “Cannot change group vboxusers for device /dev/vboxdrv” Virtualbox 错误

要解决此问题,首先使用命令创建 vboxusers 组:

$ sudo groupadd vboxusers

然后将当前用户添加到上述组中:

$ sudo usermod -a -G vboxusers sk

代替 sk 使用您当前的用户名。

检查用户是否被添加到组中:

$ grep vboxusers /etc/group
vboxusers:x:1001:sk

是的,用户 sk 已添加到 vboxusers 组。

最后,使用命令重启 virtualbox 内核模块:

$ sudo /sbin/vboxconfig

或者,

$ sudo modprobe vboxdrv

或者,

$ sudo /sbin/rcvboxdrv setup

现在我可以从 Virtualbox 启动所有虚拟机了。 如果 VM 仍然无法启动,请注销并重新登录。它们应该可以工作!

相关阅读:

  • 如何修复“未安装内核驱动程序 (rc=-1908)” VirtualBox Ubuntu 中的错误
  • 解决“结果代码:NS_ERROR_FAILURE (0x80004005)” VirtualBox Arch Linux 中的错误

感谢您的光临!

帮助我们帮助您:

祝你有美好的一天!!