[Pkg-libvirt-discuss] video/GPU passthrough, second monitor, shared keyboard/mouse

Daniel Pocock daniel at pocock.pro
Wed Jul 29 20:01:52 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 29/07/15 15:39, Nigel Kukard wrote:

> 
>> The non-Linux VM would have a dedicated video card/GPU, to
>> maximize
> 
>> compatibility and performance for certain applications.
> 
> 
> 
> This is EXACTLY what I am doing right now. Well, similar, I don't
> use the host machine, but here is nothing stopping me from using it
> for Gnome/KDE. I did this when testing and fiddling around.
> 
> 
> 
> I have a cheap NV card as my primary, and a very expensive NV card
> as the VM's GPU.
> 
> 

In the case I'm looking at, the user will have an entry level GPU card
for the VM and a more heavy-duty GPU in the host.  The application
that will run in the VM is apparently not always comfortable with the
basic 3D acceleration provided by VirtualBox.


> 
> I then have a USB3 PCI-e card, which is assigned to the VM aswell.
> I have a 7 port USDB3 AC powered hub plugged into it for all my
> devices.
> 
> 
> 
> 
> 
>> It may be possible to interact with the VM using SPICE but it is
> 
>> possible to just have a second monitor for it too.
> 
> 
> 
> I am not sure you can do this when you use the hardware GPU. I may
> very well be wrong but would love to hear if you get SPICE + GPU
> working.
> 

Well, it would be a bit like remote desktop but without needing the
image from the screen - just a one-way channel for keystrokes and
mouse movements to be sent from the host to the VM

> 
> 
> 
> 
>> So my questions are:
> 
> 
> 
>> - When using an independent video card for the VM, how to share
>> the
> 
>> keyboard and mouse between the host and the VM? E.g. should I
>> just use
> 
>> Synergy or x2vnc or is there a nicer solution with KVM or qemu?
> 
> 
> 
> I could never find a usable solution for this, especially in the 
> environment I am in (corporate, productive, reliability).
> 
> 
> 
> I've tried Synergy and ran it for at least 20 months or so, the
> end result had me chuck it out.
> 

What was it that put you off using Synergy?

Did you ever try x2vnc?

> 
> 
> A KVM switch couldn't work for me as I have 2 monitors and a
> keyboard that at the time required special software.
> 
> 
> 
> When setting up what I did was just assign the keyboard and mouse
> to the VM, so when the VM started the keyboard and mouse were
> removed from the host. You could hotplug it back to the host, and
> hot plug it back to the VM.
> 
> 

This is probably quite a stable solution for your situation as you
don't really use the host, just the VM

In the case I'm looking at, the user needs both

> 
> 
> 
>> 
> 
>> - are any other free software solutions (e.g. VirtualBox, Xen)
>> likely to
> 
>> be better or worse for such a project?
> 
> 
> 
> I could not get the same reliability or a better result using
> VMWare or Virtualbox. Libvirt + KVM while it took me a great deal
> of days to get it working is something I will never ever turn back
> on.
> 
> 
> 
> I have full 3D support in my VM with dual monitors, 9 USB devices 
> including HD webcam I use for training, and a headless Debian
> machine (just with the cheapo NV card plugged without a screen
> plugged onto it).
> 
> 

This is good feedback, I really appreciate it.

I've done some really interesting things with VirtualBox for basic
business applications but for PCI passthrough I've heard that people
struggle with it.

One other issue comes to mind: with KVM, is it possible to suspend the
VM that is using passthrough?  This is one thing that VirtualBox
specifically mentions they can't support.

Regards,

Daniel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJVuTEwAAoJEOm1uwJp1aqDEzsQAJC8rGJE85IIMz/deNxtRgPg
1SK1dFUWObTdaZX/bqrukRzz1DAh27chtY+JEG5b81ZFswrcLZE4xFw5KTkdHFgf
ftR/kv+CNaw7mxfYFogMJpkHKAHWU7vukzH8UpOy4Mttp1B6cKF5KhkulhUN/OVL
GzmCiF0r4qYIvQ8TCRf0TFuULXhtLd3HUblme2frRCC6AZwx1Yp76ztHO+/dSzU0
E005Rwmn1I3TJNlECeishLDgwTWfWRr06l8lVRNQ5gtQ5eLJZqRVv9V3Okx6QnG2
If4tNqQ1Q58KtjP4n27OuGvmgnwbXOGnIescqaOgR8YatzhK4ajFeD26euJo/Teg
MY1WKPz8YgqMXww4AEMQV44dyjlpizG0zRnxRxVSxkWwUi/ra4y3oVwkLQCh8veI
yXFiSFgEKPs+1OnMweM1kiL7tHxF2fptK/mppiszxfBfPKgGWBo4ECXSdOKyQWEc
WC2wrq15lLYUz/m4W2MgUWT7fg+JOUqqlH2IawOAD+BLKNo4xlgkmISw1ZpwK265
djxhmhdqn1LbQURHLS4EJI6fFHs/3Tva1rqECXOKfF5r7djyFhHZbg//0hIu+Sbr
6algYdEjtougt1LFqiAXfo7qcqur4oZQOuBiQizsR0L7pD6D4r7XAWLL5jUOQcXl
qx2folNSitlRUd7tpZbk
=9NxG
-----END PGP SIGNATURE-----



More information about the Pkg-libvirt-discuss mailing list