Page 1 of 1

Problem mounting external folders - virtualbox-guest-utils service not running

Posted: 14. Aug 2016, 17:53
by fustbariclation
Any suggestions gratefully received!

I've tried following all the advice I can find on-line, and I've reinstalled virtualbox-guest-utils several times, as recommended by different sites. For example:

dpkg-reconfigure --priority low virtualbox-guest-dkms

This has made no difference.

The service is not starting, so I can't mount any external folders.

I have this error:

Code: Select all

$ sudo systemctl status virtualbox-guest-utils.service

● virtualbox-guest-utils.service - LSB: VirtualBox Linux Additions
   Loaded: loaded (/etc/init.d/virtualbox-guest-utils; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2016-08-13 20:39:52 SAST; 4min 43s ago
     Docs: man:systemd-sysv-generator(8)

Aug 13 20:39:52 service-governance-com systemd[1]: Starting LSB: VirtualBox Linux Additions...
Aug 13 20:39:52 service-governance-com virtualbox-guest-utils[4549]:  * Starting VirtualBox Additions
Aug 13 20:39:52 service-governance-com virtualbox-guest-utils[4549]:  * No suitable module for running kernel found
Aug 13 20:39:52 service-governance-com virtualbox-guest-utils[4549]:    ...fail!
Aug 13 20:39:52 service-governance-com systemd[1]: virtualbox-guest-utils.service: Control process exited, code=exited status=1
Aug 13 20:39:52 service-governance-com systemd[1]: Failed to start LSB: VirtualBox Linux Additions.
Aug 13 20:39:52 service-governance-com systemd[1]: virtualbox-guest-utils.service: Unit entered failed state.
Aug 13 20:39:52 service-governance-com systemd[1]: virtualbox-guest-utils.service: Failed with result 'exit-code'
I'm running:

Virtual box: Version 5.1.2 r108956
OS/X: 10.11.6
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

The status for virtual box is:

Code: Select all

service virtualbox status
● virtualbox.service - LSB: VirtualBox Linux kernel module
   Loaded: loaded (/etc/init.d/virtualbox; bad; vendor preset: enabled)
   Active: active (exited) since Sat 2016-08-13 20:34:34 SAST; 16min ago
     Docs: man:systemd-sysv-generator(8)

Aug 13 20:34:33 service-governance-com systemd[1]: Starting LSB: VirtualBox Linux kernel module...
Aug 13 20:34:33 service-governance-com virtualbox[2578]:  * Loading VirtualBox kernel modules...
Aug 13 20:34:34 service-governance-com virtualbox[2578]:    ...done.
Aug 13 20:34:34 service-governance-com systemd[1]: Started LSB: VirtualBox Linux kernel module.

Re: Problem mounting external folders - virtualbox-guest-utils service not running

Posted: 14. Aug 2016, 18:39
by socratis
fustbariclation wrote:I've tried following all the advice I can find on-line, and I've reinstalled virtualbox-guest-utils several times, as recommended by different sites.
Instead of following advice from random bloggers, why don't you look at the User Manual? Chapter 4.2.2. Guest Additions for Linux.

Moving to "Linux guests".

Re: Problem mounting external folders - virtualbox-guest-utils service not running

Posted: 14. Aug 2016, 19:26
by Perryg
hummm,

It looks like you are installing the OS distro fork of the guest additions which we do not support. Post the guests log file ( as an attachment ). Right click on the guest in the Main Manager then click show log. Save and post as an attachment. Compress if it is too large to post.

Re: Problem mounting external folders - virtualbox-guest-utils service not running

Posted: 15. Aug 2016, 11:47
by fustbariclation
This is the log file:

Code: Select all

cat vboxadd-install.log
grep: /lib/modules/4.4.0-34-generic/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/4.4.0-34-generic/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
./scripts/gcc-version.sh: line 25: /usr/local/bin/gcc: cannot execute binary file: Exec format error
./scripts/gcc-version.sh: line 26: /usr/local/bin/gcc: cannot execute binary file: Exec format error
arch/x86/Makefile:133: stack-protector enabled but compiler support broken
Makefile:676: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
/usr/local/bin/gcc: 1: /usr/local/bin/gcc: Syntax error: "(" unexpected
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (		\
echo >&2;							\
echo >&2 "  ERROR: Kernel configuration is invalid.";		\
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
echo >&2 ;							\
/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/.VBoxGuest-linux.o.d  -nostdinc -isystem   -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include  -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -msoft-float -mregparm=3 -freg-struct-return -fno-pic -march=i686 -ffreestanding -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -O2 -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wno-declaration-after-statement -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -fno-pie -I/lib/modules/4.4.0-34-generic/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxguest/ -I/tmp/vbox.0/vboxguest/include -I/tmp/vbox.0/vboxguest/r0drv/linux -D__KERNEL__ -DMODULE -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DRT_ARCH_X86  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(VBoxGuest_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxguest)" -c -o /tmp/vbox.0/.tmp_VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c
/usr/local/bin/gcc: 1: /usr/local/bin/gcc: Syntax error: "(" unexpected
scripts/Makefile.build:258: recipe for target '/tmp/vbox.0/VBoxGuest-linux.o' failed
make[2]: *** [/tmp/vbox.0/VBoxGuest-linux.o] Error 2
Makefile:1403: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
/tmp/vbox.0/Makefile.include.footer:84: recipe for target 'vboxguest' failed
make: *** [vboxguest] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module

Re: Problem mounting external folders - virtualbox-guest-utils service not running

Posted: 15. Aug 2016, 11:57
by socratis
@fustbariclation
Did you miss the bold part in Perryg's post about the attachment?

@Perryg
Perry, bold doesn't cut it anymore. Try to add a couple of tags. Example: ( as an attachment )
;)

Re: Problem mounting external folders - virtualbox-guest-utils service not running

Posted: 15. Aug 2016, 12:08
by fustbariclation
It's OK - thank you for the help.

I've found the problem. It was finding the cross compiler gcc, not the compiler itself. I've just put /usr/bin at the start of the path and it's worked OK.