Skip to content

Commit 6deae73

Browse files
authored
Merge pull request #1707 from AkihiroSuda/dev
Update docs (hint for `softwareupdate --install-rosetta `, `socketfilterfw --unblock /usr/libexec/bootpd`, more `s/example/template/`)
2 parents 57664bb + 35a3e39 commit 6deae73

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+107
-84
lines changed

README.md

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ $ limactl start
159159
? Creating an instance "default" [Use arrows to move, type to filter]
160160
> Proceed with the current configuration
161161
Open an editor to review or modify the current configuration
162-
Choose another example (docker, podman, archlinux, fedora, ...)
162+
Choose another template (docker, podman, archlinux, fedora, ...)
163163
Exit
164164
...
165165
INFO[0029] READY. Run `lima` to open the shell.
@@ -189,7 +189,7 @@ $ limactl start --list-templates
189189

190190
To create an instance "default" from a local file:
191191
```console
192-
$ limactl start --name=default /usr/local/share/lima/examples/fedora.yaml
192+
$ limactl start --name=default /usr/local/share/lima/templates/fedora.yaml
193193
```
194194

195195
To create an instance "default" from a remote URL (use carefully, with a trustable source):
@@ -310,27 +310,30 @@ The current default spec:
310310
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
311311
### Generic
312312

313-
- [Generic](#generic)
314-
- ["What's my login password?"](#whats-my-login-password)
315-
- ["Does Lima work on ARM Mac?"](#does-lima-work-on-arm-mac)
316-
- ["Can I run non-Ubuntu guests?"](#can-i-run-non-ubuntu-guests)
317-
- ["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)
318-
- ["Can I run Lima with a remote Linux machine?"](#can-i-run-lima-with-a-remote-linux-machine)
319-
- ["Advantages compared to Docker for Mac?"](#advantages-compared-to-docker-for-mac)
320-
- [QEMU](#qemu)
321-
- ["QEMU crashes with `HV_ERROR`"](#qemu-crashes-with-hv_error)
322-
- ["QEMU is slow"](#qemu-is-slow)
323-
- [error "killed -9"](#error-killed--9)
324-
- ["QEMU crashes with `vmx_write_mem: mmu_gva_to_gpa XXXXXXXXXXXXXXXX failed`"](#qemu-crashes-with-vmx_write_mem-mmu_gva_to_gpa-xxxxxxxxxxxxxxxx-failed)
325-
- [Networking](#networking)
326-
- ["Cannot access the guest IP 192.168.5.15 from the host"](#cannot-access-the-guest-ip-192168515-from-the-host)
327-
- ["Ping shows duplicate packets and massive response times"](#ping-shows-duplicate-packets-and-massive-response-times)
328-
- [Filesystem sharing](#filesystem-sharing)
329-
- ["Filesystem is slow"](#filesystem-is-slow)
330-
- ["Filesystem is not writable"](#filesystem-is-not-writable)
331-
- [External projects](#external-projects)
332-
- ["I am using Rancher Desktop. How to deal with the underlying Lima?"](#i-am-using-rancher-desktop-how-to-deal-with-the-underlying-lima)
333-
- ["Hints for debugging other problems?"](#hints-for-debugging-other-problems)
313+
- [Generic](#generic)
314+
- ["What's my login password?"](#whats-my-login-password)
315+
- ["Does Lima work on ARM Mac?"](#does-lima-work-on-arm-mac)
316+
- ["Can I run non-Ubuntu guests?"](#can-i-run-non-ubuntu-guests)
317+
- ["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)
318+
- ["Can I run Lima with a remote Linux machine?"](#can-i-run-lima-with-a-remote-linux-machine)
319+
- ["Advantages compared to Docker for Mac?"](#advantages-compared-to-docker-for-mac)
320+
- [QEMU](#qemu)
321+
- ["QEMU crashes with `HV_ERROR`"](#qemu-crashes-with-hv_error)
322+
- ["QEMU is slow"](#qemu-is-slow)
323+
- [error "killed -9"](#error-killed--9)
324+
- ["QEMU crashes with `vmx_write_mem: mmu_gva_to_gpa XXXXXXXXXXXXXXXX failed`"](#qemu-crashes-with-vmx_write_mem-mmu_gva_to_gpa-xxxxxxxxxxxxxxxx-failed)
325+
- [VZ](#vz)
326+
- ["Liam gets stuck at `Installing rosetta...`"](#liam-gets-stuck-at-installing-rosetta)
327+
- [Networking](#networking)
328+
- ["Cannot access the guest IP 192.168.5.15 from the host"](#cannot-access-the-guest-ip-192168515-from-the-host)
329+
- ["Ping shows duplicate packets and massive response times"](#ping-shows-duplicate-packets-and-massive-response-times)
330+
- ["IP address is not assigined for vmnet networks"](#ip-address-is-not-assigined-for-vmnet-networks)
331+
- [Filesystem sharing](#filesystem-sharing)
332+
- ["Filesystem is slow"](#filesystem-is-slow)
333+
- ["Filesystem is not writable"](#filesystem-is-not-writable)
334+
- [External projects](#external-projects)
335+
- ["I am using Rancher Desktop. How to deal with the underlying Lima?"](#i-am-using-rancher-desktop-how-to-deal-with-the-underlying-lima)
336+
- ["Hints for debugging other problems?"](#hints-for-debugging-other-problems)
334337

335338
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
336339
### Generic
@@ -440,6 +443,11 @@ A workaround is to set environment variable `QEMU_SYSTEM_X86_64="qemu-system-x86
440443

441444
https://bugs.launchpad.net/qemu/+bug/1838390
442445

446+
## VZ
447+
#### "Liam gets stuck at `Installing rosetta...`"
448+
449+
Try `softwareupdate --install-rosetta` from a terminal.
450+
443451
### Networking
444452
#### "Cannot access the guest IP 192.168.5.15 from the host"
445453

@@ -463,6 +471,13 @@ PING google.com (172.217.165.14): 56 data bytes
463471

464472
For more details, see [Documentation/Networking](https://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29).
465473

474+
#### "IP address is not assigined for vmnet networks"
475+
Try the following commands:
476+
```bash
477+
/usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd
478+
/usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd
479+
```
480+
466481
### Filesystem sharing
467482
#### "Filesystem is slow"
468483
Try virtiofs. See [`docs/mount.md`](./docs/mount.md)

cmd/limactl/start.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ func chooseNextCreatorState(st *creatorState) (*creatorState, error) {
340340
Options: []string{
341341
"Proceed with the current configuration",
342342
"Open an editor to review or modify the current configuration",
343-
"Choose another example (docker, podman, archlinux, fedora, ...)",
343+
"Choose another template (docker, podman, archlinux, fedora, ...)",
344344
"Exit",
345345
},
346346
}
@@ -370,26 +370,26 @@ func chooseNextCreatorState(st *creatorState) (*creatorState, error) {
370370
return st, errors.New("should not reach here")
371371
}
372372
return st, nil
373-
case prompt.Options[2]: // "Choose another example..."
374-
examples, err := templatestore.Templates()
373+
case prompt.Options[2]: // "Choose another template..."
374+
templates, err := templatestore.Templates()
375375
if err != nil {
376376
return st, err
377377
}
378378
var ansEx int
379379
promptEx := &survey.Select{
380-
Message: "Choose an example",
381-
Options: make([]string, len(examples)),
380+
Message: "Choose a template",
381+
Options: make([]string, len(templates)),
382382
}
383-
for i := range examples {
384-
promptEx.Options[i] = examples[i].Name
383+
for i := range templates {
384+
promptEx.Options[i] = templates[i].Name
385385
}
386386
if err := survey.AskOne(promptEx, &ansEx); err != nil {
387387
return st, err
388388
}
389-
if ansEx > len(examples)-1 {
390-
return st, fmt.Errorf("invalid answer %d for %d entries", ansEx, len(examples))
389+
if ansEx > len(templates)-1 {
390+
return st, fmt.Errorf("invalid answer %d for %d entries", ansEx, len(templates))
391391
}
392-
yamlPath := examples[ansEx].Location
392+
yamlPath := templates[ansEx].Location
393393
st.instName, err = guessarg.InstNameFromYAMLPath(yamlPath)
394394
if err != nil {
395395
return nil, err

docs/network.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ The network daemon is started automatically when the first instance referencing
141141
and will stop automatically once the last instance has stopped. Daemon logs will be stored in the
142142
`$LIMA_HOME/_networks` directory.
143143

144+
The IP address is automatically assigned by macOS's bootpd.
145+
If the IP address is not assigned, try the following commands:
146+
```bash
147+
/usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd
148+
/usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd
149+
```
150+
144151
#### Unmanaged
145152
For Lima >= 0.12:
146153
```yaml

examples/almalinux-8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This example requires Lima v0.8.3 or later.
1+
# This template requires Lima v0.8.3 or later.
22

33
# NOTE: EL8-based distros are known not to work on M1 chips: https://github.com/lima-vm/lima/issues/841
44
# EL9-based distros are known to work.

examples/almalinux-9.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This example requires Lima v0.11.1 or later.
1+
# This template requires Lima v0.11.1 or later.
22

33
images:
44
- location: "https://repo.almalinux.org/almalinux/9.2/cloud/x86_64/images/AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2"

examples/alpine.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This example requires Lima v0.7.0 or later.
1+
# This template requires Lima v0.7.0 or later.
22
# Using the Alpine 3.18 aarch64 image with vmType=vz requires macOS Ventura 13.3 or later.
33

44
images:

examples/apptainer-rootful.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example to use Apptainer instead of containerd & nerdctl
1+
# A template to use Apptainer instead of containerd & nerdctl
22
# $ limactl start ./apptainer-rootful.yaml
33
# $ limactl shell apptainer-rootful apptainer run -u -B $HOME:$HOME docker://alpine
44

examples/apptainer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example to use Apptainer instead of containerd & nerdctl
1+
# A template to use Apptainer instead of containerd & nerdctl
22
# $ limactl start ./apptainer.yaml
33
# $ limactl shell apptainer apptainer run -u -B $HOME:$HOME docker://alpine
44

examples/archlinux.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This example requires Lima v0.7.0 or later
1+
# This template requires Lima v0.7.0 or later
22
images:
33
# Try to use yyyyMMdd.REV image if available. Note that yyyyMMdd.REV will be removed after several months.
44
- location: "https://geo.mirror.pkgbuild.com/images/v20230715.165098/Arch-Linux-x86_64-cloudimg-20230715.165098.qcow2"

examples/buildkit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example to use BuildKit
1+
# A template to use BuildKit
22
# $ limactl start ./buildkit.yaml
33

44
# To run `buildkit` on the host (assumes buildctl is installed):

0 commit comments

Comments
 (0)