Skip to content

Commit b2667d5

Browse files
committed
README.md: update
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 7a7f31b commit b2667d5

File tree

2 files changed

+62
-49
lines changed

2 files changed

+62
-49
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
Terminal 1:
4040
\`\`\`console
4141
[macOS]$ limactl start
42+
...
43+
INFO[0029] READY. Run `lima` to open the shell.
4244
\`\`\`
4345
4446
Terminal 2:

README.md

Lines changed: 60 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ It may work on NetBSD and Windows hosts as well.
1717

1818
✅ ARM on Intel
1919

20-
✅ ARM on ARM (untested)
20+
✅ ARM on ARM
2121

22-
✅ Intel on ARM (untested)
22+
✅ Intel on ARM
2323

2424
✅ Ubuntu guest
2525

@@ -77,49 +77,12 @@ For the usage of containerd and nerdctl (contaiNERD ctl), visit https://github.c
7777
### Requirements (Intel Mac)
7878
- QEMU v6.0.0 or later (`brew install qemu`)
7979

80-
81-
<details>
82-
<summary>
83-
Signing the binary (not needed for recent version of QEMU and macOS, in most cases)
84-
</summary>
85-
86-
<p>
87-
88-
If you have installed QEMU v6.0.0 or later on macOS 11, your binary should have been already automatically signed to enable HVF acceleration.
89-
90-
However, if you see `HV_ERROR`, you might need to sign the binary manually.
91-
92-
```bash
93-
cat >entitlements.xml <<EOF
94-
<?xml version="1.0" encoding="UTF-8"?>
95-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
96-
<plist version="1.0">
97-
<dict>
98-
<key>com.apple.security.hypervisor</key>
99-
<true/>
100-
</dict>
101-
</plist>
102-
EOF
103-
104-
codesign -s - --entitlements entitlements.xml --force /usr/local/bin/qemu-system-x86_64
105-
```
106-
107-
Note: **Only** on macOS versions **before** 10.15.7 you might need to add this entitlement in addition:
108-
109-
```
110-
<key>com.apple.vm.hypervisor</key>
111-
<true/>
112-
```
113-
114-
</p>
115-
</details>
116-
11780
### Requirements (ARM Mac)
11881

119-
- QEMU with `--accel=hvf` support, see https://gist.github.com/citruz/9896cd6fb63288ac95f81716756cb9aa
82+
- QEMU with `--accel=hvf` support, see https://gist.github.com/nrjdalal/e70249bb5d2e9d844cc203fd11f74c55
12083

12184
> **NOTE**
122-
> Lima is not tested on ARM Mac.
85+
> Lima is not regularly tested on ARM Mac.
12386
12487
### Install
12588

@@ -129,6 +92,22 @@ and extract it under `/usr/local` (or somewhere else).
12992
To install from the source, run `make && make install`.
13093

13194
### Usage
95+
96+
Terminal 1:
97+
```console
98+
[macOS]$ limactl start
99+
...
100+
INFO[0029] READY. Run `lima` to open the shell.
101+
```
102+
103+
Terminal 2:
104+
```console
105+
[macOS]$ lima uname
106+
Linux
107+
```
108+
109+
Detailed usage:
110+
132111
- Run `limactl start <INSTANCE>` to start the Linux instance.
133112
The default instance name is "default".
134113
Lima automatically opens an editor (`vi`) for reviewing and modifying the configuration.
@@ -183,13 +162,13 @@ The current default spec:
183162

184163
### Help wanted
185164
:pray:
186-
- Test on ARM Mac
165+
- [Test on ARM Mac](https://github.com/AkihiroSuda/lima/issues/42)
187166
- Performance optimization
188-
- Homebrew
167+
- [Homebrew](https://github.com/AkihiroSuda/lima/issues/37)
189168
- More guest distros
190169
- Windows hosts
191170
- GUI with system tray icon (Qt or Electron, for portability)
192-
- VirtFS to replace the current reverse sshfs (work has to be done on QEMU repo)
171+
- [VirtFS to replace the current reverse sshfs (work has to be done on QEMU repo)](https://github.com/NixOS/nixpkgs/pull/122420)
193172
- [vsock](https://github.com/apple/darwin-xnu/blob/xnu-7195.81.3/bsd/man/man4/vsock.4) to replace SSH (work has to be done on QEMU repo)
194173

195174
## FAQs & Troubleshooting
@@ -201,7 +180,7 @@ You have to use `limactl shell bash` (or `lima bash`) to open a shell.
201180
Alternatively, you may also directly ssh into the guest: `ssh -p 60022 -o NoHostAuthenticationForLocalhost=yes 127.0.0.1`.
202181

203182
#### "Does Lima work on ARM Mac?"
204-
Yes, it should work, but not tested on ARM.
183+
Yes, it should work, but not regularly tested on ARM.
205184

206185
#### "Can I run non-Ubuntu guests?"
207186
Fedora is also known to work, see [`./examples/fedora.yaml`](./examples/fedora.yaml).
@@ -229,17 +208,49 @@ the predecessor or Lima, provides similar features for remote Linux machines.
229208
e.g., run `sshocker -v /Users/foo:/home/foo/mnt -p 8080:80 <USER>@<HOST>` to expose `/Users/foo` to the remote machine as `/home/foo/mnt`,
230209
and forward `localhost:8080` to the port 80 of the remote machine.
231210

211+
#### "Advantages compared to Docker for Mac?"
212+
Lima is free software (Apache License 2.0), while Docker for Mac is not.
213+
Their [EULA](https://www.docker.com/legal/docker-software-end-user-license-agreement) even prohibits disclosure of benchmarking result.
214+
215+
On the other hand, [Moby](https://github.com/moby/moby), aka Docker for Linux, is free software, but Moby/Docker lacks several novel features of containerd, such as:
216+
- [On-demand image pulling (aka lazy-pulling, eStargz)](https://github.com/containerd/nerdctl/blob/master/docs/stargz.md)
217+
- [Running an encrypted container](https://github.com/containerd/nerdctl/blob/master/docs/ocicrypt.md)
218+
- Importing and exporting [local OCI archives](https://github.com/opencontainers/image-spec/blob/master/image-layout.md)
219+
232220
### QEMU
233221
#### "QEMU crashes with `HV_ERROR`"
234-
You have to add `com.apple.security.hypervisor` entitlement to `qemu-system-x86_64` binary.
235-
See [Getting started](#getting-started).
222+
If you have installed QEMU v6.0.0 or later on macOS 11 via homebrew, your QEMU binary should have been already automatically signed to enable HVF acceleration.
223+
224+
However, if you see `HV_ERROR`, you might need to sign the binary manually.
225+
226+
```bash
227+
cat >entitlements.xml <<EOF
228+
<?xml version="1.0" encoding="UTF-8"?>
229+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
230+
<plist version="1.0">
231+
<dict>
232+
<key>com.apple.security.hypervisor</key>
233+
<true/>
234+
</dict>
235+
</plist>
236+
EOF
237+
238+
codesign -s - --entitlements entitlements.xml --force /usr/local/bin/qemu-system-x86_64
239+
```
240+
241+
Note: **Only** on macOS versions **before** 10.15.7 you might need to add this entitlement in addition:
242+
243+
```
244+
<key>com.apple.vm.hypervisor</key>
245+
<true/>
246+
```
236247

237248
#### "QEMU is slow"
238-
- Make sure that HVF is enabled with `com.apple.security.hypervisor` entitlement. See [Getting started](#getting-started).
249+
- Make sure that HVF is enabled with `com.apple.security.hypervisor` entitlement. See ["QEMU crashes with `HV_ERROR`"](#qemu-crashes-with-hv_error).
239250
- Emulating non-native machines (ARM-on-Intel, Intel-on-ARM) is slow by design.
240251

241252
#### error "killed -9"
242-
- make sure qemu is codesigned, see [Getting started](#getting-started).
253+
- make sure qemu is codesigned, See ["QEMU crashes with `HV_ERROR`"](#qemu-crashes-with-hv_error).
243254
- if you are on macOS 10.15.7 or 11.0 or later make sure the entitlement `com.apple.vm.hypervisor` is **not** added. It only works on older macOS versions. You can clear the codesigning with `codesign --remove-signature /usr/local/bin/qemu-system-x86_64` and [start over](#getting-started).
244255

245256

0 commit comments

Comments
 (0)