I'll start in this forum but may have to take the question to VirtualBox forum.

re: VirtualBox network configuration of VM Ubuntu-12.04.2 LTS server.


My problem is that I can't get Bridge Adapter to work in VirtualBox VM Ubuntu-12.04.2-i386-server.

I have the following configuration:


  • Ubuntu-12.04.1 LTS desktop as the host OS.
  • Wired connection to cable modem.
  • Installed the latest version of VirtualBox, 4.2.12.
  • Installed on VirtualBox a guest VM Ubuntu-12.04.2 32bit server.


My problem is in setting up VirtualBox network so that I can access the guest server from my host desktop.

In VirtualBox Network Settings I have set Bridged Adapter (eth0).

However when booting up the VM a network connection isn't found.

When I login to the guest OS on VM and run ifconfig iI don't see an IP address against eth0.

If I try to run ping 8.8.8.8 from the guest OS I get ..
connect: Network is unreachable.

I cannot ping the guest server from the host OS.

If I then shut down the guest server and change network settings to NAT (instead of Bridged Adapter)
and then startup again I can ping from guest to host using ping 10.0.2.2. But in reading this chapter on virtual networking ...

http://www.virtualbox.org/manual/ch06.html

NAT is not recommended when running guest OS as a VM server.


So what steps must I take to ensure that Bridged Adapter works?

...

I've read these threads ...

http://ubuntuforums.org/showthread.php?t=1945029

https://forums.virtualbox.org/viewtopic.php?f=7&t=43090


Note .. I've looked in
/etc/udev/rules.d/70-persistent-net.rules

but the file is empty.

...

Other files in host OS

/etc/network/interfaces

auto lo
iface lo inet loopback




and in guest OS (the VM)
/etc/network/interfaces

# the loopback network interface
auto lo
iface lo inet loopback

# the primary network interface
auto eth0
iface eth0 inet dhcp