VirtualBox Installation

From openSUSE


Contents

Installation from openSUSE repositories

How to install VirtualBox depends on your openSUSE version.

Image:susemini.png
Version:
10.3+
The following instructions are for openSUSE 10.3 and beyond


VirtualBox OSE is available

Ensure that one of these repositories has been added (check in the Community Repositories YaST module).

  • Using YaST:

In YaST simply head over to the Software Management module and install the virtualbox package. Or use your own prefered package manager to install VirtualBox OSE with her dependencies.

  • virtualbox-kmp that has mandatory vboxdrv kernel driver
  • Xalan-c package
  • Xerces-c package

Read the Post-Installation section to get VirtualBox running. And read Installation of VirtualBox from VirtualBox home page to install the full version (non-OSE) of VirtualBox.

Image:susemini.png
Version:
10.2
The following instructions are for openSUSE 10.2 only


Prior to VirtuaBox installation, a repository should be added under openSUSE 10.2.

VirtualBox OSE is available in the openSUSE Build Service Virtualization:/VirtualBox repository. This repository unfortunately contains bad packages VirtualBox-kmp that are missing mandatory vboxdrv and have one more error.

Use
rpm -e --noscripts VirtualBox-kmp-default
to remove the broken package

Therefore use home:/dirkmueller which contains a correct version of VirtualBox for openSUSE 10.2.

See the paragraph below how to install VirtualBox non-OSE.

Installation from VirtualBox home page (OSE and non-OSE)

Since VirtualBox is acquired by SUN, the download page of VirtualBox will redirect to a download page from SUN. From this download site a package or the source code for the latest version of VirtualBox for openSUSE and SLED can be downloaded. At the bottom of the download page, there is a list of the repositories for the latest Virtual Box non-OSE versions for the openSUSE versions.

Prerequisites for VirtualBox downloads

Whether you use binaries or installing from source you have to install the following packages first:

  • kernel-source
  • kernel-syms
  • Xalan-c
  • Xerces-c
  • gcc
  • make

Installing VirtualBox from Binary (non-OSE only)

Simply download the package from the download page of VirtualBox and install it. See Package Management for more information about installing software under openSUSE.

When everything goes well, VirtualBox should be installed in the /opt directory.

Next, create the required kernel module by executing the command:

/etc/init.d/vboxdrv setup

When VirtualBox is started at this point, expect VirtualBox to give this warning "Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might be not installed on the host computer.". Read enable USB support in order to activate USB.

Installing from source

Read the build instructions from VirtualBox.

Post-Installation

Though VirtualBox will start after you've just installed it, there are a few other necessary steps to complete before you can really get the most out of VirtualBox. These include:

  • Making sure that the vboxdrv driver is loaded.

In the terminal (as root), execute the following command:

modprobe vboxdrv
  • Add your user to the vboxusers group:
groupmod --add-user <login> vboxusers

Or open YaST -> Security and Users -> UserManagement, and edit your user and add them to the vboxusers group. To do this, select your user name, click on Edit, switch to the Details tab and check the vboxusers check box.

Remember that this takes effect the next time that user logs in. If the user was logged in at the time you added him to the group, need need to log out and in again.

You should then be able to run VirtualBox just fine!

Getting vboxdrv module to auto load (openSUSE OSE package only)

The version of VirtualBox OSE provided in the openSUSE OSS repo comes with its own kernel module so the vboxdrv setup command does not add this. It also does not set up the kernel module to auto load at system start up, if this is how you like it then ignore this section and have fun.

This can be done by one of three ways:

  • The first way is by using insserv to add the module
insserv vboxdrv
  • The second way is by going into system services (runlevel) and enabling vboxdrv

YaST -> System > System Services (runlevel)-> vboxdrv and select the enable button and finish.

  • The last way is by adding it to the Modules_loaded_on_boot setting under sysconfig editor

YaST -> System -> /etc/sysconfig editor -> System -> Kernel -> MODULES_LOADED_ON_BOOT and just type in vboxdrv in the input box.

No matter which way you go with this will get the vboxdrv kernel module to auto load on boot of the system.

See Also