Bug 601044 - Could not add USB device to guest
Could not add USB device to guest
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Kevin Wolf
Virtualization Bugs
Depends On:
Blocks: Rhel5KvmTier2
  Show dependency treegraph
Reported: 2010-06-07 01:16 EDT by Amos Kong
Modified: 2015-05-24 20:05 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-10 05:48:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Amos Kong 2010-06-07 01:16:09 EDT
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

How reproducible:

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
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 03:54:03 EDT
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 05:10:29 EDT
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-, usb device can be identified.
Comment 4 Kevin Wolf 2010-06-10 05:48:08 EDT
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.