Skip to content

Commit e1b3c84

Browse files
committed
Refactor Ubuntu images into base templates
Also adds template://default/mounts to setup the default mounts globally. Signed-off-by: Jan Dubois <[email protected]>
1 parent 56702e0 commit e1b3c84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+397
-611
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ jobs:
196196
- name: Validate jsonschema
197197
run: make schema-limayaml.json
198198
- name: Validate templates
199-
run: find -L templates -name '*.yaml' | xargs limactl validate
199+
# Can't validate base templates in `_default` because they have no images
200+
run: find -L templates -name '*.yaml' ! -path '*/_default/*' | xargs limactl validate
200201
- name: Install test dependencies
201202
# QEMU: required by Lima itself
202203
# bash: required by test-templates.sh (OS version of bash is too old)
@@ -208,7 +209,7 @@ jobs:
208209
run: echo "LIMACTL_CREATE_ARGS=${LIMACTL_CREATE_ARGS} --vm-type=qemu" >>$GITHUB_ENV
209210
- name: "Inject `no_timer_check` to kernel cmdline"
210211
# workaround to https://github.com/lima-vm/lima/issues/84
211-
run: ./hack/inject-cmdline-to-template.sh templates/default.yaml no_timer_check
212+
run: ./hack/inject-cmdline-to-template.sh templates/_images/ubuntu.yaml no_timer_check
212213
- name: Cache image used by default.yaml
213214
uses: ./.github/actions/setup_cache_for_template
214215
with:
@@ -365,7 +366,7 @@ jobs:
365366
run: echo "LIMACTL_CREATE_ARGS=${LIMACTL_CREATE_ARGS} --vm-type=qemu --network=lima:shared" >>$GITHUB_ENV
366367
- name: "Inject `no_timer_check` to kernel cmdline"
367368
# workaround to https://github.com/lima-vm/lima/issues/84
368-
run: ./hack/inject-cmdline-to-template.sh templates/default.yaml no_timer_check
369+
run: ./hack/inject-cmdline-to-template.sh templates/_images/ubuntu.yaml no_timer_check
369370
- name: Cache image used by default .yaml
370371
uses: ./.github/actions/setup_cache_for_template
371372
with:

.ls-lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ ls:
1919
docs:
2020
.md: kebab-case
2121

22+
templates:
23+
# _default and _images have leading underscores
24+
.dir: lowercase
25+
2226
website/content:
2327
.dir: lowercase
2428

cmd/limactl/start.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,10 @@ func createStartActionCommon(cmd *cobra.Command, _ []string) (exit bool, err err
374374
if templates, err := templatestore.Templates(); err == nil {
375375
w := cmd.OutOrStdout()
376376
for _, f := range templates {
377-
_, _ = fmt.Fprintln(w, f.Name)
377+
// Don't show internal base templates like `_default/*` and `_images/*`.
378+
if !strings.HasPrefix(f.Name, "_") {
379+
_, _ = fmt.Fprintln(w, f.Name)
380+
}
378381
}
379382
return true, nil
380383
}

hack/common.inc.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@ _IPERF3=iperf3
2929
# https://github.com/lima-vm/socket_vmnet/issues/85
3030
[ "$(uname -s)" = "Darwin" ] && _IPERF3="iperf3-darwin"
3131
: "${IPERF3:=$_IPERF3}"
32+
33+
# Setup LIMA_TEMPLATES_PATH because the templates are not installed, but reference base templates
34+
# via template://_images/* and template://_default/*.
35+
templates_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../templates" && pwd)"
36+
: "${LIMA_TEMPLATES_PATH:-$templates_dir}"
37+
export LIMA_TEMPLATES_PATH

hack/test-templates.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ FILE="$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
2222
NAME="$(basename -s .yaml "$FILE")"
2323
OS_HOST="$(uname -o)"
2424

25-
# On Windows $HOME of the bash runner, %USERPROFILE% of the host machine and mpunting point in the guest machine
26-
# are all different folders. This will handle path differences, when values are expilictly set.
25+
# On Windows $HOME of the bash runner, %USERPROFILE% of the host machine and mounting point in the guest machine
26+
# are all different folders. This will handle path differences, when values are explicitly set.
2727
HOME_HOST=${HOME_HOST:-$HOME}
2828
HOME_GUEST=${HOME_GUEST:-$HOME}
2929
FILE_HOST=$FILE

pkg/limayaml/limayaml_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ func TestDefaultYAML(t *testing.T) {
3737
assert.NilError(t, err)
3838
y.Images = nil // remove default images
3939
y.Mounts = nil // remove default mounts
40+
y.Base = nil // remove default base templates
41+
y.MinimumLimaVersion = nil // remove minimum Lima version
4042
y.MountTypesUnsupported = nil // remove default workaround for kernel 6.9-6.11
4143
t.Log(dumpJSON(t, y))
4244
b, err := Marshal(&y, false)

pkg/limayaml/validate_test.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
package limayaml
55

66
import (
7-
"os"
8-
"runtime"
97
"testing"
108

119
"gotest.tools/v3/assert"
@@ -18,22 +16,6 @@ func TestValidateEmpty(t *testing.T) {
1816
assert.Error(t, err, "field `images` must be set")
1917
}
2018

21-
// Note: can't embed symbolic links, use "os"
22-
23-
func TestValidateDefault(t *testing.T) {
24-
if runtime.GOOS == "windows" {
25-
// FIXME: `assertion failed: error is not nil: field `mounts[1].location` must be an absolute path, got "/tmp/lima"`
26-
t.Skip("Skipping on windows")
27-
}
28-
29-
bytes, err := os.ReadFile("default.yaml")
30-
assert.NilError(t, err)
31-
y, err := Load(bytes, "default.yaml")
32-
assert.NilError(t, err)
33-
err = Validate(y, true)
34-
assert.NilError(t, err)
35-
}
36-
3719
func TestValidateProbes(t *testing.T) {
3820
images := `images: [{"location": "/"}]`
3921
validProbe := `probes: [{"script": "#!foo"}]`

pkg/templatestore/templatestore.go

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
package templatestore
55

66
import (
7+
"errors"
8+
"fmt"
79
"io/fs"
810
"os"
911
"path/filepath"
@@ -20,21 +22,32 @@ type Template struct {
2022
}
2123

2224
func Read(name string) ([]byte, error) {
23-
dir, err := usrlocalsharelima.Dir()
24-
if err != nil {
25-
return nil, err
25+
var pathList []string
26+
if tmplPath := os.Getenv("LIMA_TEMPLATES_PATH"); tmplPath != "" {
27+
pathList = strings.Split(tmplPath, string(filepath.ListSeparator))
28+
} else {
29+
dir, err := usrlocalsharelima.Dir()
30+
if err != nil {
31+
return nil, err
32+
}
33+
pathList = []string{filepath.Join(dir, "templates"), name}
2634
}
2735
ext := filepath.Ext(name)
2836
// Append .yaml extension if name doesn't have an extension, or if it starts with a digit.
2937
// So "docker.sh" would remain unchanged but "ubuntu-24.04" becomes "ubuntu-24.04.yaml".
3038
if len(ext) < 2 || unicode.IsDigit(rune(ext[1])) {
3139
name += ".yaml"
3240
}
33-
filePath, err := securejoin.SecureJoin(filepath.Join(dir, "templates"), name)
34-
if err != nil {
35-
return nil, err
41+
for _, path := range pathList {
42+
filePath, err := securejoin.SecureJoin(path, name)
43+
if err != nil {
44+
return nil, err
45+
}
46+
if b, err := os.ReadFile(filePath); !errors.Is(err, os.ErrNotExist) {
47+
return b, err
48+
}
3649
}
37-
return os.ReadFile(filePath)
50+
return nil, fmt.Errorf("template %q not found", name)
3851
}
3952

4053
const Default = "default"

templates/_default/mounts.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mounts:
2+
- location: "~"
3+
- location: "/tmp/lima"
4+
writable: true

templates/_images/fedora-41.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
images:
2+
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2"
3+
arch: "x86_64"
4+
digest: "sha256:6205ae0c524b4d1816dbd3573ce29b5c44ed26c9fbc874fbe48c41c89dd0bac2"
5+
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/aarch64/images/Fedora-Cloud-Base-Generic-41-1.4.aarch64.qcow2"
6+
arch: "aarch64"
7+
digest: "sha256:085883b42c7e3b980e366a1fe006cd0ff15877f7e6e984426f3c6c67c7cc2faa"

templates/_images/fedora-42.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
images:
2+
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2"
3+
arch: "x86_64"
4+
digest: "sha256:e401a4db2e5e04d1967b6729774faa96da629bcf3ba90b67d8d9cce9906bec0f"
5+
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/aarch64/images/Fedora-Cloud-Base-Generic-42-1.1.aarch64.qcow2"
6+
arch: "aarch64"
7+
digest: "sha256:e10658419a8d50231037dc781c3155aa94180a8c7a74e5cac2a6b09eaa9342b7"

templates/_images/fedora.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fedora-41.yaml

templates/_images/ubuntu-20.04.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
images:
2+
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
3+
- location: "https://cloud-images.ubuntu.com/releases/focal/release-20250303/ubuntu-20.04-server-cloudimg-amd64.img"
4+
arch: "x86_64"
5+
digest: "sha256:77a68bd67a78754bafb4a709d1af27e9a6ccf5dc9753302c6e6407c27d4f7fa0"
6+
- location: "https://cloud-images.ubuntu.com/releases/focal/release-20250303/ubuntu-20.04-server-cloudimg-arm64.img"
7+
arch: "aarch64"
8+
digest: "sha256:7ca528c6d6a28fb631760a06e5b2462f5d2a64fdf136c810d6083bf0b0bf4a1f"
9+
- location: "https://cloud-images.ubuntu.com/releases/focal/release-20250303/ubuntu-20.04-server-cloudimg-armhf.img"
10+
arch: "armv7l"
11+
digest: "sha256:b3eea15775504e94d145ba31a9171dae213c8b253cc5e99d8d4a9994d9902a24"
12+
- location: "https://cloud-images.ubuntu.com/releases/focal/release-20250303/ubuntu-20.04-server-cloudimg-s390x.img"
13+
arch: "s390x"
14+
digest: "sha256:de1c7370d59563caf29d0b6a9af43d5ab44e57e23fbda54d4b12b26bcbf6c7cf"
15+
# Fallback to the latest release image.
16+
# Hint: run `limactl prune` to invalidate the cache
17+
- location: "https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img"
18+
arch: "x86_64"
19+
- location: "https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-arm64.img"
20+
arch: "aarch64"
21+
- location: "https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-armhf.img"
22+
arch: "armv7l"
23+
- location: "https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-s390x.img"
24+
arch: "s390x"

templates/_images/ubuntu-22.04.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
minimumLimaVersion: "1.0.0"
2+
images:
3+
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
4+
- location: "https://cloud-images.ubuntu.com/releases/jammy/release-20250305/ubuntu-22.04-server-cloudimg-amd64.img"
5+
arch: "x86_64"
6+
digest: "sha256:eb4707ac0dec191347bb5123ad2fd2b372077a66e5300ddb4c0d16444f619fa6"
7+
- location: "https://cloud-images.ubuntu.com/releases/jammy/release-20250305/ubuntu-22.04-server-cloudimg-arm64.img"
8+
arch: "aarch64"
9+
digest: "sha256:46113bedf45e3429bc7e0a74e9bca0a75768c595f61ee45d9cd0141838bda2ca"
10+
- location: "https://cloud-images.ubuntu.com/releases/jammy/release-20250305/ubuntu-22.04-server-cloudimg-riscv64.img"
11+
arch: "riscv64"
12+
digest: "sha256:0cede637b61ff3575a7648414573d1ee31e36b0d014d3755fb84c7a32bff0bf1"
13+
- location: "https://cloud-images.ubuntu.com/releases/jammy/release-20250305/ubuntu-22.04-server-cloudimg-armhf.img"
14+
arch: "armv7l"
15+
digest: "sha256:852da1f71a43c7e4a782fb2ae93379eb5810cdd445570f807ede118926a11d06"
16+
- location: "https://cloud-images.ubuntu.com/releases/jammy/release-20250305/ubuntu-22.04-server-cloudimg-s390x.img"
17+
arch: "s390x"
18+
digest: "sha256:5caf61c680e6aa0b82265d93e953a6b49a5f7961ee2f5cedf8070b6efc9a2339"
19+
# Fallback to the latest release image.
20+
# Hint: run `limactl prune` to invalidate the cache
21+
- location: "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-amd64.img"
22+
arch: "x86_64"
23+
- location: "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-arm64.img"
24+
arch: "aarch64"
25+
- location: "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-riscv64.img"
26+
arch: "riscv64"
27+
- location: "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-armhf.img"
28+
arch: "armv7l"
29+
- location: "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-s390x.img"
30+
arch: "s390x"

templates/_images/ubuntu-24.04.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
minimumLimaVersion: "1.0.0"
2+
images:
3+
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
4+
- location: "https://cloud-images.ubuntu.com/releases/noble/release-20250313/ubuntu-24.04-server-cloudimg-amd64.img"
5+
arch: "x86_64"
6+
digest: "sha256:eacac65efe9e9bae0cbcb3f9d5c2b5e8c5313fa78a3bc401c3fb28b2d48cefc0"
7+
- location: "https://cloud-images.ubuntu.com/releases/noble/release-20250313/ubuntu-24.04-server-cloudimg-arm64.img"
8+
arch: "aarch64"
9+
digest: "sha256:103f31c5a5b7f031a60ce3555c8fbd56317fd8ffbaaa7e17002879e6157d546d"
10+
- location: "https://cloud-images.ubuntu.com/releases/noble/release-20250313/ubuntu-24.04-server-cloudimg-riscv64.img"
11+
arch: "riscv64"
12+
digest: "sha256:bfd6a91a7ee84e26f33ce6b2df2e415b038214db67f009206b40cf2e9158fc3f"
13+
- location: "https://cloud-images.ubuntu.com/releases/noble/release-20250313/ubuntu-24.04-server-cloudimg-armhf.img"
14+
arch: "armv7l"
15+
digest: "sha256:0b862b6a4811f23c76e292ffe5a7cd90a4f03db9f48f664a2a943b02f83621c3"
16+
- location: "https://cloud-images.ubuntu.com/releases/noble/release-20250313/ubuntu-24.04-server-cloudimg-s390x.img"
17+
arch: "s390x"
18+
digest: "sha256:7e7080ed67f148373ac9645f48fc3f4206fc1e8b517c316f3fc03fca9c04713c"
19+
# Fallback to the latest release image.
20+
# Hint: run `limactl prune` to invalidate the cache
21+
- location: "https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img"
22+
arch: "x86_64"
23+
- location: "https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-arm64.img"
24+
arch: "aarch64"
25+
- location: "https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-riscv64.img"
26+
arch: "riscv64"
27+
- location: "https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-armhf.img"
28+
arch: "armv7l"
29+
- location: "https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-s390x.img"
30+
arch: "s390x"

templates/_images/ubuntu-24.10.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
minimumLimaVersion: "1.0.0"
2+
images:
3+
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
4+
- location: "https://cloud-images.ubuntu.com/releases/oracular/release-20250305/ubuntu-24.10-server-cloudimg-amd64.img"
5+
arch: "x86_64"
6+
digest: "sha256:c2c3ed89097c5f5c90ebbe45216d1569e3ea2d3c8d0993eeae74f859f6467cdb"
7+
- location: "https://cloud-images.ubuntu.com/releases/oracular/release-20250305/ubuntu-24.10-server-cloudimg-arm64.img"
8+
arch: "aarch64"
9+
digest: "sha256:9d8e0c98858d53866117d5c701a554a9d2434bedffec1c0ab7253691bfd2c70e"
10+
- location: "https://cloud-images.ubuntu.com/releases/oracular/release-20250305/ubuntu-24.10-server-cloudimg-riscv64.img"
11+
arch: "riscv64"
12+
digest: "sha256:be6109cfed964a2b745330681f7ec5b9ddc45bb180f41837b6e3969b4be9e8b5"
13+
- location: "https://cloud-images.ubuntu.com/releases/oracular/release-20250305/ubuntu-24.10-server-cloudimg-armhf.img"
14+
arch: "armv7l"
15+
digest: "sha256:8f3a22d7392512b56ffbcbf30d4f5df0805b7d515f08fb86c5a8f87405ca7f02"
16+
- location: "https://cloud-images.ubuntu.com/releases/oracular/release-20250305/ubuntu-24.10-server-cloudimg-s390x.img"
17+
arch: "s390x"
18+
digest: "sha256:98b19fee0742b4cfccbfcc72fa82f274355f01dd0e5216263a9988e79e6d03ab"
19+
# Fallback to the latest release image.
20+
# Hint: run `limactl prune` to invalidate the cache
21+
- location: "https://cloud-images.ubuntu.com/releases/oracular/release/ubuntu-24.10-server-cloudimg-amd64.img"
22+
arch: "x86_64"
23+
- location: "https://cloud-images.ubuntu.com/releases/oracular/release/ubuntu-24.10-server-cloudimg-arm64.img"
24+
arch: "aarch64"
25+
- location: "https://cloud-images.ubuntu.com/releases/oracular/release/ubuntu-24.10-server-cloudimg-riscv64.img"
26+
arch: "riscv64"
27+
- location: "https://cloud-images.ubuntu.com/releases/oracular/release/ubuntu-24.10-server-cloudimg-armhf.img"
28+
arch: "armv7l"
29+
- location: "https://cloud-images.ubuntu.com/releases/oracular/release/ubuntu-24.10-server-cloudimg-s390x.img"
30+
arch: "s390x"
31+
32+
# 9p is broken in Linux v6.9, v6.10, and v6.11 (used by Ubuntu 24.10).
33+
# The issue was fixed in Linux v6.12-rc5 (https://github.com/torvalds/linux/commit/be2ca38).
34+
mountTypesUnsupported: ["9p"]

templates/_images/ubuntu-25.04.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
images:
2+
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
3+
- location: "https://cloud-images.ubuntu.com/releases/plucky/release-20250415/ubuntu-25.04-server-cloudimg-amd64.img"
4+
arch: "x86_64"
5+
digest: "sha256:6fb0299c53b8872c51b96c54947ee25383378ed5045f2ef18c751be0cab42ecd"
6+
- location: "https://cloud-images.ubuntu.com/releases/plucky/release-20250415/ubuntu-25.04-server-cloudimg-arm64.img"
7+
arch: "aarch64"
8+
digest: "sha256:d599b0769b6df1a2c9c6a04108beaa265a354f93db15f219c820567a42231486"
9+
- location: "https://cloud-images.ubuntu.com/releases/plucky/release-20250415/ubuntu-25.04-server-cloudimg-riscv64.img"
10+
arch: "riscv64"
11+
digest: "sha256:accc86a8fea04dff4599fe776fddcaa5ae7d498cbac69a0c25d4dd0292b79b38"
12+
- location: "https://cloud-images.ubuntu.com/releases/plucky/release-20250415/ubuntu-25.04-server-cloudimg-armhf.img"
13+
arch: "armv7l"
14+
digest: "sha256:28f9959f528f3c7e172b367fdae4032a09e75b4a8499283c6c4c611d91bf9699"
15+
- location: "https://cloud-images.ubuntu.com/releases/plucky/release-20250415/ubuntu-25.04-server-cloudimg-s390x.img"
16+
arch: "s390x"
17+
digest: "sha256:0ea6c52f2bbf3d35a767f92afe8adc4a648ebf0d31a325dfb97e21be6ef20c70"
18+
# Fallback to the latest release image.
19+
# Hint: run `limactl prune` to invalidate the cache
20+
- location: "https://cloud-images.ubuntu.com/releases/plucky/release/ubuntu-25.04-server-cloudimg-amd64.img"
21+
arch: "x86_64"
22+
- location: "https://cloud-images.ubuntu.com/releases/plucky/release/ubuntu-25.04-server-cloudimg-arm64.img"
23+
arch: "aarch64"
24+
- location: "https://cloud-images.ubuntu.com/releases/plucky/release/ubuntu-25.04-server-cloudimg-riscv64.img"
25+
arch: "riscv64"
26+
- location: "https://cloud-images.ubuntu.com/releases/plucky/release/ubuntu-25.04-server-cloudimg-armhf.img"
27+
arch: "armv7l"
28+
- location: "https://cloud-images.ubuntu.com/releases/plucky/release/ubuntu-25.04-server-cloudimg-s390x.img"
29+
arch: "s390x"
30+
31+
# # NOTE: Intel Mac requires setting vmType to qemu
32+
# # https://github.com/lima-vm/lima/issues/3334
33+
# vmType: qemu

templates/_images/ubuntu-lts.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ubuntu-24.04.yaml

templates/_images/ubuntu.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ubuntu-24.10.yaml

templates/almalinux-8.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This template requires Lima v0.8.3 or later.
1+
minimumLimaVersion: "1.1.0"
22

33
# NOTE: EL8-based distros are known not to work on M1 chips: https://github.com/lima-vm/lima/issues/841
44
# EL9-based distros are known to work.
@@ -21,11 +21,9 @@ images:
2121
arch: "aarch64"
2222
- location: "https://repo.almalinux.org/almalinux/8/cloud/s390x/images/AlmaLinux-8-GenericCloud-latest.s390x.qcow2"
2323
arch: "s390x"
24+
2425
mountTypesUnsupported: ["9p"]
25-
mounts:
26-
- location: "~"
27-
- location: "/tmp/lima"
28-
writable: true
26+
base: template://_default/mounts
2927
cpuType:
3028
# Workaround for "vmx_write_mem: mmu_gva_to_gpa XXXXXXXXXXXXXXXX failed" on Intel Mac
3129
# https://bugs.launchpad.net/qemu/+bug/1838390

templates/almalinux-9.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This template requires Lima v0.11.1 or later.
1+
minimumLimaVersion: "1.1.0"
22

33
images:
44
- location: "https://repo.almalinux.org/almalinux/9.5/cloud/x86_64/images/AlmaLinux-9-GenericCloud-9.5-20241120.x86_64.qcow2"
@@ -18,8 +18,6 @@ images:
1818
arch: "aarch64"
1919
- location: "https://repo.almalinux.org/almalinux/9/cloud/s390x/images/AlmaLinux-9-GenericCloud-latest.s390x.qcow2"
2020
arch: "s390x"
21+
2122
mountTypesUnsupported: ["9p"]
22-
mounts:
23-
- location: "~"
24-
- location: "/tmp/lima"
25-
writable: true
23+
base: template://_default/mounts

0 commit comments

Comments
 (0)