Skip to content

Commit 4f597db

Browse files
Docs: Discourage use of com.apple.vm.hypervisor on macOS >=10.15.7
Tests on multiple MacOS 10.15.7 and 11.3.1 machines showed when this entitlement is added gatekeeper prevents qemu to start (error "kill -9"). I'm not entirely sure but I believe there was a breaking change from 10.15.6 to 10.15.7 and Apple docs are incorrect. Signed-off-by: Christian Korneck <[email protected]>
1 parent f1dbc24 commit 4f597db

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,13 @@ For the usage of containerd and nerdctl (contaiNERD ctl), visit https://github.c
7070
- QEMU (`brew install qemu`)
7171

7272
- Run the following commands to enable `--accel=hvf`:
73+
7374
```bash
7475
cat >entitlements.xml <<EOF
7576
<?xml version="1.0" encoding="UTF-8"?>
7677
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
7778
<plist version="1.0">
7879
<dict>
79-
<!-- for OS X 10.10 - macOS 10.15 -->
80-
<key>com.apple.vm.hypervisor</key>
81-
<true/>
82-
<!-- for macOS 11 and later -->
8380
<key>com.apple.security.hypervisor</key>
8481
<true/>
8582
</dict>
@@ -89,6 +86,14 @@ EOF
8986
codesign -s - --entitlements entitlements.xml --force /usr/local/bin/qemu-system-x86_64
9087
```
9188

89+
Note: **Only** on macOS versions **before** 10.15.7 you might need to add this entitlement in addition:
90+
91+
```
92+
<key>com.apple.vm.hypervisor</key>
93+
<true/>
94+
```
95+
96+
9297
### Requirements (ARM Mac)
9398

9499
- coreutils (for `realpath` command) (`brew install coreutils`)
@@ -236,6 +241,10 @@ Host * !127.0.0.1
236241
User root
237242
```
238243

244+
### error "killed -9"
245+
- make sure qemu is codesigned, see [Getting started](#getting-started).
246+
- 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).
247+
239248
### "Hints for debugging other problems?"
240249
- Inspect logs:
241250
- `limactl --debug start`

0 commit comments

Comments
 (0)