Previous Post | Top | Next Post |
TOC
Host preparation for systemd-nspawn
Get required packages:
$ sudo apt install systemd-container debootstrap
Configuring systemd-sysctl.service
to enable unprivileged user namespaces required for -U
option:
$ echo 'kernel.unprivileged_userns_clone=1' | sudo tee /etc/sysctl.d/nspawn.conf
$ systemctl restart systemd-sysctl.service
Creating a bookworm
based a01
system at /srv/chroot/a01/
:
$ sudo mkdir -p /srv/chroot/a01
$ sudo debootstrap bookworm /srv/chroot/a01 http://deb.debian.org/debian/
$ sudo systemd-nspawn -D /srv/chroot/a01 -U --machine a01
Previous Post | Top | Next Post |