我有 4 个内核 + 6G RAM 笔记本,并在那里运行 qemu+aarm64。
sudo apt-get install qemu-system-arm
sudo apt-get install qemu-efi-aarch64
sudo apt-get install qemu-utils
dd if=/dev/zero of=flash1.img bs=1M count=64
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
qemu-img create ubuntu-image.img 20G
然后下载https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-11.1.0-arm64-netinst.iso并运行
qemu-system-aarch64 -nographic -machine virt,gic-version=max -m 3G -cpu max -smp 4 \
-netdev user,id=vnet,hostfwd=:127.0.0.1:0-:22 -device virtio-net-pci,netdev=vnet \
-drive file=ubuntu-image.img,if=none,id=drive0,cache=writeback -device virtio-blk,drive=drive0,bootindex=0 \
-drive file=debian-11.1.0-arm64-netinst.iso,if=none,id=drive1,cache=writeback -device virtio-blk,drive=drive1,bootindex=1 \
-drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash
模拟器运行极其慢,为什么?