|
vboxwebServiceConfigLinux
How to configure /etc/init.d/vboxweb-service (VirtualBox >= 4.0)
Deploy IntroductionOn Linux systems, VirtualBox creates the init script /etc/init.d/vboxweb-service when it is installed. This can be used to start and stop vboxwebsrv. While there may be numerous ways to configure this script, this document aims to keep it simple. DetailsIn order for vboxweb-service start vboxwebsrv, the file /etc/default/virtualbox must exist with correct settings. If this file does not exist on your system, create it now. This file has the format: SETTING1=value SETTING2=value The following settings are available for use in this file:
At a minimum, VBOXWEB_USER must be set. Some may need to set VBOXWEB_HOST as well. VBOXWEB_USER should be set to the user that runs VirtualBox virtual machines on your system. If more than one user runs virtual machines, you will have to pick one (multiple instances are possible, but beyond the scope of this document). VBOXWEB_HOST should be set if phpVirtualBox (your web server) is not running on the same host as vboxwebsrv. If phpVirtualBox must communicate with vboxwebsrv across a network, this must be set to an IP address reachable by your web server. If your web server and vboxwebsrv are running on the same host, you may exclude this setting. Your /etc/default/virtualbox may look like this: VBOXWEB_USER=vbox .. or if your web server and vboxwebsrv are on NOT the same host: VBOXWEB_USER=vbox VBOXWEB_HOST=192.168.0.4 Note that these values are just examples. The user that runs virtual machines on your system may not be named "vbox." Once this is done, you may start and stop vboxwebsrv by running: /etc/init.d/vboxweb-service start -or- /etc/init.d/vboxweb-service stop as the root user on your system. | ||||||||||||||||||||
To start the service at boot you need to do
or chkconfig (sorry I don't have the details)
if u can't start vboxweb-service, try to adduser on linux system Example: adduser 'vbox' and password 'vbox'
I had to add quotes to the user name in vbox.cfg before I could connect: VBOXWEB_USER='vbox'
i fllowed all the step. but i get this error: SOAP-ENV:ClientHTTP GET method not implemented
os : debian 6 virtualbox 4
Please some one any advice or solution thank you
@yamugot - You are probably going to http://192.168.1.89:18083/phpvirtualbox when you need to go to http://192.168.1.89/phpvirtualbox/
thank you for your quick answer immoreya, but the problem not resolve yet. error msg : Google Chrome could not connect to 192.168.1.89 when i click http://192.168.1.89/phpvirtualbox/
I using debian os 6 with minimum installation and no graphical Do i need install php or apache to make to works. By the way, i installed flubox just to create vm machine with graphical mode, but i do not see any vb menu in flubox.... please help me out... any good solution are welcome
yamugot - with that google response - that tells me Chrome is not finding a web server installed on .89 - if you are using the VM for the web server fine - but you will need to take special attention to the vbox configure as above since your vb and phpweb are different hosts. also special configuration in config.php in phpvirtualbox web dir.
yes - you need php and apache or some web server installed - for ease on yourself, install all on same server.
diazleon - for chkconfig, the command would be "chkconfig vboxweb-service on" or "chkconfig ---levels 2345 vboxweb-service on" - either way, then to start it - "service vboxweb-service start"
@yamugot - this really isn't the place for support issues. Please use the Issues tab.
But as long as we're here... you must install apache and php in Debian.
apt-get install apache2-mpm-prefork apt-get install libapache2-mod-php5
Place the phpvirtualbox folder in /var/www. Call it phpvirtualbox if it is not already named that. It should then be accessible at http://192.168.1.89/phpvirtualbox/
Again, if you have any trouble, please create an entry on the Issues tab.
i will try it and if I still have problem, I will post on the Issues Tab. Thank you all for your kind help
In case you only get a "failed" when you try to start vboxwebsrv via the init script and you have VBOXWEB_LOGFILE configured, check the permissions on that file. It must be writable for VBOXWEB_USER.
If you created a user to run the vboxes make sure the user has a writable $HOME
I have suse 11.4 and i have the same problem, i setup /etc/default/virtualbox with the vbox machine user, but when i loggin on phpvirtualbox i have this error "Error logging in to vboxwebsrv" i try with root user on /etc/default/virtualbox, and work, except i haven't any virtual machine with this user.
Perhaps is a permissions problem?
See: http://code.google.com/p/phpvirtualbox/wiki/Installation?ts=1304524370&updated=Installation#Suse_Considerations
If that doesn't work, please open an issue on the issues tab.
It seems like getting the permissions right for this process is a HUGE stumbling block...perhaps someone could document whats going on "under the hood" regarding permissioning. Every distro seems to have a different gotcha that borks piece this up.
I'm trying to get this running under Ubuntu Server 10.04 and it looks like I'll need to set aside an entire day to chase this rabbit, again.
Keep in mind this is a VirtualBox? issue and not a phpVirtualBox issue.
This is how far I got the last time - It seems that authenticating against PAM wants to read /etc/shadow. This file is only readable by root and should remain that way. If your distro's standard PAM authentication uses pam_unix.so, you will not have a problem. pam_unix.so runs a setuid root helper (so can read /etc/shaddow) to authenticate. If it uses pam_unix2.so, then you will have a problem. This does not run a setuid helper. grep pam_unix /etc/pam/common-auth (in debian at least - should work in ubuntu as well) to find out which it uses. The documentation of pam_unix2.so says something to the effect of the requesting program should run a setuid helper to authenticate. vboxwebsrv does not do this, so cannot authenticate.
If it uses pam_unix2.so, you can follow the instructions for Suse in the Installation wiki to get vboxwebsrv to work.
Another option is to google 'VirtualBox? PAM authentication'. This looks interesting in particular: http://forums.virtualbox.org/viewtopic.php?p=22619
I've recently installed Ubuntu Natty 64bits and VirtualBox? OSE 4.04 and found that /etc/init.d/vboxweb-service file is missing. Where can I get it ?
Thanks, Hernán.-
Yeah, got it running on Ubuntu 10.04 Works great.
Make sure you don't have typo's and:
If you don't see "Remote Display" tab with VirtualBox? >= 4.0, run as vbox user 'VBoxManage modifyvm "VM name" --vrde on'
I'm not part of this group but here are some findings of mine. For anyone having problems getting the service to start who has enabled logging be sure and create the log file neither the init script or the service will create it.
touch /var/log/vbox.log chown vboxuser:vboxuser /var/log/vbox.log
You can test where the init script is failing by running it like this and looking at the result.
bash -x /etc/init.d/vboxweb-service
Don't forget to setup a log rotate config for vboxweb.
Also for "I've recently installed Ubuntu Natty 64bits and VirtualBox? OSE 4.04 and found that /etc/init.d/vboxweb-service file is missing. Where can I get it ?
Thanks, Hernán.- "
Did you use the oracle apt repository to install virtualbox?
Thanks, John
I'm running 11.04 Ubuntu x64 Desktop and the file vboxweb-service does not exist even though I have virtualbox installed
Hi I am trying to install phpvirtualbox in ubuntu 10.10 but when i try to restart the vboxweb-service it shows that "VirtualBox? kernal module not loaded!". What is the solution for that.
If you have any problems, please use the Issues tab to create an issue.
If the webservice fails to start, check if you have loggin enabled in your configuration. If you change the log-path, make sure the logfile exists and that the user running the webservice has access to it.
Took me a while to figure that one out because vboxweb-service didn't show any error.
its 'chkconfig add service name'.... assuming you added the proper headers (run levels, description, yadda)
Thanks to feloniu...@gmail.com, May 24, 2011 I found that the service was failing to start due to permissions on the logfile location it was attempting to write/create. The suggestion for debugging information (bash -x /etc/init.d/vboxweb-service) was very helpful. My internal write-up goes like this:
If the Daemon seems to be running (sites are up) but the Web UI is down
2012-01 after a full restart, the hosted machines & sites responded, but the admin console didn't. The console? was up, but trying to authenticate returned "Could not connect to host" (the web UI trying to connect to the local daemon on http://127.0.0.1:18083/
returned "failed"
It seems that the web service vboxwebsrv was unable to write to its logs, and so failing to start. The log file was expected to be /var/log/vboxweb.log (configured in the config file )
Troubleshooting help in a forum suggested that the log file must be created and set writable. Starting the service manually (which is what the init script does eventually gave the clues to confirm this was the problem.
... this displayed the actual error:
Some commands like
sorted that out, and the web service was then able to start. Not sure if this will happen again.