Run a lean VM without containerd/nerdctl #631
-
DescriptionI am trying to run a lightweight VM on hardware-constrained laptops, and want to minimize the VM's unnecessary CPU/Memory footprint. In my use case, I run single pre-built Linux binaries in the VM, and do not need containerd/nerdctl. However, a bare-bone default VM with nothing running costs 5-10% CPU and close to 1GB host memory (~300MB resident as seen inside the VM), mostly due to many containerd-related processes. Since I don't run containers I want to remove these background processes in the VM. However, seems like there is no option to avoid adding containerd-related stuff when launching the VM. The launch script always attempt to download and install nerdctl -- it appears that even if I delete everything, it gets installed again in the next reboot. (I believe the "sticky" logic is here: )I can open a pull-request myself if the authors can advise on where to change the logic. Is start.go the best place to change? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You can disable installation of nerdctl and containerd by editing your lima/pkg/limayaml/default.yaml Lines 90 to 92 in f24302b The default for containerd:
system: false
user: false This is done in the Alpine example, which is also generally the smallest instance you can use. |
Beta Was this translation helpful? Give feedback.
You can disable installation of nerdctl and containerd by editing your
lima.yaml
file:lima/pkg/limayaml/default.yaml
Lines 90 to 92 in f24302b
The default for
containerd.user
istrue
, so set it tofalse
to disable:This is done in the Alpine example, which is also generally the smallest instance you can use.