I'd essentially like to access my host computer from the guest in VirtualBox. Is there an IP address given for my host which I can use from the guest? Are there extra steps required to set this up? I'd like to access my host's Apache, FTP, and SSH services.
|
|
In the default setup, you should be able to reach your host through your default gateway, in my case
In Unix/Linux based guests, use the
In case one, my default gateway is |
|||
|
|
|
Another way to do this is to use a "Host" type of virtual network. That gives you an interface in the guest OS with an address on a local subnet different from the "outer world" subnet(s) that your host machine is on. To make this work, you have to make sure of a few things:
Once you've done this, you should be able to "see" the host from the VM via the name you coded into the host file. For example, on my Ubuntu 11.04 host, I get a "vboxnet0" virtual interface on 192.168.56.1. The adapters in the machines come up with something like 192.168.56.101. I don't need to go in to my VMs, but I presume that'd be possible via a symmetric change to the host's host file. I add
to the guest OS host files, and they can (for example) see my host machine's web server at
You can of course have both bridged and host-only adapters set up. |
|||
|
|
|
You can create shared folders in VirtualBox. This will automatically create a 'network share' within Virtual Box to access folders in your Host OS. Here's a decent step by step in a Windows XP guest OS: |
|||||||||||
|
|
Here is another solution to this issue by using an additional network interface and setting traffic destined for the host to route over an additional interface. |
|||||
|
