Ask Your Question

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

asked 2014-02-06 12:11:52 +0000

zedd2006 gravatar image

updated 2015-01-20 04:18:01 +0000

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 NikTh
close date 2014-05-04 21: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 ( 2014-04-04 22:41:10 +0000 )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 ( 2014-04-14 23:39:49 +0000 )edit

4 answers

Sort by » oldest newest most voted

answered 2014-02-06 13:11:05 +0000

NikTh gravatar image

updated 2014-07-17 20:42:02 +0000

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/
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo


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 ( 2014-02-06 14:47:34 +0000 )edit

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

zedd2006 ( 2014-02-06 15:15:45 +0000 )edit

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

Cobra ( 2014-02-06 17:36:18 +0000 )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 ( 2014-04-05 20:12:27 +0000 )edit

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

NikTh ( 2014-04-17 23:32:41 +0000 )edit

answered 2014-03-02 06:36:26 +0000

t4li3sin gravatar image

updated 2014-05-04 21:51:00 +0000

NikTh 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. http://www.davemalpass.com/install-vmware-workstation-on-fedora-20-64bit/

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.

From https://wiki.archlinux.org/index.php/VMware

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

curl http://pastie.org/pastes/8672356/download -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 ( 2014-03-04 10:12:05 +0000 )edit

Like a charm.

mjelen ( 2014-03-17 09:30:07 +0000 )edit

answered 2014-02-11 02:39:11 +0000

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 ( 2014-05-04 20:57:58 +0000 )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 ( 2015-04-01 14:44:38 +0000 )edit

answered 2014-05-04 11:08:36 +0000

Ervin gravatar image

updated 2014-05-04 11:13:59 +0000

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

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.


Asked: 2014-02-06 12:11:52 +0000

Seen: 43,756 times

Last updated: Jul 17 '14