Bug 1525829
Summary: | can not boot up a scsi-block passthrough disk via -blockdev with error "cannot get SG_IO version number: Operation not supported. Is this a SCSI device?" | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | CongLi <coli> | |
Component: | qemu-kvm-rhev | Assignee: | Kevin Wolf <kwolf> | |
Status: | CLOSED ERRATA | QA Contact: | CongLi <coli> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 7.5 | CC: | chayang, famz, juzhang, knoel, kwolf, michen, pbonzini, qzhang, virt-maint, xuwei, yhong | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | qemu-kvm-rhev-2.12.0-8.el7 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1782712 (view as bug list) | Environment: | ||
Last Closed: | 2018-11-01 11:04:00 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: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1782712 |
Description
CongLi
2017-12-14 06:50:07 UTC
"-drive" with file.driver=file also doesn't work: -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x3 \ -drive format=raw,if=none,id=drive2,file.driver=file,file.filename=/dev/sdc \ -device scsi-block,drive=drive2 This is unintuitive behavior, and it's not documented anywhere, so we may want to add some workaround or improve the error message. However, it is intended. You are specifying "file.driver=file", and files are not SCSI devices. :) It works with "file.driver=host_device", and that's what libvirt should specify. Kevin, any ideas? (In reply to Paolo Bonzini from comment #2) > "-drive" with file.driver=file also doesn't work: > > -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x3 \ > -drive > format=raw,if=none,id=drive2,file.driver=file,file.filename=/dev/sdc \ > -device scsi-block,drive=drive2 > > This is unintuitive behavior, and it's not documented anywhere, so we may > want to add some workaround or improve the error message. However, it is > intended. You are specifying "file.driver=file", and files are not SCSI > devices. :) It works with "file.driver=host_device", and that's what > libvirt should specify. Thanks Paolo for the explanation. And it would be great that list all driver options in qemu-options.hx. :) (In reply to Paolo Bonzini from comment #2) > Kevin, any ideas? Perhaps the file driver can print a warning if you don't give it a regular file? We could possibly even make it an error after a few releases. Fix included in qemu-kvm-rhev-2.12.0-8.el7 Tested with qemu-kvm-rhev-2.12.0-8.el7.x86_64: Test pass with iotest 226. 1. driver: file 1.1 directory (/root/test is a directory) qemu-kvm: -blockdev driver=raw,file.driver=file,node-name=drive2,file.filename=/root/test: Could not open '/root/test': Is a directory 1.2 host device (/dev/sdc is a host device) qemu-kvm: -blockdev driver=raw,file.driver=file,node-name=drive2,file.filename=/dev/sdc: warning: Opening a block device as a file using the 'file' driver is deprecated 1.3 file --> successfully 2. driver: host_device 2.1 directory (/root/test is a directory) qemu-kvm: -blockdev driver=raw,file.driver=host_device,node-name=drive2,file.filename=/root/test: Could not open '/root/test': Is a directory 2.2 file qemu-kvm: -blockdev driver=qcow2,file.driver=host_device,node-name=drive2,file.filename=/root/test.qcow2: 'host_device' driver expects either a character or block device 2.3 host device --> successfully 3. driver: host_cdrom qemu-kvm: -blockdev driver=raw,file.driver=host_cdrom,node-name=drive2,file.filename=/root/test: Driver 'host_cdrom' is not whitelisted Hi Kevin, QE met 'Driver 'host_cdrom' is not whitelisted' error, I would like to confirm if QEMU downstream support it or it's a missing. Thanks. host_cdrom is disabled on purpose in RHEL7. See also BZ 760885 and BZ 1077302. (In reply to Fam Zheng from comment #9) > host_cdrom is disabled on purpose in RHEL7. See also BZ 760885 and BZ > 1077302. Thanks Fam. Based on comment 8 and comment 9, set this bug to 'VERIFIED'. 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. https://access.redhat.com/errata/RHBA-2018:3443 |