Page 1 of 1

Could not connect to Host

Posted: 16. Nov 2011, 00:38
by Drew5316
I posted this on phpvirtualbox.org, but they suggested I ask over here.

What steps will reproduce the problem?
1. http://192.168.0.19/phpvirtualbox/
2. Enter User and Password
3. Result: Could Not Connect to Host

Exception Object
(
[message:protected] => Could not connect to host
[string:Exception:private] =>
[code:protected] => 64
[file:protected] => /var/www/phpvirtualbox-4.0-4b/lib/vboxconnector.php
[line:protected] => 106
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /var/www/phpvirtualbox-4.0-4b/lib/vboxconnector.php
[line] => 236
[function] => __vboxwebsrvConnect
[class] => vboxconnector
[type] => ->
[args] => Array
(
)

)

[1] => Array
(
[file] => /var/www/phpvirtualbox-4.0-4b/lib/ajax.php
[line] => 108
[function] => connect
[class] => vboxconnector
[type] => ->
[args] => Array
(
)

)

)

[previous:Exception:private] =>
)

Read http://code.google.com/p/phpvirtualbox/ ... ct_to_host and then went looking for vboxwebsrv. I'm using TurnkeyLinux Core, and am most comfortable in the webmin GUI, so I found it under Bootup and Shutdown > vboxweb-service. Start at Boot? Yes. Running Now? No

Check the box next to it, and click [Start]:
Starting service vboxweb-service ..

* Starting VirtualBox web service

* VirtualBox kernel module not loaded!

.. done.

Go back to Bootup and Shutdown > vboxdrv. Start at Boot? Yes. Running Now? _Unknown_
Check box next to vboxdrv and click [Start]:
Starting service vboxdrv ..

* Starting VirtualBox kernel modules

* modprobe vboxdrv failed. Please use 'dmesg' to find out why

.. done.

Run dmesg from command line and gets all sorts of gobbly-gook that doesn't look like it has any reference to vboxdrv.

What version of phpVirtualBox, VirtualBox, and PHP are you using? On what
operating system?


phpVirtualBox: 4.0-4b
VirtualBox: 4.0.4-70112~Ubuntu~lucid
PHP: 5.3.2-1ubuntu4.10
OS: Ubuntu Linux 10.04.1

Any help would be greatly appreciated. Thanks!
Drew

Re: Could not connect to Host

Posted: 16. Nov 2011, 00:58
by Perryg
Discarding the phpvirtualbox since it is not supported here.
1) You say you are using Ubuntu and then mention turnkey linux, Which is the host?
2) You realize that if you are trying to run this in a guest it will not work, right?

Re: Could not connect to Host

Posted: 16. Nov 2011, 03:29
by imachavel
hey does virtualbox have the host only networking virtual ethernet adapter option the way that vmware does?

Re: Could not connect to Host

Posted: 16. Nov 2011, 05:17
by Drew5316
Perryg wrote:Discarding the phpvirtualbox since it is not supported here.
1) You say you are using Ubuntu and then mention turnkey linux, Which is the host?
2) You realize that if you are trying to run this in a guest it will not work, right?
0. The PHPVirtualbox folks think that the "could not connect to host" is a virtualbox issue, thus they sent me here. If there's anything I can do to help explain, let me know.
1. The Turnkey Linux Core is Ubuntu 10.04LTS Server, running a Webmin GUI
2. I don't understand the question. Could you please clarify? FYI, I'm trying to run vbox on a bare metal install of Turnkey Linux Core (Ubuntu 10.04LTS Server, as stated above). The TKL Core is the host. There will be several different guests, but I haven't gotten there, yet.

The PHPVirtualbox was to deal with the headlessness of the server. I know there is a "headless" mode in vbox, but I'm not familiar with it.

Thanks,
Drew

Re: Could not connect to Host

Posted: 16. Nov 2011, 05:58
by imachavel
wait you said the os is headless? didn't you just say that the front end is run with a webmin gui? I figure most of those linux kernels are almost identical. idk
sorry I know nothing about this type of stuff. I wish I could help you more, but honestly I really don't know the answer. there are so many possible factors, can you ping google from both host and guest? are you sure it's internal and not hardware related?

you sound so sure that you have a good solid answer that it is definitely internal. I don't want to complicate things, because I'm sure I don't have the solution to your question, but can you clarify your hardware setup? I doubt it'll help anything, but describing all possible factors goes a long ways. maybe someone else can further trouble shoot this because this type of stuff I have no clue at all.

https://wiki.archlinux.org/index.php/PhpVirtualBox

ok now I understand, it's already headless when you install it. I thought you were a programmer and you stripped the head. sorry my mistake.
btw, when I ask if you can ping google, I am of course assuming you didn't type out this thread on the same computer you are trying to connect the guest to the host on right?

also, is this your thread from yesterday?:

http://code.google.com/p/phpvirtualbox/ ... ail?id=446

doesn't look like it, it seems to be a different user. read it and tell me if you went through all those steps already, looks like you might need to edit a .cfg file, although with linux I'm not sure it'll be a .cfg file extension, but basically edit a configuration file. I'm not too familiar with web based applications, I myself am having a problem connecting virtualbox from guest to host and vice versa. I don't think though in my case not using a php application that editing a configuration file will help my connection issues. have you tried looking at your logs to see if the virtual ethernet you are using in guest is configured as the actual ethernet you are using in host? although both machines are using the same physical device, if the virtual configuration of the device in guest is set wrong, then probably it won't connect, but then how would you be able to access the internet. :?:

Re: Could not connect to Host

Posted: 16. Nov 2011, 15:50
by Perryg
So if I get this right you have Ubuntu installed on a bare metal box.
Next you installed VirtualBox in the Ubuntu server, correct?
Tell me how did you install? be explicit and detailed. (where you got it from , any prep of the server before install, Etc.)
Did you see any errors?
Post /var/log/vbox-install.log

Re: Could not connect to Host

Posted: 16. Nov 2011, 21:22
by Drew5316
Perryg wrote:So if I get this right you have Ubuntu installed on a bare metal box.
Next you installed VirtualBox in the Ubuntu server, correct?
Tell me how did you install? be explicit and detailed. (where you got it from , any prep of the server before install, Etc.)
Did you see any errors?
Post /var/log/vbox-install.log
FYI, I got it running by uninstalling the previous install of Virtualbox, then re-installing using the [Search APT] function in the Software Packages section of Webmin. I installed Virtualbox 4.1.6 for lucid. I then went to PHPVirtualbox downloaded and installed phpvirtualbox 4.1.5 and installed per instructions. It's very important to follow the Linux Considerations. One thing I did was make sure the VBOXWEB_USER={known Linux User} in my /etc/default/virtualbox file.

Fired it up, no problem... until I started to migrate my physical XP disc to vbox. Still working on that one. May be a separate thread, soon.

As to answer your questions, the install on bare metal was made using phpVirtualBox Server appliance ISOs from 9while9.com. I used Unetbootin to create a LiveUSB drive and installed on the above ISO on bare metal.

/var/log/vbox-install.log

Code: Select all

Uninstalling modules from DKMS
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxhost/4.1.6/source ->
                 /usr/src/vboxhost-4.1.6

DKMS: add Completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=2.6.32-35-generic-pae -C /lib/modules/2.6.32-35-generic-pae/build M=/var/lib/dkms/vboxhost/4.1.6/build.......................................
cleaning build area....

DKMS: build Completed.

vboxdrv.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-35-generic-pae/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-35-generic-pae/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-35-generic-pae/updates/dkms/

vboxpci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-35-generic-pae/updates/dkms/

depmod....

DKMS: install Completed.

Re: Could not connect to Host

Posted: 16. Nov 2011, 21:36
by Perryg
Wow!
You have gone through so many different programs and third party offers I have no idea how to advise you going forward.
Normally it is really straight forward.
You install VirtualBox, then phpvirtualbox, configure and it works.

One thing that is of consideration is you say you use webmin to do your installing. Did you add VirtualBox.org to the sources list? If not then you are using Ubuntu's version of VirtualBox (which is not exactly the same as the original).

Re: Could not connect to Host

Posted: 16. Nov 2011, 22:49
by Drew5316
Perryg wrote:Wow!
You have gone through so many different programs and third party offers I have no idea how to advise you going forward.
Normally it is really straight forward.
You install VirtualBox, then phpvirtualbox, configure and it works.
That's essentially what I found out. Even though there was a preconfigured phpvirtualbox in the TKL Core, I couldn't get it to work, so tried to uninstall as much as possible, then, as you suggested, just installed vbox, phpvbox, some minor config work (following instructions, of course) and it worked.
Perryg wrote:One thing that is of consideration is you say you use webmin to do your installing. Did you add VirtualBox.org to the sources list? If not then you are using Ubuntu's version of VirtualBox (which is not exactly the same as the original).
I did use the Ubuntu VirtualBox 4.1. I do not have VirtualBox.org set up, yet, on my sources list.

Re: Could not connect to Host

Posted: 23. Nov 2011, 18:26
by tech_express
Hi !

I have exactly the same problem and I find solution on the http://code.google.com/p/phpvirtualbox/ ... ail?id=437
Run the following command as the user 'vbox', restart vboxwebsrv and try again please:

VBoxManage setproperty websrvauthlibrary null

Code: Select all

 VBoxManage setproperty websrvauthlibrary null
and after restart Vbox web service

Code: Select all

service vboxweb-service restart

Re: Could not connect to Host

Posted: 11. Mar 2016, 18:56
by Qcraft
tech_express wrote:Hi !


Run the following command as the user 'vbox', restart vboxwebsrv and try again please:

VBoxManage setproperty websrvauthlibrary null

Code: Select all

 VBoxManage setproperty websrvauthlibrary null
and after restart Vbox web service

Code: Select all

service vboxweb-service restart
Thanks this worked for me very well