[lxc-users] Network Manager makes RHEL 8 and Centos 8 impossible to use as a container
Fajar A. Nugraha
list at fajar.net
Tue Dec 17 03:19:51 UTC 2019
On Tue, Dec 17, 2019 at 8:24 AM Saint Michael <venefax at gmail.com> wrote:
>
> Network Manager makes RHEL 8 and Centos 8 impossible to conteinarize. Please see that it detects a device type macvlan, when it should be really Ethernet. nmcli connection up Ethernet0 Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).
>
> nmcli dev show GENERAL.DEVICE: eth0 GENERAL.TYPE: macvlan GENERAL.HWADDR: (unknown) GENERAL.MTU: 1500 GENERAL.STATE: 20 (unavailable) GENERAL.CONNECTION: -- GENERAL.CON-PATH: --
You should write details of your setup so that others can help you better.
On default setup (with lxdbr0), c8 container works just fine, so it's
definitely not 'impossible to containerize'.
# lxc launch images:centos/8 c8
Creating c8
Starting c8
# lxc shell c8
[root at c8 ~]# nmcli connection show
NAME UUID TYPE DEVICE
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet eth0
I'm guessing you've changed it to use macvlan. It can work, but you
need a workaround, using the old network-scripts, and lxdbr0 bridged
mode temporarily (or whatever you need to be able to run "yum install"
on the container)
yum -y install network-scripts
systemctl enable network
sed -i 's/TYPE=Ethernet/TYPE=Generic/g'
/etc/sysconfig/network-scripts/ifcfg-eth0
change container config to use macvlan, then reboot the container.
The correct fix should probably be in network manager, so that it
could work with existing macvlan device, or have the option to
override detected device type.
--
Fajar
More information about the lxc-users
mailing list