On 2018-05-03 12:09, Tomasz Chmielewski wrote:
On 2018-05-03 11:58, Mark Constable wrote:
On 5/3/18 12:42 PM, Tomasz Chmielewski wrote:
> Today or yesterday, bionic image launched in LXD is not getting an IPv4
> address. It is getting an IPv6 address.

If you do a "lxc profile show default" you will probably find it doesn't
have an IPv4 network attached by default. I haven't yet found a simple
step by step howto example of how to setup a network for v3.0 but in my case I use a bridge on my host and create a new profile that includes...

lxc network attach-profile lxdbr0 [profile name] eth0

then when I manually launch a container I use something like...

lxc launch images:ubuntu-core/16 uc1 -p [profile name]

The bionic container is attached to a bridge with IPv4 networking.

Besides, xenial container is getting IPv4 address just fine, while
bionic is not.


The issue is not LXD 3.0 specific - I'm able to reproduce this on
servers with LXD 2.21 and LXD 3.0.

I'm able to reproduce this issue with these LXD servers:

- Ubuntu 16.04 with LXD 2.21 from deb
- Ubuntu 18.04 with LXD 3.0.0 from deb
- Ubuntu 16.04 with LXD 3.0.0 from snap



Reproducing is easy:

# lxc launch images:ubuntu/bionic/amd64 bionic-broken-dhcp


Then wait a few secs until it starts - "lxc list" will show it has IPv6 address (if your bridge was configured to provide IPv6), but not IPv4 (and you can confirm by doing "lxc shell", too):

# lxc list


On the other hand, this works fine with xenial, and "lxc list" will show this container is getting an IPv4 address:

# lxc launch images:ubuntu/bionic/amd64 xenial-working-dhcp


Tomasz Chmielewski
https://lxadm.com
_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to