A coworker came to me with a virtual machine running OpenSuse 10.1, where she wanted to use one of the VirtuaBox’s Guest Additions features: shared folders. The first thing I detected was it didn’t have the Guest Additions installed, so I proceeded to install them but the VirtualBox’s installing script didn’t compile because all the stuff needed to compile a Linux module was missing. On this article I describe all I had to do to compile the Guest Additions on OpenSUse 10.1.
OpenSuse 10.1 repositories
First I supposed I had to install the kernel sources and the needed compilers, but checking the repositories I realized that it only had as source the installation CD that was used to create the virtual machine. OpenSuse 10.1 is an old distribution and its repositories are no longer supported officially, so I had to find somebody who had the mirrors published, so I came across to this mirror list. I used the first option and from Software Sources I put the url shown on the picture:
Requisites to compile the Guest Additions
Once the repository was added I proceeded to install the requisites to compile the Guest Additions, begging with the C/C++ tools and compilers. To do so, I went to the OpenSuse’s Control Center, and from Software Management I choose C/C++ compilers and tools option from the selections, as shown in the following image:
In order to compile the Guest Additions it still left another requisite: the kernel sources. Here I found another problem, because the virtual machine had kernel 220.127.116.11-0.12-default but the repository didn’t have the sources for that version but the 18.104.22.168-4-default version instead. The solution was to remove the kernel image 22.214.171.124-0.12 and use the one provided in the repository 126.96.36.199-4, to do so yo can use the Software Management or from a terminal type this:
zypper remove kernel-defaultzypper install kernel-default
Then you can install the kernel sources:
zypper install kernel-source kernel-sysm
Once installed all requisites, just run the Guest Additions script from the directory it was mounted:
To changes take effect you must reboot the guest.
You can active the shared folders from VirtualBox’s by going to Device > Shared Folders, and select the one you want to map in the host’s file system. If you check Auto-mount next boot, and for the shown example, a shared folders will appear in /media/Sf_videos