[lxc-users] Network Manager makes RHEL 8 and Centos 8 impossible to use as a container

Saint Michael venefax at gmail.com
Tue Dec 17 04:41:24 UTC 2019


The setup is the default
lxc-create -t download -n mysql -- --dist centos -- --arch amd64
then you choose release 8 and amd64
I already mounted the ISO inside the container. I will do what you suggest.


On Mon, Dec 16, 2019 at 10:20 PM Fajar A. Nugraha <list at fajar.net> wrote:

> 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
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20191216/ba4b3ee2/attachment.html>


More information about the lxc-users mailing list