Friday, May 25, 2012

Server Virtualization

Virtualbox uses NAT to let  guest operating systems access the network. This is fine if you just want to have basic network functionality such as internet access, but it means that the guest will be on its own network. Often having the guest machine on the same LAN as the host is desirable (in cases where you want some of your servers run on VirtualBox). This is achieved by using Virtualbox Bridged Adapter network configuration. This is actually very simple to set up. Just open a terminal on the host and install the required packages as follows:


MyHost$sudo apt-get install bridge-utils uml-utilities
Next open Virtualbox, select your guest and click Settings. Change ‘Attached to’ from NAT to Bridged Adapter, and click OK.

To get ip from DHCP, if you are using DHCP, you need to run:

MyGust#dhclient 


If you are using a static IP, you will need to configure the guest OS accordingly (using IP range of the network of the host OS) so that it can join your LAN.

That's it.

(I got some of the information from a post on http://www.karlrixon.co.uk)