Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Arch LXD (host + client): container not getting ipv4 address #4071
I installed an Arch Virtualbox VM and started both an Ubuntu and an Arch container. The Ubuntu container gets an ipv4 address, the arch container doesn't. The host seems to behave well: it deals out ip's, the containers start OK, unprivileged mode works well. The arch container starts correctly, but can't seem to get the ipv4 address, only the ipv6 one. dhcpcd indicates that the interface is incorrectly installed? As far as I can see / know about the system, lxc's network system is working fine, so I'm at a loss where to look for answers. I suspect the archlinux image is not behaving correctly? To be sure: my goal is to get networking working in the arch container, getting an ipv4 address and be able to access the outside network.
Steps to reproduce
Information to attach
arch testcontainer config
lxc uses lxdbr0 and is used by the two containers (arch and ubuntu)
configuration of the arch container
Ip addr output for the arch container
Dhclient is not available on the container. Looking around for it did set me on the path to some failed services inside the containers:
Not sure if networkctl should be running by default, but here's the output of it (saw another question somewhere refer to it):
I'm reading around, normally you would edit /etc/netctl/* by adding a profile there, which you can then enable (such as a static ethernet connection on eth0). But I'm not sure whether that's the right course to take here, as eth0 is already getting an ipv6 somewhere (I'm guessing the outside LXD system).
I'm also seeing some errors in journalctl (in the container), but not sure whether they're related:
Ok, managed to dig a bit further w.r.t. the failed services. I'm still assuming the networkd service is responsible for getting the ipv4 address? I am testing an arch container on an Ubuntu laptop as well (lxd 2.20) which exhibits the same behaviour:
The same error crops up with the
And then restart your containers, that should take care of that.
The reason is that the networkd systemd unit somehow makes use of the kernel keyring, which doesn't work inside unprivileged containers right now. The line above makes that system call return not-implemented which is enough of a workaround to get things going again.