How to install Oracle VIrtual Box in Fedora Workstation36

I wish to install Oracle Virtual Box in my Fedora Workstation 36. Is there any commands to install it from the Terminal ?

If you have the rpmfusion free repo installed and enabled it can be installed directly using dnf with dnf install VirtualBox

Hi Jeff

Thanks for the reply. I have successfully installed VirtualBox. Now I am trying to run
ubuntu/trusty64 in my Virtual box. When I run this command : " vagrant up " I am getting this error message

"The box you’re attempting to add doesn’t support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn’t
simply misspell it.

If you’re adding a box from HashiCorp’s Vagrant Cloud, make sure the box is
released.

Name: ubuntu/trusty64
Address: https://vagrantcloud.com/ubuntu/trusty64
Requested provider: [:libvirt] "

In my Vagrantfile I defined the provider :

config.vm.provider "virtualbox" do |vb|
end

Any idea how to solve this issue ?

Thanks.

Unfortunately I do not use VB. I merely provided the means to install it.
Hopefully someone with experience using it will chime in for you.

I do know that after it is installed you will need to reboot to load the kernel modules required for it to function.

I instead use libvirt/QEMU/KVM for all my VM needs.

Hai, I never use virtualbox from rpmfusion. I Installed official virtualbox with the lastest testing build version. Virtualbox provide packet the stable version or the lastest version for Fedora Linux 36 but vboxdrv.service won’t start because failed to compile kernel module, then my problem solved, and vagrant can run with virtualbox provider.

You can read my question and problem solving in this link:
https://discussion.fedoraproject.org/t/virtualbox-still-cant-run-in-fedora-36-until-now/23664

1 Like

This is true only if the user fails to have akmod-VirtualBox installed (which comes with the install from rpmfusion). As long as that package is installed the system builds the module for the user and the first reboot after the install loads it to the kernel so VB can be active.

When I ran this command : vboxmanage --version

I am getting below output :

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (5.18.7-200.fc36.x86_64) or it failed to
load. Please recompile the kernel module and install it by

       sudo /sbin/vboxconfig

     You will not be able to start VMs until this problem is fixed.

6.1.34r150636

Ok. The message seems very self-explanatory.

VirtualBox is available from more than one source.
If you install it using dnf from rpmfusion it includes akmod-VirtualBox which automatically compiles the module for you. Then a reboot loads it.
If you install it from any other source that does not happen.

What source did you use to install VirtualBox?

Here is the steps that I followed to install Virtualbox :

  1. I go to this page : Linux_Downloads – Oracle VM VirtualBox and download Fedora 36 version.

  2. I install it by running this command : rpm -i VirtualBox-6.1-6.1.34_150636_fedora36-2.x86_64.rpm

So I tried to install the Virtual box in a different way after doing some research. I followed this steps

  1. sudo dnf -y install @development-tools
  2. sudo dnf -y install kernel-headers kernel-devel dkms elfutils-libelf-devel qt5-qtx11extras
  3. sudo vim /etc/yum.repos.d/virtualbox.repo
  4. Add this lines in the virtualbox.repo :

[virtualbox]
name=Fedora $releasever - $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/36/\$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc

  1. sudo dnf search virtualbox
  2. rpm -i VirtualBox-6.1-6.1.34_150636_fedora36-2.x86_64.rpm [ after downloading the virtualbox rpm file from Linux_Downloads – Oracle VM VirtualBox ]
  3. sudo usermod -a -G vboxusers $USER
  4. newgrp vboxusers
    9.id $USER
    10.virtualbox

when I ran the command “virtualbox” from the terminal its running with below warning message :

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
** available for the current kernel (5.18.7-200.fc36.x86_64) or it failed to**
** load. Please recompile the kernel module and install it by**

** sudo /sbin/vboxconfig**

** You will not be able to start VMs until this problem is fixed.**

There’s several posts here and in virtualboxes forum about an issue with the 5.18 kernel and virtualboxes 6.1.34.I have not tried installing it from rpmfusion but some have stated it works.I and several users here are also using the 6.1.35 test version from virtualboxes site and it’s working.There should be an updated version out soon.Until then I’d suggest using the version from rpmfusion or using the test version from virtualbox.

Hai bro, Just read my comment again, because i did the same with you, I was installed stable version or the lastest version from virtualbox official, with the same error message.
Finally working with install the lastest TESTING build from official virtualbox, the link is already in my posting in this forum.

I’m using VirtualBox from rpm fusion and it works perfectly

thanks . checking it again…

Hi Afiadi

That finally worked! I downloaded virtualbox from Testbuilds – Oracle VM VirtualBox and then ran the command : sudo sh *.run . Now virtualbox is running without any error message !

Thanks a lot :smile:

1 Like

Oke Siap. You’re Welcome.

1 Like