USB从dom0转发到domU

我有什么select将两个USB连接的电话转接到xen guest?

我已经阅读了PCI-passthrough http://www.wlug.org.nz/XenPciPassthrough ,但我确定在服务器中的USB控制器不是一个PCI卡。

有设备级转发,但我需要转发两个设备,这里没有说如何做到这一点: http : //www.olivetalks.com/2008/02/03/usb-forwarding-on-xen-it-刚刚做的那样-不工作/

会像这样简单:

usbdevice = ['host:xxx','host:yyy',]

工作?

编辑:我现在开始赏金。 这对我和其他人来说真的很重要,希望有这样的人能够帮助。

我用USB通过Xen到CentOS5上的domU。

到目前为止,我可以告诉:转发完整的USB的东西或什么也没有。 不要试图只转发一些OHCI / UHCI设备。

所以这里或多或less地运行(还没有开始压力testing):

  1. 断开所有USB设备
  2. 通过pciback从dom0卸载USB设备。 卸载UHCI / OHCI EHCI设备。 (根据你的需要写一些init.d脚本)。 关于pciback的细节在这里是在第1点
  3. 重新启动xend
  4. lsusb应该在dom0上不输出任何内容
  5. pci = ['0000:yy:xx.0']来编辑你的domUconfiguration文件
  6. 开始你的domU
  7. domU应通过lspci(其他pciids)和lsusb报告USB设备

我的dom0是用内核参数noirqdebug (grub)启动的。

我可以确认上述方法在以下前提条件下工作:

  • Xen 3.4.3
  • CentOS 5.5主机,内核2.6.18-194.32.1.el5xen x86_64
  • CentOS 5.5 guest,内核2.6.18-194.32.1.el5xen x86_64

    1. 我删除了所有连接的USB设备。
    2. rmmod uhci_hcd ohci_hcd ehci_hcd
    3. 找出哪个USB集线器连接到哪个连接器
    4. 添加了一些USB端口的隐藏function

/etc/modprobe.conf中:

options pciback hide=(0000:00:1a.0)(0000:00:1a.1)(0000:00:1a.7) 
  1. 重新启动xend:/etc/init.d/xend restart
  2. configuration虚拟机configuration:

在/ etc / xen的/自动/ VM:

 usb = 1 # Probably irrelevant pci = [ '0000:00:1a.0', '0000:00:1a.1', '0000:00:1a.7' ] 
  1. 重新创build了VM(xm destroy / xm create):

dmesg的:

 Loading ehci-hcd.ko module PCI: Enabling device 0000:00:00.7 (0000 -> 0002) ehci_hcd 0000:00:00.7: EHCI Host Controller ehci_hcd 0000:00:00.7: new USB bus registered, assigned bus number 1 ehci_hcd 0000:00:00.7: debug port 1 ehci_hcd 0000:00:00.7: irq 17, io mem 0xdf0fe000 ehci_hcd 0000:00:00.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 4 ports detected Loading ohci-hcd.ko module Loading uhci-hcd.ko module USB Universal Host Controller Interface driver v3.0 PCI: Enabling device 0000:00:00.0 (0000 -> 0001) uhci_hcd 0000:00:00.0: UHCI Host Controller uhci_hcd 0000:00:00.0: new USB bus registered, assigned bus number 2 uhci_hcd 0000:00:00.0: irq 19, io base 0x0000ec40 usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 2 ports detected PCI: Enabling device 0000:00:00.1 (0000 -> 0001) uhci_hcd 0000:00:00.1: UHCI Host Controller uhci_hcd 0000:00:00.1: new USB bus registered, assigned bus number 3 uhci_hcd 0000:00:00.1: irq 20, io base 0x0000ec60 usb usb3: configuration #1 chosen from 1 choice hub 3-0:1.0: USB hub found hub 3-0:1.0: 2 ports detected ... usb 1-3: new high speed USB device using ehci_hcd and address 2 ... usb 1-3: configuration #1 chosen from 1 choice hub 1-3:1.0: USB hub found hub 1-3:1.0: 4 ports detected usb 1-3.2: new full speed USB device using ehci_hcd and address 3 usb 1-3.2: configuration #1 chosen from 1 choice 
  1. 达到涅架。

你最好的select就是把手机放在一个退休的桌面上,用裸机来运行你需要的东西。 是的,很烂!