1

To make a long story short,I tried to pass through my two kinect 2 devices from ubuntu 20.04 to a two qemu / kvm virtual machines,where on the first one I have also passed through my RTX 2080 ti and on the second one,I have passed through also the IGPU (Intel UHD Graphics 630). This is the tutorial that I have followed:

Tutorial: Passing an Intel GPU to a Linux/KVM Virtual Machine

It worked great,except for a "little" problem. When I attach the second kinect to the vm,as soon as I try to use it,its connection drops. For this reason,I've got an idea. Maybe what I want to do works better using the xen-hypervisor. So,I have created a new connection and a new vm with xen and virt manager and I tried to assign the Intel UHD Graphics 630 GPU to the vm following the tutorial above.

It's a shame that it didn't work because the error that u see below: "hypervisor / libvirt does not support spice GL". So my question is if xen supports the spice GL or not and if it supports it,I would like to read a tutorial.

enter image description here

2 Answers 2

0

SPICE should be able to work, based on these links:

Not tried though. Maybe someone can comment?

1
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review Commented Sep 24, 2021 at 14:14
0

TL;DR

Spice should work from atleast Xen 4.4 according to official wiki.

Try adding these to the VM config file:

spice=1
spicehost='0.0.0.0'
spiceport=6000
spicedisable_ticketing=1

Or these:

spice=1
spicelisten="0.0.0.0"
spiceport=6000
spicevdagent=1
spiceagent_mouse=1
spice_clipboard_sharing=1
spiceusbredirection=4
spicedisable_ticketing=1

Make sure QEMU has SPICE support enabled.


Excerpts from various websites in previous answer

From https://www.serverwatch.com/servers/xen-4-4-arms-for-virtualization-adds-spice/ :

Support for SPICE

With Xen 4.4 support for the SPICE protocol is also being added. SPICE is noteworthy in that it is an effort led by Red Hat and is typically thought of as being a desktop virtualization technology closely tied to the KVM hypervisor.

...

“SPICE support was contributed by a very motivated user who wanted to use it himself,” Dunlap said.

Dunlap explained that like a lot of KVM features, SPICE is actually in qemu — and qemu is actually shared between KVM and the Xen Project hypervisor.

“In fact, anyone willing to get their hands dirty typing arcane runes into their config files could use a number of KVM features in Xen currently,” Dunlap said. “So all it really took was someone willing to add the plumbing to make the SPICE interfaces in qemu usable through the officially supported Xen interface without the arcane runes.”

From a user perspective, Dunlap said that with the addition of SPICE, an organization employing multiple hypervisors now has the option to use SPICE as a common remote interface. The fact that Xen 4.4 adds SPICE support is a testament to the power of open source and the open development model in Dunlap’s view.


From https://wiki.xenproject.org/wiki/SPICE_support_in_Xen :

SPICE support in Xen SPICE is a protocol for virtual desktops which allows a much richer connection than display-only protocols like VNC.

...

Xen 4.4 Xen Project 4.4 adds support for additional SPICE functionality, including vdagent, clipboard sharing, and USB redirection.

The following notes were added to the wiki on request of Fabio Fantoni, who added SPICE support to Xen

Restrictions The SPICE protocol is currently only supported on HVM guests.

QEMU Upstream To use SPICE you will need an upstream version of qemu built with SPICE support enabled.

The upstream qemu packages may already be in your Linux distribution. Recent Debian, Ubuntu, etc. will work: these have SPICE support already built-in. In addition to the xl configuration changes below, you only need to install spice-vdagent in the domU to fully enable SPICE.

...

XL Configuration You can use XL configuration parameters to enable SPICE support and control its advanced functions. Please check man xl.cfg or check out xl.cfg(5).

The following example is for a domU xl cfg for xen 4.4 with spice full features (except qxl):

name='W7'
builder="hvm"
memory=2048
vcpus=2
# The fixed mac address is a workaround for know xl problem (network not working after restore)
vif=['bridge=xenbr0,mac=00:16:3e:41:ae:8f']
# empty cdrom is for use cdrom hotswap from xl 
# raw disk with qdisk as backend produces better performance than blktap2
disk=['/mnt/vm/disks/W7.disk1.xm,raw,hda,rw',',raw,hdb,ro,cdrom']
boot='dc'
device_model_version="qemu-xen"
viridian=1
vnc=0
keymap="it"
on_crash="destroy"
vga="stdvga"
spice=1
spicehost='0.0.0.0'
spiceport=6000
# spicedisable_ticketing enabled is for no spice password, instead use spicepasswd
spicedisable_ticketing=1
#spicepasswd="test"
spicevdagent=1
spice_clipboard_sharing=1
# this will automatically redirect up to 4 usb devices from spice client to domUs
spiceusbredirection=4
# This adds intel hd audio emulated card used for spice audio
soundhw="hda"
localtime=1

From https://wiki.xenproject.org/wiki/QEMU_Upstream#SPICE_.2F_QXL :

SPICE / QXL SPICE is another remote-display protocol and QXL is a PV framebuffer which uses the best of the SPICE capabilities. To activate SPICE you can add this in the VM config file (this works only with xl).

spice=1
spicehost='0.0.0.0'
spiceport=6000
spicedisable_ticketing=1 

With xen 4.4 usb redirection, vdagent and clipboard sharing was added:

  • for use usb redirection add in domU's xl cfg spiceusbredirection=N where N is number of channels one for each usb device that can be redirected, max 4.

  • for use spice vdagent add the line below in domU's xl cfg:

spicevdagent=1

  • for use spice clipboard sharing

spice_clipboard_sharing=1

QXL currently work under Xen only on windows but xl patch is available for testing. (check [SPICE page] for more information.)


From https://wiki.mageia.org/en/XEN :

spice is like vnc, only better:

guests can have spice-vdagent, so that mouse can go in and out of guest window without explicit grab (release with SHIFT+F12) clipboard-crossover (copy paste outside of guest) QXL is not supported yet (more efficient display) spice clients should support usb-redirection (untested) spice client can play the guest audio! example config:

name="vm-name"
builder="hvm"
boot="cdn"
memory=1024
vcpus=1
vif=['vifname=vif-foo.0,bridge=br-wan,mac=E2:03:BE:F2:59:A2']
disk=['file:/var/lib/libvirt/images/testpxe.img,hda,w',',raw,hdb,ro,cdrom']
keymap="nl-be"
soundhw="hda"
vga="stdvga"
vnc=0
serial='pty'
spice=1
spicelisten="0.0.0.0"
spiceport=6000
spicevdagent=1
spiceagent_mouse=1
spice_clipboard_sharing=1
spiceusbredirection=4
spicedisable_ticketing=1

boot="cdn" # first disk, then CD, then network
disk=['file:/data/image.img,hda,w'] # prepare disk image with 'dd if=/dev/zero of=/data/image.img bs=1M count=1 seek=16k' for a 16GB sparse disk image
disk=[',raw,hdb,ro,cdrom'] # empty cdrom, for removable .iso with "xl insert" command
vif=['vifname=vif-foo.0,bridge=br-wan,mac=E2:03:BE:F2:59:A2'] # for a network interface which will be connected to the pre-existing br-wan brige interface
soundhw="hda" # with this, intelhda device will produce sound if you connect with spice to your spice-client (cool huh!)
vga="stdvga" # qxl is not supported yet serial='pty' # this is to have "xl console" work on HVM, but i wan't successful yet
spice* # for getting spice to work using upstream qemu-xen

I packaged upstream qemu-xen into /usr/bin. that means that if you want to use it, you'll need to override the path and model settings:

device_model_version="qemu-xen"
device_model_override="/usr/bin/qemu-xen"

trying VGA passthrough if you want to try this, see http://wiki.xen.org/wiki/XenVGAPassthroughTestedAdapters for what graphic cards that might work.


QEMU SPICE support must be enabled for it to work

From https://centosfaq.org/general/xen-and-spice-problem/ :

Christoph says:
October 2, 2015 at 4:36 am
hmm cant install it:

...

is there anywhere an xen qemu with enabled spice support for CentOS7?

Mark Pryor says:
October 4, 2015 at 10:50 am
http://107.185.144.55/xen/cent7/dom0/RPMS/stable-4.6/mock/ above is a build of upstream xen with this configure including spice support:./configure –enable-systemd –prefix=/usr –enable-xsmpolicy –enable-ocamltools
–libdir=%{_libdir} –enable-efi
–with-extra-qemuu-configure-args=”–enable-spice –enable-usb-redir” there is no associated libvirt buildIncluded are patches up to the HEAD of staging-4.6, so its basically rc5.

Christoph says:
October 5, 2015 at 4:08 am
Am 2015-10-04 17:50, schrieb Mark Pryor:

why is the spice support not in the ‘offical’ xen CentOS7 repo built in?

George Dunlap says:
October 5, 2015 at 5:39 am
Historically, because it wasn’t available. Now, simply because it’s off by default and before now nobody had asked for it to be enabled.

The Virt SIG is a community effort — adding a configure option and rebuilding is no problem, but the Virt SIG will need help testing / working out bugs in this feature if it’s going to be available going forward.

...

George Dunlap says:
October 6, 2015 at 11:53 am
OK, I’ve done a build of 4.6rc4 with spice enabled. You can install it with –enablerepo=virt-xen-46-candidate; I haven’t done any testing on it at all (all our test boxes are being moved today).

Let me know how it works for you.

-George

Christoph says:
October 13, 2015 at 2:09 am
Hi

till now it are the rpm’s with spice support working without problems (spice works to :) )

...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .