Skip to content

Instantly share code, notes, and snippets.

@dmilith
Last active June 30, 2022 15:21
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 dmilith/fff1ed74d9ed60c579bdc499d3b7cb86 to your computer and use it in GitHub Desktop.
Save dmilith/fff1ed74d9ed60c579bdc499d3b7cb86 to your computer and use it in GitHub Desktop.
Accelerated Qemu VM on M1 mac
# install special build of Qemu
brew tap uenob/qemu-hvf
brew install --head qemu-hvf
# run it, here 12G RAM, A72 arm64 case:
/opt/homebrew/opt/qemu-hvf/bin/qemu-system-aarch64 \
-M virt,accel=hvf,highmem=off \
-m 12288 \
-smp cores=4 \
-cpu cortex-a72 \
-drive file=edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on \
-drive file=freebsd13.qcow2,format=qcow2 \
-nographic \
-device virtio-net-device,netdev=en0 \
-netdev user,id=en0,hostfwd=tcp::4445-:22 \
-serial tcp::4444,server,telnet,nowait \
-pidfile freebsd13.pid
# then on another terminal tab:
# for SSH:
ssh root@localhost -p 4445
# for telnet:
telnet localhost 4444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment