Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382141 - /etc/init.d/vboxwebsrv is incomplete
Summary: /etc/init.d/vboxwebsrv is incomplete
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL: http://code.google.com/p/phpvirtualbo...
Whiteboard:
Keywords:
Depends on:
Blocks: 338804
  Show dependency tree
 
Reported: 2011-09-07 12:28 UTC by Markos Chandras (RETIRED)
Modified: 2012-03-16 22:39 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markos Chandras (RETIRED) gentoo-dev 2011-09-07 12:28:02 UTC
Hi, the current init and config scripts are incomplete. For example, a variable is missing for defining the user who manages the virtual machines. Moreover, a variable for defining extra opts and/or logging facilities would be nice.

What I suggest ( and currently use ) is the following

* conf.d file

Add

VBOXWEBSRV_USER and VBOXWEBSRV_OPTS variables

* init.d script

Modify it like this

        start-stop-daemon --start --quiet --user ${VBOXWEBSRV_USER} --pidfile /var/run/vboxwebsrv.pid \
                --background --make-pidfile --exec /usr/bin/vboxwebsrv \
                -- -H ${VBOXWEBSRV_HOST} -p ${VBOXWEBSRV_PORT} -t ${VBOXWEBSRV_TIMEOUT} -i ${VBOXWEBSRV_INTERVAL} ${VBOXWEBSRV_OPTS}

Please note that VBOXWEBSRV_USER is mandatory if a non-root user is managing the virtual machines ( which is normally is your current system user )

Logging facility is also useful. Thanks


These changes are required for userspace webservices like phpvirtualbox ( bug #338804 )
Comment 1 jannis 2011-10-06 05:37:51 UTC
Hit the same problem. Changing the script as told works. Maybe I just missed it in some output but the user defined in /etc/conf.d/vboxwebsrv needs to be in the "vboxusers"-group for that to work. Otherwise, the startup fails but the init-script says it started okay. Found the root-cause of the problem in some logfile.
Comment 2 Gerald 2011-10-09 23:27:12 UTC
Those conf.d and init.d changes work fine for me and allowed me go get VirtualBox and phpVirtualBox to run as a "normal" user.

However, I think I've noticed some side effects:

1) No matter what I've tried, i can't get the "External" Authentication for RDP sessions to work!

I also tried the VBoxAuthSimple method from the VirtualBox documentation with l/p stored in the XML, that also doesn't work. Perhaps because Virtualbox is running as a normal user it doesn't have the necessary rights to run the pam modules or something? 

Or perhaps I'm just to stupid to get it to work... But I think I'm not :-)
Without Authentication, RDP connections to the guests works fine.


2) Also I had lots of messages (every few seconds) in /var/log/critical/
Oct 10 01:15:36 [vboxwebsrv] pam_tally(login:auth): Couldn't stat /var/log/faillog
Oct 10 01:15:37 [vboxwebsrv] pam_tally(login:auth): Couldn't create /var/log/faillog

until I manually created a '/var/log/faillog' with access rights for the user running the virtualbox services.

The fine contains only binary information though ?!? No clue what that was about. But this also seems to be related to running Virtualbox as a "normal" user instead of root.
Comment 3 Gerald 2011-10-10 01:37:02 UTC
Please excuse my VirtualBox-Newbieness ignore my comments regarding 1) RDP Authentication, I've since found out that the problem was a missing checkbox in the Microsoft Remote Desktop Client mstsc.exe.

("Allow me to save credentials" must be checked, otherwise you will not be able to connect and get very strange error messages)
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2012-01-02 16:51:04 UTC
Hello, 

Any progress on this one?
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2012-02-29 21:37:59 UTC
Ping again? I really need this for bug #338804 :(
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2012-03-11 15:48:01 UTC
I will go ahead and fix it myself in 48 hours
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2012-03-16 22:39:01 UTC
This is now fixed in both virtualbox and virtualbox-bin