Features/Spice

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
(Current status)
(Xspice: Tweak advice on xdmcp and gnome-session)
 
(28 intermediate revisions by 6 users not shown)
Line 9: Line 9:
  
 
== Current status ==
 
== Current status ==
* Targeted release: [[Releases/14 | Fedora 14 ]]
+
* Last updated: 2013-05-07
* Last updated: 2010-07-09
+
* Percentage of completion: 100%
* Percentage of completion: 10%
+
 
+
Spice 0.6 is scheduled to be released in August.
+
  
 
== Detailed Description ==
 
== Detailed Description ==
The Spice project deals with both the virtualized devices and the front-end.
+
The Spice project deals with all of the infrastructure involved in connecting to and operating desktop environments remotely.  It's main focus is on virtualized devices within qemu virtual machines, but it also provides a pure X frame buffer solution known as Xspice.
  
Currently, the project main focus is to provide high-quality remote access to QEMU virtual machines. The SPICE remote computing protocol that is used for client-server communication. Spice adds a QXL display device to QEMU and provides
+
The Simple Protocol for Independent Computing Environments (SPICE) is used for client-server communication. Spice adds a QXL display device to QEMU and provides drivers for this device for both X and Windows.  It also provides a Spice server and VDAgent to handle connections and transmit the information via the SPICE protocol to clients.  The Spice project provides a Linux, Windows, and HTML5 client.  There are experimental Mac OS X and Android clients as well.
drivers for this device for both X and Windows.
+
  
 
Features supported in the protocol are:
 
Features supported in the protocol are:
Line 40: Line 36:
 
== Scope ==
 
== Scope ==
 
<!-- What work do the developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
 
<!-- What work do the developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
* Spice support needs to be added to the Fedora qemu package
+
 
* Need to package celt 0.5.1 as celt051 package (for the specific bitstream format spice uses) [[https://bugzilla.redhat.com/show_bug.cgi?id=612979 bug #612979]]
+
Other (non-mandatory) spice-related bits useful to have in Fedora:
* Need to package spice-protocol [[https://bugzilla.redhat.com/show_bug.cgi?id=612943 bug #612943]]
+
* gdm does not supply xdmcp any longer [[https://bugzilla.gnome.org/show_bug.cgi?id=690926]]
* Need to package spice, giving spice-server and spice-client packages
+
This would be useful for creating an Xspice server to generate session logins
* Need to update xorg-x11-drv-qxl package for latest spice version
+
* Return of pipe sink modules for sound for Xspice [[https://bugzilla.redhat.com/show_bug.cgi?id=958949]]
  
 
A common use for spice is to run windows client, and spice ships with several windows parts:
 
A common use for spice is to run windows client, and spice ships with several windows parts:
* A video driver
+
* A video driver.
* An agent for doing operations inside the guest
+
* An agent for doing operations inside the guest.
* virtio serial driver for talking to the agent
+
* virtio serial driver for talking to the agent.
  
It might be interesting to package these in fedora somehow so that its easy to deploy them.
+
It might be interesting to package these in fedora somehow so that its easy to deploy them.  Note that the fedora package guidelines don't allow shipping pre-compiled blobs.  Which implies we must build the windows binaries in mock/koji.  Which implies we must be able to cross-build all bits using the mingw compiler.
  
 
== How To Test ==
 
== How To Test ==
Line 67: Line 63:
 
3. What are the expected results of those actions?
 
3. What are the expected results of those actions?
 
-->
 
-->
 +
 +
=== QEMU ===
  
 
The server part of Spice requires a x86-64 machine, and ideally should have hardware virtualization support (kvm) although this is not strictly required.
 
The server part of Spice requires a x86-64 machine, and ideally should have hardware virtualization support (kvm) although this is not strictly required.
Line 72: Line 70:
 
The client currently works on x86-64 and x86, but we're working on porting it to more architectures.  
 
The client currently works on x86-64 and x86, but we're working on porting it to more architectures.  
  
To test spice, install a qemu with spice support and spice-server on the server machine, then start qemu with options something like this:
+
You will need a host system, guest system, and client system.  The host system runs qemu to launch the guest VM.  You connect from the client system to view the guest VM.  Often, the client system is the same as the host system, at least for simple testing.
 +
 
 +
To test spice, install a qemu with spice support and spice-server on the host machine, then start qemu with options something like this:
 
   qemu <disk-image> -usbdevice tablet -soundhw ac97 -vga qxl -spice port=5930,disable-ticketing -enable-kvm
 
   qemu <disk-image> -usbdevice tablet -soundhw ac97 -vga qxl -spice port=5930,disable-ticketing -enable-kvm
 
or with passwords:
 
or with passwords:
 
   qemu <disk-image> -usbdevice tablet -soundhw ac97 -vga qxl -spice port=5930,password=<secret> -enable-kvm
 
   qemu <disk-image> -usbdevice tablet -soundhw ac97 -vga qxl -spice port=5930,password=<secret> -enable-kvm
  
On the client, install the spice-client package and start it like:
+
In the guest, you will need to install xorg-x11-drv-qxl and you will want to install spice-vdagent.
   spicec -h localhost -p 1234 -w <secret>
+
 
 +
On the client, you will need a spice client.  Modern use suggests that you use remote-viewer, which requires the virt-viewer and spice-gtk3 packages on Fedora.  (Old clients include spice-client, which provides spicec, and spice-gtk-tools, which provides spicy).
 +
 
 +
To run, invoke as follows:
 +
  remote-viewer spice://localhost:1234
 +
 
 +
This should let you access the machine.
 +
 
 +
=== Xspice ===
 +
 
 +
Xspice creates a virtual X server that you can then connect to remotely using any Spice client.  To use, you will need the xorg-x11-server-Xspice package installed.
 +
 
 +
Start an X server as follows:
 +
  Xspice --disable-ticketing --xsession /usr/bin/gnome-terminal :1 --port 1234 &
 +
 
 +
Then connect with any spice client (see the remote-viewer section, above), and you should see a simple X server with a gnome-terminal.
 +
 
 +
{{admon/note|1=Nicer session|2=Of course, a gnome terminal isn't all that pretty.  Unfortunately, running a full gnome-session is tricky, because it will conflict with your current running session.  If you put the following lines: <pre>#!/bin/bash
 +
eval `dbus-launch --sh-syntax –exit-with-session`
 +
exec  gnome-session</pre> in an executable bash script and pass that script to --xsession, you'll get a full Gnome session.  You may have to do further tweaking to get applications like Firefox to run well also.}}
 +
 
 +
{{admon/note|1=XDMCP support|2=XDMCP, in theory, would let you run an Xspice session that would allow anyone to log in to a new session.  Simply passing '-query <hostname-running-XDMCP>' instead of the '--xsession /usr/bin/gnome-terminal' should accomplish this.  Unfortunately, gdm does not currently support this, due to [https://bugzilla.gnome.org/show_bug.cgi?id=690926 bug 690926]. You can install xdm to accomplish this result instead. }}
 +
 
 +
=== spice-html5 ===
 +
 
 +
Spice provides a pure HTML5 client option.  To use this, you will need to have the spice-html5 and python-websockify packages installed.  Then, start a Spice server as you normally would (see either the Xspice or QEMU sections, above).
 +
 
 +
* Install the Apache configuration file
 +
   sudo cp /usr/share/doc/spice-html5*/apache.conf.sample /etc/httpd/conf.d/spice.conf
 +
  sudo systemctl restart httpd
 +
 
 +
* Start websockify, providing a new port, and the host and port where the Spice server is running.
 +
  websockify 5959 localhost:5900
 +
 
 +
* Open a web browser, and navigate to http://<system-with-apache>/spice/
  
This should let you access the machine. You should now install the qxl driver and optionally the agent (only available for windows) in the guest. If you do not do this you're running in vga mode which is quite slow and inefficient.
+
Enter the address of the system running websockify, and the port (e.g. 5959) you specified when you invoked websockify, and click 'Start'.  You should now see your Spice session.
  
 
== User Experience ==
 
== User Experience ==
 
<!-- If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice. -->
 
<!-- If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice. -->
The initial version of spice is not integrated with the virtualization management in Fedora (libvirt). We're working on this, but its not expected to happen in F14.
 
  
 
== Dependencies ==
 
== Dependencies ==
Line 90: Line 123:
 
* qemu
 
* qemu
  
== Contingency Plan ==
 
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "None necessary, revert to previous release behaviour."  Or it might not.  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
 
Drop the qemu patch, stay with current qemu frontends
 
  
 
== Documentation ==
 
== Documentation ==
<!-- Is there upstream documentation on this feature, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
+
Note that most of the official documentation is generally badly out of date.
* [[http://www.spice-space.org/ the main spice website]]
+
 
* [[http://www.spice-space.org/features.html spice features]]
+
* [http://www.spice-space.org/ the main spice website]
* [[http://www.spice-space.org/documentation.html spice documentation]]
+
* [http://www.spice-space.org/features.html spice features]
* [[http://www.spice-space.org/page/Releases/SpiceZeroPointSix 0.6 schedule]]
+
* [http://www.spice-space.org/documentation.html spice documentation]
  
 
== Release Notes ==
 
== Release Notes ==
Line 110: Line 140:
  
  
[[Category:FeatureReadyForWrangler]]
+
[[Category:FeatureAcceptedF14]] [[Category:F14 Virt Features]]
 
<!-- When your feature page is completed and ready for review -->
 
<!-- When your feature page is completed and ready for review -->
 
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
 
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
 
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
 
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
 
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->
 
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->

Latest revision as of 17:41, 29 May 2013

Contents

[edit] Spice

[edit] Summary

Spice aims to provide a complete open source solution for interaction with virtualized desktops

[edit] Owner

[edit] Current status

  • Last updated: 2013-05-07
  • Percentage of completion: 100%

[edit] Detailed Description

The Spice project deals with all of the infrastructure involved in connecting to and operating desktop environments remotely. It's main focus is on virtualized devices within qemu virtual machines, but it also provides a pure X frame buffer solution known as Xspice.

The Simple Protocol for Independent Computing Environments (SPICE) is used for client-server communication. Spice adds a QXL display device to QEMU and provides drivers for this device for both X and Windows. It also provides a Spice server and VDAgent to handle connections and transmit the information via the SPICE protocol to clients. The Spice project provides a Linux, Windows, and HTML5 client. There are experimental Mac OS X and Android clients as well.

Features supported in the protocol are:

  • Accelerated 2D graphics
  • "Hardware" cursor support
  • Audio playing
  • Audio recording
  • Image compression, both lossless and lossy (for WAN support)
  • Video detection with MJpeg streaming
  • Encryption
  • Client side mouse pointer support
  • Drivers for: X, Windows (xp, vista, win7)

Red Hat acquired Spice together with kvm when it aqcuired Qumranet, and has invested significant effort into opening it up, cleaning up dependencies, etc.

[edit] Benefit to Fedora

In the long term, Spice will let Fedora provide a better user experience in desktop virtualization. In the short term, Fedora gains an interesting new open-source technology that many people want to try out.

[edit] Scope

Other (non-mandatory) spice-related bits useful to have in Fedora:

  • gdm does not supply xdmcp any longer [[1]]

This would be useful for creating an Xspice server to generate session logins

  • Return of pipe sink modules for sound for Xspice [[2]]

A common use for spice is to run windows client, and spice ships with several windows parts:

  • A video driver.
  • An agent for doing operations inside the guest.
  • virtio serial driver for talking to the agent.

It might be interesting to package these in fedora somehow so that its easy to deploy them. Note that the fedora package guidelines don't allow shipping pre-compiled blobs. Which implies we must build the windows binaries in mock/koji. Which implies we must be able to cross-build all bits using the mingw compiler.

[edit] How To Test

[edit] QEMU

The server part of Spice requires a x86-64 machine, and ideally should have hardware virtualization support (kvm) although this is not strictly required.

The client currently works on x86-64 and x86, but we're working on porting it to more architectures.

You will need a host system, guest system, and client system. The host system runs qemu to launch the guest VM. You connect from the client system to view the guest VM. Often, the client system is the same as the host system, at least for simple testing.

To test spice, install a qemu with spice support and spice-server on the host machine, then start qemu with options something like this:

 qemu <disk-image> -usbdevice tablet -soundhw ac97 -vga qxl -spice port=5930,disable-ticketing -enable-kvm

or with passwords:

 qemu <disk-image> -usbdevice tablet -soundhw ac97 -vga qxl -spice port=5930,password=<secret> -enable-kvm

In the guest, you will need to install xorg-x11-drv-qxl and you will want to install spice-vdagent.

On the client, you will need a spice client. Modern use suggests that you use remote-viewer, which requires the virt-viewer and spice-gtk3 packages on Fedora. (Old clients include spice-client, which provides spicec, and spice-gtk-tools, which provides spicy).

To run, invoke as follows:

 remote-viewer spice://localhost:1234

This should let you access the machine.

[edit] Xspice

Xspice creates a virtual X server that you can then connect to remotely using any Spice client. To use, you will need the xorg-x11-server-Xspice package installed.

Start an X server as follows:

 Xspice --disable-ticketing --xsession /usr/bin/gnome-terminal :1 --port 1234 &

Then connect with any spice client (see the remote-viewer section, above), and you should see a simple X server with a gnome-terminal.

Note.png
Nicer session
Of course, a gnome terminal isn't all that pretty. Unfortunately, running a full gnome-session is tricky, because it will conflict with your current running session. If you put the following lines:
#!/bin/bash
eval `dbus-launch --sh-syntax –exit-with-session`
exec  gnome-session
in an executable bash script and pass that script to --xsession, you'll get a full Gnome session. You may have to do further tweaking to get applications like Firefox to run well also.
Note.png
XDMCP support
XDMCP, in theory, would let you run an Xspice session that would allow anyone to log in to a new session. Simply passing '-query <hostname-running-XDMCP>' instead of the '--xsession /usr/bin/gnome-terminal' should accomplish this. Unfortunately, gdm does not currently support this, due to bug 690926. You can install xdm to accomplish this result instead.

[edit] spice-html5

Spice provides a pure HTML5 client option. To use this, you will need to have the spice-html5 and python-websockify packages installed. Then, start a Spice server as you normally would (see either the Xspice or QEMU sections, above).

  • Install the Apache configuration file
 sudo cp /usr/share/doc/spice-html5*/apache.conf.sample /etc/httpd/conf.d/spice.conf
 sudo systemctl restart httpd
  • Start websockify, providing a new port, and the host and port where the Spice server is running.
 websockify 5959 localhost:5900
  • Open a web browser, and navigate to http://<system-with-apache>/spice/

Enter the address of the system running websockify, and the port (e.g. 5959) you specified when you invoked websockify, and click 'Start'. You should now see your Spice session.

[edit] User Experience

[edit] Dependencies

  • qemu


[edit] Documentation

Note that most of the official documentation is generally badly out of date.

[edit] Release Notes

  • Fedora 14 introduces the Spice framework for desktop virtualization.

[edit] Comments and Discussion