RHEL 7.1 VirtualBox-5.0 5.0.14

Discussions related to using VirtualBox on Linux hosts.
Post Reply
PeteNorth
Posts: 2
Joined: 22. Feb 2016, 18:54

RHEL 7.1 VirtualBox-5.0 5.0.14

Post by PeteNorth »

Hi,

I did a yum update on my RHEL (7.1) laptop and it seems to have broken VirtualBox. I have tried re-installing virtualbox from scratch but without any joy.

The error on install is reported:

Running transaction
Installing : VirtualBox-5.0-5.0.14_105127_el7-1.x86_64 1/1

Creating group 'vboxusers'. VM users must be member of that group!

No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMSError! Bad return status for module build on kernel: 3.10.0-267.el7.x86_64 (x86_64)
Consult /var/lib/dkms/vboxhost/5.0.14/build/make.log for more information.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
Verifying : VirtualBox-5.0-5.0.14_105127_el7-1.x86_64 1/1

dkms is installed and up to date. The error in the dkms build log is

/var/lib/dkms/vboxhost/5.0.14/build/vboxnetflt/linux/VBoxNetFlt-linux.c:136:0: warning: "vlan_tx_tag_get" redefined [enabled by default]
# define vlan_tx_tag_get(skb) skb_vlan_tag_get(skb)
^
In file included from /var/lib/dkms/vboxhost/5.0.14/build/vboxnetflt/linux/VBoxNetFlt-linux.c:37:0:
include/linux/if_vlan.h:82:0: note: this is the location of the previous definition
#define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
^
/var/lib/dkms/vboxhost/5.0.14/build/vboxnetflt/linux/VBoxNetFlt-linux.c:137:0: warning: "vlan_tx_tag_present" redefined [enabled by default]
# define vlan_tx_tag_present(skb) skb_vlan_tag_present(skb)
^
In file included from /var/lib/dkms/vboxhost/5.0.14/build/vboxnetflt/linux/VBoxNetFlt-linux.c:37:0:
include/linux/if_vlan.h:81:0: note: this is the location of the previous definition
#define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
^
/var/lib/dkms/vboxhost/5.0.14/build/vboxnetflt/linux/VBoxNetFlt-linux.c: In function ‘vboxNetFltLinuxPacketHandler’:
/var/lib/dkms/vboxhost/5.0.14/build/vboxnetflt/linux/VBoxNetFlt-linux.c:939:9: error: implicit declaration of function ‘skb_vlan_tag_present’ [-Werror=implicit-function-declaration]
if (vlan_tx_tag_present(pBuf) && skb_headroom(pBuf) >= VLAN_ETH_HLEN)
^
/var/lib/dkms/vboxhost/5.0.14/build/vboxnetflt/linux/VBoxNetFlt-linux.c:949:13: error: implicit declaration of function ‘skb_vlan_tag_get’ [-Werror=implicit-function-declaration]
pVHdr->h_vlan_TCI = RT_H2N_U16(vlan_tx_tag_get(pBuf));
^
cc1: some warnings being treated as errors
make[2]: *** [/var/lib/dkms/vboxhost/5.0.14/build/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1
make[1]: *** [/var/lib/dkms/vboxhost/5.0.14/build/vboxnetflt] Error 2
make: *** [_module_/var/lib/dkms/vboxhost/5.0.14/build] Error 2
make: Leaving directory `/usr/src/kernels/3.10.0-267.el7.x86_64'

Any help appreciated.
PeteNorth
Posts: 2
Joined: 22. Feb 2016, 18:54

Re: RHEL 7.1 VirtualBox-5.0 5.0.14

Post by PeteNorth »

As a workaround I have done the following but I don't know how successful it will be, VirtualBox seems usable after the steps taken:

after the failed VirtualBox-5.0 install:

1) sudo vi /usr/share/virtualbox/src/vboxhost/vboxnetflt/linux/VBoxNetFlt-linux.c

and delete this section

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
# define VBOX_HAVE_SKB_VLAN
#else
# ifdef RHEL_RELEASE_CODE
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 2)
# define VBOX_HAVE_SKB_VLAN
# endif
# endif
#endif

#ifdef VBOX_HAVE_SKB_VLAN
# define vlan_tx_tag_get(skb) skb_vlan_tag_get(skb)
# define vlan_tx_tag_present(skb) skb_vlan_tag_present(skb)
#endif

Then

sudo /usr/lib/virtualbox/vboxdrv.sh setup

Which seems to get Virtual Box started despite a stream of errors.

I will see whether the VMs are usable over the course of the next few days.

Peter.
ws
Posts: 1
Joined: 23. Jun 2016, 18:16

Re: RHEL 7.1 VirtualBox-5.0 5.0.14

Post by ws »

Thanks Peter!

I have been struggling with this for quite a while (and stuck with v5.0.10...), your solution works for me. My virtual machines are running fine!
Post Reply