Take the 2-minute tour ×

Assuming I have two host machines in the same LAN running ubuntu, and on each one I set up two guest virtual machines also running ubuntu. The virtualization software, in this particular case is Virtual Box.

I'd like to create a private LAN with all VMs (even so they're in different hosts). Today I'm using only 2 guests in the same host, and connect them by setting up the bridge mode.

How can I connect all 4 VMs using my lan connection? (The hosts are in the same LAN, but they don't have internet access).

share|improve this question
Don't use virtualbox for production. Use an enterprise-grade hypervisor ESXi, Xen, or even <shudder> KVM are all much better choices. –  HopelessN00b Feb 18 '13 at 13:48
@HopelessN00b Why the put-down on KVM? We use it, and we haven't had a singe problem thus far. –  Soviero Feb 18 '13 at 14:32
@Kevin Don't want to get into a big thing about it on an unrelated question, but suffice to say it's been a pain in my butt and caused me more headaches than I care to remember - but as with all things, YMMV. –  HopelessN00b Feb 18 '13 at 14:37

1 Answer 1

up vote 0 down vote accepted

This would be the same as if you had physical hosts you wish to isolate.

You need to establish a VLAN on the physical switch(es) between your virtual machines and then configure your virtualbox NICs to use this VLAN.

It used to be that virtualbox had some problems with VLAN tagging. Not sure if that is still the case but you might want to read up on it before making any changes.

share|improve this answer

Your Answer


