Containers not running dhcp -4 automatically, VMs do

I’m on 1:6.6-debian12-202410041801. I’m setting up Incus for my workstation, which unfortunately only has wireless networking.

I’ve noticed that VMs get an IPv4 address, but containers don’t. I’m running a fairly vanilla configuration (here, with my wireless interface as the network device). I tried disabling IPv6 (because containers were getting IPv6 addresses), but this does not change anything.

Any suggestion?

Is this with default Incus networking or with something else like macvlan?

The default bridge.

This is weird if the VMs can get an IP address but a container cannot. Incus created a managed interface that gives out network configuration through DHCP. It’s the dhclient process on your system.
However, more often than not, other services like firewalls mess up with the Incus network interface and block any interface they find on your system. Do you run a firewall or some other network service that may interfere with Incus? Docker is another culprit.

No Docker here. I have podman, but iptables-save is empty, so I think it’s not interfering with networking- and empty iptables ~ no firewall.

Also, I didn’t mention- if I run dhclient -4 in the container, it then does get an IP.

Which images are you trying to launch?

Is this a desktop system?

I tried debian/12 and ubuntu/22.04. Yes, this is a desktop system (Debian 12). The other outstanding feature is that I’m using a wireless network.

VM getting networking but not containers usually means a firewall is having some fun on your system.

You say that iptables-save is empty, maybe look at nft list ruleset as it’s possible that you do have firewalling but done through the more modern nft.

Your Incus managed interface incusbr0 is a private bridge and should not be affected by your main network interface.

OK, I think I got it, my cluster configuration was obviously wrong. For some reason I was putting the host’s network interface in the profile network device:

I don’t know how I arrived to that configuration ¬ ¬U

Thanks!