Skip to content

Commit d6e0573

Browse files
committed
docs/config: add more tabpanes
Signed-off-by: Akihiro Suda <[email protected]>
1 parent b4c1c34 commit d6e0573

File tree

4 files changed

+92
-2
lines changed

4 files changed

+92
-2
lines changed

website/content/en/docs/Config/Mount/_index.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ While the host works as an SFTP server, the host does not open any TCP port,
2222
as the host initiates an SSH connection into the guest and let the guest connect to the SFTP server via the stdin.
2323

2424
An example configuration:
25+
{{< tabpane text=true >}}
26+
{{% tab header="CLI" %}}
27+
```bash
28+
limactl start --mount-type=reverse-sshfs
29+
```
30+
{{% /tab %}}
31+
{{% tab header="YAML" %}}
2532
```yaml
2633
mountType: "reverse-sshfs"
2734
mounts:
@@ -43,6 +50,8 @@ mounts:
4350
# 🟢 Builtin default: "openssh-sftp-server" if OpenSSH SFTP Server binary is found, otherwise "builtin"
4451
sftpDriver: null
4552
```
53+
{{% /tab %}}
54+
{{< /tabpane >}}
4655
4756
The default value of `sftpDriver` has been set to "openssh-sftp-server" since Lima v0.10, when an OpenSSH SFTP Server binary
4857
such as `/usr/libexec/sftp-server` is detected on the host.
@@ -60,7 +69,15 @@ The "9p" mount type is implemented by using QEMU's virtio-9p-pci devices.
6069
virtio-9p-pci is also known as "virtfs", but note that this is unrelated to [virtio-fs](https://virtio-fs.gitlab.io/).
6170

6271
An example configuration:
72+
{{< tabpane text=true >}}
73+
{{% tab header="CLI" %}}
74+
```bash
75+
limactl start --vm-type=qemu --mount-type=9p
76+
```
77+
{{% /tab %}}
78+
{{% tab header="YAML" %}}
6379
```yaml
80+
vmType: "qemu"
6481
mountType: "9p"
6582
mounts:
6683
- location: "~"
@@ -81,6 +98,8 @@ mounts:
8198
# 🟢 Builtin default: "fscache" for non-writable mounts, "mmap" for writable mounts
8299
cache: null
83100
```
101+
{{% /tab %}}
102+
{{< /tabpane >}}
84103

85104
The "9p" mount type requires Lima v0.10.0 or later.
86105

@@ -98,12 +117,21 @@ The "virtiofs" mount type is implemented via the virtio-fs device by using apple
98117
Linux guest kernel must enable the CONFIG_VIRTIO_FS support for this support.
99118

100119
An example configuration:
120+
{{< tabpane text=true >}}
121+
{{% tab header="CLI" %}}
122+
```bash
123+
limactl start --vm-type=vz --mount-type=virtiofs
124+
```
125+
{{% /tab %}}
126+
{{% tab header="YAML" %}}
101127
```yaml
102128
vmType: "vz" # only for macOS; Linux uses 'qemu'
103129
mountType: "virtiofs"
104130
mounts:
105131
- location: "~"
106132
```
133+
{{% /tab %}}
134+
{{< /tabpane >}}
107135

108136
#### Caveats
109137
- For macOS, the "virtiofs" mount type is supported only on macOS 13 or above with `vmType: vz` config. See also [`vmtype.md`](./vmtype.md).
@@ -120,10 +148,19 @@ mounts:
120148
The "wsl2" mount type relies on using WSL2's navite disk sharing, where the root disk is available by default at `/mnt/$DISK_LETTER` (e.g. `/mnt/c/`).
121149

122150
An example configuration:
151+
{{< tabpane text=true >}}
152+
{{% tab header="CLI" %}}
153+
```bash
154+
limactl start --vm-type=wsl2 --mount-type=wsl2
155+
```
156+
{{% /tab %}}
157+
{{% tab header="YAML" %}}
123158
```yaml
124159
vmType: "wsl2"
125160
mountType: "wsl2"
126161
```
162+
{{% /tab %}}
163+
{{< /tabpane >}}
127164

128165
#### Caveats
129166
- WSL2 file permissions may not work exactly as expected when accessing files that are natively on the Windows disk ([more info](https://github.com/MicrosoftDocs/WSL/blob/mattw-wsl2-explainer/WSL/file-permissions.md))

website/content/en/docs/Config/Multi-arch/_index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ See also https://github.com/containerd/nerdctl/blob/master/docs/multi-platform.m
7171
[Rosetta](https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta) is known to be much faster than QEMU User Mode Emulation.
7272
Rosetta is available for [VZ](./vmtype.md) instances on ARM hosts.
7373

74+
{{< tabpane text=true >}}
75+
{{% tab header="CLI" %}}
76+
```bash
77+
limactl start --vm-type=vz --rosetta
78+
```
79+
{{% /tab %}}
80+
{{% tab header="YAML" %}}
7481
```yaml
7582
vmType: "vz"
7683
rosetta:
@@ -80,3 +87,5 @@ rosetta:
8087
# Register rosetta to /proc/sys/fs/binfmt_misc
8188
binfmt: true
8289
```
90+
{{% /tab %}}
91+
{{< /tabpane >}}

website/content/en/docs/Config/Network/_index.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,15 @@ networks:
125125
126126
</details>
127127
128-
Instances can then reference these networks from their `lima.yaml` file:
128+
Instances can then reference these networks:
129129
130+
{{< tabpane text=true >}}
131+
{{% tab header="CLI" %}}
132+
```bash
133+
limactl start --network=lima:shared
134+
```
135+
{{% /tab %}}
136+
{{% tab header="YAML" %}}
130137
```yaml
131138
networks:
132139
# Lima can manage the socket_vmnet daemon for networks defined in $LIMA_HOME/_config/networks.yaml automatically.
@@ -139,6 +146,8 @@ networks:
139146
# # Interface name, defaults to "lima0", "lima1", etc.
140147
# interface: ""
141148
```
149+
{{% /tab %}}
150+
{{< /tabpane >}}
142151

143152
The network daemon is started automatically when the first instance referencing them is started,
144153
and will stop automatically once the last instance has stopped. Daemon logs will be stored in the
@@ -170,10 +179,19 @@ networks:
170179
|-------------------|-----------------------------|
171180

172181
For [VZ](./vmtype.md) instances, the "vzNAT" network can be configured as follows:
182+
{{< tabpane text=true >}}
183+
{{% tab header="CLI" %}}
184+
```bash
185+
limactl start --vm-type=vz --network=vzNAT
186+
```
187+
{{% /tab %}}
188+
{{% tab header="YAML" %}}
173189
```yaml
174190
networks:
175191
- vzNAT: true
176192
```
193+
{{% /tab %}}
194+
{{< /tabpane >}}
177195
178196
The range of the IP address is not specifiable.
179197
@@ -201,10 +219,19 @@ networks:
201219

202220
Instances can then reference these networks from their `lima.yaml` file:
203221

222+
{{< tabpane text=true >}}
223+
{{% tab header="CLI" %}}
224+
```bash
225+
limactl start --network=lima:example-user-v2
226+
```
227+
{{% /tab %}}
228+
{{% tab header="YAML" %}}
204229
```yaml
205230
networks:
206231
- lima: example-user-v2
207232
```
233+
{{% /tab %}}
234+
{{< /tabpane >}}
208235

209236
_Note_
210237

website/content/en/docs/Config/VMType/_index.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ This option is used by default if "vmType" is not set.
3636
"vz" option makes use of native virtualization support provided by macOS Virtualization.Framework.
3737

3838
An example configuration:
39+
{{< tabpane text=true >}}
40+
{{% tab header="CLI" %}}
41+
```bash
42+
limactl start --vm-type=vz --mount-type=virtiofs
43+
```
44+
{{% /tab %}}
45+
{{% tab header="YAML" %}}
3946
```yaml
4047
# Example to run ubuntu using vmType: vz instead of qemu (Default)
4148
vmType: "vz"
@@ -48,7 +55,8 @@ mounts:
4855
- location: "~"
4956
mountType: "virtiofs"
5057
```
51-
58+
{{% /tab %}}
59+
{{< /tabpane >}}
5260
### Caveats
5361
- "vz" option is only supported on macOS 13 or above
5462
- Virtualization.framework doesn't support running "intel guest on arm" and vice versa
@@ -71,6 +79,13 @@ mountType: "virtiofs"
7179
"wsl2" option makes use of native virtualization support provided by Windows' `wsl.exe` ([more info](https://learn.microsoft.com/en-us/windows/wsl/about)).
7280

7381
An example configuration:
82+
{{< tabpane text=true >}}
83+
{{% tab header="CLI" %}}
84+
```bash
85+
limactl start --vm-type=wsl2 --mount-type=wsl2 --containerd=system
86+
```
87+
{{% /tab %}}
88+
{{% tab header="YAML" %}}
7489
```yaml
7590
# Example to run Fedora using vmType: wsl2
7691
vmType: wsl2
@@ -84,6 +99,8 @@ containerd:
8499
system: true
85100
user: false
86101
```
102+
{{% /tab %}}
103+
{{< /tabpane >}}
87104

88105
### Caveats
89106
- "wsl2" option is only supported on newer versions of Windows (roughly anything since 2019)

0 commit comments

Comments
 (0)