安装操作系统
qemu-system-aarch64 -machine virt-3.1 -m 8G -cpu cortex-a53
-drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash
-drive file=debian-10.6.0-arm64.img,id=hd0,if=none,format=qcow2
-drive file=debian-10.6.0-arm64-netinst.img,id=cd0,if=none,format=qcow2
-device virtio-scsi-pci -device scsi-hd,drive=hd0 -device scsi-cd,drive=cd0
启动操作系统
qemu-system-aarch64 -machine virt-3.1 -m 8G -cpu cortex-a53 -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -drive file=debian-10.6.0-arm64.img,id=hd0,if=none,format=qcow2 -device virtio-scsi-pci -device scsi-hd,drive=hd0
其中flash0.img对应bios
dd if=/dev/zero of=flash0.img bs=1M count=64 dd if=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd of=flash0.img conv=notrunc
flash1.img对应nvram
dd if=/dev/zero of=flash1.img bs=1M count=64