Unable to update VirtualBox modules after last kernel update
I haven't needed to spin up a VM in a while, but I tried today and was unable to. I created a systemd service that calls a script on boot to ensure the VirtualBox modules are signed, which ran fine until the last kernel update. I haven't had to look at it until now.
The problem is that the vboxdrv
module can't be found. When I execute modprobe vboxdrv
, I get this error: modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.18.5-200.fc28.x86_64
. I checked and there are indeed no modules under /lib/modules/.../extra/VirtualBox. In fact, there's not even a VirtualBox directory within the extra directory.
After more troubleshooting I figured out I was missing the akmod-VirtualBox
package. I installed that and ran sudo akmods
, but it failed to build the VirtualBox modules. I tried removing that and installing kmod-VirtualBox
(I'm a little mixed up on the difference between the akmod and kmod packages), which just installed both the akmod and kmod packages. Tried building again, still no success. I've included the build log at the pastebin link. Any help is appreciated.
The only other relevant information I can provide is that the service systemd-modules-load.service
fails on boot. Here's the relevant part of the journalctl output when I try to restart the service:
Sep 13 12:08:54 localhost.localdomain systemd[1]: Starting Load Kernel Modules...
-- Subject: Unit systemd-modules-load.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-modules-load.service has begun starting up.
Sep 13 12:08:54 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-modules-load comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Sep 13 12:08:54 localhost.localdomain systemd-modules-load[19806]: Failed to find module 'vboxdrv'
Sep 13 12:08:54 localhost.localdomain audit[19802]: USER_END pid=19802 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 13 12:08:54 localhost.localdomain audit[19802]: CRED_DISP pid=19802 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 13 12:08:54 localhost.localdomain sudo[19802]: pam_unix(sudo:session): session closed for user root
Sep 13 12:08:54 localhost.localdomain systemd-modules-load[19806]: Failed to find module 'vboxnetflt'
Sep 13 12:08:54 localhost.localdomain systemd-modules-load[19806]: Failed to find module 'vboxnetadp'
Sep 13 12:08:54 localhost.localdomain systemd-modules-load[19806]: Failed to find module 'vboxpci'
Sep 13 12:08:54 localhost.localdomain systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Sep 13 12:08:54 ...
After looking around some more, this may have something to do with SELinux, as suggested on rpmfusion.
Also, this problem seems identical to this other question on ask.FedoraProject that was never answered.