1. start vm with user type interface set with Qos:
<interface type='user'>
<mac address='52:54:00:3e:ec:14'/>
<bandwidth>
<inbound average='1000' peak='5000' burst='5120'/>
<outbound average='128' peak='256' burst='256'/>
</bandwidth>
<model type='rtl8139'/>
<address type='pci' domain='0x0000' bus='0x07' slot='0x01' function='0x0'/>
</interface>
# cat /var/log/libvirt/libvirtd.log | grep bandwidth
2021-03-26 10:47:11.452+0000: 20185: warning : qemuBuildInterfaceCommandLine:8223 : setting bandwidth on interfaces of type 'user' is not implemented yet
2. start with hostdev type interface with Qos setting:
<interface type='hostdev' managed='yes'>
<mac address='52:54:00:07:27:b0'/>
<source>
<address type='pci' domain='0x0000' bus='0x82' slot='0x10' function='0x6'/>
</source>
<bandwidth>
<inbound average='1000' peak='5000' burst='5120'/>
<outbound average='128' peak='256' burst='256'/>
</bandwidth>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>
# virsh start rh
error: Failed to start domain 'rh'
error: unsupported configuration: interface 52:54:00:07:27:b0 - bandwidth settings are not supported for hostdev interfaces
-------
Best Regards,
Yalan Zhang
IRC: yalzhang