Can't get Vbox to work in 12.2

after installing 12.2 and getting it working I installed Vbox 4.2 with extensions. It did not leave an icon anywhere in kickoff, which it should. When I start it from command line I get a message saying the kernel needs to be recompiled, although Vbox does start. I can set up a virtual machine completely, but it won’t open, saying kernel needs recompiling.

When I recompile I get:

Stopping VirtualBox kernel modules                                    done
Uninstalling old VirtualBox DKMS kernel modules                       done
Trying to register the VirtualBox kernel modules using DKMS
Error! Your kernel headers for kernel 3.4.6-2.10-desktop cannot be found at
/lib/modules/3.4.6-2.10-desktop/build or /lib/modules/3.4.6-2.10-desktop/source.
                                                                      failed
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules                                 failed
  (Look at /var/log/vbox-install.log to find out what went wrong)
  

The log shows:

Uninstalling modules from DKMS
  removing old DKMS module vboxhost version  4.2.0

------------------------------
Deleting module version: 4.2.0
completely from the DKMS tree.
------------------------------
Done.
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxhost/4.2.0/source ->
                 /usr/src/vboxhost-4.2.0

DKMS: add Completed.
You can use the --kernelsourcedir option to tell DKMS where it's located.
Failed to install using DKMS, attempting to install without
Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.


I haven’t had a problem recompiling kernel before, assuming make, gcc, etc. were installed. Anybody know what to do here?

There is a dbus issue right now to look at: http://forums.opensuse.org/english/get-technical-help-here/applications/479284-virtualbox-4-2-cannot-talk-klauncher-not-connected-d-bus-server.html

And, I always suggest you do the following for anything to do with kernel source files:

Open YaST / Software / Software Management - Select the View Button on the top left and pick Patterns. Now, you will see several Patterns listed and you want to select:

   Development 

[X] Base Development
[X] Linux Kernel Development
[X] C/C++ Development

Then Press the Accept button on the bottom right and allow these applications to install.

VirtualBox is up to version 4.2 you can find here: https://www.virtualbox.org/wiki/Downloads

I use the following guide to install the latest version: http://forums.opensuse.org/content/59-how-install-virtualbox-opensuse-11-4-12-1-tumbleweed.html

I normally run the latest stable kernel, up to 3.6.2 you can find here: http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.6.2.tar.bz2

And use my bash script here to install it: S.A.K.C. - SUSE Automated Kernel Compiler - Version 2.78 - Blogs - openSUSE Forums

And, if you want to use kernel 3.7-rc1 & VirtualBox 4.2, you need to read about it here: http://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/479572-linux-kernel-3-7-rcx-has-been-released-test-post-your-comments-here.html

And if you need links, I got a lot more where those came from. lol!

Thank You,

On Wed, 17 Oct 2012 17:26:03 +0000, BobTheBull wrote:

> Anybody know what to do here?

Install from

http://download.opensuse.org/repositories/Virtualization:/VirtualBox_backports/openSUSE_12.2/

Looks like 4.2 is the version that’s in there (I install from the 12.1
version of this repo. Works great.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

I already reverted to the previous version of dbus to fix that problem. My install procedure is the same as in the link (probably where I got it from originally).

Currently using kernel 3.4.11-2.10.1, the latest version in the build repo. I don’t go beyond the latest kernel in the build service as I am not interested in looking for kernel problems. I am sure Vbox 4.2 should work with this kernel. I got the same results with the previous version of kernel with Vbox, too.

dkms is looking for something in one of two dirs in /lib/modules/kernel#, but neither of those dirs exist for any kernel version in /lib/modules. I haven’t seen this before and wonder if that’s not the problem? But if son, why has that suddenly popped up?

I know you’ve got lots of links, and they’ve all been good (by that I mean not that they work, but that each of them has informed me better on something or other).

I need to learn more about what patterns are and what they do. I do go through that list and install ones which look useful, but would not have thought of anything in development as I am not developing now. Nevertheless I did install the three you mentioned. Rebooted after, got same results as before.

Right now, the kernel is up to 3.4.11 and so having an error for an older kernel 3.4.6 seems kind of odd. One thing is for sure and that is I have redone how dkms works as it was dead in openSUSE 12.1, and perhaps not fully well in 12.2. My blog on dkms changes how it works under systemd and does not depend on the old /etc/init.d stuff. Here is my blog:

DKMS, systemd & Virtual Box - How to get Dynamic Kernel Module Support to work in openSUSE 12.1/12.2 - Blogs - openSUSE Forums

To determine what dkms has installed, you can open up a terminal session and type in the command:

/usr/sbin/dkms status

Here are the results I get:

vboxhost, 4.2.0, 3.6.2-2.10-desktop, x86_64: installed 
vboxhost, 4.2.0, 3.7.0-rc1-2.10-desktop, x86_64: installed 

This tells me that VirtualBox is registered with dkms for two different kernel versions, VirtualBox is at version is 4.2.0 and the driver is called vboxhost. If I list the contents of the folder /usr/src (Where dkms expects its entries to be stored):

dir /usr/src
total 16
lrwxrwxrwx  1 root root   17 Oct 13 16:03 linux -> linux-3.4.11-2.16
drwxr-xr-x 23 root root 4096 Oct 13 16:04 linux-3.4.11-2.16
drwxr-xr-x  3 root root 4096 Oct  4 17:29 linux-3.4.11-2.16-obj
drwxr-xr-x  3 root root 4096 Oct  4 17:29 linux-obj
drwxr-xr-x  8 root root 4096 Aug 24 14:47 packages
lrwxrwxrwx  1 root root   32 Oct  7 16:32 **vboxhost-4.2.0** -> ../share/virtualbox/src/vboxhost

Notice the entry **vboxhost-4.2.0 **which just a links to …/share/virtualbox/src/vboxhost where the VirtualBox compile code is kept along with instructions to dkms on how it should be compiled into the kernel. I could remove VirtualBox from dkms with a command like:

sudo /usr/sbin/dkms remove -m vboxhost 4.2.0

If I were then to run the VirtualBox setup program again,

sudo /etc/init.d/vboxdrv setup

I think it would register with dkms if it was working, though I would suggest you use my dkms fix first.

Thank You,

Your instructions at the end of the dkms fix are a little muddled. I have done everything through making userfix executable. From the beginning discussion I would assume a reboot is in order to get dkms started. system monitor does not show dkms, BTW.

I assume running the sasi script would only duplicate what I have done already.

If a reboot is in order, should I need to remove Vbox 4.2 from dkms or do anything else?

We assume you have dkms installed. If you run the following terminal command, dkms will be converted into a systemd service file and removed from /etc/init.d:

wget -nc http://paste.opensuse.org/view/download/56179570 -O ~/bin/make-dkms-installer ; chmod +x ~/bin/make-dkms-installer ; make-dkms-installer

When you reboot, if a new kernel is detected, dkms would try to reinstall the VirtualBox binary into that kernel. The commands I give in the previous post might help you understand why dkms is failing and perhaps a chance to totally remove what ever is bad in dkms in order to start over. Normally, VirtualBox will do that on its own with its command:

sudo /etc/init.d/vboxdrv setup

I say run my first terminal command to “fix” dkms. Run the last command and see if VirtuaBox can properly setup dkms. If not, look at my previous message to see what dkms has loaded and to force it to purge any entries. Now consider you did not post any dkms output from my previous example like:

/usr/sbin/dkms status

So I don’t know what is wrong with your system. Mine of course is working just fine for now with the many fixes posted in this tread. Just why all of the things have come together at once to keep VirtualBox from working is any ones guess though openSUSE took their first swing when they switched to systemd, preventing dkms from working right, then messed up dbus some how and so who know for sure what else is going wrong. Unfortunately, its my bedtime here in Austin, so its going to be Thursday before I can get back to you again.

Thank You,