Skip to content

Instantly share code, notes, and snippets.

@akhenakh
Last active October 16, 2023 17:48
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 akhenakh/814de6b8f7218d68ddaba322ecaa383d to your computer and use it in GitHub Desktop.
Save akhenakh/814de6b8f7218d68ddaba322ecaa383d to your computer and use it in GitHub Desktop.
FreeBSD on M1/M2 with ssh access to localhost
qemu-system-aarch64 -m 4096M -cpu host -M virt,accel=hvf \
-bios edk2-aarch64-code.fd -serial mon:stdio -nographic \
-drive if=virtio,file=FreeBSD.qcow2,id=hd0 \
-device virtio-net,netdev=vmnic \
-netdev user,id=vmnic,hostfwd=tcp:127.0.0.1:9022-:22
# on the guest service sshd onestart or enable sshd in rc.conf
# bios can be found here wget https://lxr.missinglinkelectronics.com/qemu/+save\=pc-bios/edk2-aarch64-code.fd.bz2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment