Skip to content

Run a lean VM without containerd/nerdctl #629

@chenxiaoqino

Description

@chenxiaoqino

Description

I 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:

if [ ! -x /usr/local/bin/nerdctl ]; then
)

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions