Page 1 of 1

vboxconfig fails on Centos 7

Posted: 18. Jan 2021, 21:48
by jimmycthemd
After patching, vboxconfig fails. Virtualbox is: VirtualBox-6.0-6.0.20_137117_el7-1.x86_64 Kernel is: 5.4.65-200.el7.x86_64. Here's the excerpt from the log file:

./arch/x86/include/asm/page_64.h: In function ‘clear_page’:
././include/linux/compiler_types.h:210:24: error: expected ‘(’ before ‘__inline’
#define asm_inline asm __inline
^
./arch/x86/include/asm/alternative.h:256:2: note: in expansion of macro ‘asm_inline’
asm_inline volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,\
^
./arch/x86/include/asm/page_64.h:49:2: note: in expansion of macro ‘alternative_call_2’
alternative_call_2(clear_page_orig,
^
In file included from ./arch/x86/include/asm/barrier.h:5:0,
from ./include/linux/compiler.h:256,
from /tmp/vbox.0/include/iprt/types.h:150,
from /tmp/vbox.0/include/VBox/types.h:33,
from /tmp/vbox.0/linux/../SUPDrvInternal.h:38,
from /tmp/vbox.0/linux/SUPDrv-linux.c:32:
./arch/x86/include/asm/alternative.h:128:2: error: expected identifier or ‘(’ before string constant
"# ALT: oldinstr2\n" \

Re: vboxconfig fails on Centos 7

Posted: 19. Jan 2021, 03:59
by scottgus1
jimmycthemd wrote:After patching, vboxconfig fails.
Can you explain more what this means and what you were attempting?

Re: vboxconfig fails on Centos 7

Posted: 19. Jan 2021, 15:19
by jimmycthemd
I've been through several kernel patches since I last started VirtualBox. When I tried starting a VM (any VM) it complains about the VBox kernel drivers. When I try to execute /sbin/vboxconfig, it fails and what you see is the failure in the log file. I'm not sure what else you need.

Re: vboxconfig fails on Centos 7

Posted: 19. Jan 2021, 15:44
by scottgus1
Thanks for the info! I'm no Linux guru, but I have seen that Virtualbox needs Linux kernel headers to be pre-installed before Virtualbox is installed https://www.virtualbox.org/manual/ch02. ... nux-prereq. Perhaps, since these headers are not part of a typical Linux automatic install they aren't updated when patching.

Try a complete uninstall of Virtualbox then install the headers and Virtualbox again, as if Virtualbox were never on your computer before. Your VMs will remain behind if you take no special trouble to delete them. However a full restorable disk image (like the one you hopefully took before all the patching) would help recovery if something goes wrong.