LXC 4.0.6 on Debian stable/Bullseye: unprivileged network options


What networking options are available for UNPRIVILEGED lxc (not lxd) containers on Debian stable/Bullseye?

I got the default standard bridge working fine, but I can’t get any of the other networking options to work, like routing, ipvlan or p2p. Those work fine on privileged containers okay, just not on unprivileged.

I always get the same basic error message:

lxc-start test001 20220623033633.744 WARN start - start.c:lxc_spawn:1778 - Operation not permitted - Failed to allocate new network namespace id
lxc-start test001 20220623033633.744 INFO network - network.c:lxc_create_network_unpriv_exec:2600 - Execing lxc-user-nic create /home/lxc/.local/share/lxc test001 2558 veth lxc0 eth0
lxc-start test001 20220623033633.817 ERROR network - network.c:lxc_create_network_unpriv_exec:2629 - lxc-user-nic failed to configure requested network: cmd/lxc_user_nic.c: 551: create_nic: Error attaching veth5555_aUGC to lxc0

So, is the lxc-net bridge (USE_LXC_BRIDGE=“true”) and (*.type=veth) the only working network option for UNPRIVILEGED containers?


Are you trying to spawn the container as an unprivileged user?