Red Hat Bugzilla – Bug 1131316
fail to specify wwn for virtual IDE CD-ROM
Last modified: 2015-03-05 03:11:11 EST
host info: # uname -r && rpm -q qemu-kvm && rpm -q seabios 3.10.0-128.el7.x86_64 qemu-kvm-1.5.3-67.el7.x86_64 seabios-1.7.2.2-12.el7.x86_64 qemu-kvm command line: e.g:...-drive file=/home/RHEL-7.0-20140507.0-Server-x86_64.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device ide-drive,bus=ide.0,unit=0,wwn=0x5000c50015ea71bb,drive=drive-virtio-disk,id=virtio-disk,bootindex=1...-drive file=/home/RHEL-7.0-20140507.0-Server-x86_64-dvd1.iso,if=none,id=hd,format=raw,media=cdrom,readonly=on,cache=none,werror=stop,rerror=stop -device ide-drive,bus=ide.0,unit=1,wwn=0x5000c50015ea71ad,drive=hd,id=cdrom Verify it in guest: # ls -l /dev/disk/by-id/wwn* lrwxrwxrwx. 1 root root 9 Aug 19 06:25 /dev/disk/by-id/wwn-0x5000c50015ea71bb -> ../../sda lrwxrwxrwx. 1 root root 10 Aug 19 06:25 /dev/disk/by-id/wwn-0x5000c50015ea71bb-part1 -> ../../sda1 lrwxrwxrwx. 1 root root 10 Aug 19 06:25 /dev/disk/by-id/wwn-0x5000c50015ea71bb-part2 -> ../../sda2 # ls -lh /dev/cdrom lrwxrwxrwx. 1 root root 3 Aug 19 06:25 /dev/cdrom -> sr0 # sg_inq -p 0x83 /dev/sr0 VPD INQUIRY: Device Identification page invalid VPD response; probably a STANDARD INQUIRY response # ls -l /dev/disk/by-id/ total 0 lrwxrwxrwx. 1 root root 9 Aug 19 2014 ata-QEMU_DVD-ROM_QM00002 -> ../../sr0 lrwxrwxrwx. 1 root root 9 Aug 19 2014 ata-QEMU_HARDDISK_QM00001 -> ../../sda lrwxrwxrwx. 1 root root 10 Aug 19 2014 ata-QEMU_HARDDISK_QM00001-part1 -> ../../sda1 lrwxrwxrwx. 1 root root 10 Aug 19 2014 ata-QEMU_HARDDISK_QM00001-part2 -> ../../sda2 lrwxrwxrwx. 1 root root 10 Aug 19 2014 dm-name-rhel-root -> ../../dm-0 lrwxrwxrwx. 1 root root 10 Aug 19 2014 dm-name-rhel-swap -> ../../dm-1 lrwxrwxrwx. 1 root root 10 Aug 19 2014 dm-uuid-LVM-XrLEijBNtSve73C9FGU14VcVVf81KNwQc6Xk6wecEvHzpPIygeuYmVNcMa0R3Ytf -> ../../dm-0 lrwxrwxrwx. 1 root root 10 Aug 19 2014 dm-uuid-LVM-XrLEijBNtSve73C9FGU14VcVVf81KNwQFIO34VQMvslthVbf5f5C9mdgALlzPIvc -> ../../dm-1 lrwxrwxrwx. 1 root root 10 Aug 19 2014 lvm-pv-uuid-MNWsMz-4hTl-xyBI-ArkY-ykAx-WSMQ-ciZrDw -> ../../sda2 lrwxrwxrwx. 1 root root 9 Aug 19 2014 wwn-0x5000c50015ea71bb -> ../../sda lrwxrwxrwx. 1 root root 10 Aug 19 2014 wwn-0x5000c50015ea71bb-part1 -> ../../sda1 lrwxrwxrwx. 1 root root 10 Aug 19 2014 wwn-0x5000c50015ea71bb-part2 -> ../../sda2 # sg_inq -p 0x83 /dev/sda VPD INQUIRY: Device Identification page Designation descriptor number 1, descriptor length: 24 designator_type: vendor specific [0x0], code_set: ASCII associated with the addressed logical unit vendor specific: QM00001 Designation descriptor number 2, descriptor length: 72 designator_type: T10 vendor identification, code_set: ASCII associated with the addressed logical unit vendor id: ATA vendor specific: QEMU HARDDISK QM00001 Designation descriptor number 3, descriptor length: 12 designator_type: NAA, code_set: Binary associated with the addressed logical unit NAA 5, IEEE Company_id: 0xc50 Vendor Specific Identifier: 0x15ea71bb [0x5000c50015ea71bb]
I tried tracing QEMU, it seems that IDENTIFY command is never called by guest. Maybe something is different from sr.ko and sd.ko.
(In reply to Fam Zheng from comment #3) > I tried tracing QEMU, it seems that IDENTIFY command is never called by > guest. Maybe something is different from sr.ko and sd.ko. I missed the WIN_PIDENTIFY command. This patch works for me: https://lists.gnu.org/archive/html/qemu-devel/2014-08/msg03295.html
Fixed in qemu-kvm-1.5.3-74.el7
Reproduce this bz: Version of components: qemu-kvm-1.5.3-68.el7.x86_64 Steps as comment 0, 1.boot guest with setting <wwn> to ide-dirve for virtual IDE CD-ROM/disk. e.g: # /usr/libexec/qemu-kvm -m 2G -M pc -smp 2 -monitor stdio -spice port=5931,disable-ticketing -qmp tcp::8888,server,nowait -boot menu=on -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device ide-drive,bus=ide.0,unit=0,wwn=0x5000c50015ea71bb,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -netdev tap,id=tap0,script=/etc/qemu-ifup,vhost=on -device virtio-net-pci,netdev=tap0,id=net0,mac=24:be:05:14:11:11,mq=on -drive file=/home/kernel-3.10.0-184.el7.iso,if=none,id=hd,format=raw,media=cdrom,readonly=on,cache=none,werror=stop,rerror=stop -device ide-drive,bus=ide.0,unit=1,wwn=0x5000c50015ea71ad,drive=hd,id=cdrom 2.check the device identification. # ls -l /dev/disk/by-id/wwn* # sg_inq -p 0x83 /dev/srX (or sg_vpd) Actual results: after step 2, it fail to specify wwn for virtual IDE CD-ROM. # ls /dev/disk/by-id/wwn* -l lrwxrwxrwx. 1 root root 9 Oct 13 05:16 /dev/disk/by-id/wwn-0x5000c50015ea71bb -> ../../sda lrwxrwxrwx. 1 root root 10 Oct 13 05:16 /dev/disk/by-id/wwn-0x5000c50015ea71bb-part1 -> ../../sda1 lrwxrwxrwx. 1 root root 10 Oct 13 05:16 /dev/disk/by-id/wwn-0x5000c50015ea71bb-part2 -> ../../sda2 # ls -lh /dev/cdrom lrwxrwxrwx. 1 root root 3 Oct 13 05:16 /dev/cdrom -> sr0 # sg_inq -p 0x83 /dev/sr0 VPD INQUIRY: Device Identification page invalid VPD response; probably a STANDARD INQUIRY response As above show, this bz has been reproduced. =============== Verify this bz: Version of components: qemu-kvm-1.5.3-75.el7.x86_64 Steps as comment 0, 1.boot guest with setting <wwn> to ide-dirve for virtual IDE CD-ROM/disk. e.g: # /usr/libexec/qemu-kvm -m 2G -M pc -smp 2 -monitor stdio -spice port=5931,disable-ticketing -qmp tcp::8888,server,nowait -boot menu=on -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device ide-drive,bus=ide.0,unit=0,wwn=0x5000c50015ea71bb,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -netdev tap,id=tap0,script=/etc/qemu-ifup,vhost=on -device virtio-net-pci,netdev=tap0,id=net0,mac=24:be:05:14:11:11,mq=on -drive file=/home/kernel-3.10.0-184.el7.iso,if=none,id=hd,format=raw,media=cdrom,readonly=on,cache=none,werror=stop,rerror=stop -device ide-drive,bus=ide.0,unit=1,wwn=0x5000c50015ea71ad,drive=hd,id=cdrom 2.check the device identification. # ls -l /dev/disk/by-id/wwn* # sg_inq -p 0x83 /dev/srX (or sg_vpd) Actual results: # ls /dev/disk/by-id/wwn* -l lrwxrwxrwx. 1 root root 9 Oct 13 05:24 /dev/disk/by-id/wwn-0x5000c50015ea71ad -> ../../sr0 lrwxrwxrwx. 1 root root 9 Oct 13 05:24 /dev/disk/by-id/wwn-0x5000c50015ea71bb -> ../../sda lrwxrwxrwx. 1 root root 10 Oct 13 05:24 /dev/disk/by-id/wwn-0x5000c50015ea71bb-part1 -> ../../sda1 lrwxrwxrwx. 1 root root 10 Oct 13 05:24 /dev/disk/by-id/wwn-0x5000c50015ea71bb-part2 -> ../../sda2 Based on above testing, this bz has been verified. -------------------- Verify this bz on qemu-kvm-rhev. Version of components: qemu-kvm-rhev-2.1.2-3.el7.x86_64 Verification on qemu-kvm-rhev is blocked by bz1150820.
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://rhn.redhat.com/errata/RHSA-2015-0349.html