Comment 2 for bug 1080681

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: debian guests get different IPv4 at every reboot

@Enrique,

near as i can tell this turns out to be not an lxc issue (unless we want the template to be more invasive than it already is).

In Ubuntu it looks like ifup simply is smart enough to not follow through with dhcp if the nic is already up with an address. In debian, not.

If you want the debian containers to not run dhcp, then you need to edit /etc/network/interfaces to tell ifupdown not to run dhcp on the devices. As I say the lxc debian template could look for a lxc.network.ipv4 entry in the provided lxc.conf and, if present, edit the container's /etc/network/interfaces to make that happen. But it's interesting that the ubuntu template doesn't do that.