Page 2 of 2

Re: Can't obtain IP from DHCP on Ubuntu Desktop in bridged m

Posted: 14. May 2013, 23:12
by Perryg
Servers don't come with a network manager so if it does not install properly on installation or you need to change it you have to do so manually.

Add the interface to the the /etc/network/interfaces file.

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
And reboot the guest

PS don't forget to fix the DNS if you can't reach a web site.

Re: Can't obtain IP from DHCP on Ubuntu Desktop in bridged m

Posted: 15. May 2013, 17:41
by leonger
Thank you Parryg! I finally got it working by fixing network adapter settings in VBox Manager and then doing few other things on the guest as you recommended.
I think, the main problem was that I installed this VM and OS on a wireless connection at home, but then tried to run it from a wired one in the office without switching the adapter settings. Apparently, wireless did not work in the office. Once I switched the adapter selection form wireless one on a Gigabit, the things started to improve.
I did have to add primary network interfaces to the /etc/networking/interfaces too, but it did not work with "allow-hotplug" for some reason - I had to define it with "auto".
Also deleted 70-persistent-net.rules, refreshed MAC address, and rebooted - all worked after that.
Thanks again!