-
Notifications
You must be signed in to change notification settings - Fork 699
Description
Note
Colima users may still see
QEMU binary /Users/<USER>/.colima/_wrapper/<HASH>/bin/qemu-system-x86_64 is not properly signed
with the latest version of QEMU:The warning is negligible if the VM is actually working.
The warning should not be printed if you use Lima directly without Colima:
limactl start template://docker
Update (Aug 27, 2023): The issue is solved again in 8.1.0_1
(Homebrew/brew#15903 , Homebrew/homebrew-core#140596 Homebrew/homebrew-core#140643). Run brew reinstall -f --force-bottle qemu
to install the updated v8.1.0 bottle.
Update (Aug 23, 2023): This seems to be broken again in v8.1.0 😞 (Homebrew/homebrew-core#140244) . See the Workarounds
below.
Update (Aug 14, 2023): The issue is now solved in Homebrew/homebrew-core#139492 .
Run brew reinstall -f --force-bottle qemu
to install the updated v8.0.4 bottle.
Homebrew bottle of QEMU v8.0.4 (Intel) is was broken due to a signing issue: Homebrew/homebrew-core#139409
$ limactl start
...
[hostagent] Driver stopped due to error: "signal: abort trap"
...
[hostagent] QEMU has already exited
...
$ qemu-system-x86_64 -accel hvf
qemu-system-x86_64: -accel hvf: Unknown Error
Abort trap: 6
$ codesign --verify /usr/local/Cellar/qemu/8.0.4/bin/qemu-system-x86_64
/usr/local/Cellar/qemu/8.0.4/bin/qemu-system-x86_64: invalid signature (code or signature have been modified)
In architecture: x86_64
(The error message can be also [hostagent] Driver stopped due to error: "exit status 255"
)
Workarounds
Option 1: Downgrade QEMU to v8.0.3
brew uninstall qemu
curl -OSL https://raw.githubusercontent.com/Homebrew/homebrew-core/dc0669eca9479e9eeb495397ba3a7480aaa45c2e/Formula/qemu.rb
brew install ./qemu.rb
Option 2: Install QEMU from the source
brew uninstall qemu
brew install --build-from-source qemu
Option 3: Sign the QEMU binary locally
Lima v0.17.2 shows a prompt to suggest applying this workaround.
cat >entitlements.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.hypervisor</key>
<true/>
</dict>
</plist>
EOF
codesign --sign - --entitlements entitlements.xml --force /usr/local/bin/qemu-system-$(uname -m | sed -e s/arm64/aarch64/)
Thanks to @z0sen for reporting this in abiosoft/colima#777