Skip to content

Commit 360fa45

Browse files
authored
Merge pull request #4183 from AkihiroSuda/docs-multiarch
docs: update config/multi-arch
2 parents 661f8c1 + f4984c3 commit 360fa45

File tree

1 file changed

+33
-15
lines changed

1 file changed

+33
-15
lines changed

website/content/en/docs/config/multi-arch.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,42 @@ Lima supports several modes for running Intel-on-ARM and ARM-on-Intel:
1010

1111
## [Slow mode: Intel VM on ARM Host / ARM VM on Intel Host](#slow-mode)
1212

13-
Lima can run a VM with a foreign architecture, just by specifying `arch` in the YAML.
13+
| ⚡ Requirement | QEMU, lima-additional-guestagents |
14+
|---------------|-----------------------------------|
1415

16+
Lima can run a VM with a foreign architecture, using [QEMU](./vmtype/qemu.md).
17+
18+
For [port forwarding](./port.md), the [`lima-additional-guestagents](../installation/) package has to be installed on the host.
19+
20+
An example configuration:
21+
{{< tabpane text=true >}}
22+
{{% tab header="CLI" %}}
23+
```bash
24+
limactl start --vm-type=qemu --arch=x86_64 --plain
25+
```
26+
27+
See the YAML tab for the explanation of the corresponding CLI flags.
28+
{{% /tab %}}
29+
{{% tab header="YAML" %}}
1530
```yaml
31+
# Starting with Lima v2.0, `vmType` has to be expclitly set to "qemu" on non-Linux hosts.
32+
vmType: "qemu"
33+
34+
# Supported architectures:
35+
# Non-experimental: aarch64, x86_64
36+
# Experimental: armv7l, ppc64le, riscv64, s390x
37+
#
38+
# containerd is not automatically installed for the experimental architectures.
1639
arch: "x86_64"
17-
# arch: "aarch64"
18-
19-
images:
20-
- location: "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
21-
arch: "x86_64"
22-
- location: "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-arm64.img"
23-
arch: "aarch64"
24-
25-
# Disable mounts and containerd, otherwise booting up may time out if the host is slow
26-
mounts: []
27-
containerd:
28-
system: false
29-
user: false
40+
41+
# A slow host may need `plain` to disable mounts, port forwards, and containerd, so as to avoid timeout.
42+
plain: true
43+
44+
base:
45+
- template://_images/ubuntu
3046
```
47+
{{% /tab %}}
48+
{{< /tabpane >}}
3149
3250
Running a VM with a foreign architecture is extremely slow.
3351
Consider using [Fast mode](#fast-mode) or [Fast mode 2](#fast-mode-2) whenever possible.
@@ -40,7 +58,7 @@ QEMU User Mode Emulation is significantly faster than QEMU System Mode Emulation
4058
Set up:
4159
```bash
4260
lima sudo systemctl start containerd
43-
lima sudo nerdctl run --privileged --rm tonistiigi/binfmt:qemu-v7.0.0-28@sha256:66e11bea77a5ea9d6f0fe79b57cd2b189b5d15b93a2bdb925be22949232e4e55 --install all
61+
lima sudo nerdctl run --privileged --rm tonistiigi/binfmt:qemu-v10.0.4-56@sha256:30cc9a4d03765acac9be2ed0afc23af1ad018aed2c28ea4be8c2eb9afe03fbd1 --install all
4462
```
4563

4664
Run containers:

0 commit comments

Comments
 (0)