Unable to start Virtual Box in CentOS 6

Issues related to applications and software problems
Post Reply
User avatar
bluegroper
Posts: 210
Joined: 2005/09/07 23:04:21
Location: .au

Unable to start Virtual Box in CentOS 6

Post by bluegroper » 2018/05/20 02:30:23

Hi forum
I been using VirtualBox on CentOS hosts for a long time, but cannot solve this problem.
I trying to recover some old VM's from a CentOS 6 server that hasn't been used for a long time.
So I fired it up, and did a large yum update. (Perhaps that was my first mistake ?)
Including update to VirtualBox 4.2.38. (Second mistake ?)

Here's some vital details:

Code: Select all

# inxi -S
System: Host: sun1.lan Kernel: 2.6.32-696.28.1.el6.x86_64 x86_64 bits: 64 Console: tty 0
Distro: CentOS release 6.9 (Final)

Code: Select all

# yum info kernel-headers dkms
...
Installed Packages
Name        : kernel-headers
Arch        : x86_64
Version     : 2.6.32
Release     : 696.28.1.el6
Size        : 2.6 M
Repo        : installed
From repo   : updates

Name        : dkms
Arch        : noarch
Version     : 2.4.0
Release     : 1.20170926git959bd74.el6
Size        : 218 k
Repo        : installed
From repo   : epel
...

Code: Select all

# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules                         [  OK  ]
Uninstalling old VirtualBox DKMS kernel modules            [  OK  ]
Removing old VirtualBox kernel module                      [  OK  ]
Trying to register the VirtualBox kernel modules using DKMSError! Bad return status for module build on kernel: 2.6.32-696.28.1.el6.x86_64 (x86_64)
Consult /var/lib/dkms/vboxhost/4.2.38/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)
# cat /var/log/vbox-install.log
contains errors above my level of experience, including the following at the end ;

Code: Select all

test -e include/linux/autoconf.h -a -e include/config/auto.conf || (            \
        echo;                                                           \
        echo "  ERROR: Kernel configuration is invalid.";               \
        echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";      \
        echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
        echo;                                                           \
        /bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/linux/.VBoxNetFlt-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.4.7/include -Iinclude  -I/usr/src/kernels/2.6.32-696.28.1.el6.x86_64/include/uapi -I/usr/src/kernels/2.6.32-696.28.1.el6.x86_64/arch/x86/include -Iarch/include/generated -Iinclude -include /usr/src/kernels/2.6.32-696.28.1.el6.x86_64/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -I/lib/modules/2.6.32-696.28.1.el6.x86_64/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxnetflt/ -I/tmp/vbox.0/vboxnetflt/include -I/tmp/vbox.0/vboxnetflt/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(VBoxNetFlt_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxnetflt)" -D"DEBUG_HASH=60" -D"DEBUG_HASH2=11" -c -o /tmp/vbox.0/linux/.tmp_VBoxNetFlt-linux.o /tmp/vbox.0/linux/VBoxNetFlt-linux.c
/tmp/vbox.0/linux/VBoxNetFlt-linux.c: In function ‘vboxNetFltLinuxPacketHandler’:
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:940: error: implicit declaration of function ‘vlan_tx_tag_present’
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:950: error: implicit declaration of function ‘vlan_tx_tag_get’
make[2]: *** [/tmp/vbox.0/linux/VBoxNetFlt-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxnetflt] Error 2
I normally just let dkms load the needed module/s.
/var/lib/dkms/vboxhost/4.2.38/build/make.log shows these errors :

Code: Select all

make[2]: *** [/var/lib/dkms/vboxhost/4.2.38/build/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1
make[1]: *** [/var/lib/dkms/vboxhost/4.2.38/build/vboxnetflt] Error 2
make[1]: *** Waiting for unfinished jobs....
...
make: *** [_module_/var/lib/dkms/vboxhost/4.2.38/build] Error 2
make: Leaving directory `/usr/src/kernels/2.6.32-696.28.1.el6.x86_64'
Pleases and thankyous for any tips or clues to get this working again.

User avatar
TrevorH
Forum Moderator
Posts: 23454
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unable to start Virtual Box in CentOS 6

Post by TrevorH » 2018/05/20 12:38:06

Probably you need to update VirtualBox. You know that 4.2.38 is pretty ancient? In fact it's not even listed on the Vbox download pages, according to that, 4.2.36 was the last version and it was "VirtualBox 4.2.36 (released November 11th 2015)".
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply