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.
Created attachment 213551 [details, diff] ebuild patch
Created attachment 213553 [details] vboxguest-service init script
Created attachment 213554 [details] vboxguest-service udev script
Created attachment 213555 [details] sample xorg.conf installed to doc folder
Created attachment 213557 [details] VBoxClient-all autostart file
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
(In reply to comment #6) > ebuild with your patch and it then restarted my virtual system I meant: ... and then I restarted ...
(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.
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.
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.
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 :/
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
(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?
(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.
+*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.
Okay, no complaints here, time to mark this bug as FIXED...