CentOS 7 with VirtualBox

General support questions
mabad
Posts: 2
Joined: 2014/07/12 23:28:54

CentOS 7 with VirtualBox

Post by mabad » 2014/07/12 23:38:44

Hello everyone,

I have installed CentOS 7 under Virtualbox 4.3.12 and Windows 7. The install went fine and CentOS 7 is operational.
When I tried to install VirtualBox's Guest Additions to integrate the screen resolution and mouse pointer, I could not do it.
One of the requirements is to install the dkms package from repoforge. I suppose it might still be too early to get it as CentOS 7 is still hot from the oven.
Does anyone know an alternative to get dkms for VirtualBox?

Thanks in advance

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 with VirtualBox

Post by TrevorH » 2014/07/13 00:30:59

EPEL has dkms packages but you will also need the Guest Additions from an unreleased copy of VirtualBox to build them as they do not do so on el7 using the ones from 4.3.12. There's a 4.3.14-RC1 or so iso out there that is meant to fix it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

nbritton
Posts: 38
Joined: 2014/07/09 23:38:46

Re: CentOS 7 with VirtualBox

Post by nbritton » 2014/07/13 01:09:05

To install VirtualBox Guest Additions on a CentOS 7 guest run this as root:

Code: Select all

rpm -Uvh http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm;
yum -y install dkms kernel-devel-$(uname -r) kernel-headers-$(uname -r);
wget http://download.virtualbox.org/virtualbox/4.3.14/VBoxGuestAdditions_4.3.14.iso;
mount -o loop VBoxGuestAdditions_4.3.14.iso /media/;
/media/VBoxLinuxAdditions.run;
To install VirtualBox on a CentOS 7 host run these as root:

Code: Select all

rpm -Uvh http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm;
yum -y install dkms kernel-devel-$(uname -r) kernel-headers-$(uname -r);
yum -y localinstall http://download.virtualbox.org/virtualbox/4.3.14/VirtualBox-4.3-4.3.14_95030_fedora18-1.x86_64.rpm;
Last edited by nbritton on 2014/07/20 18:22:53, edited 1 time in total.

mabad
Posts: 2
Joined: 2014/07/12 23:28:54

Re: CentOS 7 with VirtualBox

Post by mabad » 2014/07/13 02:37:52

Thanks nbritton,

with your first answer I was able to find the iso file for the Additions (and also a buggy RC1 windows version of VirtualBox). When I came back to answer I saw your modifications, which is what I did.

After installing he RC1 Guest Additions and the EPEL repo, the screen and mouse integration work fine. Still a little bit flunky: the secondary screen blinks when some operations are performed on CentOS, but for a Release Candidate 1 is not bad.

Thanks again.

lshantz
Posts: 1
Joined: 2014/09/25 04:11:46

Re: CentOS 7 with VirtualBox

Post by lshantz » 2014/09/25 04:32:19

Unfortunately the target has moved. The following command/url is not longer valid. FYI. Not sure where to get this now, but I'm off to try to find it .

rpm -Uvh http://dl.fedoraproject.org/pub/epel/be ... noarch.rpm

The requested URL returned error: 404 Not Found
error: skipping http://dl.fedoraproject.org/pub/epel/be ... noarch.rpm - transfer failed
[root@localhost ~]#

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 with VirtualBox

Post by TrevorH » 2014/09/25 07:18:46

Rather than use fixed URLs, use google and search for EPEL. That turns up the link to their front page and the FAQ. In the FAQ there are links to current epel-release packages for el5, el6 and el7.

Oh, and simpler than that, CentOS has recently added epel-release to the "extras" repo so yum --enablerepo=extras install epel-release will do it
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Noval
Posts: 1
Joined: 2014/09/16 11:24:39

Re: CentOS 7 with VirtualBox

Post by Noval » 2014/09/25 07:42:30

I don't know if this will help you but I was able to install guest additions on centOS 7 downloading the last ISO (VBoxGuestAdditions_4.3.16.iso) from http://download.virtualbox.org/virtualbox/4.3.16/
and mounting the image with virtualbox.

User avatar
Apollo7
Posts: 1
Joined: 2014/03/18 20:50:43

Re: CentOS 7 with VirtualBox

Post by Apollo7 » 2014/09/30 03:27:21

Using Virtualbox 4.3.16 on an OS X 10.9.5 host and CentOS 7 guest machine, I was able to install the VirtualBox Guest additions by following these steps. Please point out anything that should be done in fewer steps, a different order, or not at all.

Log into CentOS 7 as a local administrator belonging to the group wheel. These terminal commands need root permission to complete their install.
  • sudo yum install epel-release
    sudo yum install dkms
    sudo yum groupinstall "Development Tools"
    sudo yum install kernel-devel
    #Restart Guest Machine
    #cd to Guest Additions CD image
    sudo ./VBoxLinuxAdditions.run

PhillyIdol
Posts: 11
Joined: 2015/08/27 18:43:19

Re: CentOS 7 with VirtualBox

Post by PhillyIdol » 2015/09/03 18:04:47

Not sure if anyone here ran into this, but I'm testing the 'minimal' install of CentOS 7 with the 'Compatibility Libraries' and 'Development Tools' checked during the initial installation process, then after install, used the steps in this post (which were awesome BTW - really saved me) for the Guest Additions, and everything went well - except mouse integration doesn't work.

I understand it's only the 'minimal' install, so NOT using a GUI - just CLI, but I'm sure Ive seen other CentOS CLI only VB's where mouse integration works, so don't think that's the issue. I even ran the export KERN_DIR=/usr/src/kernels/`uname -r` command JIC.

Anyway, if anyone has any insights, would greatly appreciate it.

Cheers

BTW - using newest CentOS 7 and newest VB (v5.0.2)

PhillyIdol
Posts: 11
Joined: 2015/08/27 18:43:19

Re: CentOS 7 with VirtualBox

Post by PhillyIdol » 2015/09/03 22:32:28

Sorry all...

Where I said 'used the steps in this post', I meant to say the steps listed in this thread by Apollo7. My bad :oops:

Post Reply