No network in chroot environment
Ralf Mardorf
silver.bullet at zoho.com
Sat Jan 25 20:43:53 UTC 2020
To workaround issues when using systemd-nspawn without the -b option my
resolv.conf files are files and not links. IIRC a link does work, when
using systemd-nspawn with the -b option. However, while a chroot allows
to do some things, that still can't be done by using
systemd-nspawn, with or without the -b flag, a chroot might suffer from
one or another pitfall (perhaps related to systemd). Perhaps resolv.conf
is such a pitfall.
There's no issue at all by using a resolv.conf file instead of a link
for my Ubuntu 16.04 and Arch Linux installs, at least not when using
systemd-nspawn.
Sometimes systemd-nspawn can't replace a chroot. However, I didn't
remember any issue by using resolv.conf files instead of links, when
using a chroot, but maybe resolv.conf wasn't needed at all, when I
needed to use a chroot instead of systemd-nspawn.
Consider to dally over with the principle of trial and error. IOW for
testing purpose replace the links by a file.
More information about the ubuntu-users
mailing list