QEMU를 사용하여 RPi 에뮬레이션

QEMU를 사용하여 RPi 에뮬레이션

QEMU를 사용하여 Buster Lite Raspbian을 실행하는 RPI를 시뮬레이션하려고 합니다. 내가 사용하는 명령은 다음과 같습니다

qemu-system-arm -kernel ~/qemu_vms/kernel-qemu-4.19.50-buster -cpu arm1176 -m 256 -M versatilepb -serial stdio -append "root=/dev/sda2 rootfstype=ext4 rw" -hda ~/qemu_vms/2020-02-13-raspbian-buster-lite.img,format=raw -redir tcp:5022::22 -no-reboot

하지만 오류가 발생합니다.

    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.
qemu-system-arm: -no-reboot: drive with bus=0, unit=0 (index=0) exists

해결책은 format=raw명령 어딘가에 삽입하는 것이라는 것을 알고 있지만 어디에 있습니까?

반품내가 사용하는 튜토리얼약간 오래된 것 같으니 오래된 명령을 사용하고 있다면 알려주시기 바랍니다.

답변1

이 방법이 도움이 될 것 같습니다(제공 man qemu-system-arm: )

qemu-system-arm -kernel ~/qemu_vms/kernel-qemu-4.19.50-buster -cpu arm1176 -m 256 -M versatilepb -serial stdio -append "root=/dev/sda2 rootfstype=ext4 rw" -drive file="$HOME"/qemu_vms/2020-02-13-raspbian-buster-lite.img,format=raw -net user,hostfwd=tcp::5022-:22 -no-reboot

-drive file="$HOME"/qemu_vms/2020-02-13-raspbian-buster-lite.img,format=raw기본적으로 디스크 정의와 포트 리디렉션을 업데이트 하여-net user,hostfwd=tcp::5022-:22

관련 정보