Quantcast
Channel: CentOS Bug Tracker - Issues
Viewing all articles
Browse latest Browse all 19115

0007435: NetworkManager automatically creates a non working eth0 profile each boot in LXC container

$
0
0
Hello.<br /> <br /> I use CentOS 7 and trying to create a libvirt LXC CentOS 7 container.<br /> I am able to create the CentOS 7 container and then boot into it fine.<br /> <br /> (<br /> commands used to create the container :<br /> yum install --installroot=/var/lib/libvirt/lxc/test1 --releasever=7 systemd passwd NetworkManager <br /> virt-install --connect <a href="lxc:///">lxc:///</a> [<a href="lxc:///" target="_blank">^</a>] --name test1 --ram 1024 --filesystem /var/lib/libvirt/lxc/test1/,/ --noautoconsole<br /> define root password, edit securetty, etc.<br /> )<br /> <br /> At the first boot, NetworkManager creates automatically a new profile named 'eth0' :<br /> <br /> NAME UUID TYPE DEVICE <br /> eth0 0a5658c7-9732-4a99-b06d-0fbbb437f3bf 802-3-ethernet eth0 <br /> <br /> This profile has no IPV4 method activated and is not autoconnected :<br /> <br /> $ nmcli con show eth0 | grep -E "autoconnect|ipv4.method"<br /> connection.autoconnect: no<br /> ipv4.method: disabled<br /> <br /> I activate the connection (with nmtui) then get it up with 'nmcli con up eth0' :<br /> <br /> Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)<br /> <br /> -bash-4.2# ip a s eth0<br /> 14: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000<br /> link/ether 00:16:3e:c4:70:24 brd ff:ff:ff:ff:ff:ff<br /> inet 192.168.122.9/24 brd 192.168.122.255 scope global dynamic eth0<br /> valid_lft 3589sec preferred_lft 3589sec<br /> inet6 fe80::216:3eff:fec4:7024/64 scope link <br /> valid_lft forever preferred_lft forever<br /> <br /> Next boot, NetworkManager keeps my previous eth0 profile and creates a new one (assigned to device eth0) :<br /> <br /> NAME UUID TYPE DEVICE <br /> eth0 5c72289f-e759-451f-9d48-790f1095f922 802-3-ethernet eth0 <br /> eth0 0a5658c7-9732-4a99-b06d-0fbbb437f3bf 802-3-ethernet --<br /> <br /> This new profile is not configured and so I have no connection :<br /> <br /> -bash-4.2# ip addr show eth0<br /> 8: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000<br /> link/ether 00:16:3e:c4:70:24 brd ff:ff:ff:ff:ff:ff<br /> inet6 fe80::216:3eff:fec4:7024/64 scope link <br /> <br /> I active the new profile.<br /> <br /> Next boot, a new inactive profile is automatically created :<br /> <br /> -bash-4.2# nmcli con<br /> NAME UUID TYPE DEVICE <br /> eth0 115de973-4798-4df3-9fd1-ae0f445f56ff 802-3-ethernet eth0 <br /> eth0 5c72289f-e759-451f-9d48-790f1095f922 802-3-ethernet -- <br /> eth0 0a5658c7-9732-4a99-b06d-0fbbb437f3bf 802-3-ethernet -- <br /> <br /> To clean old profiles and create a working one, I need to run each boot :<br /> <br /> $ nmcli connection delete eth0<br /> $ nmcli connection add type ethernet ifname eth0 con-name eth0<br /> <br /> NetworkManager should not created automatically a new eth0 profile at boot.<br /> My workaround is to not use NetworkManager in the LXC and use the ifcfg method.<br /> <br /> This problem was reported on CentOS forums by 2 other people :<br /> <a href="https://www.centos.org/forums/viewtopic.php?f=47&t=47350">https://www.centos.org/forums/viewtopic.php?f=47&t=47350</a> [<a href="https://www.centos.org/forums/viewtopic.php?f=47&t=47350" target="_blank">^</a>]<br /> <br /> A similar problem (not in LXC) was reported on Debian bug tracker :<br /> (network-manager: keeps creating and using new connection "eth0" that does not work)<br /> <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755202">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755202</a> [<a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755202" target="_blank">^</a>]

Viewing all articles
Browse latest Browse all 19115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>