I'm setting up a VM that runs on Ubuntu Server 14.04.2 via virtualbox 5.0 on a desktop running on windows 7 Pro. The host machine is set to a static IP address and its Internet connection is working.
I can run a command "dig" on the VM and it replied with success. At this stage, its IP address was still assigned by DHCP. I believe, it's set to NAT by default under "Network" configuration in VirtualBox.
Then, the internet stopped working after changing from dhcp to static in virtual network adapter on the Ubuntu VM.
Code: Select all
auto eth0
iface eth0 inet static
address 10.0.2.100
netmask 255.255.255.0
network 10.0.2.0
broadcast 10.0.2.255
gateway 10.0.2.1
dns-servers 8.8.8.8 8.8.4.4
When I looked into Network settings for the Ubuntu VM, it's set to NAT. I tried both Bridged Adapter and Host-only Adapter but to no avail.
If I switched it back from static to dhcp in the VM network interfaces settings, I got replies and the internet is working fine.
Just wondering if I have missed out on any steps here.
Thank you very much!
[Spam content removed]