V
V
VlLight2014-06-25 10:00:18
Xen
VlLight, 2014-06-25 10:00:18

Xen 4.2.4, only one USB device is forwarded. How to skip multiple?

Hello colleagues.
There is a problem with forwarding USB devices in DomU (Win XP x86 - I want to forward the mouse and keyboard) of the Xen 4.2.4 hypervisor
(Xen4Centos6 on CentOS 6.5 x64). The virtual machine is created using xl toolstack.
man xl.cfg says that

usb=BOOLEAN Enables or disables a USB bus in the guest.
usbdevice=DEVICE
Adds DEVICE to the USB bus. The USB bus must also be enabled using usb=1. ... XXX should/could be a list of devices.

lsusb says that
Bus 001 Device 007: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 008: ID 046d:c050 Logitech, Inc. RX 250 Optical Mouse

If I write in DomU config:
usb=1
usbdevice = ['host:1.7','host:1.8']

then xl create swears that usbdevice cannot be a list
/etc/xen/winxp_xl:33: warning: parameter `usbdevice' is a list but should be a single value

If I place several usbdevices in turn - only the last of the specified devices is forwarded
usb=1
usbdevice="host:1.7"
usbdevice="host:1.8"

only the mouse is forwarded, if you swap the entries, only the keyboard will be forwarded.
I tried to create a virtual machine using xm, it perceives the config parameters in the same way as xl, BUT it is possible to add a device from Dom0 via xm usb-add, HOWEVER, when starting via xm, the write speed to the virtual hard disk drops very much, so this is for me does not fit. This is where my ideas ended.
I don’t want to forward the entire USB controller through PCI Passthrough, I need just separate devices.
Who will advise what?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Azretik, 2014-06-26
@azretik

as far as I understand, in computers now all USB connectors are serviced by more than one controller, so it makes sense to make lspci and see how many of them and by selecting one for the VM, still forward it. usually it is 2-4 usb ports. I have 10 controllers on my server. I can quite afford to forward 1-2 to VM.
f5a2af76d7474786af5aa23293edc569.PNG

V
VlLight, 2014-06-26
@VlLight

It is planned to place more virtual machines than USB controllers, so I want to save USB ports. In extreme cases, yes, this is the way out, of course.
================
Moved the virtual disk to the LVM partition instead of a file, in xm the write speed on the HDD became normal (but the reading speed, damn it, fell, although not very much), applied patch from here . It turned out to forward several USBs, I decided to stop there for now.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question