CentOS 8 Cloud Image Ignores Network Config File

For some reason the CentOS 8 Cloud image ignores /etc/sysconfig/network-scripts/ifcfg-eth0 despite populating it with static ip information from my lxd profile.

For example here is a profile.

    cloud-user@cloud10:~$ lxc profile show vlan13
    config:
      user.network-config: |
        version: 1
        config:
          - type: physical
            name: eth0
            subnets:
              - type: static
                ipv4: true
                address: 10.0.3.50
                netmask: 255.255.255.0
                gateway: 10.0.3.1
                control: auto
          - type: nameserver
            address: 10.0.0.2
    description: ""
    devices:
      eth0:
        nictype: macvlan
        parent: bond0
        type: nic
        vlan: "13"
    name: vlan13
    used_by:
    - /1.0/instances/centos1

And here is the configuration file generated inside of the container.

[root@centos1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEFROUTE=yes
DEVICE=eth0
GATEWAY=10.0.3.1
IPADDR=10.0.3.50
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no

But after creation the network isn’t up or configured
[root@centos1 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
34: eth0@if9: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 00:16:3e:44:ea:a6 brd ff:ff:ff:ff:ff:ff link-netnsid 0

Hmm, maybe some mis-ordering or bad interaction between NetworkManager and cloud-init.

I just tried with CentOS 7 cloud images and it works fine. I thought I saw something on github about this mentioning it had been fixed in the CentOS 8 image but now I can’t find it.

It also doesn’t work in the non cloud version of CentOS 8 with a manual config file inside of the image. The config file is never applied to the interface for some reason.

Yeah, smells like NetworkManager getting confused then, it’s supposed to use its sysconfig plugin to read and setup configs as needed.

fedora/32/cloud is also showing the same behavior but things like debian/11/cloud and debian/10/cloud are both working correctly.

-- Logs begin at Mon 2020-07-20 18:57:32 UTC, end at Mon 2020-07-20 18:57:37 UTC. --
Jul 20 18:57:32 ipa1 systemd-journald[63]: Journal started
Jul 20 18:57:32 ipa1 systemd-journald[63]: Runtime journal (/run/log/journal/c65aed249c6243dabb673efaab89e1cc) is 8.0M, max 4.0G, 3.9G free.
Jul 20 18:57:32 ipa1 systemd-sysctl[59]: Couldn't write '0' to 'kernel/yama/ptrace_scope', ignoring: Permission denied
Jul 20 18:57:32 ipa1 systemd-sysctl[59]: Couldn't write '|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e' to 'kernel/core_pattern', ignoring: Permission denied
Jul 20 18:57:32 ipa1 systemd-sysctl[59]: Couldn't write '16' to 'kernel/sysrq', ignoring: Permission denied
Jul 20 18:57:32 ipa1 systemd-sysctl[59]: Couldn't write '1' to 'kernel/core_uses_pid', ignoring: Permission denied
Jul 20 18:57:32 ipa1 systemd-sysctl[59]: Couldn't write '1' to 'kernel/kptr_restrict', ignoring: Permission denied
Jul 20 18:57:32 ipa1 systemd-sysctl[59]: Couldn't write 'fq_codel' to 'net/core/default_qdisc', ignoring: No such file or directory
Jul 20 18:57:32 ipa1 systemd-sysctl[59]: Couldn't write '1' to 'fs/protected_hardlinks', ignoring: Permission denied
Jul 20 18:57:32 ipa1 systemd-sysctl[59]: Couldn't write '1' to 'fs/protected_symlinks', ignoring: Permission denied
Jul 20 18:57:32 ipa1 systemd-sysctl[59]: Couldn't write '81920' to 'net/core/optmem_max', ignoring: No such file or directory
Jul 20 18:57:32 ipa1 systemd-sysctl[59]: Couldn't write '4194304' to 'kernel/pid_max', ignoring: Permission denied
Jul 20 18:57:32 ipa1 systemd[1]: Starting Flush Journal to Persistent Storage...
Jul 20 18:57:32 ipa1 systemd-journald[63]: Runtime journal (/run/log/journal/c65aed249c6243dabb673efaab89e1cc) is 8.0M, max 4.0G, 3.9G free.
Jul 20 18:57:32 ipa1 systemd[1]: Started Flush Journal to Persistent Storage.
Jul 20 18:57:32 ipa1 systemd[1]: Starting Create Volatile Files and Directories...
Jul 20 18:57:32 ipa1 systemd[1]: Started Create Volatile Files and Directories.
Jul 20 18:57:32 ipa1 systemd[1]: Starting Update UTMP about System Boot/Shutdown...
Jul 20 18:57:32 ipa1 systemd[1]: Started Update UTMP about System Boot/Shutdown.
Jul 20 18:57:33 ipa1 systemd[1]: Started Rebuild Hardware Database.
Jul 20 18:57:33 ipa1 systemd[1]: Starting udev Kernel Device Manager...
Jul 20 18:57:33 ipa1 systemd[1]: Starting Update is Completed...
Jul 20 18:57:33 ipa1 systemd[1]: Started Update is Completed.
Jul 20 18:57:33 ipa1 systemd[1]: Started udev Kernel Device Manager.
Jul 20 18:57:33 ipa1 systemd[1]: Reached target System Initialization.
Jul 20 18:57:33 ipa1 systemd[1]: Started dnf makecache --timer.
Jul 20 18:57:33 ipa1 systemd[1]: Started Daily Cleanup of Temporary Directories.
Jul 20 18:57:33 ipa1 systemd[1]: Reached target Timers.
Jul 20 18:57:33 ipa1 systemd[1]: Listening on D-Bus System Message Bus Socket.
Jul 20 18:57:33 ipa1 systemd[1]: Reached target Sockets.
Jul 20 18:57:33 ipa1 systemd-udevd[75]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jul 20 18:57:33 ipa1 systemd[1]: Starting Initial cloud-init job (pre-networking)...
Jul 20 18:57:33 ipa1 systemd[1]: Reached target Basic System.
Jul 20 18:57:33 ipa1 systemd-udevd[76]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jul 20 18:57:33 ipa1 systemd[1]: Started D-Bus System Message Bus.
Jul 20 18:57:33 ipa1 systemd[1]: Starting Turn off network device...
Jul 20 18:57:33 ipa1 systemd[1]: Starting Login Service...
Jul 20 18:57:33 ipa1 systemd[1]: Started Turn off network device.
Jul 20 18:57:33 ipa1 systemd-logind[84]: New seat seat0.
Jul 20 18:57:33 ipa1 systemd[1]: Started Login Service.
Jul 20 18:57:34 ipa1 dbus-daemon[80]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.2' (uid=0 pid=96 comm="hostnamectl set-hostname ipa1 " label="unconfined")
Jul 20 18:57:34 ipa1 systemd[1]: system.slice: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-hostnamed.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Failed to set devices.allow on /system.slice/systemd-hostnamed.service: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Failed to set devices.allow on /system.slice/systemd-hostnamed.service: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Failed to set devices.allow on /system.slice/systemd-hostnamed.service: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Failed to set devices.allow on /system.slice/systemd-hostnamed.service: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Failed to set devices.allow on /system.slice/systemd-hostnamed.service: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Failed to set devices.allow on /system.slice/systemd-hostnamed.service: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Failed to set devices.allow on /system.slice/systemd-hostnamed.service: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Failed to set devices.allow on /system.slice/systemd-hostnamed.service: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Starting Hostname Service...
Jul 20 18:57:34 ipa1 systemd[1]: user.slice: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: init.scope: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-zero.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: ldconfig.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-journald.socket: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-tty.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-mqueue.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-tmpfiles-setup-dev.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-.lxd\x2dmounts.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: proc-loadavg.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: proc-swaps.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: sys-fs-fuse-connections.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: proc-meminfo.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: network-device-down.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dbus.socket: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-journal-catalog-update.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-lxd.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: proc-sys-kernel-random-boot_id.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: sys-kernel-tracing.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-journald-dev-log.socket: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-udev-trigger.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: system-getty.slice: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-sysusers.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-coredump.socket: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-update-utmp.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: proc-sys-fs-binfmt_misc.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: -.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-hwdb-update.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-null.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dbus.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dracut-shutdown.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-journald.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: proc-stat.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-update-done.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-random.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-udevd.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: proc-diskstats.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: proc-uptime.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-sysctl.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-udevd-kernel.socket: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: sys-kernel-debug.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: selinux-autorelabel-mark.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: sys-devices-system-cpu-online.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-udevd-control.socket: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-full.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-net-tun.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: proc-cpuinfo.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-journal-flush.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-fuse.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-tmpfiles-setup.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-urandom.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: cloud-init-local.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: dev-ptmx.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-logind.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: systemd-initctl.socket: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: sys-kernel-config.mount: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 dbus-daemon[80]: [system] Successfully activated service 'org.freedesktop.hostname1'
Jul 20 18:57:34 ipa1 systemd[1]: Started Hostname Service.
Jul 20 18:57:34 ipa1 systemd-hostnamed[97]: Changed static host name to 'ipa1'
Jul 20 18:57:34 ipa1 cloud-init[87]: Cloud-init v. 18.5 running 'init-local' at Mon, 20 Jul 2020 18:57:34 +0000. Up 1.86 seconds.
Jul 20 18:57:34 ipa1 cloud-init[87]: 2020-07-20 18:57:34,462 - util.py[WARNING]: Failed to non-persistently adjust the system hostname to ipa1
Jul 20 18:57:34 ipa1 systemd[1]: Started Initial cloud-init job (pre-networking).
Jul 20 18:57:34 ipa1 systemd[1]: Reached target Network (Pre).
Jul 20 18:57:34 ipa1 systemd[1]: NetworkManager.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Starting Network Manager...
Jul 20 18:57:34 ipa1 systemd[1]: cloud-init-local.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5563] NetworkManager (version 1.22.8-4.el8) is starting... (for the first time)
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5570] Read config: /etc/NetworkManager/NetworkManager.conf (etc: 99-cloud-init.conf)
Jul 20 18:57:34 ipa1 systemd[1]: Started Network Manager.
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5616] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
Jul 20 18:57:34 ipa1 systemd[1]: Reached target Network.
Jul 20 18:57:34 ipa1 systemd[1]: NetworkManager-wait-online.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Starting Network Manager Wait Online...
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5661] manager[0x559163be0070]: monitoring kernel firmware directory '/lib/firmware'.
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5689] hostname: hostname: using hostnamed
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5689] hostname: hostname changed from (none) to "ipa1"
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5694] dns-mgr[0x559163bca250]: init: dns=none,systemd-resolved rc-manager=unmanaged
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5730] manager: rfkill: Wi-Fi enabled by radio killswitch; enabled by state file
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5731] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5732] manager: Networking is enabled by state file
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5733] dhcp-init: Using DHCP client 'internal'
Jul 20 18:57:34 ipa1 dbus-daemon[80]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.4' (uid=0 pid=100 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5748] settings: Loaded settings plugin: ifcfg-rh ("/usr/lib64/NetworkManager/1.22.8-4.el8/libnm-settings-plugin-ifcfg-rh.so")
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5752] settings: Loaded settings plugin: keyfile (internal)
Jul 20 18:57:34 ipa1 systemd[1]: NetworkManager-dispatcher.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Starting Network Manager Script Dispatcher Service...
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5812] device (lo): carrier: link connected
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5815] manager: (lo): new Generic device (/org/freedesktop/NetworkManager/Devices/1)
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5825] manager: (eth0): new Macvlan device (/org/freedesktop/NetworkManager/Devices/2)
Jul 20 18:57:34 ipa1 NetworkManager[100]: <info>  [1595271454.5872] manager: startup complete
Jul 20 18:57:34 ipa1 dbus-daemon[80]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jul 20 18:57:34 ipa1 systemd[1]: Started Network Manager Wait Online.
Jul 20 18:57:34 ipa1 systemd[1]: Started Network Manager Script Dispatcher Service.
Jul 20 18:57:34 ipa1 systemd[1]: cloud-init.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:34 ipa1 systemd[1]: Starting Initial cloud-init job (metadata service crawler)...
Jul 20 18:57:34 ipa1 systemd[1]: NetworkManager-wait-online.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:35 ipa1 cloud-init[112]: Cloud-init v. 18.5 running 'init' at Mon, 20 Jul 2020 18:57:35 +0000. Up 3.08 seconds.
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: | Device |   Up  |  Address  |    Mask   | Scope |     Hw-Address    |
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: |  eth0  | False |     .     |     .     |   .   | 00:16:3e:a7:38:bf |
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: |   lo   |  True | 127.0.0.1 | 255.0.0.0 |  host |         .         |
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: |   lo   |  True |  ::1/128  |     .     |  host |         .         |
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: +-------+-------------+---------+-----------+-------+
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: | Route | Destination | Gateway | Interface | Flags |
Jul 20 18:57:35 ipa1 cloud-init[112]: ci-info: +-------+-------------+---------+-----------+-------+
Jul 20 18:57:35 ipa1 cloud-init[112]: 2020-07-20 18:57:35,481 - util.py[WARNING]: Failed to update the hostname to ipa1 (ipa1)
Jul 20 18:57:35 ipa1 cloud-init[112]: 2020-07-20 18:57:35,483 - util.py[WARNING]: Running module update_hostname (<module 'cloudinit.config.cc_update_hostname' from '/usr/lib/python3.6/site-packages/cloudinit/config/cc_update_hostname.py'>) failed
Jul 20 18:57:35 ipa1 useradd[121]: new group: name=cloud-user, GID=1000
Jul 20 18:57:35 ipa1 useradd[121]: new user: name=cloud-user, UID=1000, GID=1000, home=/home/cloud-user, shell=/bin/bash
Jul 20 18:57:35 ipa1 useradd[121]: add 'cloud-user' to group 'adm'
Jul 20 18:57:35 ipa1 useradd[121]: add 'cloud-user' to group 'systemd-journal'
Jul 20 18:57:35 ipa1 useradd[121]: add 'cloud-user' to shadow group 'adm'
Jul 20 18:57:35 ipa1 useradd[121]: add 'cloud-user' to shadow group 'systemd-journal'
Jul 20 18:57:35 ipa1 systemd[1]: cloud-init.service: Main process exited, code=exited, status=1/FAILURE
Jul 20 18:57:35 ipa1 systemd[1]: cloud-init.service: Failed with result 'exit-code'.
Jul 20 18:57:35 ipa1 systemd[1]: Failed to start Initial cloud-init job (metadata service crawler).
Jul 20 18:57:35 ipa1 systemd[1]: systemd-user-sessions.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:35 ipa1 systemd[1]: Starting Permit User Sessions...
Jul 20 18:57:35 ipa1 systemd[1]: Reached target Network is Online.
Jul 20 18:57:35 ipa1 systemd[1]: rsyslog.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:35 ipa1 systemd[1]: Starting System Logging Service...
Jul 20 18:57:35 ipa1 systemd[1]: Reached target Cloud-config availability.
Jul 20 18:57:35 ipa1 systemd[1]: cloud-config.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:35 ipa1 systemd[1]: Starting Apply the settings specified in cloud-config...
Jul 20 18:57:35 ipa1 systemd[1]: Started Permit User Sessions.
Jul 20 18:57:35 ipa1 systemd[1]: crond.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:35 ipa1 systemd[1]: Started Command Scheduler.
Jul 20 18:57:35 ipa1 rsyslogd[130]: [origin software="rsyslogd" swVersion="8.1911.0-3.el8" x-pid="130" x-info="https://www.rsyslog.com"] start
Jul 20 18:57:35 ipa1 rsyslogd[130]: imjournal: No statefile exists, /var/lib/rsyslog/imjournal.state will be created (ignore if this is first run): No such file or directory [v8.1911.0-3.el8 try https://www.rsyslog.com/e/2040 ]
Jul 20 18:57:35 ipa1 systemd[1]: console-getty.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:35 ipa1 systemd[1]: Started Console Getty.
Jul 20 18:57:35 ipa1 systemd[1]: Reached target Login Prompts.
Jul 20 18:57:35 ipa1 systemd[1]: systemd-user-sessions.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:35 ipa1 systemd[1]: Started System Logging Service.
Jul 20 18:57:35 ipa1 systemd[1]: Reached target Multi-User System.
Jul 20 18:57:35 ipa1 systemd[1]: Reached target Graphical Interface.
Jul 20 18:57:35 ipa1 systemd[1]: systemd-update-utmp-runlevel.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:35 ipa1 crond[132]: (CRON) STARTUP (1.5.2)
Jul 20 18:57:35 ipa1 crond[132]: (CRON) INFO (Syslog will be used instead of sendmail.)
Jul 20 18:57:35 ipa1 systemd[1]: Starting Update UTMP about System Runlevel Changes...
Jul 20 18:57:35 ipa1 crond[132]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 9% if used.)
Jul 20 18:57:35 ipa1 crond[132]: (CRON) INFO (running with inotify support)
Jul 20 18:57:35 ipa1 rsyslogd[130]: imjournal: journal files changed, reloading...  [v8.1911.0-3.el8 try https://www.rsyslog.com/e/0 ]
Jul 20 18:57:35 ipa1 systemd[1]: Started Update UTMP about System Runlevel Changes.
Jul 20 18:57:36 ipa1 cloud-init[131]: Cloud-init v. 18.5 running 'modules:config' at Mon, 20 Jul 2020 18:57:36 +0000. Up 3.91 seconds.
Jul 20 18:57:36 ipa1 cloud-init[131]: 2020-07-20 18:57:36,236 - util.py[WARNING]: Running module mounts (<module 'cloudinit.config.cc_mounts' from '/usr/lib/python3.6/site-packages/cloudinit/config/cc_mounts.py'>) failed
Jul 20 18:57:36 ipa1 cloud-init[131]: 2020-07-20 18:57:36,279 - util.py[WARNING]: Running module set-passwords (<module 'cloudinit.config.cc_set_passwords' from '/usr/lib/python3.6/site-packages/cloudinit/config/cc_set_passwords.py'>) failed
Jul 20 18:57:36 ipa1 systemd[1]: cloud-config.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 20 18:57:36 ipa1 systemd[1]: cloud-config.service: Failed with result 'exit-code'.
Jul 20 18:57:36 ipa1 systemd[1]: Failed to start Apply the settings specified in cloud-config.
Jul 20 18:57:36 ipa1 systemd[1]: cloud-final.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:36 ipa1 systemd[1]: Starting Execute cloud user/final scripts...
Jul 20 18:57:36 ipa1 ec2[156]:
Jul 20 18:57:36 ipa1 ec2[156]: #############################################################
Jul 20 18:57:36 ipa1 ec2[156]: -----BEGIN SSH HOST KEY FINGERPRINTS-----
Jul 20 18:57:36 ipa1 ec2[156]: -----END SSH HOST KEY FINGERPRINTS-----
Jul 20 18:57:36 ipa1 ec2[156]: #############################################################
Jul 20 18:57:36 ipa1 cloud-init[151]: Cloud-init v. 18.5 running 'modules:final' at Mon, 20 Jul 2020 18:57:36 +0000. Up 4.59 seconds.
Jul 20 18:57:36 ipa1 cloud-init[151]: ci-info: no authorized ssh keys fingerprints found for user cloud-user.
Jul 20 18:57:36 ipa1 cloud-init[151]: Cloud-init v. 18.5 finished at Mon, 20 Jul 2020 18:57:36 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net].  Up 4.72 seconds
Jul 20 18:57:37 ipa1 echo[157]: try restart NetworkManager.service
Jul 20 18:57:37 ipa1 systemd[1]: Stopped Network Manager Wait Online.
Jul 20 18:57:37 ipa1 systemd[1]: Stopping Network Manager Wait Online...
Jul 20 18:57:37 ipa1 systemd[1]: Stopping Network Manager...
Jul 20 18:57:37 ipa1 NetworkManager[100]: <info>  [1595271457.0346] caught SIGTERM, shutting down normally.
Jul 20 18:57:37 ipa1 NetworkManager[100]: <info>  [1595271457.0380] exiting (success)
Jul 20 18:57:37 ipa1 systemd[1]: Stopped Network Manager.
Jul 20 18:57:37 ipa1 systemd[1]: NetworkManager.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:37 ipa1 systemd[1]: Starting Network Manager...
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0819] NetworkManager (version 1.22.8-4.el8) is starting... (after a restart)
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0822] Read config: /etc/NetworkManager/NetworkManager.conf (etc: 99-cloud-init.conf)
Jul 20 18:57:37 ipa1 systemd[1]: Started Network Manager.
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0848] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
Jul 20 18:57:37 ipa1 systemd[1]: Started Execute cloud user/final scripts.
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0862] manager[0x5568bf3f5070]: monitoring kernel firmware directory '/lib/firmware'.
Jul 20 18:57:37 ipa1 systemd[1]: Reached target Cloud-init target.
Jul 20 18:57:37 ipa1 systemd[1]: NetworkManager-wait-online.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:37 ipa1 systemd[1]: Starting Network Manager Wait Online...
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0882] hostname: hostname: using hostnamed
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0882] hostname: hostname changed from (none) to "ipa1"
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0885] dns-mgr[0x5568bf3e0250]: init: dns=none,systemd-resolved rc-manager=unmanaged
Jul 20 18:57:37 ipa1 systemd[1]: cloud-final.service: Failed to reset devices.list: Operation not permitted
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0902] manager: rfkill: Wi-Fi enabled by radio killswitch; enabled by state file
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0903] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0903] manager: Networking is enabled by state file
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0904] dhcp-init: Using DHCP client 'internal'
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0909] settings: Loaded settings plugin: ifcfg-rh ("/usr/lib64/NetworkManager/1.22.8-4.el8/libnm-settings-plugin-ifcfg-rh.so")
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0909] settings: Loaded settings plugin: keyfile (internal)
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0932] device (lo): carrier: link connected
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0935] manager: (lo): new Generic device (/org/freedesktop/NetworkManager/Devices/1)
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0942] manager: (eth0): new Macvlan device (/org/freedesktop/NetworkManager/Devices/2)
Jul 20 18:57:37 ipa1 NetworkManager[159]: <info>  [1595271457.0962] manager: startup complete
Jul 20 18:57:37 ipa1 systemd[1]: Started Network Manager Wait Online.
Jul 20 18:57:37 ipa1 systemd[1]: Startup finished in 4.678s.

It appears that this issue is specific to the macvlan nic type. If I go through the trouble of creating a bridge over the vlan and then use the bridged nictype it works fine.

This is basically the same issue Macvlan Not Working for LXC centos/8 Container so it’s a CentOS 8 image problem more than anything. I don’t have a lot VLANs but for folks that do not being able to use macvlan is kinda problematic.

Looks like an issue with nmcli not recognising the macvlan device as available for use.

If you run ifup eth0 it shows this error:

Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).

I’ve also tried adding the connection manually as “generic” type using;

nmcli con add type generic ifname eth0 con-name eth0 ip4 10.0.3.50/24 gw4 10.0.3.1

But it also doesn’t recognise it.

Some other folks have noticed this as well and it looks like a bug in Network Manager.

https://www.mail-archive.com/networkmanager-list@gnome.org/msg28266.html

That would explain why it works with bridged but not macvlan, looks like it doesn’t like macvlan devices.