![QEMU: -net 플래그를 -device 및 -netdev로 변환하는 방법](https://linux55.com/image/152044/QEMU%3A%20-net%20%ED%94%8C%EB%9E%98%EA%B7%B8%EB%A5%BC%20-device%20%EB%B0%8F%20-netdev%EB%A1%9C%20%EB%B3%80%ED%99%98%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95.png)
QEMU를 통해 Raspberry Pi를 에뮬레이션하려고 하는데 다음이 도움이 되었습니다.
qemu-system-arm \
-append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" \
-boot c \
-cpu arm1176 \
-drive "file=2019-04-08-raspbian-stretch-lite.img,if=scsi,cache=none,discard=ignore,format=raw" \
-kernel ./kernel-qemu-4.4.34-jessie \
-m 256M \
-machine type=versatilepb,accel=tcg \
-name packer-qemu \
-no-reboot \
-vnc 127.0.0.1:4 \
-net nic \
-net user,id=user.0,hostfwd=tcp::5555-:22
5904
VNC 와 SSH를 통해 접속할 수 있습니다 5555
(VNC를 통해 SSHd를 시작한 후). 즉, 네트워크가 올바르게 설정된 것 같습니다.
내가 알아낸 대로-net
이 옵션은 더 이상 사용되지 않습니다.-device
& 가 지원되므로 -netdev
위의 마지막 두 플래그를 "new QEMU"로 번역하고 싶습니다.
-device
새 플래그로 인해 대신 드라이버를 선택해야 하는 것 같습니다 -net
. 명시성이 마음에 들지만 기본/암시적 드라이버가 무엇인지 어떻게 알 수 있습니까?
다음 예의 포트 전달이 더 이상 작동하지 않는 것 같습니다(SSH를 통해 연결할 수 없습니다. 연결 시간이 초과되었습니다).
qemu-system-arm \
-append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" \
-boot c \
-cpu arm1176 \
-drive "file=2019-04-08-raspbian-stretch-lite.img,if=scsi,cache=none,discard=ignore,format=raw" \
-kernel ./kernel-qemu-4.4.34-jessie \
-m 256M \
-machine type=versatilepb,accel=tcg \
-name packer-qemu \
-no-reboot \
-vnc 127.0.0.1:4 \
-device e1000,netdev=user.0 \
-netdev user,id=user.0,hostfwd=tcp::5555-:22
내가 잘못된 드라이버를 사용하고 있는 걸까요?
QEMU 3.1.0
(Homebrew에서 설치)
(호스트) MacOS10.14.4