lima
lima copied to clipboard
Allow changing the default containerd snapshotter
Description
Currently CONTAINERD_SNAPSHOTTER is set to fuse-overlayfs and this value cannot be overriden. Neither by adding CONTAINERD_SNAPSHOTTER: stargz to the env: section in ~/.lima/default/lima.yaml nor by using a provision script. Please allow changing this value or set it to stargz whenever containerd is running in rootful mode.
I found a quick (and dirty) way to change this variable. Modify both ~/.bashrc and ~/.profile inside the Ubuntu VM:
# fuse-overlayfs is the most stable snapshotter for rootless
CONTAINERD_SNAPSHOTTER="stargz"
export PATH CONTAINERD_SNAPSHOTTER
# Lima END
Currently CONTAINERD_SNAPSHOTTER is set to fuse-overlayfs and this value cannot be overriden.
Lima v0.9 no longer sets this variable for new Ubuntu 21.10 instances.
I see. So for new instances the ~/.bashrc and ~/.profile files do not contain the export and hence it can be set in the env section in the lima config yaml. https://github.com/lima-vm/lima/blob/master/pkg/cidata/cidata.TEMPLATE.d/boot/20-rootless-base.sh
Is there a way for older VMs to automatically update the ~/.bashrc and ~/.profile files without having to delete everything and creating a new one?