The first is the setup of the network connection in Vitualbox. The default is for network address translation (NAT) to be modified to bridge the NIC, other default.
Then is to go into the Ubuntu to modify the IP address, this is believed that everyone Baidu can find.
sudo VI /etc/network/interfaces
Then, modify the content inside, append the content:
Auto Eth0
Iface eth0 inet Static
Address 192.168.1.121 netmask 255.255.255.0 Gateway 192.168.1.1 maintains the same network segment as the IP address in the host operating system. Use the specific command Cmd->ipconfig/all, in Ubuntu with Ifconfig. Next, add the DNS information in the/etc/resolv.conf file: NameServer 202.112.125.33, and so on, then restart the NIC:
sudo Ifdown eth0 sudo ifup eth0
Restart the Network service:
/etc/init.d/networking restart
Configure the IP address of Ubuntu in Vitualbox