Bug 734994
Summary: | qdev: weird syntax and rules (with usb device) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Chao Yang <chayang> |
Component: | qemu-kvm | Assignee: | Markus Armbruster <armbru> |
Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.2 | CC: | ajia, areis, juzhang, michen, mkenneth, qzhou, shuang, tburke, virt-maint |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-12-08 08:20:54 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
Chao Yang
2011-09-01 06:34:17 UTC
Here is a update: I found it should be 'if=none' that caused this issue. In step 4, if adding 'if=none', guest can launch from S4 successfully. But it is raising another question here: In step 2, hot add a usb storage, please see the following output with/without 'if=none': (qemu) __com.redhat_drive_add file=/home/image/usb-storage.qcow2,id=drive-usb-0-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop (qemu) __com.redhat_drive_add file=/home/image/usb-storage.qcow2,id=drive-usb-0-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,if=none ^^^^^^^^ Invalid parameter 'if' And in step 4, adding 'if=none', guest booted up. without 'if=none', failed to boot up. Q: Why there is a different rule? Updating summary; this is not related to S4 at all. Markus, can you look into what's going on here? Step 4 adds an IDE disk, then tries to reuse its backend for an usb-storage device. Fails as expected. The command line version of "__com.redhat_drive_add OPTS" is "-drive if=none,OPTS". The reporter mistakenly tried just "-drive OPTS", which is short for "-drive if=ide,OPTS". Why is this so? -drive configures both backend and frontend. if=ide gets you an IDE disk frontend, if=floppy a floppy drive frontend, if=virtio a virtio-blk frontend, and so forth. Default is if=ide. Except for if=none, which configures *only* a backend. You configure the frontend separately, with -device. Separate configuration is desirable for cleanliness and flexibility. Unfortunately, it was shoehorned into -drive using the special if=none. That was probably a design mistake, but it's ABI now, and can't be changed. __com.redhat_drive_add is *not* like -drive, it's like -drive if=none: (qemu) help __com.redhat_drive_add __com.redhat_drive_add id=name,[file=file][,format=f][,media=d]... -- Create a drive similar to -device if=none. Note: if=none is *implied* with __com.redhat_drive_add, you can't have it in the argument. We hope to have a cleaner and less confusing way to create block backends in time for RHEL-7. Closing NOTABUG. |