Bug 768870
| Summary: | Guest can not be started with <iotune> setting in xml | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | weizhang <weizhan> |
| Component: | libvirt | Assignee: | Martin Kletzander <mkletzan> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.3 | CC: | acathrow, ajia, dallan, dyuan, eblake, mzhan, rwu, zpeng |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-0.9.10-1.el6 | Doc Type: | Bug Fix |
| Doc Text: |
No Documentation needed
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-06-20 06:39:22 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
also can be reproduced on qemu-kvm-0.12.1.2-2.211.el6.x86_64 Use of <iotune> requires a feature added in the upcoming qemu 1.1. It is not available on RHEL, so failure to start a guest is expected unless someone opens a bug to backport bps= and friends to the qemu command line. As for XML being mis-formatted, yes, that should be fixed. Anything libvirt can do here to provide a better error message? Misformatting fixed in commit abd076938df2854d6c75be393a72e4c8936dfafc Author: Martin Kletzander <mkletzan> Date: Mon Jan 16 14:43:23 2012 +0100 Fixed dumxml of <iotune> parameters The output of dumpxml for <iotune> settings was misformatted, this patch just adds missing newlines. (In reply to comment #4) > Misformatting fixed in commit abd076938df2854d6c75be393a72e4c8936dfafc Actual upstream commit id is: e1eb93470edfdeaa06c4435f280a59ba0b9bc92e > Author: Martin Kletzander <mkletzan> > Date: Mon Jan 16 14:43:23 2012 +0100 > > Fixed dumxml of <iotune> parameters > > The output of dumpxml for <iotune> settings was misformatted, this patch just > adds missing newlines. (In reply to comment #3) > Anything libvirt can do here to provide a better error message? It's probably possible to parse 'qemu -h' output to see if -drive supports bps= and friends, and set a qemu_capabilities.h flag bit accordingly, so that we can indeed give a better error message up front if we know qemu won't support it. (In reply to comment #6) > It's probably possible to parse 'qemu -h' output to see if -drive supports bps= > and friends, and set a qemu_capabilities.h flag bit accordingly, so that we can > indeed give a better error message up front if we know qemu won't support it. That seems like something worth doing to me rather than just barfing out the qemu failure. Error reporting fixed in commit 5fafc63ec61f3c453cc0fed8b4a83709154bd1bf Author: Martin Kletzander <mkletzan> Date: Wed Jan 18 16:34:28 2012 +0100 Added capability checking for block <iotune> setting. There was missing capability for blkiotune and thus specifying these settings caused libvirt to run qemu with invalid parameters and then reporting qemu error instead of the standard libvirt one. Actual upstream commit id changed due to v2 of patch; moving this to POST.
commit 4c82f09ef08674be77f461600195d0a646105306
Author: Martin Kletzander <mkletzan>
Date: Wed Jan 18 17:42:33 2012 +0100
Added capability checking for block <iotune> setting.
There was missing capability for blkiotune and thus specifying these
settings caused libvirt to run qemu with invalid parameters and then
reporting qemu error instead of the standard libvirt one. The support
for blkiotune setting was added in upstream qemu repo under commit
0563e191516289c9d2f282a8c50f2eecef2fa773.
I can reproduce this issue with:
libvirt-0.9.9-1.el6.x86_64
qemu-kvm-0.12.1.2-2.213.el6.x86_64
verify with:
libvirt-0.9.10-1.el6.x86_64
qemu-kvm-0.12.1.2-2.229.el6.x86_64
step:
After adding <iotune> in guest, with dumpxml guest, can see that the iotune
section disordered like
...
<iotune>
<total_bytes_sec>10000000</total_bytes_sec>
<read_iops_sec>400000</read_iops_sec>
<write_iops_sec>100000</write_iops_sec>
</iotune>
...
then start the guest
# virsh start v1-clone
error: Failed to start domain v1-clone
error: unsupported configuration: block I/O throttling not supported with this QEMU binary
it's expected error message.
verification passed.
move to verified.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
No Documentation needed
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/RHSA-2012-0748.html |
Description of problem: Guest can not be started after setting iotune on guest disk ... <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/kvm-rhel6u2-x86_64-new.img'/> <target dev='hda' bus='ide'/> <iotune> <total_bytes_sec>10000000</total_bytes_sec> <read_iops_sec>400000</read_iops_sec> <write_iops_sec>100000</write_iops_sec> </iotune> <address type='drive' controller='0' bus='0' unit='0'/> </disk> ... After adding <iotune> in guest, with dumpxml guest, we can see that the iotune section disordered like ... <iotune> <total_bytes_sec>10000000</total_bytes_sec> <read_iops_sec>400000</read_iops_sec> <write_iops_sec>100000</write_iops_sec> </iotune> ... and with start guest, it will report error # virsh start kvm-rhel6u2-x86_64-new error: Failed to start domain kvm-rhel6u2-x86_64-new error: internal error Process exited while reading console log output: qemu-kvm: -drive file=/var/lib/libvirt/images/kvm-rhel6u2-x86_64-new.img,if=none,id=drive-ide0-0-0,format=raw,cache=none,bps=10000000,iops_rd=400000,iops_wr=100000: Invalid parameter 'bps' char device redirected to /dev/pts/1 qemu-kvm: -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1: Property 'ide-drive.drive' can't find value 'drive-ide0-0-0' Version-Release number of selected component (if applicable): kernel-2.6.32-223.el6.x86_64 qemu-kvm-0.12.1.2-2.210.el6.x86_64 libvirt-0.9.8-1.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. define a guest and adding <iotune> <total_bytes_sec>10000000</total_bytes_sec> <read_iops_sec>400000</read_iops_sec> <write_iops_sec>100000</write_iops_sec> </iotune> to disk section and save 2. virsh dumpxml guest 3. start guest Actual results: the guest xml disordered and can not start guest Expected results: the guest xml is formatted and can be started successfully. Additional info: