githubEdit

Lima

Linux virtual machines, typically on macOS, for running containerd

Introduction

Lima (Linux Machines) is an open-source tool for running Linux virtual machines on macOS (and Linux), with a focus on providing containerd as the container runtime. It serves as a lightweight alternative to Docker Desktop, automatically handling file sharing, port forwarding, and containerd/nerdctl setup. Lima uses QEMU or Apple's Virtualization.framework (vz) as the VM backend.

Key Features

  • Automatic containerd Setup: Ships with containerd and nerdctl pre-configured

  • File Sharing: Bidirectional file sharing between host and guest (reverse-sshfs, virtiofs, 9p)

  • Port Forwarding: Automatic forwarding of ports from guest to host

  • Multi-Architecture: Support for x86_64 and aarch64 VMs, including Rosetta for x86 emulation on Apple Silicon

  • Multiple VM Types: Templates for containerd, Docker, Podman, Kubernetes (k3s, k8s), and more

  • macOS Integration: Native support for Apple Virtualization.framework (vz) with better performance

Installation

# Install via Homebrew
brew install lima

# Verify installation
limactl --version

Usage

Create and Start a VM

Using nerdctl (containerd CLI)

Lima provides nerdctl as a Docker-compatible CLI for containerd:

Configuration

Lima VMs are configured via YAML files (~/.lima/<instance>/lima.yaml):

Kubernetes with Lima

Use the k3s template for a lightweight Kubernetes cluster:

Reference:

Last updated