Article: Install the Sun/Oracle VirtualBox in openSUSE 11.4, 12.x or Tumbleweed (most recently tested in 12.3)

Update 4 April 2013 Tested & working in openSUSE 12.3

Introduction You can install the fully open source version or the Sun/Oracle version. The latter (Sun/Oracle) is significantly better IMHO. I only talk about the Sun/Oracle version here.

Install the Oracle VirtualBox RPM Add this repo, it contains the Oracle VirtualBox RPM and it will supply updates over time. It is currently the correct repo for openSUSE 11.4, 12.1, 12,2, 12.3 and Tumbleweed

Oracle VirtualBox openSUSE        http://download.virtualbox.org/virtualbox/rpm/opensuse/11.4/

Important, read carefully: You will have a series of possible RPMs available in the package management GUI in Yast. Be very sure to install only the Oracle VirtualBox RPM, not the oss virtualbox RPM. GoTo Yast → Software → Software management and select the Oracle RPM. If dependency linkages attempt to install additional packages beginning virtualbox-guest or virtualbox-host kernel modules, then you have made a mistake. Install only the single RPM “VirtualBox”. Make sure you choose the latest version in the repo.

Additional RPMs You will also need these RPMs: kernel-devel, gcc, make. Install them in yast or run this zypper command (as root)

zypper in gcc make kernel-devel

Add your username to the vboxusers group VirtualBox permissions will not work properly until you do this. GoTo Yast → Security and Users → User and group management. Highlight and Edit you username. Select the Details tab and tick the box to add yourself to “vboxusers”. Then reboot to activate the changes.

Next: the Extension Pack This pack provides additiopnal functionality like USB and RDP support. GoTo the VirtualBox dot org download site https://www.virtualbox.org/wiki/Downloads and click the link for the Extension Pack. NB be sure to select the extension pack with the same version as your installed version of VirtualBox! Download the pack, a file with a name like Oracle_VM_VirtualBox_Extension_Pack-4.0.14-74382.vbox-extpack. Download the pack, then browse to it and click it with the mouse. That will cause it to be installed (provided the VirtualBox RPM has been installed first).

Each time you upgrade the VirtualBox RPM, you will have to go back to the Extension Pack download page and acquire and install the new Extension Pack to match the version number of the upgraded RPM.

Where’s the GUI? In KDE GoTo Kicker → Applications → System → Virtual Machine (Oracle VM VirtualBox).

** After a Kernel Upgrade in the openSUSE Host** This is arguably a part of the installation of VirtualBox. When you have a kernel upgrade, after you reboot, you must run this command as root to recompile the kernel modules:

/etc/init.d/vboxdrv setup

If USB support fails: If the Guest VM does not detect USB devices, or if they are detected but “grayed” out in the menu bar, check that you added your username to the vboxusers group. Check that the file xx-vboxdrv.rules exists in the directory /etc/udev/rules.d/

That’s all folks. I only wanted to talk about the installation, which can be a bit tricky in the detail.

PS: Tumbleweed only: if you’re a Tumbleweeder, you might occasionally install an upgrade of the VirtualBox RPM with “zypper dup”. Just check that the earlier version of the RPM has uninstalled. Run “rpm -qa | grep VirtualBox” and make sure the earlier one has gone.]

If you would like to have your kernel modules automatically installed for you. Have a look at the following blog.

VirtualBox Automatic Recompile of kernel modules after a Kernel Update or Replacement - Blogs - openSUSE Forums

And as always, great articleswerdna!](http://forums.opensuse.org/members/swerdna.html)

This also explain some a bit about the installation.

Jetchisel’s CyberCabin: VirtualBox on openSuSE

As now 12.1 repo is not up since the package you will install for 12.1 the 11.4 package.

For the time being it’s the same repo, same for 11.4 and 12.1. Don’t be confused, just use the address I put there, use it for 11.4 and 12.1, like I said.

I agree with you about that package and repo is the same. In my blog it explain howto add the repo via zypper and since the 12.1 repo is still not up there might be a confusion to some users thats all. So as you said, “folks dont be confused the 11.4 package works for 12.1.” Maybe the next major Vbox release they will put the repo up well all depends on what Oracle will do :wink:

James, thank you for that interesting comment. Users may choose to go to those additional lengths, but just so the readers know: folks, simplicity is a good thing and you can stick with the simple tactics that I have outlined here. No need to go installing additional complex scripts.

As always, very good and useful article.
Thanks.

Hello, swerdna,
it was quite simple to install win7 into VB on o.S.11.4.
Using ssh for data exchange, by adding a small FAT32 partition ( in my case <E> )to win7 data exchange is working into win7 partition <E>,from there to win7 <C>.
EK

Nice to see…

hmm, I do not quite understand what you mean by this:
“The latter (Sun/Oracle) is significantly better IMHO.”

the base code is the same, and licensed under GPLV2 so how can that be ?
(as you can read here ) https://www.virtualbox.org/wiki/Downloads

It is the extentions that are under a closed license, but you do not have to use them unless you specifically need one of the following:

  • have usb 2.0 /ehci support ( plain usb 1.0 is supported without this)
  • have pxe boot
  • have remote console on the virtual machine, so you can see and interact with the boot-process when the OS doesn’t have a remote prompt or desktop yet

I think the USB 2.0 support is the big one which causes many to use the version directly from Oracle, but in the end, use what you are happy with. That is all that matters here.

By the way, we have a new forum on this very subject here: Virtualization

We would love to have your help in building up the posts in this forum so that it can be as useful as possible for all openSUSE users. Your assistance in posting VM related questions and solutions there is requested.

Thank You,

well swerdna, looks very easy and i hope it would get installed, the only additional package it is saying to install with virtual box is this one, which i am looking for how to solve.

That’s a library update, a single small package, incidental. Other readers: these extra dependencies pop up from time to time. You can accept them.

Ok thanks swerdna, your post is the easiest way I guess I have seen so far and virtualization is working great, Cheers.

Dear User.

I have problem with this solution on openSUSE 12.1. After command:

/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.1.0-1.2-desktop cannot be found at
/lib/modules/3.1.0-1.2-desktop/build or /lib/modules/3.1.0-1.2-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)

What should I do with this ??

Try this first (if you use KDE): 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.

Thank You

If you happen to use the ose and the binary from Oracle then you will know the real difference. The package from the distro does not have vbox-webservice which means no vboxwebsrv to use if you going to install phpVirtualBox. There is no VNC support which is the equivalent for the rdesktop implementation of the binary. From what i have read from the forum other distro’s has VNC support for the ose which OpenSuSE is lacking. Dont ask me why i dont know the answer to that question. :wink:

If your going to install VirtualBox you need to update and reboot. Now if your going to use the binary blob from Oracle you need to run the following command.

**su root -c’zypper in kernel-source kernel-syms make gcc’
**
this will install those needed dependencies

Install the prerequisite RPMs listed in the tutorial.

Dear users,

Now everything is ok. The problem was in the different versions kernel and kernel-devel. It was my mistake.

rpm -ivh VirtualBox-4.1-4.1.8_75467_openSUSE114-1.x86_64.rpm
Przygotowywanie… ########################################### [100%]
1:VirtualBox-4.1 ########################################### [100%]

Creating group ‘vboxusers’. VM users must be member of that group!

No precompiled module for this kernel found – trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Stopping VirtualBox kernel modules done
Uninstalling old VirtualBox DKMS kernel modules done
Trying to register the VirtualBox kernel modules using DKMS done
Starting VirtualBox kernel modules done
redirecting to systemctl
redirecting to systemctl