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

Re: [fedora-virt] USB passthrough



This is precisely what I brought up on this list weeks ago -- USB device pass through. Thanks to work done by Mark and also Dan Walsh, I'm succeeding with something called a USB BUB developed by Paul Badger of moderndevice.com and Brian Riley of wulfden.org. The BUB is essentially an FTDI FT232RL-based uart. I use it to program my Freeduino devices, which I purchase as kits from Brian. I expect to pass other USB devices through to my Ubuntu guest as well.

Thanks again to Mark and Dan for the fantastic support when I both complained and filed a bug related to USB device passthrough.

Bob Cochran



On 06/29/2009 06:19 AM, Mark McLoughlin wrote:
Hey,

At FUDCon yesterday, Paul asked me about how to get KVM USB device
passthrough working and I had to admit I'd never tried it.

So, after some poking with F-11, here's what I found:

   1) You need selinux-policy-targeted-3.6.12-55.fc11 or later

   2) Make sure the virt_use_usb SELinux boolean is enabled, which it
      should be by default:

        $>  getsebool virt_use_usb
        virt_use_usb -->  on
        $>  setsebool -P virt_use_usb on

   3) Plug your device in, and if it's a USB mass storage device, make
      sure it's not mounted in the host

   4) In virt-manager, open the VM window, go to the details tap,
      clock 'Add hardware', select 'Phyiscal host device', choose
      'USB device', then the device you wish to passthrough

   5) Take a peek at the device in the guest XML config

        $>  virsh dumpxml xp
        ...
        <devices>
          ...
          <hostdev mode='subsystem' type='usb' managed='yes'>
            <source>
              <vendor id='0x0dda'/>
              <product id='0x0001'/>
            </source>
          </hostdev>
        </devices>

   6) Start the guest and check whether the guest can see it. If not,
      check /var/log/libvirt/qemu/$guest.log because qemu will happily
      start up even if the device cannot be assigned.

   7) It sucks that the device has to be plugged in before you start
      the guest; qemu now has a "autoconnect" mode which probably
      makes sense for libvirt to use by default, see bug #508645

Cheers,
Mark.

_______________________________________________
Fedora-virt mailing list
Fedora-virt redhat com
https://www.redhat.com/mailman/listinfo/fedora-virt




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