I am using phpVirtualBox, and everything is working perfectly. Then something changes, and I get the following error:
Code:
Could not connect to host (http://127.0.0.1:18083/)
I reboot the physical machine, or execute /etc/init.d/vboxweb-service restart, and then everything works for a while.
According to http://sourceforge.net/p/phpvirtualb...onnect-to-host, there are three reasons why this will happen.
Quote:
This indicates that phpVirtualBox could not connect to the vboxwebsrv server. Either the location setting in config.php is wrong, vboxwebsrv is not running on the VirtualBox host, or SELinux is blocking access to vboxwebsrv. If you have SELinux enabled
As shown below, it is not reason 2 or 3.
Code:
[root@devserver ~]# service vboxweb-service status
Checking for VBox Web Service ...running
[root@devserver ~]# service vboxdrv status
VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are loaded.
[root@devserver ~]# service vboxautostart-service status
Usage: /etc/init.d/vboxautostart-service {start|stop}
[root@devserver ~]# service vboxballoonctrl-service status
Checking for VBox watchdog service ...not running
[root@devserver ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 24
Policy from config file: targeted
[root@devserver ~]#
Thus it must be that the location setting in config.php is wrong. config.php has the following default settings, and I left them as is.
Code:
/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */
var $location = 'http://127.0.0.1:18083/';
...
// Host / ip to use for console connections
#var $consoleHost = '192.168.1.40';
According to http://sourceforge.net/p/phpvirtualb...-configuration, "If VirtualBox and phpVirtualBox are on the same physical host, you may leave the $location setting alone". VirtualBox and phpVirtualBox are definitely on the same physical machine.
Please provide recommendations.