Edit: I just found out the issue is to do with the archlinux image because I just installed centos 7 as an unprivileged user and networking was working out of the gate.
Here are the journalctl errors in the archlinux container
systemd-networkd.service: Failed to change ownership of session keyring: Permission denied
systemd-networkd.service: Failed to set up kernel keyring: Permission denied
systemd-networkd.service: Failed at step KEYRING spawning /usr/lib/systemd/systemd-networkd: Permission denied
I still want arch in the container though since it is the distro I am most used to.
I was able to set it up fine on privileged containers but now moving to unprivileged ones I can’t get network going as yet. I followed the wiki and used the same details which worked for privileged ones, changing the respective paths to reflect their unprivileged equivalents. Below is the container’s config file.
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# Template script checksum (SHA-1): b7de1d7259bdd66f5b8f0347f74b18c19729883a
# For additional config options, please look at lxc.container.conf(5)
# Uncomment the following line to support nesting containers: #lxc.include = /usr/share/lxc/config/nesting.conf # (Be aware this has security implications) # Distribution configuration lxc.include = /usr/share/lxc/config/archlinux.common.conf lxc.include = /usr/share/lxc/config/archlinux.userns.conf lxc.arch = x86_64 # Container specific configuration lxc.idmap = u 0 100000 65536 lxc.idmap = g 0 100000 65536 lxc.rootfs.path = dir:/home/user1/.local/share/lxc/base-arch/rootfs lxc.uts.name = base-arch ## network lxc.net.0.type = veth lxc.net.0.link = lxcbr0 lxc.net.0.flags = up lxc.net.0.name = eth0 lxc.net.0.hwaddr = ee:ec:fa:e9:56:7d[/code]
When I try and ping
network in unreachable.
lxc-net bridge is running.