What is the best way to install virtualbox on fedora 40 KDE?

Less than a year ago I was installing virtualbox on fedora 38 gnome, however I remember that it was somewhat complicated, now I want to install it on my fedora 40 KDE, although there are tutorials on the internet on how to install virtualbox on fedora 40, several of them differ in the method, so I wanted to ask you what is the best current method and the one you recommend to install virtualbox effectively

Sorry for not answering the question, but if you just need a simple virtual machine solution that works, I highly recommend GNOME Boxes instead of Virtualbox. You can install it as a native package or Flatpak; either works.

If you absolutely need Virtualbox, I’ll leave that to others to answer. This is the way I would have tried first though: Howto/VirtualBox - RPM Fusion

4 Likes

I don’t know if this is the best way, but I simply downloaded the .rpm file + Extension Pack from their website, works really well for me! here

1 Like

I believe the consensus is that this is not the best way. The VirtualBox packages from RpmFusion are built and tested for Fedora, which can’t be said about the one from the VirtualBox web site.

2 Likes

Several of us here use virtualbox from rpmfusion.I removed the virtualbox I had been using from virtualbox’s site and installed it from rpmfusion.I have had no issue’s with it in several years.

2 Likes

I have been using VirtualBox installed from rpmfusion flawlessly for some time.
As noted, that package is tested on fedora, and the driver module (vboxdrv) is built locally and is updated (and signed for secure boot) by akmods with every kernel upgrade.

2 Likes

I’m one of those who use VB from rpmfusion. No issues for a very long time.
I also use my own script to occasionally install from the Oracle site, just for kicks. The script usually works flawlessly, but not always. The problem with the script is that it needs to be tweaked to reflect the exact rpm package that I’m trying to install, or it will probably fail, but it is fun to play with and rewarding when it works.

Stick with the rpmfusion method.

1 Like

Hi everyone, I appreciate that this is marked as solved, but as a newbie would like to add some thoughts, and express thanks :slightly_smiling_face:

Thanks for posting this @thfedo. I’m quite new to Linux/Fedora coming from Win, and I too have been struggling with differing methods.

Off topic: While I absolutely love Fedora and it’s ecosystem, it is a bit of a nightmare working things out. however, as @glennzo says,

Really happy to have found this thread, AND that the consensus is to download from RpmFusion, because:

Some guidance says to just download the one command line command, and others say you need to install additional libraries and whatnot. Confusing!

I was so frustrated with, having installed it from VB direct, with a couple of Linux distros and then Win10, I could not find Guest Additions anywhere, so yesterday uninstalled the lot, and today found this guidance.

I’ll follow the RpmFusion guide and update here how it goes.

Many thanks all.

Thanks for the notes of confidence.

Yes it can be confusing at times since there are usually lots of ways to perform the same task. Some find one solution and tout it as the only one to use. Others search for the best and continue looking.

Those of us who use fedora continuously try and find what works best for us. The key thing to note and what I always suggest, is that the rpmfusion repo is the source for packages that have been created and tested to work on fedora so you can be assured that they will just work. Those packages are also created in such a way that when you install them they pull in all the needed dependencies to support that software. The user does not need to search for additional software to install. Packages from elsewhere that provide instructions to install other software for support have not been built with the same care to support the end users needs.

In my experience, 100% of the packages from rpmfusion use supporting (dependency) software from either the fedora or rpmfusion repos so the user does not need to search for the location and does not encounter issues with packaging conflicts or version mismatches. This is a win-win for users.

Brilliant thanks!

This is really helpful :smiley:

1 Like

If I may open this thread up again somewhat, I’ve followed the instructions, but there was no Guest Additions to be found.

I remember one tutorial said to remove the Win10 iso, which I did (hopefully now no-one’s gonna say that was a mistake).

image

Please see second pic, still no sign of Guest Additions

image

I suspect I’m making the same mistake each time? Every article I follow says it is so easy, duh!

Many thanks for any ideas

If you run this command and see the result given then the guest additions are there.
I believe fedora includes and installs the virtualbox-guest-additions package by default when f40 is installed.

$ sudo dnf list virtualbox*
Last metadata expiration check: 0:24:00 ago on Sat 06 Jul 2024 01:36:57 PM CDT.
Installed Packages
VirtualBox.x86_64                                               7.0.18-1.fc40                                @rpmfusion-free-updates
VirtualBox-kmodsrc.noarch                                       7.0.18-1.fc40                                @rpmfusion-free-updates
VirtualBox-server.x86_64                                        7.0.18-1.fc40                                @rpmfusion-free-updates
virtualbox-guest-additions.x86_64                               7.0.18-1.fc40                                @updates               
Available Packages
VirtualBox-devel.x86_64                                         7.0.18-1.fc40                                rpmfusion-free-updates 
VirtualBox-webservice.x86_64                                    7.0.18-1.fc40                                rpmfusion-free-updates 
1 Like

I am afraid you need to download the guest additions from Oracle. That is, unless you are running a Fedora as a guest system, where the guest additions are available from the Fedora repository, if not already installed.

More info are found at https://www.virtualbox.org/manual/ch04.html.

Thanks @computersavvy , I ran it here’s the results

2024-07-06-Guest_Additions

So I have it installed, but how do I access it.

(I’m hoping this will also be helpful for anyone else who has this issue)

Thanks!

If your guest system is a Fedora system, then you install it on the guest system.

Thanks @vekruse , I’m running Fedora as my main OS (host OS) only. The guest OS’s will be Win10 and probably MX Linux later

As my above screenshot shows, I believe it is already installed, which is brilliant and great progress, thanks @computersavvy

But I don’t know how to access it :frowning:

Read https://rpmfusion.org/Howto/VirtualBox?highlight=%28%5CbCategoryHowto%5Cb%29#Fedora_as_a_Virtual_Machine_and_VBoxGuestAdditions

If you want run Fedora in a vm, you may/should install !virtualBox-guest-additions. this replaces VBoxGuestAdditions provide by Oracle

RPM Fusion doesn't provide VBoxGuestAdditions for others OS , you have to download it , you have a button for that in VirtualBox, vm manager menu. 

Your guest system will be Windows, so virtualbox-guest-additions will not do you any good. It will work only on Fedora installed as a guest system; and then you have to install it on the guest OS, not on the host os.

I downloaded VirtualBox-7.0-7.0.18_162988_fedora40-1.x86_64.rpm from the virtualbox site and ran the command

rpm2cpio VirtualBox-7.0-7.0.18_162988_fedora40-1.x86_64.rpm | cpio -idmvu ./usr/share/virtualbox/VBoxGuestAdditions.iso

That iso file can then somehow be mounted or extracted on the WIndows guest OS, perhaps. It should contain the guest additions for Windows and other systems.

Is there any way to install VirtualBox-6.1 on F40?

I downloaded rpm VB for Fedora 36/37/38/39 from Download_Old_Builds_6_1 – Oracle VM VirtualBox because I was hoping it would work somehow on F40, but when I tried to install Virtualbox 6.1 on my F40, I got → error: Failed dependencies: libvpx.so.7() (64bit) is needed by VirtualBox-6.1-6.1.50_161033_fedora36-1.x86_64

Personally I always trust the rpm from rpmfusion more that directly from virtualbox since it is tested for use on fedora. I dislike having to track down inconsistencies myself.

Your use of a version that is for f36 (EOL) and trying to track down dependencies seems rather odd since the newer versions are updated to use the more modern libraries.

The only versions of libvpx.so that seem available for fedora at present are libvpx.so.{8,9} from the packages

libvpx8-1.13.1-1.fc40.x86_64 : Compat package with libvpx libraries
Repo        : fedora
...
libvpx-1.14.1-1.fc40.x86_64 : VP8/VP9 Video Codec SDK
Repo        : updates

I see this advice quite often. I thought it would apply to me as I’m a bit of a newbie when it comes to virtual machines. However, I found out that in my use case which was to use the virtual machine as a “web server” for development, GNOME Boxes is hopeless because there is no reasonable way to set up port forwarding. Also with virt-manager I was not able to do it, it was way too difficult and complicated. So I highly recommend going with the advice in this thread and using VirtualBox, for anyone who needs the port forwarding.

As for secure boot with VirtualBox, I made sure I have akmods package installed, then followed the guide in /usr/share/doc/akmods/README.secureboot. Then, after following the instructions and rebooting, I was just able to install VirtualBox from rpmfusion with no issues, and didn’t need to manually sign anything. Secureboot is enabled, no issues. This was something that was previously confusing me in many guides.