CentOS 7下的KVM网卡配置为千兆网卡

在KVM下可以生成两种型号的网卡,RTL8139和E1000,其实应该是底层生成不同芯片的网卡,而不是附带宿主机网卡是什么型号就是什么型号的,其中默认为100兆网卡,即RTL8319的螃蟹卡,另一种是E1000的千兆网卡。

设置步骤:

1、修改KVM

virsh edit KVM名称

2、找到RTL8139,并替换成E1000

<interface type=\'network\'>
  ...<model type=\'e1000\' />
</interface>

或者是这个:

<interface type=\'bridge\'>
      <model type=\'virtio\'/><!--去掉-->
      <model type=\'e1000\'/><!--替换为这个-->
</interface>

注意:是替换而不是增加。

3、重启网卡服务后查看型号信息

service network restart
ethtool 网卡名称

参考:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/virtualization/sect-virtualization-troubleshooting-kvm_networking_performance

https://www.linux-kvm.org/page/Networking