Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have setup multiple guest hosts with NAT networking. On each hosts i have some portforwards so i can connect from my host (like 2222 to 22 host 1, 2223 to 22 host 2, ...).

How can i setup a guest-guest network connection with virtualbox?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

I would suggest just adding a second network adapter to each of your virtual machines that is configured with the "Host-Only" option. You could also use a bridged interface but that can do weird things if you have a wireless network adapter. The Host-only option allows your VMs to communicate with your host, as well as each other. This also means you can get rid of the port forwards on your NAT configuration as your host will be able to directly talk to each guest. There is a DHCP configured on the Host-only network by default, and it will typically hand out addresses in the 192.168.56.101-254 range - so you can use the .1-100 addresses for static assignments as well.

  • Open your VM settings
  • Choose the Network secton of the settings dialog
  • On the Adapter 2 tab
    • Check the box for Enable Network Adapter
    • Changed Attached to to Host-only Adapter

VirtualBox VM Settings - Network

share|improve this answer
    
This sounds good. I am able to choose "Host-only Adapter" but there is nothing in "Name" field. The error message is something like "you did not choose a host-only network adapter". –  tonymarschall Mar 30 '12 at 16:41
    
If for some reason you don't have a Host-Only network configured, you can go to the preferences for VirtualBox itself, on the network section and add a Host-Only Ethernet adapter. –  Goyuix Mar 30 '12 at 16:50
    
If I understand correctly, 192.168.56.1 is the address of the Host and 192.168.56.100 is the DHCP server on the Host-only network so I wouldn't use either or those as static addresses. –  pgraham Apr 24 at 0:54

if you mean Guest - Guest as in running 2 virtual machines on the same host and have them communicate then you could use Bridged adapters and set them all in the same subnet.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.