tomp
(Thomas Parrott)
December 29, 2020, 6:42am
21
Thanks I have recreated the issue on an ubuntu 18.04 host.
1 Like
tomp
(Thomas Parrott)
January 5, 2021, 4:19pm
22
I’ve not had any luck figuring out why the NetworkManager inside CentOS 8 on Ubuntu Bionic doesn’t classify the veth interface as managed. I suspect its something different with how udev is working (or not) inside the container. NetworkManager seems particularly picky about setting up existing interfaces, and I’ve not found a way of just telling it to configure the existing interface without worrying about its state or type.
See also a similar issue related to macvlan interface types in CentOS 8:
opened 01:08PM - 23 Dec 20 UTC
closed 02:33AM - 16 Jun 21 UTC
On the [lxd tryit](https://linuxcontainers.org/lxd/try-it) server I ran the foll… owing:
```
root@tryit-precise:~# lxc launch images:centos/8-Stream centos8stream
Creating centos8stream
Starting centos8stream
root@tryit-precise:~# lxc list centos8stream
+---------------+---------+------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+---------------+---------+------+------+-----------+-----------+
| centos8stream | RUNNING | | | CONTAINER | 0 |
+---------------+---------+------+------+-----------+-----------+
root@tryit-precise:~# lxc image ls
+-------+--------------+--------+----------------------------------------+--------------+-----------+----------+------------------------------+
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCHITECTURE | TYPE | SIZE | UPLOAD DATE |
+-------+--------------+--------+----------------------------------------+--------------+-----------+----------+------------------------------+
| | 6940ae22b743 | no | Centos 8-Stream amd64 (20201222_07:08) | x86_64 | CONTAINER | 126.81MB | Dec 23, 2020 at 2:41am (UTC) |
+-------+--------------+--------+----------------------------------------+--------------+-----------+----------+------------------------------+
root@tryit-precise:~# lxc exec centos8stream bash
[root@centos8stream ~]# cat /etc/udev/rules.d/86-nm-unmanaged.rules
ENV{ID_NET_DRIVER}=="veth", ENV{NM_UNMANAGED}="0"
```
Seems the fix https://github.com/lxc/lxc-ci/pull/216 was not effective.
Discussed [here](https://discuss.linuxcontainers.org/t/1-6-lxd-containers-not-assigned-ipv4-ipv6-addresses), @tomponline suggests it's due to the tryit service using `macvlan` nictype.
tomp
(Thomas Parrott)
January 7, 2021, 5:42pm
23
It looks like you need to run the HWE kernel on Ubuntu Bionic as that supports passing udev events into containers.
I’ve tested this working using:
apt-get install --install-recommends linux-generic-hwe-18.04
2 Likes
kimbo
(Kim Faint)
January 8, 2021, 12:23am
24
That’s working beautifully for me now. Thanks Tom. Legend.
1 Like