Fedora 37下VirtualBox加载vboxdrv内核模块失败(Exec format error)及Kernel driver not installed (rc=-1908)问题求助
各位好,我已经试过类似问题下的各种解决方案,但还是卡在VirtualBox的内核模块加载问题上,想请大家帮忙看看。
我的系统环境:
- Fedora Linux 37 (Workstation Edition) x86_64
- 内核版本:6.0.7-301.fc37.x86_64
问题重现步骤:
- 我通过
sudo dnf install VirtualBox安装了VirtualBox - 启动VirtualBox后,弹出错误提示:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (6.0.7-301.fc37.x86_64) or it failed to
load. Please try load the kernel module by executing as root
dnf install akmod-VirtualBox kernel-devel-6.0.7-301.fc37.x86_64
akmods --kernels 6.0.7-301.fc37.x86_64 && systemctl restart vboxdrv.service
You will not be able to start VMs until this problem is fixed.
- 按照提示执行推荐的命令,前几步都正常,但执行
systemctl restart vboxdrv.service时失败,报错:
Job for vboxdrv.service failed because the control process exited with error code.
See "systemctl status vboxdrv.service" and "journalctl -xeu vboxdrv.service" for details.
相关日志信息:
systemctl status vboxdrv.service输出:
× vboxdrv.service - Linux kernel module init script Loaded: loaded (/usr/lib/systemd/system/vboxdrv.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Mon 2023-02-27 21:25:49 EET; 9s ago Process: 73393 ExecStart=/sbin/modprobe vboxdrv (code=exited, status=1/FAILURE) Main PID: 73393 (code=exited, status=1/FAILURE) CPU: 23ms Feb 27 21:25:49 fedora systemd[1]: Starting vboxdrv.service - Linux kernel module init script... Feb 27 21:25:49 fedora modprobe[73393]: modprobe: ERROR: could not insert 'vboxdrv': Exec format error Feb 27 21:25:49 fedora systemd[1]: vboxdrv.service: Main process exited, code=exited, status=1/FAILURE Feb 27 21:25:49 fedora systemd[1]: vboxdrv.service: Failed with result 'exit-code'. Feb 27 21:25:49 fedora systemd[1]: Failed to start vboxdrv.service - Linux kernel module init script.
journalctl -xeu vboxdrv.service输出:
Feb 27 21:25:49 fedora systemd[1]: Starting vboxdrv.service - Linux kernel module init script... ░░ Subject: A start job for unit vboxdrv.service has begun execution ░░ Defined-By: systemd ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel ░░ ░░ A start job for unit vboxdrv.service has begun execution. ░░ ░░ The job identifier is 5095. Feb 27 21:25:49 fedora modprobe[73393]: modprobe: ERROR: could not insert 'vboxdrv': Exec format error Feb 27 21:25:49 fedora systemd[1]: vboxdrv.service: Main process exited, code=exited, status=1/FAILURE ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel ░░ ░░ An ExecStart= process belonging to unit vboxdrv.service has exited. ░░ ░░ The process' exit code is 'exited' and its exit status is 1. Feb 27 21:25:49 fedora systemd[1]: vboxdrv.service: Failed with result 'exit-code'. ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel ░░ ░░ The unit vboxdrv.service has entered the 'failed' state with result 'exit-code'. Feb 27 21:25:49 fedora systemd[1]: Failed to start vboxdrv.service - Linux kernel module init script. ░░ Subject: A start job for unit vboxdrv.service has failed ░░ Defined-By: systemd ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel ░░ ░░ A start job for unit vboxdrv.service has finished with a failure. ░░ ░░ The job identifier is 5095 and the job result is failed.
- 尝试启动任何虚拟机时,会弹出错误:
Kernel driver not installed (rc=-1908)
补充说明:
- 我已经安装了对应内核版本的
akmod-VirtualBox和kernel-devel - 另外,我的系统在启动更高版本内核时会出现问题,可能这个情况和当前的VirtualBox问题有关?
非常感谢大家的任何建议或帮助!
备注:内容来源于stack exchange,提问作者metramarta

