Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. There are two supported methods of booting %%FreeBSD%%/arm64 under QEMU: using U-Boot, or using an UEFI firmware image. To use U-Boot, install u-boot-qemu-arm64 package, and then run: <code> % qemu-system-aarch64 -m 4096M -cpu cortex-a57 -M virt \ -bios /usr/local/share/u-boot/u-boot-qemu-arm64/u-boot.bin \ -serial telnet::4444,server -nographic \ -drive if=none,file=VMDISK,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -device virtio-net-device,netdev=net0 \ -netdev user,id=net0 </code> Be sure to replace "VMDISK" with the path to the virtual machine image. Prepopulated images are available under https://download.freebsd.org/releases/VM-IMAGES/ or https://download.freebsd.org/snapshots/VM-IMAGES/ Qemu comes with a UEFI firmware image. To boot the VM image run: <code> % qemu-system-aarch64 -m 4096M -cpu cortex-a57 -M virt \ -bios edk2-aarch64-code.fd -serial telnet::4444,server -nographic \ -drive if=none,file=VMDISK,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -device virtio-net-device,netdev=net0 \ -netdev user,id=net0 </code> Be sure to replace "VMDISK" with the path to the virtual machine image. NOTE: if you are booting a 12.x image, use ''%%-device virtio-blk,drive=hd0%%'' and ''%%-device virtio-net,netdev=net0%%'' instead, e.g.: <code> % qemu-system-aarch64 -m 4096M -cpu cortex-a57 -M virt \ -bios edk2-aarch64-code.fd -serial telnet::4444,server -nographic \ -drive if=none,file=VMDISK,id=hd0 \ -device virtio-blk,drive=hd0 \ -device virtio-net,netdev=net0 \ -netdev user,id=net0 </code> To connect to the virtual console run ''%%telnet localhost 4444%%''. To boot on %%ThunderX%% under KVM: <code> % qemu-system-aarch64 -m 4096M -cpu host,pmu=off -M virt,gic-version=3 \ -bios QEMU_EFI.fd -serial telnet::4444,server -nographic \ -drive if=none,file=VMDISK,id=hd0 \ -device virtio-blk-device,drive=hd0 \ --enable-kvm </code> To boot on Apple Silicon hardware (M1, M2) and macOS with HVF acceleration: <code> % qemu-system-aarch64 -m 4096M -cpu host -M virt,accel=hvf \ -bios edk2-aarch64-code.fd -serial telnet::4444,server -nographic \ -drive if=virtio,file=VMDISK,id=hd0 \ -device virtio-net,netdev=net0 -netdev user,id=net0 </code> ---- {{tag>Virtualization}} arm64/qemu.txt Last modified: 2023/01/05 20:29by LiWenHsu