Skip to content

Feature: lima

Description

Garden Linux images for Lima are published with nightly or release

How to use the pre-built image:

  1. Prerequisites

    • podman
    • access to gardenlinux-glrd.s3.eu-central-1.amazonaws.com
  2. Generate yaml file for Lima-VM

Generate yaml file required using generate-lima-yaml.py script inside bin folder

bash
# for help, use:
./bin/generate-lima-yaml.py --help

# without any argument, you will get the latest released version of Garden Linux:
./bin/generate-lima-yaml.py

# you can specify a released version:
./bin/generate-lima-yaml.py --version <version>

# for the latest nightly image, use:
./bin/generate-lima-yaml.py --version nightly

# for a particular nightly version, use:
./bin/generate-lima-yaml.py --version <version> --allow-nightly

You may also use the container image that contains the script with all its dependencies:

bash
podman run --rm ghcr.io/gardenlinux/gardenlinux/lima:latest | limactl start --name gardenlinux -
  1. Start Lima VM with GardenLinux Image
./bin/generate-lima-yaml.py --version nightly | limactl start --name gardenlinux -
  1. Open a shell inside the VM: limactl shell gardenlinux

How to build your own image:

  1. Build an image: ./build lima

  2. Create the manifest.yaml file

yaml
os: Linux
images:
  - location: /path/to/your/gardenlinux/.build/lima-[ARCH]-[VERSION]-[COMMIT_SHA].qcow2

containerd:
  system: false
  user: false
  1. Create and start the VM: cat manifest.yaml | limactl start --name=gardenlinux -

  2. Open a shell inside the VM: limactl shell gardenlinux

Sample manifests

Lima allows to configure provisioning shell scripts in manifest files.

In samples, you can find example scripts that might be useful depending on your use-case. Depending on what you're planning to do, building a custom image might be better than using provisioning shell scripts.