diff --git a/cmd/limactl/start.go b/cmd/limactl/start.go index 34f4f2d12e0..e7311d5ab70 100644 --- a/cmd/limactl/start.go +++ b/cmd/limactl/start.go @@ -131,6 +131,12 @@ func loadOrCreateInstance(cmd *cobra.Command, args []string, createOnly bool) (* // No need to use SecureJoin here. https://github.com/lima-vm/lima/pull/805#discussion_r853411702 templateName := filepath.Join(templateURL.Host, templateURL.Path) logrus.Debugf("interpreting argument %q as a template name %q", arg, templateName) + switch templateName { + case "experimental/riscv64": + logrus.Warn("template://experimental/riscv64 was merged into the default template in Lima v1.0. Use `limactl create --arch=riscv64 template://default` instead.") + case "experimental/armv7l": + logrus.Warn("template://experimental/armv7l was merged into the default template in Lima v1.0. Use `limactl create --arch=armv7l template://default` instead.") + } if st.instName == "" { // e.g., templateName = "deprecated/centos-7" , st.instName = "centos-7" st.instName = filepath.Base(templateName) diff --git a/examples/README.md b/examples/README.md index c25e48c1aaf..9632b0831c1 100644 --- a/examples/README.md +++ b/examples/README.md @@ -52,8 +52,6 @@ Optional feature enablers: - [`vmnet`](./vmnet.yaml): ⭐enable [`vmnet.framework`](../docs/network.md) - [`experimental/9p`](./experimental/9p.yaml): [experimental] use 9p mount type - [`experimental/virtiofs-linux`](./experimental/9p.yaml): [experimental] use virtiofs mount type for Linux -- [`experimental/armv7l`](./experimental/armv7l.yaml): [experimental] ARMv7 -- [`experimental/riscv64`](./experimental/riscv64.yaml): [experimental] RISC-V - [`experimental/net-user-v2`](./experimental/net-user-v2.yaml): [experimental] user-v2 network to enable VM-to-VM communication without root privilege - [`experimental/vnc`](./experimental/vnc.yaml): [experimental] use vnc display and xorg server @@ -70,6 +68,8 @@ Lost+found: - ~`nomad`~: Removed in Lima v0.17.1, as Nomad is [no longer free software](https://github.com/hashicorp/nomad/commit/b3e30b1dfa185d9437a25830522da47b91f78816) - ~`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/). - ~`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/). +- ~`experimental/armv7l`~: Merged into the `default` template in Lima v1.0. Use `limactl create --arch=armv7l template://default`. +- ~`experimental/riscv64`~: Merged into the `default` template in Lima v1.0. Use `limactl create --arch=riscv64 template://default`. ## Tier diff --git a/examples/default.yaml b/examples/default.yaml index 5e112460315..433f70aa56f 100644 --- a/examples/default.yaml +++ b/examples/default.yaml @@ -20,7 +20,7 @@ vmOpts: qemu: # Minimum version of QEMU required to create an instance of this template. # Will be ignored if the vmType is not "qemu" - # 🟒 Builtin default: not set + # 🟒 Builtin default: not set (but RISC-V requires QEMU 9.1 or later) minimumVersion: null # OS: "Linux". @@ -42,12 +42,22 @@ images: - location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-arm64.img" arch: "aarch64" digest: "sha256:5ecac6447be66a164626744a87a27fd4e6c6606dc683e0a233870af63df4276a" +- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-riscv64.img" + arch: "riscv64" + digest: "sha256:f5886ad4e405e689585dfef0e96c31b06478e0cb12bc7f3fae965759a32d729e" +- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-armhf.img" + arch: "armv7l" + digest: "sha256:8d5756a9424a5a75f8640539f3119b3cfeb31341bbb01f4968f13df4427ce489" # Fallback to the latest release image. # Hint: run `limactl prune` to invalidate the cache - location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img" arch: "x86_64" - location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img" arch: "aarch64" +- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-riscv64.img" + arch: "riscv64" +- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-armhf.img" + arch: "armv7l" # CPUs # 🟒 Builtin default: min(4, host CPU cores) @@ -200,7 +210,7 @@ containerd: # 🟒 Builtin default: false system: null # Enable user-scoped (aka rootless) containerd and its dependencies - # 🟒 Builtin default: true + # 🟒 Builtin default: true (for x86_64 and aarch64) user: null # # Override containerd archive # # 🟒 Builtin default: hard-coded URL with hard-coded digest (see the output of `limactl info | jq .defaultTemplate.containerd.archives`) diff --git a/examples/experimental/armv7l.yaml b/examples/experimental/armv7l.yaml deleted file mode 100644 index 0902544936d..00000000000 --- a/examples/experimental/armv7l.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# This template requires Lima v0.17.0 or later. - -arch: "armv7l" -images: -# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months. -- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-armhf.img" - arch: "armv7l" - digest: "sha256:8d5756a9424a5a75f8640539f3119b3cfeb31341bbb01f4968f13df4427ce489" -# Fallback to the latest release image. -# Hint: run `limactl prune` to invalidate the cache -- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-armhf.img" - arch: "armv7l" - -mounts: -- location: "~" -- location: "/tmp/lima" - writable: true -mountType: "9p" - -# We do not have arm-v7 binaries of containerd -containerd: - system: false - user: false diff --git a/examples/experimental/riscv64.yaml b/examples/experimental/riscv64.yaml deleted file mode 100644 index 97861379cc1..00000000000 --- a/examples/experimental/riscv64.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Lima v0.x users should use https://raw.githubusercontent.com/lima-vm/lima/v0.23.2/examples/experimental/riscv64.yaml -minimumLimaVersion: "1.0.0" -vmOpts: - qemu: - minimumVersion: "9.1.0" - -arch: "riscv64" -images: -- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-riscv64.img" - arch: "riscv64" - digest: "sha256:f5886ad4e405e689585dfef0e96c31b06478e0cb12bc7f3fae965759a32d729e" -# Fallback to the latest release image. -# Hint: run `limactl prune` to invalidate the cache -- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-riscv64.img" - arch: "riscv64" - -mounts: -- location: "~" -- location: "/tmp/lima" - writable: true -mountType: "9p" - -# We do not have riscv64 binaries of containerd -containerd: - system: false - user: false diff --git a/examples/ubuntu.yaml b/examples/ubuntu.yaml index a7fb0b3246e..dfb16afdab7 100644 --- a/examples/ubuntu.yaml +++ b/examples/ubuntu.yaml @@ -7,12 +7,22 @@ images: - location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-arm64.img" arch: "aarch64" digest: "sha256:5ecac6447be66a164626744a87a27fd4e6c6606dc683e0a233870af63df4276a" +- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-riscv64.img" + arch: "riscv64" + digest: "sha256:f5886ad4e405e689585dfef0e96c31b06478e0cb12bc7f3fae965759a32d729e" +- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-armhf.img" + arch: "armv7l" + digest: "sha256:8d5756a9424a5a75f8640539f3119b3cfeb31341bbb01f4968f13df4427ce489" # Fallback to the latest release image. # Hint: run `limactl prune` to invalidate the cache - location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img" arch: "x86_64" - location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img" arch: "aarch64" +- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-riscv64.img" + arch: "riscv64" +- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-armhf.img" + arch: "armv7l" mounts: - location: "~" diff --git a/pkg/limayaml/defaults.go b/pkg/limayaml/defaults.go index 0e48c65b6e4..32817cee55c 100644 --- a/pkg/limayaml/defaults.go +++ b/pkg/limayaml/defaults.go @@ -448,7 +448,12 @@ func FillDefault(y, d, o *LimaYAML, filePath string) { y.Containerd.User = o.Containerd.User } if y.Containerd.User == nil { - y.Containerd.User = ptr.Of(true) + switch *y.Arch { + case X8664, AARCH64: + y.Containerd.User = ptr.Of(true) + default: + y.Containerd.User = ptr.Of(false) + } } y.Containerd.Archives = append(append(o.Containerd.Archives, y.Containerd.Archives...), d.Containerd.Archives...)