Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 297633 - app-emulation/virtualbox-guest-additions-3.1.0: all features should just work
Summary: app-emulation/virtualbox-guest-additions-3.1.0: all features should just work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Alessio Cassibba (X-Drum)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-20 12:51 UTC by Ambroz Bizjak
Modified: 2010-06-27 13:49 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild patch (virtualbox-guest-additions-3.1.0.ebuild.patch,2.55 KB, patch)
2009-12-20 12:52 UTC, Ambroz Bizjak
Details | Diff
vboxguest-service init script (vboxguest-service.init,698 bytes, text/plain)
2009-12-20 12:52 UTC, Ambroz Bizjak
Details
vboxguest-service udev script (vboxguest-service.sh,254 bytes, text/plain)
2009-12-20 12:53 UTC, Ambroz Bizjak
Details
sample xorg.conf installed to doc folder (xorg.conf,407 bytes, text/plain)
2009-12-20 12:53 UTC, Ambroz Bizjak
Details
VBoxClient-all autostart file (vboxclient.desktop,145 bytes, text/plain)
2009-12-20 12:54 UTC, Ambroz Bizjak
Details
module alias file (vboxsf.conf,21 bytes, text/plain)
2009-12-31 01:02 UTC, Ambroz Bizjak
Details
ebuild patch (virtualbox-guest-additions-3.1.0.ebuild.patch,2.78 KB, text/plain)
2009-12-31 01:03 UTC, Ambroz Bizjak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ambroz Bizjak 2009-12-20 12:51:51 UTC
app-emulation/virtualbox-guest-additions-3.1.0 is broken in several aspects:

- The virtualbox-guest-additions init script should not mess with device nodes; this is udev's job.
- The vboxguest-service daemon has to be statted manually with the virtualbox-guest-additions init script; it could easily be autostarted by udev when running under VirtualBox; in the same way as the bluetooth service is started when a bluetooth device is plugged in.
- For screen resizing and other features to work, VBoxClient-all must be started in user X sessions, but this is not documented anywhere. An XDG autostart file should be installed to automatically start VBoxClient-all.
- /dev/vboxuser permissions are preventing users from running VBoxClient-all in X sessions.
- VBoxClient-all is not installed to the system because it is named "98vboxadd-client" in the source, not "98vboxguest-client".
- mount.vboxsf is not installed to the system because the compiled program is named "mount.vboxsf", not "mountvboxsf".
- to allow users to easily use all features of the guest additions, a sample xorg.conf file should be shipped that enables the vboxmouse and vboxvideo drivers

I'm attaching a patch to the ebuild and additional files that solve the issues listed. I've replaced the virtualbox-guest-additions init script with a simpler vboxadd-service script, which is autostarted by udev and only starts the vboxadd-service daemon.

Reproducible: Always

Steps to Reproduce:
1. emerge app-emulation/virtualbox-guest-additions-3.1.0.
2. try to get mouse integration, 3D acceleration, display resizing, clipboard integration, clock sync, etc. to work
Actual Results:  
desperation

Expected Results:  
All features should just work.
Comment 1 Ambroz Bizjak 2009-12-20 12:52:26 UTC
Created attachment 213551 [details, diff]
ebuild patch
Comment 2 Ambroz Bizjak 2009-12-20 12:52:53 UTC
Created attachment 213553 [details]
vboxguest-service init script
Comment 3 Ambroz Bizjak 2009-12-20 12:53:15 UTC
Created attachment 213554 [details]
vboxguest-service udev script
Comment 4 Ambroz Bizjak 2009-12-20 12:53:42 UTC
Created attachment 213555 [details]
sample xorg.conf installed to doc folder
Comment 5 Ambroz Bizjak 2009-12-20 12:54:03 UTC
Created attachment 213557 [details]
VBoxClient-all autostart file
Comment 6 Jac Goudsmit 2009-12-30 19:45:07 UTC
Thanks for the info and the files, Ambroz.
I stored all the text files in
/usr/portage/app-emulation/virtualbox-guest-additions/files and patched the
ebuild with your patch and it then restarted my virtual system, it seems to
work okay so far. I copied your xorg.conf over my old one in /etc/X11 (which
was much longer) and that is working fine too.

I had a few minor snags, because I had a previous version of the virtualbox
guest additions installed:
- I needed to remove vboxvideo from /etc/modules.autoload.d/kernel-2.6 to get
rid of an error message during startup
- I needed to add vboxvfs to the same file to use shared folders
- I needed to run rc-update add vboxguest-service default (as expected) to add
the service to the default startup, but I also had to remove the old service
using rc-update del virtualbox-guest-additions.

Maybe you should add some instructions to do this to the output of the ebuild?
By the way I suggest leaving the init.d script name unchanged i.e.
virtualbox-guest-additions instead of vboxguest-service to prevent the last
problem in the list above.

Thanks!

===Jac Goudsmit
Comment 7 Jac Goudsmit 2009-12-30 19:47:16 UTC
(In reply to comment #6)
> ebuild with your patch and it then restarted my virtual system

I meant: ... and then I restarted ...
Comment 8 Ambroz Bizjak 2009-12-31 00:06:41 UTC
(In reply to comment #6)
> - I needed to remove vboxvideo from /etc/modules.autoload.d/kernel-2.6 to get rid of an error message during startup
I cannot reproduce this. On my system autoloading vboxvideo works without errors, even though it is not needed; as the X server will load it.

> - I needed to add vboxvfs to the same file to use shared folders
Ideally this wouldn't be needed and the module would be autoloaded when mounting shared folders. I'll look into how it is done properly.

> - I needed to run rc-update add vboxguest-service default (as expected) to add
> the service to the default startup
This should NOT be needed. The service should be autostarted when udev creates the /dev/vboxguest device. Please check that the service is indeed not autostarted, without adding it to a runlevel. Make sure you have properly applied my patch and included all the files. Specifically, your /etc/udev/rules.d/60-virtualbox-guest-additions.rules should contain a RUN+= option on the first line, and you should have /lib/udev/vboxguest-service.sh. Also check that /dev/vboxguest is created automatically.
If it still doesn't work, please provide more information. Are there any errors during startup? Do you see "vboxguest-service" in the "device initialized services:" boot message? I see that you are using the old baselayout rather than OpenRC, on which I have tested. I will try testing that too.

> By the way I suggest leaving the init.d script name unchanged i.e.
> virtualbox-guest-additions instead of vboxguest-service to prevent the last
> problem in the list above.
As already mentioned, this should not be a problem because the service should be autostarted. Also, "vboxguest-service" is much more descriptive - it only starts the daaemon of the same name, nothing else from the guest additions.
Comment 9 Ambroz Bizjak 2009-12-31 01:02:33 UTC
Created attachment 214679 [details]
module alias file

This modprobe.d file adds an alias vboxsf -> vboxvfs so that the vboxvfs kernel module is autoloaded when mounting shared folders.
Comment 10 Ambroz Bizjak 2009-12-31 01:03:33 UTC
Created attachment 214680 [details]
ebuild patch

Update ebuild to install the above mentioned modprobe.d file, add a note on how to mount shared folders.
Comment 11 Hans Nieser 2010-02-08 01:55:01 UTC
Any chance of these fixes ending up in portage? I just upgraded to 3.1.0 (using the build in portage currently) and ended up with a pretty broken vbox setup, which seems to be a recurring theme and it always takes me hours to get working again :/
Comment 12 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-05-20 09:14:55 UTC
I'm working on this right now. If it's working as intended by the bug reporter this will be available with app-emulation/virtualbox-guest-additions-3.2.0
Comment 13 Mike Limansky 2010-05-20 09:28:40 UTC
(In reply to comment #12)
> I'm working on this right now. If it's working as intended by the bug reporter
> this will be available with app-emulation/virtualbox-guest-additions-3.2.0
> 

Do you mean that the versions 3.1.x will not be fixed?
Comment 14 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-05-20 13:50:44 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > I'm working on this right now. If it's working as intended by the bug reporter
> > this will be available with app-emulation/virtualbox-guest-additions-3.2.0
> > 
> 
> Do you mean that the versions 3.1.x will not be fixed?

I don't want to decide that on my own. Maybe if patrick agrees we can backport it to 3.1.8.

By the way, the hotplug stuff cannot be incorporated as it would break setups where hot-/coldplug is disabled. So I left the vboxguest-service.sh away and kept the code to (un)load the kernel modules through the init script. These changes are currently ony available in app-emulation/virtualbox-guest-additions-3.2.0 but this is not a finaly decision yet.
Comment 15 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-05-20 21:04:26 UTC
+*virtualbox-guest-additions-3.1.8-r2 (20 May 2010)
+
+  20 May 2010; Lars Wendler <polynomial-c@gentoo.org>
+  -virtualbox-guest-additions-3.1.8-r1.ebuild,
+  +virtualbox-guest-additions-3.1.8-r2.ebuild:
+  New revision with cherry picked changes from bug #297633 (thanks to Ambroz
+  Bizjak for the report and the patches).
+

Please test and report you experience. Like I said the hotplug stuff is not included as that would break machines where hotplug and/or coldplug is disabled.
Comment 16 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-06-27 13:49:02 UTC
Okay, no complaints here, time to mark this bug as FIXED...