SPICE support in Xen: Difference between revisions
Lars.kurth (talk | contribs) m (→Restrictions) |
Lars.kurth (talk | contribs) |
||
Line 33: | Line 33: | ||
You can also find configuration examples in this [http://lists.xenproject.org/archives/html/xen-users/2013-06/msg00423.html e-mail thread]. |
You can also find configuration examples in this [http://lists.xenproject.org/archives/html/xen-users/2013-06/msg00423.html e-mail thread]. |
||
<pre> |
|||
builder = 'hvm' |
|||
memory = '1024' |
|||
device_model_version = 'qemu-xen' |
|||
device_model_override = '/usr/src/qemu-dm/i386-softmmu/qemu-system-i386' |
|||
disk = [ 'tap2:vhd:/srv/win7_noDriver,sda,w'] |
|||
vif = ['bridge=xenbr0'] |
|||
boot='cd' |
|||
vcpus=4 |
|||
name = 'UserVM' |
|||
usbdevice='tablet' |
|||
vnc=1 |
|||
vnclisten="0.0.0.0" |
|||
vncdisplay=1 |
|||
vncunused = 0 |
|||
spice=1 |
|||
spicehost='0.0.0.0' |
|||
spiceport=6000 |
|||
spicedisable_ticketing=1 |
|||
device_model_args_hvm = [ '-vga', 'qxl' ] |
|||
videoram = 128 |
|||
apic=1 |
|||
pae=1 |
|||
stdvga=1 |
|||
vga = "qxl" |
|||
videoram=32 |
|||
</pre> |
|||
{{InfoLeft|Note that the author has taken this from the e-mail thread and not checked it. If you find an issue, please refer to the thread and fix the example.}} |
|||
=== Know Problems === |
=== Know Problems === |
Revision as of 17:16, 9 April 2014
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 most of the 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. In many cases, you may be able to use upstream qemu packages from Linux distributions (recent Debian, Ubuntu, etc. will work) : these have SPICE support already built-in.
Alternatively, can compile upstream qemu from the xen source tree. However, you will need to apply a small patch to enable SPICE and USB Redirection to the build parameters. See:
> tools/Makefile > @@ -201,6 +201,8 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find > --datadir=$(SHAREDIR)/qemu-xen \ > --localstatedir=/var \ > --disable-kvm \ > + --enable-spice \ > + --enable-usb-redir \ > --disable-docs \ > --disable-guest-agent \ > --python=$(PYTHON) \
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).
You can also find configuration examples in this e-mail thread.
builder = 'hvm' memory = '1024' device_model_version = 'qemu-xen' device_model_override = '/usr/src/qemu-dm/i386-softmmu/qemu-system-i386' disk = [ 'tap2:vhd:/srv/win7_noDriver,sda,w'] vif = ['bridge=xenbr0'] boot='cd' vcpus=4 name = 'UserVM' usbdevice='tablet' vnc=1 vnclisten="0.0.0.0" vncdisplay=1 vncunused = 0 spice=1 spicehost='0.0.0.0' spiceport=6000 spicedisable_ticketing=1 device_model_args_hvm = [ '-vga', 'qxl' ] videoram = 128 apic=1 pae=1 stdvga=1 vga = "qxl" videoram=32
Note that the author has taken this from the e-mail thread and not checked it. If you find an issue, please refer to the thread and fix the example. |
Know Problems
- Linux domUs with recent kernel need pci=nomsi set for kernel boot parameters to ensure that vdagent is working. This is a know problem with virtio devices on Xen which has not yet been solved. All other cases and things works out of box based on my tests. We are not entirely sure which kernel versions are affected, except that kernel >= 3.2 exhibits the problem, while kernel <= 2.6.32 does not. -Feel free to update this section if you have more accurate information.
Ongoing work
Work on the following patches to improve SPICE support and integration in Xen is ongoing:
- qxl vga (libxl patch complete and seems good but qxl is not working because other changes are needed on xen and/or qemu)
- Basic SPICE support on PV guests (patch is working but needs serious improvements)
- Add SPICE parameters to xenstore and handle those acquired with qmp (only the qmp part is currently working)
- Automatic SPICE port selection similar to the support available in VNC (blocked, awaiting reply from qemu community)
The latest work in progress and discussions can be found on xen-devel and any patches (including partial and drafts) can be found on Fabio Fantoni's github repository.