No connection in LXC container - erronous symbolic links in rootfs?

I am using LXC containers for a long time without problems. Recently, I wanted to create a new LXC container. While the creation worked without issue, once attached to the container I had no network connectivity. Looking into it in more detailed, I got strange results when wanting to edit /etc/resolv.conf inside the container. Hence, I detached and had a look at the container’s file system from outside. ls -la /srv/lxc/[container]/rootfs/etc/ gives me multiple invalid symbolic links:

lrwxrwxrwx    1 root     root            27 Oct 26 01:53 localtime -> /usr/share/zoneinfo/Etc/UTC
lrwxrwxrwx    1 root     root            19 Oct 26 01:52 mtab -> ../proc/self/mounts
lrwxrwxrwx    1 root     root            39 Oct 26 01:53 resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
lrwxrwxrwx    1 root     root            13 May 18 22:50 rmt -> /usr/sbin/rmt
lrwxrwxrwx    1 root     root            23 Feb 24  2023 vtrgb -> /etc/alternatives/vtrgb

Could it be that there is an issue in the templates when setting up a new container?

For completeness, my /etc/lxc/default.conf: = veth = br-lan = up = eth0
# # Some workarounds
lxc.include = /usr/share/lxc/config/common.conf
lxc.hook.start-host = /usr/share/lxc/hooks/systemd-workaround
# Template to generate fixed MAC address = x2:xx:xx:xx:xx:xx

because turris is not using anymore linuxcontiners as they stopped building for armhf but bare rootfs tarballs without any init scripts ( lxc-generator/ · master · Turris / misc · GitLab (
As an alternative you can use my repo see Omnia armhf LXC (armv7 32bit) alternative repo discussion - #31 by maurer

1 Like

I was aware about the change of linuxcontainers but I did not know that it affected the container’s from the Turris repo (or rather, that they do not contain any init scripts). Thank for your comment and making a separate repo, much appreciated!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.