rahul@localhost:~> virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.4.6-2.10-desktop) or it failed to
load. Please recompile the kernel module and install it by
sudo /etc/init.d/vboxdrv setup
You will not be able to start VMs until this problem is fixed.
Make sure the package virtualbox-host-kmp-desktop is installed. Edit, unless you downloaded it from virtualbox web site. You need gcc, gcc-c++, make, kernel-devel installed. And then run the virtualbox setup from a root terminal, or reinstall virtualbox rpm.
If the OP runs kernel-default this is not going to help.
Installed from the repos: install virtualbox-host-kmp-$YOURKERNELFLAVOR
Installed from the download from the vbox website:
su -c '/etc/init.d/vboxdrv setup'
Another thing is to install “dkms” from the Packman repo. On a kernel upgrade/change, dkms will take care that the vbox kernel module is rebuilt.
Thank you both for the replies. The system seems to have latest versions of the mentioned packages installed. Some more console log:
rahul@localhost:~> uname -a
Linux localhost 3.4.6-2.10-desktop #1 SMP PREEMPT Thu Jul 26 09:36:26 UTC 2012 (641c197) x86_64 x86_64 x86_64 GNU/Linux
rahul@localhost:~> sudo zypper in virtualbox-host-kmp-2.4.6-2.10-desktop
root's password:
Retrieving repository 'KDE:KDE3' metadata .............................................................[done]
Building repository 'KDE:KDE3' cache ..................................................................[done]
Loading repository data...
Reading installed packages...
'virtualbox-host-kmp-2.4.6-2.10-desktop' not found in package names. Trying capabilities.
No provider of 'virtualbox-host-kmp-2.4.6-2.10-desktop' found.
Resolving package dependencies...
Nothing to do.
rahul@localhost:~> sudo zypper in virtualbox-host-kmp-desktop
root's password:
Sorry, try again.
root's password:
Loading repository data...
Reading installed packages...
'virtualbox-host-kmp-desktop' is already installed.
No update candidate for 'virtualbox-host-kmp-desktop-4.1.18_k3.4.6_2.10-1.3.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
rahul@localhost:~> sudo zypper in dkms
Loading repository data...
Reading installed packages...
'dkms' is already installed.
No update candidate for 'dkms-2.1.1.2-1.1.noarch'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
rahul@localhost:~> virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.4.6-2.10-desktop) or it failed to
load. Please recompile the kernel module and install it by
sudo /etc/init.d/vboxdrv setup
You will not be able to start VMs until this problem is fixed.
/usr/bin/virtualbox: line 77: /usr/lib/virtualbox/VirtualBox: Permission denied
/usr/bin/virtualbox: line 77: exec: /usr/lib/virtualbox/VirtualBox: cannot execute: Permission denied
rahul@localhost:~> sudo /etc/init.d/vboxdrv setup
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)
rahul@localhost:~> cat /var/log/vbox-install.log
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 normally suggest you do the following steps. I would uninstall VirtualBox from YaST, if it was not a downloaded file from Oracle that you installed, but included in the repository and not the latest version. Then I use YaST to install some required software.
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. I also suggest you add the Packman repository then search for and install dkms in YaST, which comes from Packman. I normally suggest you install VirtualBox outside of YaST, directly from Oracle. See the Article here on the subject:
@missingfaktor
A drive-by comment: there are two versions of VBox used in openSUSE. One is from the www.virtualbox.org siteand is named VirtualBox-4.x in zypper, the other is from the openSUSE repo and is named virtualbox in zypper. The second I mentioned uses and needs the package virtualbox-host-kmp-blahblah. The first I mentioned does not use or need the package virtualbox-host-kmp-blahblah.
You probably need to be clear which version you have. This command in a console window will reveal it to you: zypper se -s virtualbox. If you get an i in the leading column beside a package named VirtualBox, you have the first named version. If you get an i in the leading column beside a package named virtualbox, you have the second named. If you’ve got the former, then get rid ofvirtualbox-host-kmp-blahblah.
Make sure to enable the ability to use a VM in your PC BIOS as it is often disabled by default. Tell use more about your PC hardware and how you installed VirtualBox and from what source your obtained the applications and what version of VB you have installed.
Why do we have a Virtalization forums if nobody cares where to post things:
. the OP started in the wrong forum;
. several people answered without even pointing to the fact that this is in the wrong forum and that in the correct forums the quality of the answers could improve and, more important, that people with same or similar Virtualization problems will find this thread easier (if at all).
Do all of the posters above in fact whish that the special forums for different subjects be removed?
This message thread sat at the old location long enough to allow comments to have been made. Lets us stick to help with any problems as specified by the current OP in the proper forum.