How to do networking between virtual machines in VirtualBox?

Have you tried this Virtual Networking Guide ?

The virtual machine receives its network address and configuration on the private network from a DHCP server integrated into VirtualBox. The IP address thus assigned to the virtual machine is usually on a completely different network than the host. As more than one card of a virtual machine can be set up to use NAT, the first card is connected to the private network 10.0.2.0, the second card to the network 10.0.3.0 and so on.

I think what you're looking for is "Internal Networking" , connecting internal VMs each other.

You can use a VM's "Settings" dialog in the VirtualBox graphical user interface. In the "Networking" category of the settings dialog, select "Internal Networking" from the drop-down list of networking modes. Now select the name of an existing internal network from the drop-down below or enter a new name into the entry field.


I found the following solution for my environment:

  • first adapter with internal network to access the other VM-
  • second adapter with NAT to access the internet.

Those settings can be done by the GUI Oracle VM VirtualBox Manager. Initially I had the same problem as Jonas, I missed DHCP. Finally I found this article (archived copy, original link is dead) and I used:

VBoxManage dhcpserver add --netname intnet --ip 10.13.13.100 --netmask 255.255.255.0 --lowerip 10.13.13.101 --upperip 10.13.13.254 --enable

from the command line. Afterwards it worked fine.

I dare say that the manual is a poor resource, as most of the configuration of VirtualBox on a Windows host can be done by the GUI and it is a severe inconvenience that one can't configure DHCP with the GUI.

My environment: I'm running portable VirtualBox 4.1.2r73507 on Windows 7 64 bit. Currently host-only and bridged mode not working, because host-only adapter is missing. I have a problem similar to that described in a german question on Virtual Box forum, I have no host only adapter.


This is how I connect vbox guests in NAT mode only (tested on VirtualBox 4.2.4).

Just use the gateway IP to go from one guest to the host. Then use port forwarding to "proxy" the host traffic into the other guest.

For instance if guest A wants to reach a guest B service that listen on port 1000, A has to use the gateway IP (for the first NAT interface it is 10.0.2.2). Then you need to configure port forwarding on guest B so that all traffic received by the host on port 1000 go to guest B on port 1000.

This might not work for every service but it seems to work just fine for ssh, salt, ...

In conclusion, you don't necessary need host-only mode to connect multiple guests but I don't mean to say that host-only mode is not the best option for your use case.