NKXLAB / phpvirtualbox

Automatically exported from code.google.com/p/phpvirtualbox
Other
1 stars 0 forks source link

Could not connet to the host #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Virtualbox and Xampp installed in the same host
2.
3.

What is the expected output? What do you see instead?
I've get the following error
Exception Object
(
    [message:protected] => Could not connect to host
    [string:Exception:private] => 
    [code:protected] => 32
    [file:protected] => C:\xampp\htdocs\phpvirtualbox\lib\vboxconnector.php
    [line:protected] => 111
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => C:\xampp\htdocs\phpvirtualbox\lib\vboxconnector.php
                    [line] => 1749
                    [function] => __vboxwebsrvConnect
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [1] => Array
                (
                    [file] => C:\xampp\htdocs\phpvirtualbox\lib\vboxconnector.php
                    [line] => 218
                    [function] => getVMsCached
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [fn] => getVMs
                                )

                            [1] => Array
                                (
                                    [data] => 
                                    [errors] => Array
                                        (
                                        )

                                    [persist] => Array
                                        (
                                        )

                                )

                        )

                )

            [2] => Array
                (
                    [function] => __call
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => getVMs
                            [1] => Array
                                (
                                    [0] => Array
                                        (
                                            [fn] => getVMs
                                        )

                                    [1] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [data] => 
                                                    [errors] => Array
                                                        (
                                                        )

                                                    [persist] => Array
                                                        (
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [3] => Array
                (
                    [file] => C:\xampp\htdocs\phpvirtualbox\lib\ajax.php
                    [line] => 93
                    [function] => getVMs
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [fn] => getVMs
                                )

                            [1] => Array
                                (
                                    [0] => Array
                                        (
                                            [data] => 
                                            [errors] => Array
                                                (
                                                )

                                            [persist] => Array
                                                (
                                                )

                                        )

                                )

                        )

                )

        )

    [previous:Exception:private] => 
)

What version of phpVirtualBox, VirtualBox, and PHP are you using? On what
operating system?
windows XP 2002 SP 3
virtualbox 3.2.6
xampp 1.7.3
phpvirtualbox 0.5

Please provide any additional information below.

Original issue reported on code.google.com by elio.lo...@gmail.com on 11 Aug 2010 at 9:03

GoogleCodeExporter commented 9 years ago
Did you start vboxwebsrv? Is it running?

Original comment by imooreya...@gmail.com on 12 Aug 2010 at 12:47

GoogleCodeExporter commented 9 years ago
Yes, I started it with "vboxwebsrv > nul" command, and I can see it on the 
processes. it takes 6Mb of memory.
There is something that I should configure on the Vbox itself?

Original comment by elio.lo...@gmail.com on 12 Aug 2010 at 2:16

GoogleCodeExporter commented 9 years ago
VirtualBox should require no additional configuration. What do you have in 
config.php for location?

Original comment by imooreya...@gmail.com on 12 Aug 2010 at 3:08

GoogleCodeExporter commented 9 years ago
I will paste the entire config.php file.
I've installed all in the same server, so I use the IP Address of the host 
machine and I provided a user name/password for this machine, I'm correct?

<?php
/*
 * phpVirtualBox configuration
 *
 */
class phpVBoxConfig {

/* Username / Password for system user that runs VirutalBox */
var $username = 'Plab4';
var $password = 'Endpoints';
var $location = 'http://localhost:18083/';

/* Currently, en_US is the only supported language */
var $language = 'en_US';

/*
 *
 * Not-so-common options / tweeking
 *
 */

// Default host/ip to use for RDP
//var $rdpHost = '135.20.215.211';

/*
Allow to prompt deletion harddisk files on removal from Virtual Media Manager.
If this is not set, files are always kept. If this is set, you will be PROMPTED
to decide whether or not you would like to delete the harddisk file(s) when you
remove a harddisk from virtual media manager. You may still choose not to delete
the file when prompted.
*/
var $deleteOnRemove = true;

/*
 * File / Folder browser settings
 */

// Restrict file types
var $browserRestrictFiles = '.iso,.vdi,.vmdk,.img,.bin,.vhd,.hdd,.ovf,.ova';

// Restrict locations / folders
#var $browserRestrictFolders = 'D:\\,C:\\Users\\Ian'; // Or something like 
'/home/vbox,/var/ISOs'

// Force use of local, webserver based file browser instead of going through 
vboxwebsrv
#var $browserLocal = true;

// Disable file / folder browser.
#var $browserDisable = true;

/*
 * Misc
 */

/* Disable any of phpVirtualBox's main tabs */
#var $disableTabVMSnapshots = true; // Snapshots tab
#var $disableTabVMConsole = true; // Console tab
#var $disableTabVMDescription = true; // Description tab

/* Custom screen resolutions for console tab */
#var $consoleResolutions = '640x480,800x600,1024x768';

/* Max number of network cards per VM. Do not set above VirtualBox's limit 
(typically 8) or below 1 */
var $nicMax = 4;

/* Enable Acceleration configuration (normally hidden in the VirtualBox GUI) */
var $enableAccelerationConfig = true;

/* Custom VMList sort function in JavaScript */
/* This places running VMs at the top of the list
var $vmListSort = 'function(a,b) {
    if(a.state == "Running" && b.state != "Running") return -1;
    if(b.state == "Running" && a.state != "Running") return 1;
    return strnatcasecmp(a.name,b.name);
}';
*/

/*
 * Cache tweeking.
 *
 * NOT a good idea to set any of these unless asked to do so.
 */
#var $cachePath = '/tmp';

/*
 * Cache timings

var $cacheExpireMultiplier = 1;
var $cacheSettings = array(
        'getHostDetails' => 86400, // "never" changes
        'getGuestOSTypes' => 86400,
        'getSystemProperties' => 86400,
        'getInternalNetworks' => 86400,
        'getMediums' => 600,
        'getVMs' => 2,
        '__getMachine' => 7200,
        '__getNetworkAdapters' => 7200,
        '__getStorageControllers' => 7200,
        '__getSharedFolders' => 7200,
        '__getUSBController' => 7200,
);
*/

}

Original comment by elio.lo...@gmail.com on 13 Aug 2010 at 9:53

GoogleCodeExporter commented 9 years ago
Hello,

Try changing the location setting so that it looks like this:

var $location = 'http://127.0.0.1:18083/';

Let me know if that resolves it.

Original comment by imooreya...@gmail.com on 13 Aug 2010 at 10:47

GoogleCodeExporter commented 9 years ago
Hey! it seems to solved the startup, thanks =)
but when I try to start any VM is get stucked there (I've attached an image)
The machine should open in a new window? I have to deal with the RDP settings 
or this is an extra feature?
thanks in advance

Original comment by elio.lo...@gmail.com on 14 Aug 2010 at 12:48

Attachments:

GoogleCodeExporter commented 9 years ago
I'm afraid you're misunderstanding phpVirtualBox a little. It is meant to start 
up virtual machines without displaying a window at all. If you want it to open 
up a window that you can interact with when you start a VM, you should just use 
the VirtualBox program rather than phpVirtualBox.

Original comment by imooreya...@gmail.com on 14 Aug 2010 at 1:09