Skip to content

Instantly share code, notes, and snippets.

@stsquad
Created July 4, 2025 10:53
Show Gist options
  • Save stsquad/753f9651678ac188cec73afbded18bae to your computer and use it in GitHub Desktop.
Save stsquad/753f9651678ac188cec73afbded18bae to your computer and use it in GitHub Desktop.
Booting up an Amazon image under TCG in QEMU
./qemu-system-aarch64 -serial mon:stdio \
-machine type=virt,virtualization=on,pflash0=rom,pflash1=efivars,gic-version=max \
-cpu neoverse-n1 -smp 4 -accel tcg \
-device virtio-net-pci,netdev=unet \
-device virtio-scsi-pci \
-device scsi-hd,drive=amazon \
-netdev user,id=unet,hostfwd=tcp::2222-:22 \
-blockdev driver=qcow2,node-name=amazon,file.driver=file,file.filename=/home/alex/images/al2023-kvm-2023.7.20250623.1-kernel-6.1-arm64.xfs.gpt.qcow2 \
-blockdev node-name=rom,driver=file,filename=(pwd)/pc-bios/edk2-aarch64-code.fd,read-only=true \
-blockdev node-name=efivars,driver=file,filename=$HOME/images/qemu-arm64-efivars \
-m 8192 \
-object memory-backend-memfd,id=mem,size=8G,share=on \
-display none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment