(1) usb network support: <interface type='network'> [ ... ] <model type='usb-net'/> <address type='usb' ... /> </interface> (2) usb audio support: <sound model='usb-audio'> <address type='usb' ... /> </sound> (3) uas (usb attached scsi) support: <controller type='scsi' model='usb-uas'> <address type='usb' ... /> </controller> Supports one scsi target with up to 256 luns. (4) usb serial support: [ dunno how to do that best ]
Hi Gerd When I trid to implement usb-uas, I used qemu upstream code and following qemu commandline, the guest could boot up without any error, but using "fdisk -l" couldn't be able to have the second scsi disk printed . Did I miss something critical? /usr/bin/qemu-system-x86_64 -enable-kvm -m 1024 -drive \ if=ide,file=/var/lib/libvirt/images/rhel6u3raw.img,format=raw \ -drive if=none,file=/var/lib/libvirt/images/seconddisk,id=uas-disk1 \ -device usb-ehci,id=ehci -device usb-uas,id=uas,bus=ehci.0 \ -device scsi-hd,bus=uas.0,scsi-id=0,lun=0,drive=uas-disk1
usb-audio https://www.redhat.com/archives/libvir-list/2013-January/msg00060.html usb-net https://www.redhat.com/archives/libvir-list/2013-January/msg00056.html usb-serial https://www.redhat.com/archives/libvir-list/2013-January/msg00053.html
(In reply to comment #1) > Hi Gerd > > When I trid to implement usb-uas, I used qemu upstream code and following > qemu commandline, the guest could boot up without any error, but using > "fdisk -l" couldn't be able to have the second scsi disk printed . Did I > miss something critical? > > /usr/bin/qemu-system-x86_64 -enable-kvm -m 1024 -drive \ > if=ide,file=/var/lib/libvirt/images/rhel6u3raw.img,format=raw \ > -drive if=none,file=/var/lib/libvirt/images/seconddisk,id=uas-disk1 \ > -device usb-ehci,id=ehci -device usb-uas,id=uas,bus=ehci.0 \ > -device scsi-hd,bus=uas.0,scsi-id=0,lun=0,drive=uas-disk1 command line looks fine, most likely it is just missing guest support. seabios: With upstream/rhel7 qemu seabios should be able to see the uas disk (and thus show it in the boot menu). linux: lsusb should show the device. Fedora has the kernel driver disabled by default though, so you must build your own kernel with CONFIG_USB_UAS=y to have it show up as scsi disk. Same for rhel7. rhel6 kernel is too old for uas support. windows: win8+ reportly has uas support too. Didn't test (yet) myself.
Thanks, I graded linux-3.7.1.tar.bz2 from kernel official website, removing the BROKEN dependency of CONFIG_USB_UAS. Finally I could set it to 'y' and installed on fedora 17 without any error. The UAS HBA supports only one scsi target, is that right? The scsi-id has to be set to '0' in my use Another question is that the scsi target is supposed to support up to 256 luns. But when I set the lun number >= 9, the guest couldn't see the lun any more without any error, is this right? -device scsi-hd,bus=uas.0,scsi-id=0,lun=0,drive=uas-disk1
Yes, one target, scsi-id must be 0. luns up to 255 should work, please open a bug if they don't (rhel7/qemu-kvm & assign to me).
usb-uas patchset sent to upstream https://www.redhat.com/archives/libvir-list/2013-January/msg00870.html
(In reply to comment #5) > Yes, one target, scsi-id must be 0. > > luns up to 255 should work, please open a bug if they don't (rhel7/qemu-kvm > & assign to me). bug here: https://bugzilla.redhat.com/show_bug.cgi?id=895002
Hi Gerd Is it possible to assign the usb host devices(4 types mentioned in the bug) to guest ? Thanks
Yes. Support for host devices has been in libvirt for quite a while, see http://www.libvirt.org/formatdomain.html#elementsHostDev
qemu 1.4 got a new usb device: usb-bot (basically usb-storage with a different configuration interface and multi-lun support). See http://git.qemu.org/?p=qemu.git;a=blob;f=docs/usb-storage.txt, last paragraph. Can you add support for that one too please?
(In reply to comment #10) > qemu 1.4 got a new usb device: usb-bot (basically usb-storage with a > different configuration interface and multi-lun support). > > See http://git.qemu.org/?p=qemu.git;a=blob;f=docs/usb-storage.txt, last > paragraph. > > Can you add support for that one too please? okay, I will do it.
bug 917702 is for usb-bot support
usb-serial is already upstream: v1.0.1-188-ge3a0445 commit e3a04455fa4b867726157ff0a35f61a045c443a3 Author: Guannan Ren <gren> Date: Sat Jan 5 13:25:36 2013 +0800 qemu: add usb-serial support Add an optional 'type' attribute to <target> element of serial port device. There are two choices for its value, 'isa-serial' and 'usb-serial'. For backward compatibility, when attribute 'type' is missing the 'isa-serial' will be chosen as before. Libvirt XML sample <serial type='pty'> <target type='usb-serial' port='0'/> <address type='usb' bus='0' port='1'/> </serial> qemu commandline: qemu ${other_vm_args} \ -chardev pty,id=charserial0 \ -device usb-serial,chardev=charserial0,id=serial0,bus=usb.0,port=1
usb-audio support was added upstream: commit e260a0e60a5abc48f27d09900ca3150130919d3f Author: Peter Krempa <pkrempa> Date: Thu Jul 24 17:32:31 2014 +0200 conf: Add USB sound card support and implement it for qemu v1.2.7-23-ge260a0e
usb-net still isn't in libvirt, so I split out a separate bug to track it: https://bugzilla.redhat.com/show_bug.cgi?id=1328969 FWIW there's more info about usb-uas vs usb-bot in the RHEL bug referenced earlier: https://bugzilla.redhat.com/show_bug.cgi?id=917702
Has there been any movement on this since the last comment posted in late April?
No, no progress on usb-uas. I don't think it's really a priority for the core team at the moment
Ah, fair enough, thank you for the update.
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.