Re: [PATCH 0/6] add qemu usb-scsi controller support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/14/2013 05:04 PM, Guannan Ren wrote:
This patchset tries to add usb-scsi model for SCSI controller.
http://lists.gnu.org/archive/html/qemu-devel/2012-06/msg03382.html

"usb-uas is a pure UAS (usb attached scsi) emulation.
The emulation works like any other scsi hba emulation (eps, lsi, virtio,
megasas, ...).  It provides just the HBA where you can attach scsi
devices as you like using '-device'.  A single scsi target with up to
256 luns is supported. For now only usb 2.0 transport is supported."

libvirt XML snip
 <devices>
   <controller type='usb' index='2' model='ehci'>
   </controller>
   <controller type='scsi' index='0' model='usb-scsi'>
     <address type='usb' bus='2' port='1'/>
   </controller>
 </devices>

qemu commandline:
qemu ${other_vm_args}              \
     -device usb-ehci,id=usb2,bus=pci.0,addr=0x8 \
     -device usb-uas,id=scsi0,bus=usb2.0,port=1

When a scsi disk is attached to usb-scsi controller, the target
id must 0(usb-scsi only provide one scsi target). The unit value
must in range of 0~255 for its lun number.

As for the guest, the kernel with CONFIG_USB_UAS=y is necessary to have it show up
scsi disk attached to UAS. Fedora has the kernel driver disabled by default though.
(thanks to Gerd Hoffmann's suggestion)
I grabbed linux-3.7.1 version from kernel website. It works after compiling.



      There is no good chipset or vendor name for usb-uas virtual device.
      idVendor is QEMU. ( 46f4)
      idProduct is "USB Attached SCSI HBA" (0003)
 
      For the name of this scsi model in XML, any opinion is welcome.
      If no other opinion, the usb-uas will be chosen (usb-scsi in this patchset)
      I am going to send a v2 with this fix.

      Guannan
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]