LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Unable to install virtual box guest additions (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/unable-to-install-virtual-box-guest-additions-944923/)

sirius57 05-14-2012 02:08 PM

Unable to install virtual box guest additions
 
I am running opensuse 11.3 64 bit host and virtualbox opensuse 12.1 32bit guest. Virtual box version is 3.0.4. I have added kernel sources, make and the gcc compiler. I get this error log file and am unable to resolve the problem.



Installing VirtualBox 3.0.4 Guest Additions, built Tue Aug 4 19:37:03 CEST 2009

Testing the setup of the guest system

Building test kernel module vboxadd_test...

Makefile:25: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.
grep: /usr/src/linux/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 -C /usr/src/linux SUBDIRS=/tmp/selfgz610117513/module/test SRCROOT=/tmp/selfgz610117513/module/test modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)

ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.

mkdir -p /tmp/selfgz610117513/module/test/.tmp_versions ; rm -f /tmp/selfgz610117513/module/test/.tmp_versions/*

WARNING: Symbol version dump /usr/src/linux-3.1.10-1.9/Module.symvers
is missing; modules will have no dependencies and modversions.

make -f scripts/Makefile.build obj=/tmp/selfgz610117513/module/test
/tmp/selfgz610117513/module/test/Makefile:25: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.
grep: /usr/src/linux/include/linux/version.h: No such file or directory
gcc -Wp,-MD,/tmp/selfgz610117513/module/test/.test.o.d -nostdinc -isystem /usr/lib/gcc/i586-suse-linux/4.6/include -I/usr/src/linux-3.1.10-1.9/arch/x86/include -Iarch/x86/include/generated -Iinclude -include /usr/src/linux-3.1.10-1.9/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 -mno-red-zone -mcmodel=kernel -maccumulate-outgoing-args -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fomit-frame-pointer -DCC_HAVE_ASM_GOTO -I/usr/src/linux/include -I/tmp/selfgz610117513/module/test/ -I/tmp/selfgz610117513/module/test/include -I/tmp/selfgz610117513/module/test/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -D_X86_ -DIN_RT_R0 -DIN_SUP_R0 -DVBGL_VBOXGUEST -DVBGL_HGCM -DVBOX_WITH_HGCM -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(test)" -D"KBUILD_MODNAME=KBUILD_STR(vboxadd_test)" -c -o /tmp/selfgz610117513/module/test/test.o /tmp/selfgz610117513/module/test/test.c
/tmp/selfgz610117513/module/test/test.c:1:0: error: code model ‘kernel’ not supported in the 32 bit mode
/tmp/selfgz610117513/module/test/test.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
make[2]: *** [/tmp/selfgz610117513/module/test/test.o] Error 1
make[1]: *** [_module_/tmp/selfgz610117513/module/test] Error 2
make: *** [vboxadd_test] Error 2

Building the test kernel module vboxadd_test failed.
Giving up due to the problems mentioned above.

frankbell 05-14-2012 08:23 PM

Check that you have the kernel headers and sources installed; without them, Guest Addtions will not compile properly. I'm not 100% sure you need them in the host--it's been a while--but you definitely need them in the VM.

Many distros do not install them by default. I don't know Suse well enough to suggest how to check, but that would be the first step for me.

Knightron 05-15-2012 06:19 AM

might i ask why you're using an out dated version of virtualbox? infact how did you even install that version?
My two cents; use the virtualbox repo, it keeps things up to date and easy to manage in my experience.
If you'd like more info on this method, just say so, and my self or somebody else can help.

djsoundfx 05-15-2012 10:47 AM

Quote:

Originally Posted by Knightron (Post 4678732)
might i ask why you're using an out dated version of virtualbox? infact how did you even install that version?
My two cents; use the virtualbox repo, it keeps things up to date and easy to manage in my experience.
If you'd like more info on this method, just say so, and my self or somebody else can help.

This is a very valid point, you should probably start by updating your virtualbox there are even preconfigured packages for your architecture on their website https://www.virtualbox.org/wiki/Linux_Downloads and at the bottom the link to their repo: http://download.virtualbox.org/virtu...irtualbox.repo

Also according to openSUSE's website...
Quote:

Originally Posted by http://en.opensuse.org/VirtualBox
Installing the latest Version of the Guest Additions

The Guest Additions is software that installs in the guest operating system and aims to make interaction with and connecting to the guest simple and seamless, for example by enabling features like folder sharing with the host. By default Opensuse installs the Virtualbox guest additions automatically when it's installed as a Virtualbox guest.


sirius57 05-16-2012 01:41 PM

I have heard of existing vm's not working after virtual box has been updated. I have several vm's installed so that is why I never updated virtual box. In the meantime I will check yast for kernel sources and headers.
Thanks for the replies.

djsoundfx 05-16-2012 05:30 PM

Personally I haven't had an issue (with the VMs) after upgrading but as always make sure you backup everything before you upgrade and you'll be fine. If you don't already maintain a bare metal backup of your host then it's worthwhile to look in to clonezilla/ghost etc.


All times are GMT -5. The time now is 07:18 PM.