dhcp and macvlans in vbox'd containers

Discussions related to using VirtualBox on Linux hosts.

dhcp and macvlans in vbox'd containers

Postby toby.h.ferguson » 20. Dec 2013, 19:08

Problem: macvlans don't seem to allow VirtualBox guests containers (!) to use dhcp, no matter the networking mode, no matter the adaptor chosen.

Description: OL6U5 host, OL6U5 guest, bridged networking, non-intel adaptor. Guest contains a linux container, and I want to make that container use dhcp to get its address. This doesn't work ... setting the address manually does work, but dhcp doesn't.

Anyone seen anything like this, or have any ideas what I might try next? (I haven't gotten wireshark out yet to see if the request gets out, but that'd be my next step as/when I have time)

Toby
toby.h.ferguson
 
Posts: 4
Joined: 23. Mar 2010, 18:16
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu 9.1 desktop i386

Re: dhcp and macvlans in vbox'd containers

Postby toby.h.ferguson » 22. Jan 2014, 21:22

For the record, Jerome Petazzone@docker.com gave me this info:

1. The "Adapter Type" should be set to "PCnet-FAST III" (not the default, which is an Intel PRO/1000 variant), see https://www.virtualbox.org/ticket/6519
2. "Promiscuous Mode" should be set to "Allow All".

And I found that my container configuration file had TWO entries for lxc.network in it - so I reduced it to this set:

Code: Select all   Expand viewCollapse view
lxc.network.type = macvlan
lxc.network.macvlan.mode = bridge
lxc.network.link = eth0
lxc.network.flags = up


Furthermore, my ifcfg-eth0 contained:

Code: Select all   Expand viewCollapse view
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=ues
DHCP_HOSTNAME=ol65.toby.net


Once I'd done an ifdown eth0; ifup eth0 everything worked as I'd hoped. Great!
toby.h.ferguson
 
Posts: 4
Joined: 23. Mar 2010, 18:16
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu 9.1 desktop i386


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 20 guests