Rocky Linux 10 container not getting DHCP IP address on macvlan interface

Hopefully I’m not providing unnecessary information here.

I have a profile with a networking device

# incus profile show lxd_containers
config: {}
description: “”
devices:
eth0:
nictype: macvlan
parent: eno1
type: nic
root:
path: /
pool: my_storage
type: disk
name: lxd_containers
used_by:
project: default

When I create a rocky linux 9 container - that container gets an IP address by DHCP

# incus launch images:rockylinux/9 rockylinux9-test  -p lxd_containers
# lxc info rockylinux9-test --show-log
Name: rockylinux9-test
Status: RUNNING
Type: container
Architecture: x86_64
PID: 424924
Created: 2025/08/29 10:44 UTC
Last Used: 2025/08/29 10:44 UTC
Started: 2025/08/29 10:44 UTC

Resources:
  Processes: 16
  Disk usage:
    root: 5.10MiB
  CPU usage:
    CPU usage (in seconds): 2
  Memory usage:
    Memory (current): 51.77MiB
    Memory (peak): 72.18MiB
  Network usage:
    eth0:
      Type: broadcast
      State: UP
      Host interface: eno1
      MAC address: 00:16:3e:21:16:19
      MTU: 1500
      Bytes received: 146.65kB
      Bytes sent: 2.15kB
      Packets received: 1749
      Packets sent: 21
      IP addresses:
        inet:  192.168.8.176/20 (global)
        inet6: fe80::216:3eff:fe21:1619/64 (link)
    lo:
      Type: loopback
      State: UP
      MTU: 65536
      Bytes received: 0B
      Bytes sent: 0B
      Packets received: 0
      Packets sent: 0
      IP addresses:
        inet:  127.0.0.1/8 (local)
        inet6: ::1/128 (local)

Inside the container - it has an IP address

# 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
2625: eth0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:16:3e:21:16:19 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.8.176/24 brd 192.168.255.255 scope global dynamic eth0
       valid_lft 7174sec preferred_lft 7174sec
    inet6 fe80::216:3eff:fe21:1619/64 scope link 
       valid_lft forever preferred_lft forever

When I create a Rocky Linux 10 container, the container is not getting an IP address

# lxc launch images:rockylinux/10 rockylinux10-test  -p lxd_containers
# lxc info rockylinux10-test --show-log
Name: rockylinux10-test
Status: RUNNING
Type: container
Architecture: x86_64
PID: 2041193
Created: 2025/08/29 10:53 UTC
Last Used: 2025/08/29 10:53 UTC
Started: 2025/08/29 10:54 UTC

Resources:
  Processes: 20
  Disk usage:
    root: 5.05MiB
  CPU usage:
    CPU usage (in seconds): 2
  Memory usage:
    Memory (current): 55.57MiB
    Memory (peak): 75.25MiB
  Network usage:
    eth0:
      Type: broadcast
      State: DOWN
      Host interface: eno1
      MAC address: 00:16:3e:ef:06:ca
      MTU: 1500
      Bytes received: 832B
      Bytes sent: 426B
      Packets received: 10
      Packets sent: 5
      IP addresses:
    lo:
      Type: loopback
      State: UP
      MTU: 65536
      Bytes received: 0B
      Bytes sent: 0B
      Packets received: 0
      Packets sent: 0
      IP addresses:
        inet:  127.0.0.1/8 (local)
        inet6: ::1/128 (local)

inside the container

# 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
2628: eth0@if2: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 00:16:3e:ef:06:ca brd ff:ff:ff:ff:ff:ff link-netnsid 0

How do I investigate this further?

If I grep /var/log/messages for NetworkManager - there is no mention of eth0

Inside the rocky linux 10 container

# nmcli con show
NAME  UUID                                  TYPE      DEVICE 
lo    9b72c758-6d85-48d5-a253-2987a441b6dd  loopback  lo     
# nmcli dev show
GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          100 (connected (externally))
GENERAL.CONNECTION:                     lo
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/1
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            --
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:                            --

GENERAL.DEVICE:                         eth0
GENERAL.TYPE:                           macvlan
GENERAL.HWADDR:                         00:16:3E:EF:06:CA
GENERAL.MTU:                            1500
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.GATEWAY:                            --
IP6.GATEWAY:                            --

The NetworkManager that comes with RHEL 10 has an integrated dhcp client, so running dhclient on it’s own is not an option.

Your Rocky Linux 10 container’s eth0 is down, it will not connect to any network. You can try to start eth0: ip link set eth0 up

But it downs for a reason, you need to find it.

Yea, bringing up the interface with ip link set eth0 up results in the interface showing as up

# lxc info rockylinux10-test --show-log
Name: rockylinux10-test
Status: RUNNING
Type: container
Architecture: x86_64
PID: 276229
Created: 2025/08/29 15:06 UTC
Last Used: 2025/08/29 15:07 UTC
Started: 2025/08/29 15:07 UTC

Resources:
  Processes: 19
  Disk usage:
    root: 5.05MiB
  CPU usage:
    CPU usage (in seconds): 3
  Memory usage:
    Memory (current): 57.90MiB
    Memory (peak): 74.67MiB
  Network usage:
    eth0:
      Type: broadcast
      State: UP
      Host interface: eno1
      MAC address: 00:16:3e:98:af:74
      MTU: 1500
      Bytes received: 734.27kB
      Bytes sent: 1.59kB
      Packets received: 8972
      Packets sent: 20
      IP addresses:
        inet6: fe80::216:3eff:fe98:af74/64 (link)
    lo:
      Type: loopback
      State: UP
      MTU: 65536
      Bytes received: 0B
      Bytes sent: 0B
      Packets received: 0
      Packets sent: 0
      IP addresses:
        inet:  127.0.0.1/8 (local)
        inet6: ::1/128 (local)

However, it still isn’t getting an IP address.

I can’t work out if the issue is something with the way that incus interacts with the container’s networking.

Can you try to manually config container to use DHCP or assign static ip?

Implementing the Network - Documentation

I’m working on trying to understand the networking changes between RHEL 9 and 10.

As far as I am aware that documentation that you linked is not applicable, as RHEL 10 doesn’t use ifcfg files.

As far as I can only nmcli should used.

I’m not clear whether the change in networking in RHEL 10 are causing the issues that I am having.

well, I don’t know how RHEL 10 or Rocky Linux 10 control network, I just googled Rocky Linux network and gave the link. Anyway, you are using it, you know where the document is.

Your NIC is up, all you need to do is config it to connect to network.