I've tested the patchset successful with virsh command for both kvm and lxc
vm.
root@debian:~/images# virsh version
Compiled against library: libvirt 1.2.0
Using library: libvirt 1.2.0
Using API: QEMU 1.2.0
Running hypervisor: QEMU 1.7.0
root@debian:~/images# virsh blkiotune kvm
weight :
500
device_weight :
device_read_iops:
device_write_iops:
device_read_bps:
device_write_bps:
root@debian:~/images# virsh blkiotune kvm
--device-weights /dev/vda,250 --device-read-iops /dev/vda,1234567
--device-write-iops /dev/vda,2345678 --device-read-bps /dev/vda,123456789
--device-write-bps /dev/vda,234567890 --config
--live
root@debian:~/images# virsh blkiotune kvm
weight :
500
device_weight : /dev/vda,250
device_read_iops: /dev/vda,1234567
device_write_iops: /dev/vda,2345678
device_read_bps: /dev/vda,123456789
device_write_bps: /dev/vda,234567890
root@debian:~/images# cat
/sys/fs/cgroup/blkio/machine/kvm.libvirt-qemu/blkio.weight_device
254:0
250
root@debian:~/images# cat
/sys/fs/cgroup/blkio/machine/kvm.libvirt-qemu/blkio.throttle.read_bps_device
254:0 123456789
root@debian:~/images# cat
/sys/fs/cgroup/blkio/machine/kvm.libvirt-qemu/blkio.throttle.read_iops_device
254:0 1234567
root@debian:~/images# cat
/sys/fs/cgroup/blkio/machine/kvm.libvirt-qemu/blkio.throttle.write_bps_device
254:0 234567890
root@debian:~/images# cat
/sys/fs/cgroup/blkio/machine/kvm.libvirt-qemu/blkio.throttle.write_iops_device
254:0 2345678
---------------------------- lxc ----------------------------------
root@debian:~/images# vir version
Compiled against library: libvirt 1.2.0
Using library: libvirt 1.2.0
Using API: LXC 1.2.0
Running hypervisor: LXC 3.10.11
root@debian:~/images# vir blkiotune lxc
--device-weights /dev/vda,250 --device-read-iops /dev/vda,1234567
--device-write-iops /dev/vda,2345678 --device-read-bps /dev/vda,123456789
--device-write-bps /dev/vda,234567890 --config --live
root@debian:~/images# vir blkiotune lxc
weight :
500
device_weight : /dev/vda,250
device_read_iops: /dev/vda,1234567
device_write_iops: /dev/vda,2345678
device_read_bps: /dev/vda,123456789
device_write_bps: /dev/vda,234567890
root@debian:~/images# vir blkiotune lxc
--device-weights /dev/vda,270 --device-read-iops /dev/vda,111111111
--device-write-iops /dev/vda,22222222 --device-read-bps /dev/vda,333336789
--device-write-bps /dev/vda,5555555 --config
--live
root@debian:~/images# vir blkiotune lxc
weight :
500
device_weight : /dev/vda,270
device_read_iops: /dev/vda,111111111
device_write_iops: /dev/vda,22222222
device_read_bps: /dev/vda,333336789
device_write_bps: /dev/vda,5555555
root@debian:~/images# cat
/sys/fs/cgroup/blkio/machine/lxc.libvirt-lxc/blkio.weight_device
254:0 270
root@debian:~/images# cat
/sys/fs/cgroup/blkio/machine/lxc.libvirt-lxc/blkio.throttle.read_iops_device
254:0 111111111
root@debian:~/images# cat
/sys/fs/cgroup/blkio/machine/lxc.libvirt-lxc/blkio.throttle.write_iops_device
254:0 22222222
root@debian:~/images# cat
/sys/fs/cgroup/blkio/machine/lxc.libvirt-lxc/blkio.throttle.read_bps_device
254:0 333336789
root@debian:~/images# cat
/sys/fs/cgroup/blkio/machine/lxc.libvirt-lxc/blkio.throttle.write_bps_device
254:0 5555555