I uninstalled virtualbox in its entirety including its configuration and registry files, its components, however I think I haven’t done it completely right, I have noticed some errors in my uninstallation; for example, I found that there was a vbox user in my user list so I deleted the user manually, however I keep getting more errors related to virtualbox:
1
Failed to start app-gnome-vboxclient-2273.scope - Application launched by gnome-session-binary.
2
/usr/lib/udev/rules.d/60-vboxguest.rules:2 Unknown user 'vboxadd', ignoring
my user is in a group called vboxusers, yours too?
check by running groups - use sudo usermod -aG vboxuser <your-username-here> to add your user to the group.
may not have been the right thing to do. In my /etc/passwd, I see:
vboxadd:x:983:1::/var/run/vboxadd:/sbin/nologin
Either add the user manually, or reinstall virtualbox.
I used sudo dnf list installed | grep -i virtualbox to locate the virtualbox related packages, and removed them with sudo dnf remove [package_name], I also removed the virtualbox configuration files in my home directory with rm -rf ~/.config/VirtualBox also the virtualbox files. virtual machines with rm -rf ~/VirtualBox\ VMs also logs with sudo rm -rf /var/log/VirtualBox also delete the user with userdel -r vboxusers and lastly I ran sudo find / -name "*VirtualBox*" -exec rm -rf {} \; to try to delete all virtualbox related files
It is also important to say that the problems with virtualbox arose with a MOK key that I forgot and then through a script and repeating the installation I managed to solve it, I have a topic here in fedora discussion about that, called “I forgot my MOK password”, then the kernel integrity checks started to fail and it was fair which I didn’t want, so I uninstalled virtualbox completely, I would like to reinstall it but I don’t know what will happen because the MOK key still appears on my system for the installation of virtualbox, and I think it is necessary to delete that MOK key to that it is not redundant or duplicated, however I am afraid of deleting that key and creating more problems in my system, so I guess I can settle for Gnome Boxes while my problem is solved
The mok key is created and installed by use of the akmods package and is not directly related to virtualbox. When virtualbox is installed the akmods package compiles and signs the kernel module for virtualbox, then installs those modules to be used at the next boot.
You do not need to worry about redundant keys since there is only one key active at a time and only that one key will be used when the modules are compiled.
Installing VirtualBox is as simple as sudo dnf install VirtualBox as long as you have the rpmfusion-free repo enabled (it will tell you if the package cannot be located). The installation will add the needed user & group to the system.
Once VB is installed then run (as your regular user) the command groups. If the group vboxusers does not show in the list then run sudo usermod -a -G vboxusers $USER which will add your user to that group.
Log out then back in and repeat the command groups and you should now see that group in the list.
At this point you should reboot to load the virtual box modules then your user should be able to launch virtualbox and create a VM. To verify the modules are loaded you may run lsmod | grep box which for me gives 3 lines of output, including the vboxdrv module.
I understand, the issue is that during the installation of virtualbox a message appeared that said that the MOK key could not be installed automatically because I have Secure Boot activated, so I had to install that key manually with a series of commands that output recommended when installing virtualbox
That shows you installed VB from the oracle provided repo and it sometimes does not cleanly install since it has not been tweaked for operating on the latest version of Fedora. The oracle provided package required using dkms and has a different process for creating the key and signing the kernel modules.
Installing the package from the rpmfusion-free repo provides a package which has been specifically tested and tweaked to perform on fedora. That package uses akmods and the signing steps that have been provided above.
The instructions for creating and installing the key using mokutil are not appropriate for using dkms which the package from oracle requires – thus if we do not have the full info at the very beginning then our suggestions are likely based on improper understanding.
If you insist on using the package directly from oracle I cannot provide more assistance. If you instead install from the rpmfusion repo my assistance is available and the procedure above should work.
I have already done the steps you indicated to download virtualbox from the rpmfusion-free repo, I have already restarted my computer and no loaded virtualbox modules appear, I used lsmod | grep box i also used lsmod | grep -i '.*box.*' and also manually search if there was any virtualbox module loaded in the system kernel and there is none, I have already done all the steps you indicated including restarting the computer, in fact I have restarted it several times to see if it loads a module but nothing
Loaded: loaded (/usr/lib/systemd/system/vboxdrv.service; enabled; preset: enabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
Active: failed (Result: exit-code) since Fri 2023-10-13 12:15:11 -05; 1h 5min ago
Process: 1160 ExecStart=/sbin/modprobe vboxdrv (code=exited, status=1/FAILURE)
Main PID: 1160 (code=exited, status=1/FAILURE)
CPU: 29ms
oct 13 12:15:11 hrqm495z systemd[1]: Starting vboxdrv.service - Linux kernel module init script...
oct 13 12:15:11 hrqm495z modprobe[1160]: modprobe: ERROR: could not insert 'vboxdrv': Key was rejected by service
oct 13 12:15:11 hrqm495z systemd[1]: vboxdrv.service: Main process exited, code=exited, status=1/FAILURE
oct 13 12:15:11 hrqm495z systemd[1]: vboxdrv.service: Failed with result 'exit-code'.
oct 13 12:15:11 hrqm495z systemd[1]: Failed to start vboxdrv.service - Linux kernel module init script.
Loaded: loaded (/usr/lib/systemd/system/vboxdrv.service; enabled; preset: enabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
Active: failed (Result: exit-code) since Sat 2023-10-14 17:09:08 -05; 17min ago
Process: 1147 ExecStart=/sbin/modprobe vboxdrv (code=exited, status=1/FAILURE)
Main PID: 1147 (code=exited, status=1/FAILURE)
CPU: 42ms
oct 14 17:09:08 hrqm495z systemd[1]: Starting vboxdrv.service - Linux kernel module init script...
oct 14 17:09:08 hrqm495z modprobe[1147]: modprobe: ERROR: could not insert 'vboxdrv': Key was rejected by service
oct 14 17:09:08 hrqm495z systemd[1]: vboxdrv.service: Main process exited, code=exited, status=1/FAILURE
oct 14 17:09:08 hrqm495z systemd[1]: vboxdrv.service: Failed with result 'exit-code'.
oct 14 17:09:08 hrqm495z systemd[1]: Failed to start vboxdrv.service - Linux kernel module init script.
Lets not just continue performing other commands and expecting them to work properly.
What is the output of dnf list installed kmod\* virtual\* ?
What is the output of lsmod | grep box
Post the output of both those then please wait for us to respond before doing anything else.
It is best if you post the command and the results such as
If you continue executing commands and fail to provide the exact command as well as the output of the command it becomes impossible for us to even guess at what may or may not have happened.
This is why we normally only provide one or 2 commands at a time and wait for results.
So far you have executed several commands, some out of sequence in the order suggested, and we really know nothing about the current status. Take it slow, give us the result of commands used/suggested, then wait for us to review the results and make further suggestions.
I know from the result of that systemctl status command that the vboxdrv module failed to load, but we need to evaluate why. The commands I suggested above give us a start in figuring that out.