RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 965016 - The libvirt hasn't correctly check I/O throttling capabilities for the QEMU binary
Summary: The libvirt hasn't correctly check I/O throttling capabilities for the QEMU b...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-20 10:19 UTC by Alex Jia
Modified: 2014-06-18 00:50 UTC (History)
8 users (show)

Fixed In Version: libvirt-1.0.6-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 10:40:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alex Jia 2013-05-20 10:19:17 UTC
Description of problem:
Whether the QEMU binary supports block I/O throttling is irrelevant with VM running or not, it only has relationship with QEMU and libvirt version, if a VM isn't running, libvirt shouldn't allow to change block I/O throttling for the VM.

In addition, with '--config' option for the shutoff guest, I still got the same error message "block I/O throttling not supported with this QEMU binary" with previous. 

Version-Release number of selected component (if applicable):
# rpm -q libvirt qemu-kvm kernel
libvirt-1.0.5-2.el7.x86_64
qemu-kvm-1.4.0-4.el7.x86_64
kernel-3.7.0-0.36.el7.x86_64


How reproducible:
always

Steps to Reproduce:
1. # virsh domstate foo
shut off

2. # virsh blkdeviotune foo vda --write-bytes-sec 1000


Actual results:
# virsh blkdeviotune foo vda --write-bytes-sec 1000
error: Unable to change block I/O throttle
error: unsupported configuration: block I/O throttling not supported with this QEMU binary


Expected results:
error: Unable to change block I/O throttle
error: Requested operation is not valid: domain is not running

and with '--config' or '--current' option, users should successfully
set block I/O throttling for the shutoff status guest.


Additional info:

# virsh blkdeviotune foo vda --write-bytes-sec 1000
error: Unable to change block I/O throttle
error: unsupported configuration: block I/O throttling not supported with this QEMU binary

However, the QEMU owns block I/O throttling capabilities:

# /usr/libexec/qemu-kvm -drive bps_wr=1000 ?
qemu-kvm: -drive bps_wr=1000: drive with bus=0, unit=0 (index=0) exists

Comment 2 Alex Jia 2013-05-21 02:37:44 UTC
(In reply to Alex Jia from comment #0)
> Description of problem:
> Whether the QEMU binary supports block I/O throttling is irrelevant with VM
> running or not, it only has relationship with QEMU and libvirt version, if a

s/QEMU and libvirt version/QEMU version/

> VM isn't running, libvirt shouldn't allow to change block I/O throttling for
> the VM.

Of course, it may have effect on guest XML configuration with '--config' or '--current' option.

In addition, if a VM is running then we can successfully change block I/O throttling parameters.


# virsh domstate foo 
running

# virsh blkdeviotune foo vda --write_iops_sec 100000

# virsh blkdeviotune foo vda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 100000

Comment 3 Martin Kletzander 2013-05-23 12:45:21 UTC
Patch proposed upstream:

http://www.redhat.com/archives/libvir-list/2013-May/msg01696.html

Comment 4 Martin Kletzander 2013-05-24 13:10:37 UTC
Moving to POST with commit v1.0.5-371-g5af3ce8:

commit 5af3ce827767707097affc5e001eab8cbabc28a7
Author: Martin Kletzander <mkletzan>
Date:   Thu May 23 13:07:34 2013 +0200

    Fix blkdeviotune for shutoff domain

Comment 5 yanbing du 2013-06-04 10:23:31 UTC
Hi Martin,
I'm trying to verify this bug with libvirt-1.0.6-1.el7.x86_64. And find when setread_bytes_sec for a shut off guest, virsh still succeed(like using --config flag), i'm not sure if this's expect result, could you help to confirm it, thanks!
 
# virsh domstate test2
shut off

# virsh blkdeviotune test2 vda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

# virsh blkdeviotune test2 vda --read-bytes-sec 1000

# virsh blkdeviotune test2 vda 
total_bytes_sec: 0
read_bytes_sec : 1000
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

Comment 6 Martin Kletzander 2013-06-07 11:32:45 UTC
(In reply to yanbing du from comment #5)
yes, because by default, if the domain is not running, the flag '--config' is implied.  Same with '--live' and running domain.

Comment 7 yanbing du 2013-06-08 02:36:11 UTC
(In reply to Martin Kletzander from comment #6)
> (In reply to yanbing du from comment #5)
> yes, because by default, if the domain is not running, the flag '--config'
> is implied.  Same with '--live' and running domain.

Thanks for you confirm, then this bug can move to VERIFIED.

Comment 8 Ludek Smid 2014-06-13 10:40:29 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.