| Summary: | Cant add a ide device with index option when virtio-blk/usb-storage device exists | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Qingtang Zhou <qzhou> |
| Component: | qemu-kvm | Assignee: | Markus Armbruster <armbru> |
| Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.3 | CC: | acathrow, bsarathy, dyasny, juzhang, michen, mkenneth, tburke, virt-maint |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-04-26 08:05:50 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Qingtang Zhou
2012-04-18 12:53:46 UTC
Reproduced: $ rhel6-qemu-kvm \ -nodefaults \ -drive file='foo.qcow2',index=0,if=none,id=drive-virtio-disk1 \ -device virtio-blk-pci,drive=drive-virtio-disk1,id=virtio-disk1 \ -drive file='bar.qcow2',if=none,id=drive-virtio-disk2,format=qcow2 \ -device virtio-blk-pci,drive=drive-virtio-disk2,id=virtio-disk2 \ -drive file='baz.iso',index=1,if=none,id=drive-ide0-0-0,media=cdrom,format=raw \ -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ -enable-kvm \ -monitor stdio rhel6-qemu-kvm: -drive file=baz.iso,index=1,if=none,id=drive-ide0-0-0,media=cdrom,format=raw: drive with bus=0, unit=1 (index=1) exists TL;DR: Works as designed, closing NOTABUG. If you think this is a bug, feel free to reopen; just make sure to explain why you think it's a bug. Detailed explanation of how this works: -drive defines a drive with a unique (if, index). You can also specify the index as bus and unit, for convenience. If you don't specify an index (directly or via bus, unit), the next unused index is assigned automatically. Your test case defines three drives: 1. index=0,if=none,id=drive-virtio-disk1 2. if=none,id=drive-virtio-disk2 3. index=1,if=none,id=drive-ide0-0-0 The second one doesn't specify index, so the next unused index is assigned automatically, which happens to be index=1. The third one then asks for index=1, and fails, because that's already in use. With if=none, the index is actually meaningless. Nevertheless, it needs to be unique. I recommend not to use option index with if=none. If you're looking for a way to control the IDE CD-ROM device address, use ide-drive qdev properties bus and unit. Actually, you do that already. |