[CentOS-virt] USB redirection under CentOS 6.4

Thu Sep 26 20:58:27 UTC 2013
carlopmart <carlopmart at gmail.com>


On 25/09/13 19:11, Zoltan Frombach wrote:
>
> On 9/25/2013 9:00 PM, carlopmart wrote:
>>
>> On 25/09/13 18:33, Zoltan Frombach wrote:
>>> On 9/25/2013 6:51 PM, Nux! wrote:
>>>> On 25.09.2013 07:25, C. L. Martinez wrote:
>>>>> On Tue, Sep 24, 2013 at 11:11 PM, Nux! <nux at li.nux.ro> wrote:
>>>>>> On 24.09.2013 14:17, carlopmart wrote:
>>>>>>> Hi all,
>>>>>>>
>>>>>>>     Does usb redirection works?? I am trying to assign to a Win7 kvm
>>>>>>> guest
>>>>>>> an usb HP printer without luck ... My second attempt is to use usb
>>>>>>> redirection, but according to Redhat's docs, this option is only
>>>>>>> available for windows using RHEV ... Is this correct??
>>>>>>>
>>>>>>>     Exists another tool to assign a printer via usb to a kvm guest??
>>>>>>>
>>>>>>>     Thanks.
>>>>>> As far as I can tell usb redirection works in EL 6.4. I used it more
>>>>>> than once, it did not work successfully with all devices, but I think
>>>>>> a
>>>>>> printer should be easy.
>>>>>>
>>>>>> --
>>>>> Many thanks Nux, but my problem is with windows side ... What soft do
>>>>> you use inside windows guest to usb redirect??
>>>> No software in guest. I just choose the desired host USB device from
>>>> virt-manager and attach it to the virtual machine. Should just work.
>>> And the appropriate Windows driver should be installed for the USB
>>> device. (Eg: If it's a printer)
>> Driver it is installed, but printer it doesn't works ...
>>
>
> Try to use a tool like AIDA64 on your Windows guest OS
> http://www.aida64.com/downloads
> and see what USB devices it reports (under Devices / USB Devices)

Ok, I have found a solution to use usb from virt-manager. Adding the 
following lines to guest.xml, works:

     <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
function='0x2'/>
     </controller>
     <controller type='usb' index='1' model='ehci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x08' 
function='0x0'/>
     </controller>

  Many thanks to all for your help.

-- 
CL Martinez
carlopmart {at} gmail {d0t} com