QEMU 支持的网卡类型
QEMU 提供了对一系列主流和兼容性良好的网卡的模型,通过 “-net nic,model=?” 参数可以查询到当前的 QEMU 工具实现了哪些网卡的模拟。
如下:
[root@localhost ~]# /usr/libexec/qemu-kvm --version
QEMU emulator version 2.12.0 (qemu-kvm-ev-2.12.0-44.1.el7_8.1)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
[root@localhost ~]#
[root@localhost ~]# /usr/libexec/qemu-kvm -net nic,model=?
qemu: Supported NIC models: e1000,e1000-82540em,e1000e,rtl8139,virtio-net-pci
[root@localhost ~]#
QEMU “-netdev” 参数
在 qemu 命令行中,关于配置 bridge 模式的网络环境参数如下:
-netdev tap,id=str[,fd=h][,fds=x:y:...:z][,ifname=name][,script=file][,downscript=dfile]
[,br=bridge][,helper=helper][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off]
[,vhostfd=h][,vhostfds=x:y:...:z][,vhostforce=on|off][,queues=n]
[,poll-us=n]
configure a host TAP network backend with ID 'str'
connected to a bridge (default=br0)
use network scripts 'file' (default=/etc/qemu-ifup)
to configure it and 'dfile' (default=/etc/qemu-ifdown)
to deconfigure it
use '[down]script=no' to disable script execution
use network helper 'helper' (default=/usr/libexec/qemu-bridge-helper) to
configure it
use 'fd=h' to connect to an already