Bug 733023 - info qtree can't show the drive name of usb-storage
Summary: info qtree can't show the drive name of usb-storage
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-24 13:30 UTC by Chao Yang
Modified: 2013-01-10 00:14 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-12 07:55:09 UTC


Attachments (Terms of Use)

Description Chao Yang 2011-08-24 13:30:55 UTC
Description of problem:
Boot a guest with usb-storage, and specify device drive in cli, say "-drive file=/home/image/usb-storage.qcow2,if=none,id=drive-usb-0-0,media=disk, ..."
, then info qtree in monitor

Version-Release number of selected component (if applicable):
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.184.el6.x86_64
# uname -r
2.6.32-191.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:
(qemu) info qtree 
  dev: usb-storage, id "usb-0-0"
            dev-prop: drive = <null>  <------------ note here
            dev-prop: logical_block_size = 512
            dev-prop: physical_block_size = 512
            dev-prop: min_io_size = 0
            dev-prop: opt_io_size = 0
            dev-prop: bootindex = -1
            dev-prop: discard_granularity = 0
            dev-prop: serial = <null>
            dev-prop: removable = on
            bus-prop: port = "1"
            addr 1.1, port 1, speed 480, name QEMU USB MSD, attached


Expected results:

Better output info like:
dev: virtio-blk-pci, id "virt0-0-0"
        dev-prop: class = 0x100
        dev-prop: drive = drive-virtio-0-0 <---------it outputs drive name here
        dev-prop: logical_block_size = 512
        dev-prop: physical_block_size = 512
        dev-prop: min_io_size = 0
        dev-prop: opt_io_size = 0
        dev-prop: bootindex = 1
        dev-prop: discard_granularity = 0
        dev-prop: ioeventfd = on
        dev-prop: vectors = 2
        dev-prop: indirect_desc = on
        dev-prop: event_idx = on
        dev-prop: scsi = on
        bus-prop: addr = 03.0
        bus-prop: romfile = <null>
        bus-prop: rombar = 1
        bus-prop: multifunction = off


Additional info:

CLI:
# /usr/libexec/qemu-kvm -M rhel6.2.0 -enable-kvm -m 4096 -smp 4,sockets=1,cores=4,threads=1 -name RHEL6.1_32 ... -boot order=dc,menu=on -drive file=/home/RHEL6.1-32-copy.qcow2,if=none,id=drive-virtio-0-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-virtio-0-0,id=virt0-0-0,bootindex=1 -usb -device usb-tablet,id=input1,bus=usb.0,port=1 -device usb-ehci,id=ehci -device usb-storage,drive=drive-usb-0-0,id=usb-0-0,removable=on,bus=ehci.0,port=1 -drive file=/home/image/usb-storage.qcow2,if=none,id=drive-usb-0-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native

Comment 2 Gerd Hoffmann 2011-09-12 07:55:09 UTC
It is there, but you have to check the scsi disk connected to the scsi bus liked to usb-storage.

          dev: usb-storage, id "ehci1-stick"
            dev-prop: drive = <null>
            dev-prop: logical_block_size = 512
            dev-prop: physical_block_size = 512
            dev-prop: min_io_size = 0
            dev-prop: opt_io_size = 0
            dev-prop: bootindex = -1
            dev-prop: discard_granularity = 0
            dev-prop: serial = "usb-12345"
            dev-prop: removable = on
            bus-prop: port = "1"
            addr 1.1, port 1, speed 480, name QEMU USB MSD, attached
            bus: ehci1-stick.0
              type SCSI
              dev: scsi-disk, id ""
                dev-prop: drive = usbstick           <== LOOK HERE
                dev-prop: logical_block_size = 512
                dev-prop: physical_block_size = 512
                dev-prop: min_io_size = 0
                dev-prop: opt_io_size = 0
                dev-prop: bootindex = -1
                dev-prop: discard_granularity = 0
                dev-prop: ver = "0.15.50"
                dev-prop: serial = <null>
                dev-prop: removable = on
                bus-prop: scsi-id = 0
                bus-prop: lun = 0


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