How to replace `qemu-system -redir` command argument?

后端 未结 1 1425
抹茶落季
抹茶落季 2021-02-06 04:48

I have a script starting qemu with these options:

qemu-system-x86_64 [...] -net nic,model=rtl8139 -net user,hostfwd=tcp::55

相关标签:
1条回答
  • 2021-02-06 04:58

    After @PeterMaydell comments and a few more readings I understood how the options -device and -netdev relates in qemu.

    The correct translation of the older -redir options used in my script are:

    -netdev user,id=ethernet.0,hostfwd=tcp::5555-:1522,hostfwd=tcp::9999-:9,hostfwd=tcp::17010-:17010,hostfwd=tcp::17013-:17013
    -device rtl8139,netdev=ethernet.0
    

    In a -netdev user you specify all host->guest port forwards for a single virtual ethernet of the guest. The id option identify such virtual network interface (ethernet.0 in this case).

    The -device argument can then define the hardware to simulate for that interface (related with netdev=ethernet.0) so that the guest see that hardware in place and open the forwarded ports.

    0 讨论(0)
提交回复
热议问题