RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 894211 - fail to works with the serial property for virtio scsi devices(scsi-hd,scsi-disk)
Summary: fail to works with the serial property for virtio scsi devices(scsi-hd,scsi-d...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-11 03:02 UTC by Sibiao Luo
Modified: 2013-01-11 13:48 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 894210
Environment:
Last Closed: 2013-01-11 13:48:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Sibiao Luo 2013-01-11 03:04:40 UTC
host info:
kernel-3.6.0-0.29.el7.x86_64
qemu-kvm-1.3.0-3.el7.x86_64
seabios-1.7.2-0.2.gita810e4e7.el7.x86_64
guest info:
kernel-3.6.0-0.29.el7.x86_64

Comment 3 Sibiao Luo 2013-01-11 08:49:26 UTC
(In reply to comment #2)
>
> SCSI disks do not have /sys/class/block/<dev>/serial attributes.  I believe
> this is standard Linux behavior - at least I can't find the serial attribute
> code in drivers/scsi/.
> 
> Please check:
> $ ls /dev/disk/by-id
> 
> You will see the disk serial is listed.
> 
> Alternatively, you can use:
> 
> $ scsi_id --whitelist /dev/<dev>
> 0QEMU    QEMU HARDDISK    <serial>

ok, thanks for your reminds. i mistake between /sys/class/block/<dev>/serial and /dev/disk/by-id. 
the scsi-block has no such serial property, so i think the qemu-kvm should also disable the serial property for the virtio scsi devices(scsi-hd,scsi-disk), otherwise it will confuse users.

Comment 4 Paolo Bonzini 2013-01-11 13:48:29 UTC
> should disable the serial property for the virtio scsi devices(scsi-hd,scsi-
> disk), otherwise it will confuse users.

It works with upstream:

$ x86-64-softmmu/qemu-system-x86_64 --enable-kvm \
  -drive file=$HOME/test.img,id=hd,if=none -device virtio-scsi-pci \
  -device scsi-disk,serial=foo,drive=hd -m 256
...
# scsi_id --whitelisted /dev/sda
0QEMU    QEMU HARDDISK   foo

$ x86-64-softmmu/qemu-system-x86_64 --enable-kvm \
  -drive file=$HOME/test.img,id=hd,if=none,serial=foo -device virtio-scsi-pci \
  -device scsi-disk,drive=hd -m 256
...
# scsi_id --whitelisted /dev/sda
0QEMU    QEMU HARDDISK   foo


Same with scsi-hd.

scsi-block has no serial property because it uses the physical drive's serial number.


Note You need to log in before you can comment on or make changes to this bug.