[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't access USBs from DomU
On 2020-07-01 1:32 a.m., Martin
Hargreaves wrote:
Thank you for responding, David.
Yes, I have been using the link you recommended in order to
gain access to the USBs. It appears on Dom0 to have worked
okay but I simply can't 'see' the USB on my
para-virtualization VM. Thank you for the www.spice-space.org
link; I'll look into that.
Martin..
On 2020-06-25 8:56 a.m., hargreaves martin wrote:
A very quick question (hopefully).
On Dom0, I can attach my USBs.
$ sudo xl usbdev-attach ubud1 hostbus=2 hostaddr=36
$ sudo xl usb-list 5
Devid Type BE state usb-ver ports
0 qusb 0 1 2 8
Port 1: Bus 002 Device 025
Port 2: Bus 002 Device 024
Port 3:
…
But I can’t see them in my DomU (Ubuntu). Any
suggestions?
Any help would be very much appreciated.
Martin..
I don't do it that way anymore (I use SPICE instead), but
the Xen USB Passthrough page helped me when I was trying to
figure out how to do it the way you are now: https://wiki.xenproject.org/wiki/Xen_USB_Passthrough
Regards,
David
Hi Martin,
Sorry - I should have
mentioned that, AFAIK, SPICE is only for use with hvm domUs,
which all of mine are.
I found the Spice
documentation a bit hard to dig through (Spice for Newbies felt
like a Masters-level course :-).
In case it might save
you some time and effort, FWIW, here is my understanding of
Spice basics .
Spice has three pieces
- a Spice server, one or more guest domUs running the spice
agent software,
and one or more sessions of a Spice viewer/client. They interact
using the Spice protocol.
SERVER
Recent releases of major Linux distributions already have the
server component, libspice, available. I run my dom0 on Debian
10 and run the Spice server there. I didn't have to do anything
special to get the Spice server running. (It could be I
installed one or more of the libspice-server packages using the
package manager). What I mean is that I didn't have to build an
upstream version of qemu as I thought I might after reading the
(very helpful) Xen page about Spice:
https://wiki.xenproject.org/wiki/SPICE_support_in_Xen
GUESTS
Linux
I add
pci=nomsi
to the kernel boot line as recommended on the Xen page.
When first creating a
Linux domU, I connect via vnc to check for the spice agent
software, vdagent, and install it if it's not already in.
I use the Spice section
of sample xl configuration file from the Xen page as well - it
works fine for me. Some of the other configuration choices
there don't work for me so I modify other parts of the sample
file.
I believe it's still
true that qxl doesn't work for Linux-based domUs, so in the domU
.cfg files I have:
#VIDEO
videoram = 128
vga = 'stdvga'
Windows
For a Windows domU, the vdagent software is available from the
Windows binaries subsection of the Guest section on the
spice-space download page:
https://www.spice-space.org/download.html
The page says:
This installer contains
some optional drivers and services that can be installed in
Windows guest to improve SPICE performance and integration.
This includes the qxl video driver and the SPICE guest agent
(for copy and paste, automatic resolution switching, ...)
I'm not sure how the options are accessed
or configured - there doesn't seem to be a Spice-tools
executable. I don't have the qxl component working at this
point - just haven't had the motivation to look for it as I
use the Windows domU infrequently - so I have
vga = 'stdvga'
in the Windows .cfg file as well.
I use a modified
version of the sample xl.cfg lines from the Xen page for Windows
too. I note that I had to change viridian= from 1 to 0. With
viridian=1, my Windows 10 machine wouldn't boot.
VIEWER/CLIENT
Finally, the viewer software (the actual magic in all of this) is
available from the Spice downloads page as well, and (at least on
Debian) from the distribution package manager. As you may already
have seen, there are several options here. I use virt-viewer
because it suits my needs - haven't tried the others. I find it a
little unstable - the viewer has some problem with mouse clicks
that seems to cause it to shut down from time to time.
One handy feature of virt-viewer is that it will also connect via
vnc protocol, by replacing:
spice://192,168.x.x:6000 (or whathaveyou)
with:
vnc://192,168.x.x:6000
Once I have all of the above, it's simple to redirect a USB
device to a domU through the File menu of virt-viewer, so long as
there is some number of ports set out for redirect in the xl.cfg
file, like:
spiceusbredirection=4
I hope you haven't independently discovered all of this already,
but, if you have, I'd appreciate hearing of any errors in the
above, as it's been a while since I actually went through it.
Regards,
David
|