Skip to content

Commit dd04a85

Browse files
committed
templates: merge experimental/{riscv64,armv7l} into default
These archs still remain experimental but can be merged into the `default` template. `.containerd.user` now defaults to `false` for these archs, as `nerdctl-full` archive is still missing for them. Signed-off-by: Akihiro Suda <[email protected]>
1 parent 9705b66 commit dd04a85

File tree

7 files changed

+35
-53
lines changed

7 files changed

+35
-53
lines changed

cmd/limactl/start.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ func loadOrCreateInstance(cmd *cobra.Command, args []string, createOnly bool) (*
131131
// No need to use SecureJoin here. https://github.com/lima-vm/lima/pull/805#discussion_r853411702
132132
templateName := filepath.Join(templateURL.Host, templateURL.Path)
133133
logrus.Debugf("interpreting argument %q as a template name %q", arg, templateName)
134+
switch templateName {
135+
case "experimental/riscv64":
136+
logrus.Warn("template://experimental/riscv64 was merged into the default template in Lima v1.0. Use `limactl create --arch=riscv64 template://default` instead.")
137+
case "experimental/armv7l":
138+
logrus.Warn("template://experimental/armv7l was merged into the default template in Lima v1.0. Use `limactl create --arch=armv7l template://default` instead.")
139+
}
134140
if st.instName == "" {
135141
// e.g., templateName = "deprecated/centos-7" , st.instName = "centos-7"
136142
st.instName = filepath.Base(templateName)

examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ Optional feature enablers:
5252
- [`vmnet`](./vmnet.yaml): ⭐enable [`vmnet.framework`](../docs/network.md)
5353
- [`experimental/9p`](./experimental/9p.yaml): [experimental] use 9p mount type
5454
- [`experimental/virtiofs-linux`](./experimental/9p.yaml): [experimental] use virtiofs mount type for Linux
55-
- [`experimental/armv7l`](./experimental/armv7l.yaml): [experimental] ARMv7
56-
- [`experimental/riscv64`](./experimental/riscv64.yaml): [experimental] RISC-V
5755
- [`experimental/net-user-v2`](./experimental/net-user-v2.yaml): [experimental] user-v2 network
5856
to enable VM-to-VM communication without root privilege
5957
- [`experimental/vnc`](./experimental/vnc.yaml): [experimental] use vnc display and xorg server
@@ -70,6 +68,8 @@ Lost+found:
7068
- ~`nomad`~: Removed in Lima v0.17.1, as Nomad is [no longer free software](https://github.com/hashicorp/nomad/commit/b3e30b1dfa185d9437a25830522da47b91f78816)
7169
- ~`centos-stream-8`~: Remove in Lima v0.23.0, as CentOS Stream 8 reached [EOL](https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/).
7270
- ~`deprecated/centos-7`~: Remove in Lima v0.23.0, as CentOS 7 reached [EOL](https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/).
71+
- ~`experimental/armv7l`~: Merged into the `default` template in Lima v1.0. Use `limactl create --arch=armv7l template://default`.
72+
- ~`experimental/riscv64`~: Merged into the `default` template in Lima v1.0. Use `limactl create --arch=riscv64 template://default`.
7373

7474
## Tier
7575

examples/default.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,22 @@ images:
4242
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-arm64.img"
4343
arch: "aarch64"
4444
digest: "sha256:5ecac6447be66a164626744a87a27fd4e6c6606dc683e0a233870af63df4276a"
45+
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-riscv64.img"
46+
arch: "riscv64"
47+
digest: "sha256:f5886ad4e405e689585dfef0e96c31b06478e0cb12bc7f3fae965759a32d729e"
48+
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-armhf.img"
49+
arch: "armv7l"
50+
digest: "sha256:8d5756a9424a5a75f8640539f3119b3cfeb31341bbb01f4968f13df4427ce489"
4551
# Fallback to the latest release image.
4652
# Hint: run `limactl prune` to invalidate the cache
4753
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img"
4854
arch: "x86_64"
4955
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img"
5056
arch: "aarch64"
57+
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-riscv64.img"
58+
arch: "riscv64"
59+
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-armhf.img"
60+
arch: "armv7l"
5161

5262
# CPUs
5363
# 🟢 Builtin default: min(4, host CPU cores)
@@ -200,7 +210,7 @@ containerd:
200210
# 🟢 Builtin default: false
201211
system: null
202212
# Enable user-scoped (aka rootless) containerd and its dependencies
203-
# 🟢 Builtin default: true
213+
# 🟢 Builtin default: true (for x86_64 and aarch64)
204214
user: null
205215
# # Override containerd archive
206216
# # 🟢 Builtin default: hard-coded URL with hard-coded digest (see the output of `limactl info | jq .defaultTemplate.containerd.archives`)

examples/experimental/armv7l.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/experimental/riscv64.yaml

Lines changed: 0 additions & 26 deletions
This file was deleted.

examples/ubuntu.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,22 @@ images:
77
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-arm64.img"
88
arch: "aarch64"
99
digest: "sha256:5ecac6447be66a164626744a87a27fd4e6c6606dc683e0a233870af63df4276a"
10+
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-riscv64.img"
11+
arch: "riscv64"
12+
digest: "sha256:f5886ad4e405e689585dfef0e96c31b06478e0cb12bc7f3fae965759a32d729e"
13+
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-armhf.img"
14+
arch: "armv7l"
15+
digest: "sha256:8d5756a9424a5a75f8640539f3119b3cfeb31341bbb01f4968f13df4427ce489"
1016
# Fallback to the latest release image.
1117
# Hint: run `limactl prune` to invalidate the cache
1218
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img"
1319
arch: "x86_64"
1420
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img"
1521
arch: "aarch64"
22+
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-riscv64.img"
23+
arch: "riscv64"
24+
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-armhf.img"
25+
arch: "armv7l"
1626

1727
mounts:
1828
- location: "~"

pkg/limayaml/defaults.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,12 @@ func FillDefault(y, d, o *LimaYAML, filePath string) {
448448
y.Containerd.User = o.Containerd.User
449449
}
450450
if y.Containerd.User == nil {
451-
y.Containerd.User = ptr.Of(true)
451+
switch *y.Arch {
452+
case X8664, AARCH64:
453+
y.Containerd.User = ptr.Of(true)
454+
default:
455+
y.Containerd.User = ptr.Of(false)
456+
}
452457
}
453458

454459
y.Containerd.Archives = append(append(o.Containerd.Archives, y.Containerd.Archives...), d.Containerd.Archives...)

0 commit comments

Comments
 (0)