Skip to content

Instantly share code, notes, and snippets.

@infinitewarp
Last active August 21, 2023 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infinitewarp/15c561b601a3930dda294c4348dca7d4 to your computer and use it in GitHub Desktop.
Save infinitewarp/15c561b601a3930dda294c4348dca7d4 to your computer and use it in GitHub Desktop.
fix podman error `qemu-system-x86_64: Error: HV_ERROR` on macOS

fix podman qemu-system-x86_64: Error: HV_ERROR on macOS

after installing podman machine normally...

copy this:

<?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>

run this:

pbpaste > /tmp/entitlements.xml
cd /opt/podman/qemu/bin
sudo codesign -s - --entitlements /tmp/entitlements.xml --force ./qemu-system-x86_64

then start podman machine normally:

podman machine init  # first time only if needed
podman machine start

see also:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment