Centos 8 as a container

falves1

Well-Known Member
Jan 11, 2009
99
3
48
Network Manager makes RHEL 8 and Centos 8 impossible to containerize. 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: --
GENERAL.DEVICE: lo GENERAL.TYPE: loopback GENERAL.HWADDR: 00:00:00:00:00:00 GENERAL.MTU: 65536 GENERAL.STATE: 10 (unmanaged) GENERAL.CONNECTION: -- GENERAL.CON-PATH: -- IP4.ADDRESS[1]: 127.0.0.1/8 IP4.GATEWAY: -- IP6.ADDRESS[1]: ::1/128 IP6.GATEWAY: --
 
Please try to use [code]...[/code] tags, this is really hard to decipher else.

NetworkManager is generally a bit of a PITA (IMHO), but using the CentOS 8 templat provided by us and setting a CT up here it network works out of the box here:

Code:
[root@CT144 ~]# nmcli dev show
GENERAL.DEVICE:                         eth0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         E6:4C:2B:3A:94:83
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     System eth0
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/1
WIRED-PROPERTIES.CARRIER:               on
IP4.ADDRESS[1]:                         192.168.31.234/20
IP4.GATEWAY:                            192.168.16.1
IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.16.1, mt = 100
IP4.ROUTE[2]:                           dst = 192.168.16.0/20, nh = 0.0.0.0, mt = 100
IP4.DNS[1]:                             192.168.4.15
IP4.DNS[2]:                             192.168.4.16
IP4.DNS[3]:                             192.168.17.1
IP4.DOMAIN[1]:                          proxmox.com
IP6.ADDRESS[1]:                         fe80::e44c:2bff:fe3a:9483/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = ff00::/8, nh = ::, mt = 256, table=255
IP6.ROUTE[2]:                           dst = fe80::/64, nh = ::, mt = 256

GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            --
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = ::1/128, nh = ::, mt = 256

[root@CT144 ~]# cat /etc/centos-release
CentOS Linux release 8.0.1905 (Core)