Bug 737879
Summary: | Qemu-kvm fails to exit when given invalid "-drive" option name or option value | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Shaolong Hu <shu> |
Component: | qemu-kvm | Assignee: | Markus Armbruster <armbru> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 6.2 | CC: | acathrow, areis, juzhang, michen, minovotn, mkenneth, tburke, virt-maint |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-0.12.1.2-2.214.el6 | Doc Type: | Bug Fix |
Doc Text: |
Cause:
Invalid -drive arguments are handled incorrectly.
Consequence:
Some errors are reported, others aren't. Then we continue with a misconfigured drive.
Fix:
Correct the validation of -drive arguments.
Results:
Invalid -drive arguments are diagnosed, and qemu-kvm refuses to run.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-20 11:34:19 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: |
Description
Shaolong Hu
2011-09-13 10:23:27 UTC
I reproduced the reported results. Test case 2 part "bus=123" works as expected. The error message could use polish, though. For all other test cases, upstream exits unsuccessfully, as it should. Additionally, upstream reports for test case 6: qemu: Device needs media, but drive is empty qemu: Initialization of device ide-hd failed Need at least upstream commit e2982c3a. Also need upstream commit 98f28ad7 for test case 6. Test case 7: $ qemu-kvm -drive if=ide Actual results: VNC server running on `127.0.0.1:5900' block I/O error in device 'ide0-hd0': No medium found (123) [doesn't terminate] Expected results: upstream-qemu: Device needs media, but drive is empty upstream-qemu: Initialization of device ide-hd failed [Exit 1 ] Test case 8: $ qemu-kvm -drive if=virtio Actual results: VNC server running on `127.0.0.1:5900' [doesn't terminate] Expected results: upstream-qemu: -drive if=virtio: Device needs media, but drive is empty upstream-qemu: -drive if=virtio: Device 'virtio-blk' could not be initialized [Exit 1 ] Verified on qemu-kvm-0.12.1.2-2.222.el6: 1.# /usr/libexec/qemu-kvm -drive 123 qemu-kvm: -drive 123: Invalid parameter '123' 2.# /usr/libexec/qemu-kvm -drive bus=sfdsd qemu-kvm: -drive bus=sfdsd: Parameter 'bus' expects a number 3.# /usr/libexec/qemu-kvm -drive index=dfs qemu-kvm: -drive index=dfs: Parameter 'index' expects a number 4.# /usr/libexec/qemu-kvm -drive cyls=sdf qemu-kvm: -drive cyls=sdf: Parameter 'cyls' expects a number # /usr/libexec/qemu-kvm -drive heads=sdfsd qemu-kvm: -drive heads=sdfsd: Parameter 'heads' expects a number # /usr/libexec/qemu-kvm -drive secs=sdfsd qemu-kvm: -drive secs=sdfsd: Parameter 'secs' expects a number 5.# /usr/libexec/qemu-kvm -drive snapshot=123 qemu-kvm: -drive snapshot=123: Parameter 'snapshot' expects 'on' or 'off' 6.# /usr/libexec/qemu-kvm -drive serial=dsfs qemu-kvm: Device needs media, but drive is empty qemu-kvm: Initialization of device ide-drive failed 7./usr/libexec/qemu-kvm -drive if=ide qemu-kvm: Device needs media, but drive is empty qemu-kvm: Initialization of device ide-drive failed 8./usr/libexec/qemu-kvm -drive if=virtio qemu-kvm: -drive if=virtio: Device needs media, but drive is empty qemu-kvm: -drive if=virtio: Device 'virtio-blk-pci' could not be initialized Based on above results, 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: Cause: Run qemu-kvm with invalid -drive option name or option value. Consequence: Qemu-kvm fails to run. Fix: [NEEDINFO: Markus, could you please add info? Thanks!] Results: Qemu-kvm starts smoothly. Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,11 +1,11 @@ Cause: -Run qemu-kvm with invalid -drive option name or option value. +Invalid -drive arguments are handled incorrectly. Consequence: -Qemu-kvm fails to run. +Some errors are reported, others aren't. Then we continue with a misconfigured drive. Fix: -[NEEDINFO: Markus, could you please add info? Thanks!] +Correct the validation of -drive arguments. Results: -Qemu-kvm starts smoothly.+Invalid -drive arguments are diagnosed, and qemu-kvm refuses to run. 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-2012-0746.html |