我的主机操作系统是Windows 7( IP: 192.168.0.25 ),上面有Qemu。我在Qemu上启动了TinyCore Linux。
当我在ifconfig中执行命令TinyCore时,我希望看到地址,例如192.168.0.40。
当我通过命令qemu-system-i386.exe -cdrom C:\Users\Tom\Desktop\Core-11.1.iso启动qemu并执行命令ifconfig时,我在TinyCore上看到了两个接口: eth0 ( 10.0.2.15 )和lo ( 127.0.0.1 )。
当我通过命令qemu-system-i386.exe -cdrom C:\Users\Tom\Desktop\Core-11.1.iso -netdev user,id=xyz,net=192.168.0.0/24,dhcpstart=192.168.0.40启动qemu并执行命令ifconfig时,我只看到TinyCore上的一个接口: lo ( 127.0.0.1 )。
有什么帮助吗?
发布于 2021-03-25 21:11:07
使用device时仍然需要提供-netdev (即。-netdev ...和-device是对-nic ...的扩展语法。请参阅https://qemu.readthedocs.io/en/latest/system/invocation.html#hxtool-5
因此,您需要这样的东西:
qemu-system-x86_64 -hda linux.img -boot n -device e1000,netdev=n1 \
-netdev user,id=n1,tftp=/path/to/tftp/files,bootfile=/pxelinux.0还有..。如果您要升级到Windows 10,您可以使用加速,使您的QEMU不要这么慢。(只是个提示。)
https://unix.stackexchange.com/questions/590076
复制相似问题