Ask Your Question

Trying to install virtualbox or vmware - Fedora 20 [closed]

asked 2014-02-06 06:11:52 -0500

zedd2006 gravatar image

updated 2015-01-19 22:18:01 -0500

mether gravatar image

I have several classes this semester that require me to run VM's. Specifically W2008 and CentOS. I need either vmware player or virtualbox. I have fedora 20 installed as the host. With both applications it gives me kernel header errors. virtualbox installed fine, but when i go to launch a guest i get kernel driver not installed and to run /etc/init.d/vboxdrv setup so i run that and gives me kernel failed, then i installed DKMS and re-ran that command and the log file gives me

Uninstalling modules from DKMS Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxhost/4.3.6/source -> /usr/src/vboxhost-4.3.6

DKMS: add completed. Failed to install using DKMS, attempting to install without Makefile:183: * Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.</directory>

For VMWare player 6 it says Kernel headers for version 3.12.8-300.fc20.x86_64 were not found i did search around and found the solution that is suppose to work but i does not work for me and it's this command

cp /usr/include/linux/version.h /lib/modules/3.12.8-300.fc20.x86_64/build/include/linux/

the output of this command is cp: cannot create regular file ‘/lib/modules/3.12.8-300.fc20.x86_64/build/include/linux/’: No such file or directory after i digged into the folders i found that in the 3.12.8XXXX folder is a file named build, that is neither a file nor a folder, and i can not copy it or anything. Which to me is confusing because this command says there should be a 2 more sub folders inside build, but build already exists but i can not cat build, nor can i cd build.

Does anyone have the answer to this? I dont have time to be fixing crap with fedora and maintain 16 credit hours. I've already wasted a day and half and i'm almost at the point of installing ubuntu.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by NickTux
close date 2014-05-04 16:47:21.542952


I did the full procedure listed the question "How to install Oracle VM VirtualBox in Fedora 20" and it worked for me.I was trying to get the VBOXADDITIONS from the file cabinet to load. I had same issue with Kernel Headers when vbox additions was auto-run from top right button in file cabinet. I had to mount this windows file "C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso" as a CD in virtual box storage settings at first to get it to display in the file cabinet. Initially the "Fedora-Live-Desktop-i686-20-1.iso" file was still listed as the CD in storage settings after I had installed the Fedora-Live...iso to the VBOX disk --- so I removed that Fedora-Live...iso file in settings because everytime I booted it still asked me to make the installation choice of LIVE vs Hard disk.

slsearles gravatar imageslsearles ( 2014-04-04 17:41:10 -0500 )edit

ll /lib/modules/3.13.9-200.fc20.x86_64/ , build -> /usr/src/kernels/3.13.9-200.fc20.x86_64 , rpm -qf /usr/src/kernels/3.13.9-200.fc20.x86_64/ kernel-devel-3.13.9-200.fc20.x86_64 you need install kernel-devel and kernel-headers

sergiomb gravatar imagesergiomb ( 2014-04-14 18:39:49 -0500 )edit

4 Answers

Sort by » oldest newest most voted

answered 2014-02-06 07:11:05 -0500

NickTux gravatar image

updated 2014-07-17 15:42:02 -0500

How to install Oracle VM VirtualBox in Fedora 20

(Oracle VM repository)

If you have UEFI with Secure boot On, then try this answer instead.

Make sure that the system is up to date.

yum update

If a kernel update arrives, reboot the system. You must run the kernel with its current headers. Alternatively examine the results of the following commands

rpm -qa kernel | sort -V | tail -n 1 

uname -rm

The versions should match !

Add the virtualbox .repo

su - 
cd /etc/yum.repos.d/


yum update

Install the required packages

yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

Install virtualbox

yum install VirtualBox-4.3

If you want another version, use Tab Completion to list them all.

Build the modules now.

/etc/init.d/vboxdrv setup

Add the user in vboxusers group

usermod -a -G vboxusers username

replace username with your actual username.

Exit from root environment


Run virtualbox either from terminal by issuing the command virtualbox or search in the menu for an entry.

If in trouble with KERN_DIR error message

Try to specify the KERN_DIR manually

su - 
KERN_DIR=/usr/src/kernels/`uname -r` 
export KERN_DIR

Try to rebuild the modules now

/etc/init.d/vboxdrv setup
edit flag offensive delete link more



very nice answer! :)

nonamedotc gravatar imagenonamedotc ( 2014-02-06 08:47:34 -0500 )edit

That fixed both issues with vmware and virtualbox, thank you!

zedd2006 gravatar imagezedd2006 ( 2014-02-06 09:15:45 -0500 )edit

Damn, I can only upvote this answer once...

Cobra gravatar imageCobra ( 2014-02-06 11:36:18 -0500 )edit

Hello, i followed the instructions but got an error when compiling: [root@machine yum.repos.d]# /etc/init.d/vboxdrv setup Stopping VirtualBox kernel modules [ OK ] Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong)

when looking at the log file, i get: Makefile:183: * Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.</directory>

I tried to run virtualbox anyway, and got: [root@machine yum.repos.d]# virtualbox WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (3.13.8-200.fc20.x86_64) or it failed to load. Please recompile the kernel module and install it by

       sudo /etc/init.d/vboxdrv setup

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

Qt WARNING: Qt: Session management error: None ...(more)

Oded gravatar imageOded ( 2014-04-05 15:12:27 -0500 )edit

@Oded , I have already (predict ? ) answered this problem. See the "If in trouble with KERN_DIR error message" section.

NickTux gravatar imageNickTux ( 2014-04-17 18:32:41 -0500 )edit

answered 2014-03-02 00:36:26 -0500

t4li3sin gravatar image

updated 2014-05-04 16:51:00 -0500

NickTux gravatar image

I had an Issue getting VMWare Player and Workstation to compile on Fedora 20 /w Kernel 3.13.5 Then I found a solution.

And I quote it here (Thanks to Dave Malpas) :

There was a problem compiling the modules for VMWare Workstation to work on Fedora 20. Turns out there was / is a bug with netfilter.


Note: You might ned to install 'patch' (yum install patch)

curl -o /tmp/vmware-netfilter.patch
cd /usr/lib/vmware/modules/source
tar -xvf vmnet.tar
patch -p0 -i /tmp/vmware-netfilter.patch
tar -cf vmnet.tar vmnet-only
rm -r vmnet-only
vmware-modconfig --console --install-all
edit flag offensive delete link more


Finally a solution that works. Thank you very much

lnxslck gravatar imagelnxslck ( 2014-03-04 04:12:05 -0500 )edit

Like a charm.

mjelen gravatar imagemjelen ( 2014-03-17 04:30:07 -0500 )edit

answered 2014-02-10 20:39:11 -0500

sergiomb gravatar image

or install VirtualBox with rpmfusion repos

yum install VirtualBox kmod-VirtualBox

kmod-VirtualBox is a meta-package which sole purpose is to make sure you get VirtualBox kernel module(s) together with a new kernel.

edit flag offensive delete link more


Yes, this is the way easiest method, using that for a while...

markusN gravatar imagemarkusN ( 2014-05-04 15:57:58 -0500 )edit

This is the only solution worked on fedora21. Installed from rpm fusion, yum install kmod-VirtualBox-$(uname -r) kmod-VirtualBox yum install akmod-VirtualBox kernel-devel-$(uname -r); akmods /usr/sbin/akmods --force systemctl restart systemd-modules-load.service

Viola! it works!

saikrishna gravatar imagesaikrishna ( 2015-04-01 09:44:38 -0500 )edit

answered 2014-05-04 06:08:36 -0500

Ervin gravatar image

updated 2014-05-04 06:13:59 -0500

I give an easier path.

First go the Oracle VM VirtualBox page and download the latest version for Oracle Virtual Box, Fedora rpm i386 for 32 bit and / or amd64 for 64 bit.

Let the file download.

Open the Terminal and write either : su password ( to become root) than yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

Or sudo yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

After the files have installed, install the virtualbox rpm file directly with open and install.

Build the module as root su /etc/init.d/vboxdrv setup or sudo /etc/init.d/vboxdrv setup - However the first one is more likely to work. You should use sudo only if you are system administrator. Check settings, users, to see if you are administrator.

Then become vboxuser, like described above

usermod -a -G vboxusers username username is your name That;s all. Don't forget to download the extension pack too, it might be useful if you want to insert a usb to your os in the virtualbox. The extension pack is installed by virtualbox, it works on all platforms.

edit flag offensive delete link more

Question Tools


Asked: 2014-02-06 06:11:52 -0500

Seen: 57,020 times

Last updated: Jul 17 '14