Skip to content

Commit e3fb75a

Browse files
authored
Merge pull request #3972 from AkihiroSuda/docs
docs: split long pages, fix minor errors, etc.
2 parents ca35495 + ef417d1 commit e3fb75a

File tree

16 files changed

+245
-196
lines changed

16 files changed

+245
-196
lines changed

website/content/en/docs/config/environment-variables.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,18 @@ This page documents the environment variables used in Lima.
109109
### `LIMA_SSH_PORT_FORWARDER`
110110

111111
- **Description**: Specifies to use the SSH port forwarder (slow) instead of gRPC (fast, previously unstable)
112-
- **Default**: `false` (since v1.1.0-beta.0)
112+
- **Default**: `false` (since v1.1.0)
113113
- **Usage**:
114114
```sh
115115
export LIMA_SSH_PORT_FORWARDER=false
116116
```
117117
- **The history of the default value**:
118-
| Version | Default value |
119-
|---------------|---------------------|
120-
| v0.1.0 | `true`, effectively |
121-
| v1.0.0 | `false` |
122-
| v1.0.1 | `true` |
123-
| v1.1.0-beta.0 | `false` |
118+
| Version | Default value |
119+
|---------|---------------------|
120+
| v0.1.0 | `true`, effectively |
121+
| v1.0.0 | `false` |
122+
| v1.0.1 | `true` |
123+
| v1.1.0 | `false` |
124124

125125
### `LIMA_USERNET_RESOLVE_IP_ADDRESS_TIMEOUT`
126126

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Intel-on-ARM and ARM-on-Intel
33
weight: 20
44
---
55

6-
Lima supports two modes for running Intel-on-ARM and ARM-on-Intel:
6+
Lima supports several modes for running Intel-on-ARM and ARM-on-Intel:
77
- [Slow mode](#slow-mode)
88
- [Fast mode](#fast-mode)
99
- [Fast mode 2](#fast-mode-2)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Plug-in
3+
weight: 90
4+
---
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: CLI plugins
3+
weight: 2
4+
---
5+
6+
| ⚡ Requirement | Lima >= 2.0 |
7+
|----------------|-------------|
8+
9+
Lima supports a plugin-like command aliasing system similar to `git`, `kubectl`, and `docker`. When you run a `limactl` command that doesn't exist, Lima will automatically look for an external program named `limactl-<command>` in your system's PATH.
10+
11+
## Creating Custom Aliases
12+
13+
To create a custom alias, create an executable script with the name `limactl-<alias>` and place it somewhere in your PATH.
14+
15+
**Example: Creating a `ps` alias for listing instances**
16+
17+
1. Create a script called `limactl-ps`:
18+
```bash
19+
#!/bin/sh
20+
# Show instances in a compact format
21+
limactl list --format table "$@"
22+
```
23+
24+
2. Make it executable and place it in your PATH:
25+
```bash
26+
chmod +x limactl-ps
27+
sudo mv limactl-ps /usr/local/bin/
28+
```
29+
30+
3. Now you can use it:
31+
```bash
32+
limactl ps # Shows instances in table format
33+
limactl ps --quiet # Shows only instance names
34+
```
35+
36+
**Example: Creating an `sh` alias**
37+
38+
```bash
39+
#!/bin/sh
40+
# limactl-sh - Connect to an instance shell
41+
limactl shell "$@"
42+
```
43+
44+
After creating this alias:
45+
```bash
46+
limactl sh default # Equivalent to: limactl shell default
47+
limactl sh myinstance bash # Equivalent to: limactl shell myinstance bash
48+
```
49+
50+
## How It Works
51+
52+
1. When you run `limactl <unknown-command>`, Lima first tries to find a built-in command
53+
2. If no built-in command is found, Lima searches for `limactl-<unknown-command>` in your PATH
54+
3. If found, Lima executes the external program and passes all remaining arguments to it
55+
4. If not found, Lima shows the standard "unknown command" error
56+
57+
This system allows you to:
58+
- Create personal shortcuts and aliases
59+
- Extend Lima's functionality without modifying the core application
60+
- Share custom commands with your team by distributing scripts
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: VM driver plugins
3+
weight: 1
4+
---
5+
6+
See [Virtual Machine Drivers](../../dev/drivers.md).
7+
<!-- TODO: migrate the most of the content from ../../dev/drivers.md to here -->

website/content/en/docs/config/port.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Lima supports two port forwarders: SSH and GRPC.
1111

1212
The default port forwarder is shown in the following table.
1313

14-
| Version | Default |
15-
| ------------- | ------- |
16-
| v0.1.0 | SSH |
17-
| v1.0.0 | GRPC |
18-
| v1.0.1 | SSH |
19-
| v1.1.0-beta.0 | GRPC |
14+
| Version | Default |
15+
| --------| ------- |
16+
| v0.1.0 | SSH |
17+
| v1.0.0 | GRPC |
18+
| v1.0.1 | SSH |
19+
| v1.1.0 | GRPC |
2020

2121
The default was once changed to GRPC in Lima v1.0, but it was reverted to SSH in v1.0.1 due to stability reasons.
2222
The default was further reverted to GRPC in Lima v1.1, as the stability issues were resolved.

website/content/en/docs/config/vmtype.md

Lines changed: 0 additions & 120 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: VM types
3+
weight: 10
4+
---
5+
6+
Lima supports several VM drivers for running guest machines:
7+
8+
The vmType can be specified only on creating the instance.
9+
The vmType of existing instances cannot be changed.
10+
11+
> **💡 For developers**: See [Virtual Machine Drivers](../../dev/drivers) for technical details about driver architecture and creating custom drivers.
12+
13+
14+
See the following flowchart to choose the best vmType for you:
15+
```mermaid
16+
flowchart
17+
host{"Host OS"} -- "Windows" --> wsl2["WSL2"]
18+
host -- "Linux" --> qemu["QEMU"]
19+
host -- "macOS" --> intel_on_arm{"Need to run <br> Intel binaries <br> on ARM?"}
20+
intel_on_arm -- "Yes" --> just_elf{"Just need to <br> run Intel userspace (fast), <br> or entire Intel VM (slow)?"}
21+
just_elf -- "Userspace (fast)" --> vz
22+
just_elf -- "VM (slow)" --> qemu
23+
intel_on_arm -- "No" --> vz["VZ"]
24+
```
25+
26+
The default vmType is QEMU in Lima prior to v1.0.
27+
Starting with Lima v1.0, Lima will use VZ by default on macOS (>= 13.5) for new instances,
28+
unless the config is incompatible with VZ. (e.g., legacyBIOS or 9p is enabled)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: QEMU
3+
weight: 1
4+
---
5+
6+
"qemu" option makes use of QEMU to run guest operating system.
7+
8+
Recommended QEMU version:
9+
- v8.2.1 or later (macOS)
10+
- v6.2.0 or later (Linux)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: VZ
3+
weight: 2
4+
---
5+
6+
| ⚡ Requirement | Lima >= 0.14, macOS >= 13.0 |
7+
|-------------------|-----------------------------|
8+
9+
"vz" option makes use of native virtualization support provided by macOS Virtualization.Framework.
10+
11+
An example configuration:
12+
{{< tabpane text=true >}}
13+
{{% tab header="CLI" %}}
14+
```bash
15+
limactl start --vm-type=vz
16+
```
17+
{{% /tab %}}
18+
{{% tab header="YAML" %}}
19+
```yaml
20+
# Example to run ubuntu using vmType: vz instead of qemu (Default)
21+
vmType: "vz"
22+
images:
23+
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img"
24+
arch: "x86_64"
25+
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img"
26+
arch: "aarch64"
27+
mounts:
28+
- location: "~"
29+
```
30+
{{% /tab %}}
31+
{{< /tabpane >}}
32+
### Caveats
33+
- "vz" option is only supported on macOS 13 or above
34+
- Virtualization.framework doesn't support running "intel guest on arm" and vice versa
35+
36+
### Known Issues
37+
- "vz" doesn't support `legacyBIOS: true` option, so guest machine like `centos-stream` and `oraclelinux-8` will not work on Intel Mac.
38+
- When running lima using "vz", `${LIMA_HOME}/<INSTANCE>/serial.log` will not contain kernel boot logs
39+
- On Intel Mac with macOS prior to 13.5, Linux kernel v6.2 (used by Ubuntu 23.04, Fedora 38, etc.) is known to be unbootable on vz.
40+
kernel v6.3 and later should boot, as long as it is booted via GRUB.
41+
https://github.com/lima-vm/lima/issues/1577#issuecomment-1565625668
42+
The issue is fixed in macOS 13.5.

0 commit comments

Comments
 (0)