я пытаюсь эмулировать Ubuntu/arm64 внутри эмулятора QEMU. Поэтому я слежу за вики Ubuntu (https://wiki.ubuntu.com/ARM64/QEMU), но не могу ее запустить. Сначала я установил qemu:
$ sudo apt-get install qemu-system-arm qemu-efi
затем я создал два тома pflash для UEFI:
$ dd if=/dev/zero of=flash0.img bs=1M count=64
$ dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc
$ dd if=/dev/zero of=flash1.img bs=1M count=64
и наконец:
$ sudo qemu-system-aarch64 -m 1024 -cpu cortex-a57 -M virt -nographic -pflash flash0.img -pflash flash1.img -drive if=none,file=xenial-server-cloudimg-arm64-uefi1.img,id=hd0 -device virtio-blk-device,drive=hd0 -netdev type=tap,id=net0 -device virtio-net-device,netdev=net0,mac=$randmac
Выполнение этой команды дало мне два предупреждения:
WARNING: Image format was not specified for 'flash0.img' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
WARNING: Image format was not specified for 'flash1.img' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
Поэтому, чтобы обойти предупреждения, я указал формат диска как формат =raw:
sudo qemu-system-aarch64 -m 1024 -cpu cortex-a57 -M virt -nographic -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -drive if=none,file=xenial-server-cloudimg-arm64-uefi1.img,id=hd0 -device virtio-blk-device,drive=hd0 -device virtio-net-device,netdev=net0,mac=$randmac -netdev type=tap,id=net0
но у меня есть:
W: /etc/qemu-ifup: no bridge for guest interface found
qemu-system-aarch64: -device virtio-net-device,netdev=net0,mac=: Property 'virtio-net-device.mac' doesn't take value ''
Что мне делать?
Примечание: Мне не обязательно загружать Ubuntu/arm64, любой другой дистрибутив Linux (например, Debian) в порядке.
Кто-нибудь может мне помочь? Спасибо.