Home | News | Download | Packages | Forum | Wiki | Github

VirtualBox as Guest drivers don't work

(Sergei Gnezdov) #1

I have installed Void from void-live-i686-20170220-enlightenment.iso as a Guest on VirtualBox VM. The desktop environment works, but slow. So, I am tried following instructions how to get Void on VirtualBox Guest:


The symptom of the problem is that after installation video quality did not change. Running “VBoxClient --clipboard” command produces no visible feedback.

I skipped instructions to install as a host as those do not apply to my case and only followed guest instructions.

xbps-install -Sv dbus
failed to work and complained that it will conflict with existing dbus. I figured it is ok.

xbps-install -Sv virtualbox-ose-guest
worked. Here is most interesting part of the log:

virtualbox-ose-guest-dkms-5.1.22_2: configuring …
Added DKMS module ‘virtualbox-ose-guest-5.1.22’.
Building DKMS module ‘virtualbox-ose-guest-5.1.22’ for kernel-4.11.10_1… done.
Installing DKMS module ‘virtualbox-ose-guest-5.1.22’ for kernel-4.11.10_1… done.
Skipping kernel-4.9.11_1. kernel-headers package not installed…
virtualbox-ose-guest-dkms-5.1.22_2: installed successfully.
virtualbox-ose-guest-5.1.22_2: configuring …
virtualbox-ose-guest-5.1.22_2: installed successfully.

18 downloaded, 17 installed, 1 updated, 17 configured, 0 removed.

Note message Skipping kernel-4.9.11_1. kernel-headers package not installed…

I used command

strace -f -s128 -o log.txt /usr/bin/VBoxService -f

to start service and troubleshoot the error message. Here is what I’ve got:

2461 rt_sigaction(SIGCHLD, {sa_handler=0x80666e0, sa_mask=[], sa_flags=SA_RESTART|SA_NOCLDSTOP}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
2461 open("/dev/vboxguest", O_RDWR|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
2461 write(2, “VBoxService”, 11) = 11
2461 write(2, ": ", 2) = 2
2461 write(2, "error: ", 7) = 7
2461 write(2, “VbglR3Init failed with rc=VERR_FILE_NOT_FOUND”, 45) = 45
2461 write(2, “\n”, 1) = 1
2461 exit_group(1) = ?
2461 +++ exited with 1 +++

So, the reason for failure to start is a missing /dev/vboxguest file.

And I have no idea how to fix that. Based on comments in VBoxClient-all missing /dev/vboxguest indicates that “kernel module” is not present.

I have no idea how to fix that.

I tried following wiki page instructions and run

sudo depmod

but nothing has changed.

(Sergei Gnezdov) #2

I checked on modules:

cd /lib/modules/

Lists 2 versions:

  • 4.11.10_1
  • 4.9.11_1

Uname lists 4.9.11_1. In the installation log above, DKMS built 4.11.10_1, but uname lists an older version.

(Sergei Gnezdov) #3

So, I looked for vbox with command:

cd /lib/modules
find . -name 'vbox*'

And found that only 4.11.10_1/updates/ contains files:

  • vboxguest.ko
  • vboxsf.ko
  • vboxvideo.ko

So, it appears that installed kernel version is older than modules.

If that’s the case, then how do I resolve the issue? I would need detailed instructions as I am not that great with grub updates.

Thank you

(David) #4

If I’m reading right, your problem is low performance from Void with Enlightenment on VBox. If so I’d suggest you retry with the Mate or Cinnamon flavours for a snappier system; Enlightenment is slow even on x86_64 and bare metal unless you enable OpenGL and are happy with the random freezes…

Missing 4.9.11 kernel headers is normal since you upgraded to 4.11, or at least that’s what the output you pasted indicates. If anything, maybe you didn’t reboot since the upgrade, hence uname is still reporting an older kernel.


(Sergei Gnezdov) #5

I will install Virtual Box integration regardless of desktop environment. So, the choice of desktop is my choice.

And, yes, I have rebooted after upgrade.

So, I did not get any other responses. Shall I create an issue somewhere?

(Masato the Empty) #6

I don’t use virtualbox (I use KVM) so I’m not entirely familiar with everything involved. However, there are some things that might be worth mentioning.

That kernel version is many versions behind what’s available in the repos, so if you didn’t already have the header package for that version installed, forget about it and just focus on your current running kernels. You won’t be able to get the header package via standard means at this point, since they’re not in the repos.

It just means you won’t build modules for that kernel version. DKMS is just letting you know. It won’t stop it from working on kernels where you are able to build the modules. Thus, in the future, it’s worth making sure you always install the headers for all the kernel upgrades you install as well.

It’s just the nature of rolling-release…

OK, here is where you will affect performance. If you don’t have hardware assisted virtualization on your system (Intel VT-x or AMD-v) then you can’t really do anything about it. Performance will simply be far less than what it would be with HAV.

But if your hardware supports it, then you need to prepare the host system as well. That would mean getting the virtualbox host extensions built and installed for the running kernel on your host OS. (note the advice regarding keeping kernel headers for each version of the kernel you intend to build against also applies here…)

What else could degrade performance? Can’t say I have many ideas here… From experience using linux-KVM, one can easily get close to baremetal performance in a guest. And it works out of the box (especially easily if you’re using libvirt for management). I’ve been told by others here that it’s pretty much the same with Virtualbox.

(Sergei Gnezdov) #7

Thank you.

Can you point me to resources related to kernel headers?

I have not lived with rolling release, so it is something new to me.

What I’ve done is quite simple: get ISO distribution and install it on Virtual Machine. Start working with installing Virtual Box by following instructions. From my point of view I was simply working with binary packages. I guess my view was simplistic.

About enlightenment. With void Linux fiasco I have moved back to FreeBSD 11 and tried almost every desktop from non-console installation base and Virtual Box drivers installed (it works). I decided that enlightenment was not reliable and found that XFCE was the best easiest to work with at least on FreeBSD. KDE got too slow, Gnome too complicated (technologically).

(Masato the Empty) #8

I don’t know of any links in particular. It’s just with the way things are packages, linux kernel packages in most distros don’t contain the C headers for building out-of-tree modules. Most likely it’s because they’re more akin to a library’s -devel package, that most distros also split out from the main package, containing headers and static objects.

Just like -devel packages are needed to build/link against a library, the kernel headers are needed to code/build things using kernel APIs.

Because rolling release Linux distros just update individual pieces of the system as they are updated in upstream, which is different from a traditional fixed-release distro and from a BSD. The thing to remember is that you can generally only build software against development packages that are current. Unless the repos archive old packages (Void does not), then if you need to build against an older library or kernel, then you must have downloaded it at the time that it was available.

It’s no wonder it would be quite different from what a BSD user would be accustomed to (especially since when out-of-tree kernel module building/loading is even supported, what linux distros consider “development-only” files are not separate from your base system)

(Erin) #9

I think, from what I have read, is to upgrade the kernel, install the headers for that version. Reboot and try to reinstall the guest elements. That should permit the kernel module to be built and the special file to be created.

After a while I gave up on using VB and went for qemu instead.

(oliver) #10

I think you’re in a partial-upgrade state where your core O/S is from February (based on the ISO date) but the VirtualBox components are from July. If so, then partial upgrades are a recipe for disaster and will eventually cause things to break.

Try upgrading the entire O/S
# xbps-install -Su