Skip to content

Instantly share code, notes, and snippets.

@Ne0nd0g
Created March 3, 2023 12:49
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 Ne0nd0g/bf05a498842979490b6c90f9213327f4 to your computer and use it in GitHub Desktop.
Save Ne0nd0g/bf05a498842979490b6c90f9213327f4 to your computer and use it in GitHub Desktop.
Qemu ARM64 VM Setup
  1. Install Qemu: apt install qemu-system-arm qemu-efi-aarch64 qemu-utils
  2. Create a 15GB hard drive for the virtual machine: qemu-img create -f qcow2 openbsd.qcow2 15G
  3. Download the OpenBSD installation image install72.img from https://ftp.openbsd.org/pub/OpenBSD/7.2/arm64/
  4. Start the VM with the install image and the bios image; create a telnet listener on 127.0.0.1:4444 to connect to the VM
     qemu-system-aarch64 -M virt -m 2048 -cpu cortex-a57 -serial tcp:127.0.0.1:4444,server,telnet,wait -nographic -drive file=openbsd.qcow2,format=qcow2,index=0,media=disk -drive file=install72.img,format=raw,index=1 -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd
    
    • The /usr/share/qemu-efi-aarch64/QEMU_EFI.fd comes from installing the QEMU packages
  5. Connect to the VM with telnet 127.0.0.1 4444 and install OpenBSD
    • When asked for the location of sets use http and cdn.openbsd.org
  6. Run the VM after install, excluding the install image: qemu-system-aarch64 -M virt -m 2048 -cpu cortex-a57 -serial tcp:127.0.0.1:4444,server,telnet,wait -nographic -drive file=openbsd.qcow2,format=qcow2,index=0,media=disk -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment