VirtualBox in LAN
By nitkal on Mar 10, 2009
If you would like to make a Linux virtual machine (created using say Sun's VirtualBox) connect to your LAN to which the host machine is a part of, you could follow these steps:
(0) Create the virtual machine and install the guest OS (I installed Ubuntu).
(1) Install bridge-utils and uml-utilities on the guest OS:
sudo apt-get install bridge-utils uml-utilities
(2) Edit /etc/network/if-pre-up.d/uml-utilities to change:
chown root:uml-net /dev/net/tun
to chown root:vboxusers /dev/net/tun
(3) Change the VirtualMachine settings from NAT (the default) to Host Interface in the Network settings tab of the GUI.
(4) Restart the networking service
sudo /etc/init.d/networking restart
After this, the virtual machine can be accessed from any other machine on the LAN using ssh or vnc if these services are available on the guest OS. For more advanced configuration including TUN/TAP settings, this link might be useful.