Bug 601044 - Could not add USB device to guest
Summary: Could not add USB device to guest
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: Rhel5KvmTier2
TreeView+ depends on / blocked
 
Reported: 2010-06-07 05:16 UTC by Amos Kong
Modified: 2015-05-25 00:05 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-10 09:48:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Amos Kong 2010-06-07 05:16:09 UTC
Description of problem:

Try to add a usb device to a rhel5 guest, but it failed when using rhel5 host,
and qemu outputs "Warning: could not add USB device disk:format=qcow2:/tmp/usbdevice.qcow2"
It's fine when using rhel6 host.

Version-Release number of selected component (if applicable):
host kernel: 2.6.18-201.el5
guest kernel: 2.6.18-201.el5

# rpm -qa |grep kvm
etherboot-zroms-kvm-5.4.4-12.el5
kvm-83-181.el5
etherboot-zroms-kvm-5.4.4-10.el5
etherboot-zroms-kvm-5.4.4-13.el5
kvm-debuginfo-83-181.el5
kmod-kvm-83-181.el5
kvm-tools-83-181.el5
kvm-qemu-img-83-181.el5

How reproducible:
100%

Steps to Reproduce:
1. create a image
host)# qemu-img create -f qcow2 /tmp/usbdevice.qcow2 1G
2. boot up guest with "-usbdevice disk:format=qcow2:/tmp/usbdevice.qcow2"
3. check usb infomation by monitor
qemu) info usb
4. login guest and check the disk infomation
guest) fdisk -l
  
Actual results:
could not add 'disk' to guest

Expected results:
usb device can be added to guest

Additional info:
command line:
#  /home/devel/autotest/client/tests/kvm/qemu -name vm1 -monitor tcp:0:6001,server,nowait -drive file=/home/devel/autotest/client/tests/kvm/images/RHEL-Server-5.5-64.qcow2,if=ide,cache=none,boot=on -net nic,vlan=0,model=e1000,macaddr=02:8F:F3:8D:18:14 -net tap,vlan=0,ifname=e1000_0_6001,script=/home/devel/autotest/client/tests/kvm/scripts/qemu-ifup,downscript=no -m 512 -smp 1 -soundhw ac97 -usbdevice disk:format=qcow2:/tmp/usbdevice.qcow2 -redir tcp:5000::22 -vnc :0 -usbdevice tablet -rtc-td-hack -no-hpet -cpu qemu64,+sse2 -no-kvm-pit-reinjection -serial unix:/tmp/serial-20100602-095130-xL2n,server,nowait
interface_audio_init: 
line_in_init: 
line_out_init: freq 44100 channels 2 format AUD_FMT_S16 HOST_ENDIANNESS
Warning: could not add USB device disk:format=qcow2:/tmp/usbdevice.qcow2

Comment 2 Kevin Wolf 2010-06-10 07:54:03 UTC
Amos, can you please double-check if you had a typo somewhere, maybe a wrong filename or something? It seems to work fine for me, both with the current 5.6 tree and with the 5.4 version.

Comment 3 Amos Kong 2010-06-10 09:10:29 UTC
I checked again on different machines,

The bug can be reproduced with rhel5(host kernel 2.6.18-201, kvm-83-181)
But when do the same test on rhel6 host(2.6.32-33, qemu-kvm-0.12.1.2-2.69), usb device can be identified.

Comment 4 Kevin Wolf 2010-06-10 09:48:08 UTC
Turns out usb-msd is simply not supported on RHEL 5 and therefore compiled out. Closing as NOTABUG.


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