Tags: #Arch Linux #VirtualBox #KISS
Arch Linux: VirtualBox Issues
Recently, Arch Linux development community have confirmed (again) that they stick hard to the announced KISS (keep it simple stupid) strategy except for, the “simple” part…
Introduction
Many times throughout the history, Arch Linux users have been “surprised” by undocumented changes within the system which sometimes ended up with broken software or the whole system. Therefore, one can sometimes feel that being an Arch Linux user requires some kind of a sixth sense (pr being an oracle) in what the hack is running through the developers’ heads (pun intended).
VirtualBox and DKMS
The recent undocumented issue is with VirtualBox which suddenly requires to replace pre-compiled binary drivers virtualbox-host-modules
with community/virtualbox-host-dkms
:
:: Replace virtualbox-host-modules with community/virtualbox-host-dkms? [Y/n]
As per the long-time experience described above, no reason for this action has been provided whatsover (no official pages, no wiki, nil). The developers “defend” themselves that:
“The lesson here is that it is always important to look at
pacman
’s output.”
Obviously, most of the users wish there were some relevant and meaningful output though, since it weren’t (from their perspective of course). (Great comment: oconnor663)
Anyways, to cut the story short. The missing link is the linux-headers
package which is an optional dependency that is necessary in order to automatically compile the VirtualBox modules against the distro’s default linux kernel. Obviously, this cannot be a “hard” VirtualBox’s dependency, since different users do use different kernels. Hence they require different (custom) headers for their custom kernels.
Solution
Considering that the binary module packages are installed, i.e. virtualbox-host-modules
or virtualbox-guest-modules
, these need to be removed by:
$ pacman -R virtualbox-host-modules virtualbox-guest-modules
Verification that the complementary DKMS package(s) is(are) installed:
$ pacman -S virtualbox-host-dkms virtualbox-guest-dkms
And finally, the headers (for the default kernel) need to be installed:
$ pacman -S linux-headers
resolving dependencies...
looking for conflicting packages...
Packages (1) linux-headers-4.4.3-1
Total Installed Size: 33.61 MiB
:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [########################################] 100%
(1/1) checking package integrity [########################################] 100%
(1/1) loading package files [########################################] 100%
(1/1) checking for file conflicts [########################################] 100%
(1/1) checking available disk space [########################################] 100%
:: Processing package changes...
(1/1) installing linux-headers [########################################] 100%
:: Running post-transaction hooks...
(1/1) Install DKMS modules
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make KERNELRELEASE=4.4.3-1-ARCH -C /usr/lib/modules/4.4.3-1-ARCH/build M=/var/lib/dkms/vboxguest/5.0.14_OSE/build................
cleaning build area...
Kernel cleanup unnecessary for this kernel. Skipping...
DKMS: build completed.
vboxguest.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /usr/lib/modules/4.4.3-1-ARCH/kernel/misc/
vboxsf.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /usr/lib/modules/4.4.3-1-ARCH/kernel/misc/
vboxvideo.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /usr/lib/modules/4.4.3-1-ARCH/kernel/misc/
depmod...
DKMS: install completed.
Creating symlink /var/lib/dkms/vboxhost/5.0.14_OSE/source ->
/usr/src/vboxhost-5.0.14_OSE
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make KERNELRELEASE=4.4.3-1-ARCH -C /usr/lib/modules/4.4.3-1-ARCH/build M=/var/lib/dkms/vboxhost/5.0.14_OSE/build......
Now, it is necessary to load (or reload) the kernel modules either by restarting the computer or using the modprobe
command. Depending on which modules are required, the following list of commands will differ:
$ rmmod vboxpci
$ rmmod vboxnetflt
$ rmmod vboxnetadp
$ rmmod vboxdrv
$ modprobe vboxdrv
$ modprobe vboxnetadp
$ modprobe vboxnetflt
$ modprobe vboxpci
Drawbacks
Some users may have built their Arch Linux-based servers in the real KISS minimalist way. But due to this “free-cool-in” feature, they are forced to install kernel-headers and other development tools (GCC compiler and all that stuff). As a result, the total consumed disk space even doubles (depending on the installation of course).
Considering that the kernel updates come approximately once in a week, removing gcc
and make
tools every time after the modules are compiled is not a KISS solution. Actually, it’s a KIS solution where the “S” for “simple” is absent…
Arch Linux is a tough playground. Beware, behold and KISS!