How to control VM traffic on KVM
10,278
The libvirt domain specification includes this functionality already. You can specify separate settings for incoming and outgoing traffic. The example given in the libvirt documentation is:
<devices>
<interface type='network'>
<source network='default'/>
<target dev='vnet0'/>
<bandwidth>
<inbound average='1000' peak='5000' floor='200' burst='1024'/>
<outbound average='128' peak='256' burst='256'/>
</bandwidth>
</interface>
<devices>
You can read more upstream at http://libvirt.org/formatdomain.html#elementQoS
Related videos on Youtube
Author by
Mike G
Updated on September 18, 2022Comments
-
Mike G over 1 year
I have multiple VMs running on a KVM hypervisor. One of the VMs is consuming most of the available bandwidth, making it difficult for other VMs to use. How can I control the bandwidth usage for each VM. I would like to guarantee bandwidth for each individual VM. I would like to know if this is usually done on a hypervisor level, if so how? or on a virtual switch level provided that I have one.