Des de fa uns anys ja es possible instal·lar un sistema operatiu din de un contenidor (LXC) sempre que es fa servir el mateix kernel. Per a saber més: https://ca.wikipedia.org/wiki/LXC
Per a facilitat la gestió de aquests contenidors, es por fa servir el project LXD https://linuxcontainers.org/lxd/
Inslall LXD in debian buster
https://stgraber.org/2017/01/18/lxd-on-debian/
apt install snapd
snap install core
snap install lxd
Edit /root/.bashrc
and add:
PATH=$PATH:/snap/bin
Initiate LXD
lxd init
Would you like to use LXD clustering? (yes/no) [default=no]: no
Do you want to configure a new storage pool? (yes/no) [default=yes]: yes
Name of the new storage pool [default=default]:
Name of the storage backend to use (btrfs, ceph, dir, lvm) [default=btrfs]: dir
Would you like to connect to a MAAS server? (yes/no) [default=no]:
Would you like to create a new local network bridge? (yes/no) [default=yes]: yes
What should the new bridge be called? [default=lxdbr0]:
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: none
Would you like LXD to be available over the network? (yes/no) [default=no]:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:
Ara es pot llistar el contenidors fent
lxc list
Altres apunts
iptables
Pot ser que aquests passos ja no son necessaris
Snap seems to use legacy iptables and buster uses nf_tables
So you end up with two sets of rules.
So for the time being, let’s tell debian to use legacy-iptables.
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy