libvirt xml定义虚拟机方式,如何定义使用virtio网卡

    默认情况下xml中定义的网络设备是rtl8139,如果要提高性能可以选择使用virtio虚拟化网卡,xml中如何配置?

在xml中<interface type="xx">字段下 <model type="virtio"/> 这相当于前端驱动,是在VM中使用的,后端驱动可以用qemu <driver name="qemu"/> 或者vhost方式 <driver name="vhost"/> ,一般而言后端驱动用vhost方式性能更高。但是如果VM接收报文的速度比host发送报文的速度慢,VM会由于缓存慢丢包,反而性能下降,此场景后端驱动可以用qemu。


参考:http://smilejay.com/2012/11/kvm-virtio-network/

猜你喜欢

转载自blog.csdn.net/kklvsports/article/details/79572659