b is bit, B is Byte 1 Mbps = 0.125 MB/s = 1024 kb/s = 128 KB/s 150 Mbps = 18.75 MB/s = 153600 kb/s = 19200 KB/s
爲什麽需要特別提及網速,因爲KVM的XML使用的是KB/s,測速軟件一般是 MB/s。
1 2 3 4
The units for average and peak attributes are kilobytes per second
23.17. Devices Red Hat Enterprise Linux 7 | Red Hat Customer Portal https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-Manipulating_the_domain_xml-Devices#sect-Network_interfaces-Quality_of_service:~:text=The%20units%20for%20average%20and%20peak%20attributes%20are%20kilobytes%20per%20second
0x01 設置
修改流程如下:
1 2 3 4 5 6 7 8 9 10 11 12 13
[root@rhel7 ~]# virsh list Id Name State ---------------------------------------------------- 4 rhel7.6 running [root@rhel7 ~]# virsh edit rhel7.6 .... <bandwidth> <inbound average='19200' peak='20000'/> <outbound average='19200' peak='20000'/> </bandwidth> :wq [root@rhel7 ~]# virsh stop rhel7.6 [root@rhel7 ~]# virsh start rhel7.6