Skip to content

Commit c01d1d4

Browse files
committed
docs/usage: simplify
Signed-off-by: Akihiro Suda <[email protected]>
1 parent da0cd70 commit c01d1d4

File tree

3 files changed

+56
-67
lines changed

3 files changed

+56
-67
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,11 @@ weight: 5
44
---
55

66
For all the configuration items, see <https://github.com/lima-vm/lima/blob/master/examples/default.yaml>.
7+
8+
The current default spec:
9+
- OS: Ubuntu
10+
- CPU: 4 cores
11+
- Memory: 4 GiB
12+
- Disk: 100 GiB
13+
- Mounts: `~` (read-only), `/tmp/lima` (writable)
14+
- SSH: 127.0.0.1:60022

website/content/en/docs/Usage/_index.md

Lines changed: 22 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ title: Usage
33
weight: 2
44
---
55

6-
## Start a linux instance
6+
## Starting a Linux instance
77

8-
```console
9-
limactl start [--name=NAME] [--tty=false] <template://TEMPLATE>
10-
```
8+
Run `limactl start <INSTANCE>` to create and start the first instance.
9+
The `<INSTANCE>` name defaults to "default".
1110

1211
```console
1312
$ limactl start
@@ -24,38 +23,34 @@ Choose `Proceed with the current configuration`, and wait until "READY" to be pr
2423

2524
For automation, `--tty=false` flag can be used for disabling the interactive user interface.
2625

27-
### Advanced usage
26+
### Customization
2827
To create an instance "default" from a template "docker":
29-
```console
30-
$ limactl start --name=default template://docker
28+
```bash
29+
limactl create --name=default template://docker
30+
limactl start default
3131
```
3232

33-
To create an instance "default" with modified parameters:
34-
```console
35-
$ limactl start --set='.cpus = 2 | .memory = "2GiB"'
36-
```
33+
See also the command reference:
34+
- [`limactl create`](../reference/limactl_create/)
35+
- [`limactl start`](../reference/limactl_start/)
36+
- [`limactl edit`](../reference/limactl_edit/)
3737

38-
To see the template list:
39-
```console
40-
$ limactl start --list-templates
38+
### Executing Linux commands
39+
Run `limactl shell <INSTANCE> <COMMAND>` to launch `<COMMAND>` on the VM:
40+
```bash
41+
limactl shell default uname -a
4142
```
4243

43-
To create an instance "default" from a local file:
44-
```console
45-
$ limactl start --name=default /usr/local/share/lima/templates/fedora.yaml
46-
```
47-
48-
To create an instance "default" from a remote URL (use carefully, with a trustable source):
49-
```console
50-
$ limactl start --name=default https://raw.githubusercontent.com/lima-vm/lima/master/examples/alpine.yaml
51-
```
52-
53-
#### limactl shell
54-
`limactl shell <INSTANCE> <COMMAND>`: launch `<COMMAND>` on Linux.
44+
See also the command reference:
45+
- [`limactl shell`](../reference/limactl_shell/)
5546

5647
For the "default" instance, this command can be shortened as `lima <COMMAND>`.
48+
```bash
49+
lima uname -a
50+
```
5751
The `lima` command also accepts the instance name as the environment variable `$LIMA_INSTANCE`.
5852

53+
5954
SSH can be used too:
6055
```console
6156
$ limactl ls --format='{{.SSHConfigFile}}' default
@@ -64,28 +59,6 @@ $ limactl ls --format='{{.SSHConfigFile}}' default
6459
$ ssh -F /Users/example/.lima/default/ssh.config lima-default
6560
```
6661

67-
#### limactl completion
62+
### Shell completion
6863
- To enable bash completion, add `source <(limactl completion bash)` to `~/.bash_profile`.
69-
7064
- To enable zsh completion, see `limactl completion zsh --help`
71-
72-
## Configuration
73-
{{% fixlinks %}}
74-
75-
See [`./examples/default.yaml`](./examples/default.yaml).
76-
77-
The current default spec:
78-
- OS: Ubuntu 23.04 (Lunar Lobster)
79-
- CPU: 4 cores
80-
- Memory: 4 GiB
81-
- Disk: 100 GiB
82-
- Mounts: `~` (read-only), `/tmp/lima` (writable)
83-
- SSH: 127.0.0.1:60022
84-
85-
## How it works
86-
87-
- Hypervisor: [QEMU with HVF accelerator (default), or Virtualization.framework](./docs/vmtype.md)
88-
- Filesystem sharing: [Reverse SSHFS (default), or virtio-9p-pci aka virtfs, or virtiofs](./docs/mount.md)
89-
- Port forwarding: `ssh -L`, automated by watching `/proc/net/tcp` and `iptables` events in the guest
90-
91-
{{% /fixlinks %}}

website/content/en/docs/faq/_index.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,42 @@ weight: 6
77
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
88
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
99

10+
1011
- [Generic](#generic)
11-
- ["What's my login password?"](#whats-my-login-password)
12-
- ["Does Lima work on ARM Mac?"](#does-lima-work-on-arm-mac)
13-
- ["Can I run non-Ubuntu guests?"](#can-i-run-non-ubuntu-guests)
14-
- ["Can I run other container engines such as Docker and Podman? What about Kubernetes?"](#can-i-run-other-container-engines-such-as-docker-and-podman-what-about-kubernetes)
15-
- ["Can I run Lima with a remote Linux machine?"](#can-i-run-lima-with-a-remote-linux-machine)
16-
- ["Advantages compared to Docker for Mac?"](#advantages-compared-to-docker-for-mac)
12+
- ["How does Lima work?"](#how-does-lima-work)
13+
- ["What's my login password?"](#whats-my-login-password)
14+
- ["Does Lima work on ARM Mac?"](#does-lima-work-on-arm-mac)
15+
- ["Can I run non-Ubuntu guests?"](#can-i-run-non-ubuntu-guests)
16+
- ["Can I run other container engines such as Docker and Podman? What about Kubernetes?"](#can-i-run-other-container-engines-such-as-docker-and-podman-what-about-kubernetes)
17+
- ["Can I run Lima with a remote Linux machine?"](#can-i-run-lima-with-a-remote-linux-machine)
18+
- ["Advantages compared to Docker for Mac?"](#advantages-compared-to-docker-for-mac)
1719
- [QEMU](#qemu)
18-
- ["QEMU crashes with `HV_ERROR`"](#qemu-crashes-with-hv_error)
19-
- ["QEMU is slow"](#qemu-is-slow)
20-
- [error "killed -9"](#error-killed--9)
21-
- ["QEMU crashes with `vmx_write_mem: mmu_gva_to_gpa XXXXXXXXXXXXXXXX failed`"](#qemu-crashes-with-vmx_write_mem-mmu_gva_to_gpa-xxxxxxxxxxxxxxxx-failed)
20+
- ["QEMU crashes with `HV_ERROR`"](#qemu-crashes-with-hv_error)
21+
- ["QEMU is slow"](#qemu-is-slow)
22+
- [error "killed -9"](#error-killed--9)
23+
- ["QEMU crashes with `vmx_write_mem: mmu_gva_to_gpa XXXXXXXXXXXXXXXX failed`"](#qemu-crashes-with-vmx_write_mem-mmu_gva_to_gpa-xxxxxxxxxxxxxxxx-failed)
2224
- [VZ](#vz)
23-
- ["Lima gets stuck at `Installing rosetta...`"](#lima-gets-stuck-at-installing-rosetta)
25+
- ["Lima gets stuck at `Installing rosetta...`"](#lima-gets-stuck-at-installing-rosetta)
2426
- [Networking](#networking)
25-
- ["Cannot access the guest IP 192.168.5.15 from the host"](#cannot-access-the-guest-ip-192168515-from-the-host)
26-
- ["Ping shows duplicate packets and massive response times"](#ping-shows-duplicate-packets-and-massive-response-times)
27-
- ["IP address is not assigined for vmnet networks"](#ip-address-is-not-assigined-for-vmnet-networks)
27+
- ["Cannot access the guest IP 192.168.5.15 from the host"](#cannot-access-the-guest-ip-192168515-from-the-host)
28+
- ["Ping shows duplicate packets and massive response times"](#ping-shows-duplicate-packets-and-massive-response-times)
29+
- ["IP address is not assigined for vmnet networks"](#ip-address-is-not-assigined-for-vmnet-networks)
2830
- [Filesystem sharing](#filesystem-sharing)
29-
- ["Filesystem is slow"](#filesystem-is-slow)
30-
- ["Filesystem is not writable"](#filesystem-is-not-writable)
31+
- ["Filesystem is slow"](#filesystem-is-slow)
32+
- ["Filesystem is not writable"](#filesystem-is-not-writable)
3133
- [External projects](#external-projects)
32-
- ["I am using Rancher Desktop. How to deal with the underlying Lima?"](#i-am-using-rancher-desktop-how-to-deal-with-the-underlying-lima)
34+
- ["I am using Rancher Desktop. How to deal with the underlying Lima?"](#i-am-using-rancher-desktop-how-to-deal-with-the-underlying-lima)
3335
- ["Hints for debugging other problems?"](#hints-for-debugging-other-problems)
3436

3537
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3638

3739
### Generic
40+
#### "How does Lima work?"
41+
42+
- Hypervisor: [QEMU with HVF accelerator (default), or Virtualization.framework](../config/vmtype/)
43+
- Filesystem sharing: [Reverse SSHFS (default), or virtio-9p-pci aka virtfs, or virtiofs](../config/mount/)
44+
- Port forwarding: `ssh -L`, automated by watching `/proc/net/tcp` and `iptables` events in the guest
45+
3846
#### "What's my login password?"
3947
Password is disabled and locked by default.
4048
You have to use `limactl shell bash` (or `lima bash`) to open a shell.
@@ -213,4 +221,4 @@ If you need to create an `override.yaml` file, its location should be:
213221
- `$HOME/.lima/<INSTANCE>/serial.log`
214222
- `/var/log/cloud-init-output.log` (inside the guest)
215223
- `/var/log/cloud-init.log` (inside the guest)
216-
- Make sure that you aren't mixing up tabs and spaces in the YAML.
224+
- Make sure that you aren't mixing up tabs and spaces in the YAML.

0 commit comments

Comments
 (0)