Hide Forgot
This bug has been copied from bug #1014198 and has been proposed to be backported to 6.4 z-stream (EUS).
To POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2013-October/msg00275.html
Tested with the latest 6.4.z build libvirt-0.10.2-18.el6_4.15.x86_64, it is verified. Steps: Scenario1: update the Qos to the running guest 1. prepare one running guest, and check the interface section of the guest. # virsh list --all Id Name State ---------------------------------------------------- 1 a running # virsh dumpxml a ...... <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> ...... 2. prepare one xml like the following one: #cat Qos.xml <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='1000' peak='5000' burst='1024'/> <outbound average='128' peak='256' burst='256'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 3. update the device, make sure the Qos can be updated in the flying guest. # virsh update-device a Qos.xml Device updated successfully [root@xuzhangtest1 xuzhang]# virsh dumpxml a <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='1000' peak='5000' burst='1024'/> <outbound average='128' peak='256' burst='256'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> Scenario2: only update the inbound or outbound to the running guest. #cat Qos1.xml <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='1000' peak='5000' burst='1024'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> #cat Qos2.xml <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <outbound average='128' peak='256' burst='256'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 2. update to the guest with Qos settings. # virsh update-device a Qos1.xml Device updated successfully [root@xuzhangtest1 xuzhang]# virsh dumpxml a|grep interface -A 10 <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='128' peak='256' burst='256'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> # virsh update-device a Qos2.xml Device updated successfully [root@xuzhangtest1 xuzhang]# virsh dumpxml a|grep interface -A 10 <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <outbound average='128' peak='256' burst='256'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> Scenario3: increase and decrease the value of the Qos settings. 1. prepare the following xml. #cat Qos3.xml <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='199' peak='299' burst='299'/> <outbound average='199' peak='299' burst='299'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> #cat Qos4.xml <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='155' peak='255' burst='255'/> <outbound average='155' peak='255' burst='255'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 2. update the value of the Qos # virsh update-device a Qos3.xml Device updated successfully [root@xuzhangtest1 xuzhang]# virsh dumpxml a <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='199' peak='299' burst='299'/> <outbound average='199' peak='299' burst='299'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> # virsh update-device a Qos4.xml Device updated successfully [root@xuzhangtest1 xuzhang]# virsh dumpxml a <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='155' peak='255' burst='255'/> <outbound average='155' peak='255' burst='255'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> Scenario4: negative testing 1. prepare the following xml #cat Qos5.xml <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='-1' peak='299' burst='299'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> #cat Qos6.xml <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='110000000000000000000' peak='299' burst='299'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> #cat Qos7.xml <interface type='network'> <mac address='52:54:00:12:ca:a9'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound peak='255' burst='255'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 2. set the inbound average value as "-1" and very large. # virsh update-device a Qos5.xml error: Failed to update device from Qos.xml error: internal error cannot set bandwidth limits on vnet0 # virsh update-device a Qos6.xml error: Failed to update device from Qos.xml error: unsupported configuration: could not convert 110000000000000000000 3. didn't add the average value in the updated xml. # virsh update-device a Qos7.xml error: Failed to update device from Qos.xml error: Missing mandatory average attribute
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1517.html