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

おすすめ記事