Problem installing VirtualBox 1.5 on SLES host

Discussions related to using VirtualBox on Linux hosts.
Post Reply
jamesgan
Posts: 4
Joined: 12. Sep 2007, 15:25

Problem installing VirtualBox 1.5 on SLES host

Post by jamesgan »

Hi,

I've been using VirtualBox 1.5 on a WindowsXP host running multiple SLES guests with no problem and am very pleased with the product. Now I'm trying to install this on a SuSE Linux Enterprise Server 9.3 64-bit host.

I am using the generic Linux distribution i.e. VirtualBox_1.5.0_Linux_amd64.run

Exact version of the host OS:
jgan:/tmp # Linux sswas011 2.6.5-7.286-smp #1 SMP Thu May 31 10:12:58 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux
VirtualBox release 1.5

I've installed all required packages as recommended in the documentation:
jgan:/tmp # rpm -qa *kernel* *gcc*
libgcc-3.3.3-43.41
gcc-3.3.3-43.41
kernel-update-tool-0.9-20.7
kernel-smp-2.6.5-7.286
kernel-syms-2.6.5-7.286
kernel-source-2.6.5-7.286
gcc-c++-3.3.3-43.41

However when running the installer it aborted with the following message:

VirtualBox 1.5.0 installer, built Fri Aug 31 16:46:42 CEST 2007.

Testing system setup...
System setup appears correct.

Installing VirtualBox to /opt/vbox/

Output from the module build process (the Linux kernel build system) follows:

make KBUILD_VERBOSE=1 -C /lib/modules/2.6.5-7.286-smp/build SUBDIRS=/tmp/vbox.2 SRCROOT=/tmp/vbox.2 modules
make[1]: Entering directory `/usr/src/linux-2.6.5-7.286-obj/x86_64/smp'
make -C ../../../linux-2.6.5-7.286 O=../linux-2.6.5-7.286-obj/x86_64/smp modules
make -C /usr/src/linux-2.6.5-7.286-obj/x86_64/smp \
KBUILD_SRC=/usr/src/linux-2.6.5-7.286 KBUILD_VERBOSE=1 \
KBUILD_CHECK= KBUILD_EXTMOD="/tmp/vbox.2" \
-f /usr/src/linux-2.6.5-7.286/Makefile modules
mkdir -p /tmp/vbox.2/.tmp_versions
make -f /usr/src/linux-2.6.5-7.286/scripts/Makefile.build obj=/tmp/vbox.2
gcc -Wp,-MD,/tmp/vbox.2/linux/.SUPDrv-linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src
/linux-2.6.5-7.286/include -I/tmp/vbox.2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -mno-red-
zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -O2 -fomit-
frame-pointer -I/lib/modules/2.6.5-7.286-smp/build/include -I/tmp/vbox.2/ -I/tmp/vbox.2/include -I/tmp/vbox.2/r0drv/linux
-D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DUSE_NEW_OS_
INTERFACE_FOR_MM -DMODULE -DKBUILD_BASENAME=SUPDrv_linux -DKBUILD_MODNAME=vboxdrv -c -o /tmp/vbox.2/linux/.tmp_SUPDrv-linux.o
/tmp/vbox.2/linux/SUPDrv-linux.c
/tmp/vbox.2/linux/SUPDrv-linux.c:393: warning: static declaration for `disable_lapic_nmi_watchdog' follows non-static
/tmp/vbox.2/linux/SUPDrv-linux.c: In function `supdrvOSGetCPUCount':
/tmp/vbox.2/linux/SUPDrv-linux.c:1846: error: `smp_num_cpus' undeclared (first use in this function)
/tmp/vbox.2/linux/SUPDrv-linux.c:1846: error: (Each undeclared identifier is reported only once
/tmp/vbox.2/linux/SUPDrv-linux.c:1846: error: for each function it appears in.)
make[4]: *** [/tmp/vbox.2/linux/SUPDrv-linux.o] Error 1
make[3]: *** [_module_/tmp/vbox.2] Error 2
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.5-7.286-obj/x86_64/smp'
make: *** [vboxdrv] Error 2


It looks like the installer wasn't able to discover the number of smp cpus on the host? How can I resolve this?

Thanks for any help.
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Post by frank »

This is a quite old Linux kernel. To make the module compile edit the file linux/SUPDrv-linux.c and change both lines 1843 and 1844 from num_present_cpus to num_online_cpus.
jamesgan
Posts: 4
Joined: 12. Sep 2007, 15:25

Problem installing VirtualBox 1.5 on SLES host

Post by jamesgan »

Many thanks for you reply. I've made the change as advised and rebuilt using the temp build script. Now the following exception occured:

jgan:/tmp/vbox.2 # ./build_in_tmp
make KBUILD_VERBOSE=1 -C /lib/modules/2.6.5-7.286-smp/build SUBDIRS=/tmp/vbox.3 SRCROOT=/tmp/vbox.3 modules
make[1]: Entering directory `/usr/src/linux-2.6.5-7.286-obj/x86_64/smp'
make -C ../../../linux-2.6.5-7.286 O=../linux-2.6.5-7.286-obj/x86_64/smp modules
make -C /usr/src/linux-2.6.5-7.286-obj/x86_64/smp \
KBUILD_SRC=/usr/src/linux-2.6.5-7.286 KBUILD_VERBOSE=1 \
KBUILD_CHECK= KBUILD_EXTMOD="/tmp/vbox.3" \
-f /usr/src/linux-2.6.5-7.286/Makefile modules
mkdir -p /tmp/vbox.3/.tmp_versions
make -f /usr/src/linux-2.6.5-7.286/scripts/Makefile.build obj=/tmp/vbox.3
gcc -Wp,-MD,/tmp/vbox.3/linux/.SUPDrv-linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.5-7.286/include -I/tmp/vbox.3 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -O2 -fomit-frame-pointer -I/lib/modules/2.6.5-7.286-smp/build/include -I/tmp/vbox.3/ -I/tmp/vbox.3/include -I/tmp/vbox.3/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DUSE_NEW_OS_INTERFACE_FOR_MM -DMODULE -DKBUILD_BASENAME=SUPDrv_linux -DKBUILD_MODNAME=vboxdrv -c -o /tmp/vbox.3/linux/.tmp_SUPDrv-linux.o /tmp/vbox.3/linux/SUPDrv-linux.c
/tmp/vbox.3/linux/SUPDrv-linux.c:393: warning: static declaration for `disable_lapic_nmi_watchdog' follows non-static
gcc -Wp,-MD,/tmp/vbox.3/.SUPDRVShared.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.5-7.286/include -I/tmp/vbox.3 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -O2 -fomit-frame-pointer -I/lib/modules/2.6.5-7.286-smp/build/include -I/tmp/vbox.3/ -I/tmp/vbox.3/include -I/tmp/vbox.3/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DUSE_NEW_OS_INTERFACE_FOR_MM -DMODULE -DKBUILD_BASENAME=SUPDRVShared -DKBUILD_MODNAME=vboxdrv -c -o /tmp/vbox.3/.tmp_SUPDRVShared.o /tmp/vbox.3/SUPDRVShared.c
gcc -Wp,-MD,/tmp/vbox.3/r0drv/.alloc-r0drv.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.5-7.286/include -I/tmp/vbox.3 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -O2 -fomit-frame-pointer -I/lib/modules/2.6.5-7.286-smp/build/include -I/tmp/vbox.3/ -I/tmp/vbox.3/include -I/tmp/vbox.3/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DUSE_NEW_OS_INTERFACE_FOR_MM -DMODULE -DKBUILD_BASENAME=alloc_r0drv -DKBUILD_MODNAME=vboxdrv -c -o /tmp/vbox.3/r0drv/.tmp_alloc-r0drv.o /tmp/vbox.3/r0drv/alloc-r0drv.c
gcc -Wp,-MD,/tmp/vbox.3/r0drv/.initterm-r0drv.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.5-7.286/include -I/tmp/vbox.3 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -O2 -fomit-frame-pointer -I/lib/modules/2.6.5-7.286-smp/build/include -I/tmp/vbox.3/ -I/tmp/vbox.3/include -I/tmp/vbox.3/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DUSE_NEW_OS_INTERFACE_FOR_MM -DMODULE -DKBUILD_BASENAME=initterm_r0drv -DKBUILD_MODNAME=vboxdrv -c -o /tmp/vbox.3/r0drv/.tmp_initterm-r0drv.o /tmp/vbox.3/r0drv/initterm-r0drv.c
gcc -Wp,-MD,/tmp/vbox.3/r0drv/linux/.alloc-r0drv-linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.5-7.286/include -I/tmp/vbox.3 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -O2 -fomit-frame-pointer -I/lib/modules/2.6.5-7.286-smp/build/include -I/tmp/vbox.3/ -I/tmp/vbox.3/include -I/tmp/vbox.3/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DUSE_NEW_OS_INTERFACE_FOR_MM -DMODULE -DKBUILD_BASENAME=alloc_r0drv_linux -DKBUILD_MODNAME=vboxdrv -c -o /tmp/vbox.3/r0drv/linux/.tmp_alloc-r0drv-linux.o /tmp/vbox.3/r0drv/linux/alloc-r0drv-linux.c
In file included from /tmp/vbox.3/r0drv/linux/alloc-r0drv-linux.c:22:
/tmp/vbox.3/r0drv/linux/the-linux-kernel.h:105: error: redefinition of `jiffies_to_msecs'
/usr/src/linux-2.6.5-7.286/include/linux/jiffies.h:74: error: `jiffies_to_msecs' previously defined here
/tmp/vbox.3/r0drv/linux/the-linux-kernel.h:116: error: redefinition of `msecs_to_jiffies'
/usr/src/linux-2.6.5-7.286/include/linux/jiffies.h:96: error: `msecs_to_jiffies' previously defined here
make[4]: *** [/tmp/vbox.3/r0drv/linux/alloc-r0drv-linux.o] Error 1
make[3]: *** [_module_/tmp/vbox.3] Error 2
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.5-7.286-obj/x86_64/smp'
make: *** [vboxdrv] Error 2


Thanks in advance for any help.
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Post by frank »

This seems to be a very home-brewn kernel by Novell. Just comment the jiffies_to_msecs() function in the-linux-kernel.h out (#if 0 ... #endif) around the code block.
jamesgan
Posts: 4
Joined: 12. Sep 2007, 15:25

Problem installing VirtualBox 1.5 on SLES host

Post by jamesgan »

I commented out jiffies_to_msecs() and msecs_to_jiffies(), rebuilt and it seemed to have worked! Now I'm afraid I have to ask you a silly question, what do I do next? I ran the script build_in_temp which created a new temporary vbox working folder (vbox.2) that is removed as soon as a compilation has finished.

Here's the output from the build script:

<<truncated>>
gcc -Wp,-MD,/tmp/vbox.2/r0drv/.memobj-r0drv.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src
/linux-2.6.5-7.286/include -I/tmp/vbox.2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -mno-red-
zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -O2 -fomit-
frame-pointer -I/lib/modules/2.6.5-7.286-smp/build/include -I/tmp/vbox.2/ -I/tmp/vbox.2/include -I/tmp/vbox.2/r0drv/linux
-D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DUSE_NEW_OS_
INTERFACE_FOR_MM -DMODULE -DKBUILD_BASENAME=memobj_r0drv -DKBUILD_MODNAME=vboxdrv -c -o /tmp/vbox.2/r0drv/.tmp_memobj-r0drv.o
/tmp/vbox.2/r0drv/memobj-r0drv.c
gcc -Wp,-MD,/tmp/vbox.2/r0drv/linux/.memobj-r0drv-linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude
2 -I/usr/src/linux-2.6.5-7.286/include -I/tmp/vbox.2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-comm
on -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time
-O2 -fomit-frame-pointer -I/lib/modules/2.6.5-7.286-smp/build/include -I/tmp/vbox.2/ -I/tmp/vbox.2/include -I/tmp/vbox.2
/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -
DUSE_NEW_OS_INTERFACE_FOR_MM -DMODULE -DKBUILD_BASENAME=memobj_r0drv_linux -DKBUILD_MODNAME=vboxdrv -c -o /tmp/vbox.2/r0drv/l
inux/.tmp_memobj-r0drv-linux.o /tmp/vbox.2/r0drv/linux/memobj-r0drv-linux.c
ld -m elf_x86_64 -r -o /tmp/vbox.2/vboxdrv.o /tmp/vbox.2/linux/SUPDrv-linux.o /tmp/vbox.2/SUPDRVShared.o /tmp/vbox.2/r0drv
/alloc-r0drv.o /tmp/vbox.2/r0drv/initterm-r0drv.o /tmp/vbox.2/r0drv/linux/alloc-r0drv-linux.o /tmp/vbox.2/r0drv/linux/initter
m-r0drv-linux.o /tmp/vbox.2/r0drv/linux/process-r0drv-linux.o /tmp/vbox.2/r0drv/linux/semaphore-r0drv-linux.o /tmp/vbox.2/r0d
rv/linux/spinlock-r0drv-linux.o /tmp/vbox.2/r0drv/linux/thread-r0drv-linux.o /tmp/vbox.2/alloc/heapsimple.o /tmp/vbox.2/r0drv
/memobj-r0drv.o /tmp/vbox.2/r0drv/linux/memobj-r0drv-linux.o
Building modules, stage 2.
make -rR -f /usr/src/linux-2.6.5-7.286/scripts/Makefile.modpost
scripts/modpost -i /usr/src/linux-2.6.5-7.286-obj/x86_64/smp/Module.symvers -s /dev/null /tmp/vbox.2/vboxdrv.o
gcc -Wp,-MD,/tmp/vbox.2/.vboxdrv.mod.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-
2.6.5-7.286/include -I/usr/src/linux-2.6.5-7.286/ -I -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-commo
n -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time
-O2 -fomit-frame-pointer -DKBUILD_BASENAME=vboxdrv -DKBUILD_MODNAME=vboxdrv -DMODULE -c -o /tmp/vbox.2/vboxdrv.mod.o /tmp/vb
ox.2/vboxdrv.mod.c
ld -m elf_x86_64 -r -o /tmp/vbox.2/vboxdrv.ko /tmp/vbox.2/vboxdrv.o /tmp/vbox.2/vboxdrv.mod.o
make[1]: Leaving directory `/usr/src/linux-2.6.5-7.286-obj/x86_64/smp'

Your help is much appreciated.
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Post by frank »

Execute

build_in_tmp install

or -- if you changed the sources in the virtualbox tree --

/etc/init.d/vboxdrv setup
jamesgan
Posts: 4
Joined: 12. Sep 2007, 15:25

Post by jamesgan »

Hi again,

I ran 'make install' and everything went fine.

I then executed './vboxdrv.sh setup' as you suggested and here's the output:

Code: Select all

Stopping VirtualBox kernel module                                                                                 done
Recompiling VirtualBox kernel module                                                                              done
Starting VirtualBox kernel module FATAL: Error inserting vboxdrv (/lib/modules/2.6.5-7.286-smp/misc/vboxdrv.ko): Invalid argument
                                                                                                                  failed
(modprobe vboxdrv failed)
I did a 'dmesg' and here's the results:

Code: Select all

vboxdrv: module not supported by Novell, setting U taint flag.
vboxdrv: NMI watchdog in IO_APIC mode active -- refused to load the kernel module!
vboxdrv: Please disable the NMI watchdog by specifying 'nmi_watchdog=0' at kernel
vboxdrv: command line.
Also, I noticed that the device node vboxdrv is missing in /dev?

It seems to me that SLES 9.3 is not supported out-of-the-box by vbox 1.5. Would you advice that I switch to SLES 10 or OpenSuse?

Thanks.
Post Reply