summaryrefslogtreecommitdiff
path: root/books/docbook/user_guide.sgm
blob: d0ff8e9bdde7d819545d182d8474d40c532966fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<?xml version='1.0'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
               "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<book>
<bookinfo>
<title>Spice User Manual</title>

<authorgroup>

<author>
<firstname>Lubos</firstname>
<surname>Kocman</surname>
</author>

<author>
<firstname>Arnon</firstname>
<surname>Gilboa</surname>
</author>

</authorgroup>

<copyright>
<year>2009</year>
<year>2010</year>
<year>2011</year>
<holder>Red Hat, Inc.</holder>
</copyright>

<legalnotice>
<para>
Licensed under a Creative Commons Attribution-Share Alike 3.0 United States License (see <ulink url="http://creativecommons.org/licenses/by-sa/3.0/us/legalcode">http://creativecommons.org/licenses/by-sa/3.0/us/legalcode</ulink>).
</para>
</legalnotice>
<releaseinfo>Draft 54</releaseinfo>
</bookinfo>

<chapter id="introduction">
<title>Introduction</title>
<para>
Spice is an open remote computing solution, providing client access to remote  displays and devices (e.g. keyboard, mouse, audio). Spice provides a desktop like user experience, while trying to offload most of the intensive CPU and GPU tasks to the client. 

The basic building blocks of Spice are:
</para>

<orderedlist>
<listitem>
<para>Spice protocol</para>
</listitem>
<listitem>
<para>Spice server</para>
</listitem>
<listitem><para>Spice client</para>
</listitem>
</orderedlist>

<para>
The following sections provide basic iformation on Spice components and features, obtaining, building installing and using Spice.
</para>

<section>
<title>Spice and Spice-related Compoments</title>

<section>
<title>Spice Server</title>

<para>
Spice server is implemented in libspice, a VDI pluggable library. Virtual Device Interface (VDI) defines a set of interfaces that provide a standard way to publish virtual devices (e.g. display device, keyboard, mouse) and enables different Spice components to interact with those devices. For more information, refer to [2]. On one side, the server communicates with the remote client using the Spice protocol and on the other side, it interacts with the VDI host application (e.g QEMU). 
</para>
</section>

<section>
<title>Spice Client</title>

<para>Spice cross-platform (Linux & Windows) client is the interface for the end user.</para>
</section>

<section>
<title>QXL Device and Drivers</title>
<para>
Spice server supports QXL VDI interface. When libspice is used with QEMU, a specific QEMU  QXL PCI device can be used for improving remote display performance and enhancing the graphic capabilities of the guest graphic system. QXL device requires guest QXL drivers for full functionality. However, standard VGA is supported when no driver exists. 
</para>
</section>

<section>
<title>VDI Port Device</title>

<para>
Spice protocol supports a communication channel between the client and the agent on the server side. When using QEMU, Spice agent resides on the guest. VDI port is a QEMU PCI device used for communication with the agent.
</para>
</section>

<section>
<title>Spice Agent</title>

<para>
The Spice agent is an optional component for enhancing user experience and performing guest-oriented management tasks. For example, the agent injects mouse position and state to the guest when using client mouse mode. In addition, it is used for configuration of the guest display settings.
</para>
</section>
</section>

<section>
<title>Features</title>

<section>
<title>Multiple Channels</title>

<para>
The server and client communicate via channels. Each channel is dedicated to a specific type of data. The available channels are:
</para>

<orderedlist>
<listitem>
<para>Main -  control and configuration</para>
</listitem>
<listitem>
<para>Display -  graphics commands images and video streams</para>
</listitem>
<listitem>
<para>Inputs - keyboard and mouse inputs</para>
</listitem> 
<listitem>
<para>Cursor - pointer device position and cursor shape</para>
</listitem>
<listitem>
<para>Playback - audio received from the server to be played by the client</para>
</listitem>
<listitem>
<para>Record - audio capture on the client side</para>
</listitem>
</orderedlist>

</section>

<section>
<title>Image Compression</title>

<para>
Spice offers several image compression algorithms, which can be chosen on server initiation and  dynamically at run-time. Quic is a Spice proprietary image compression technology based on the SFALIC algorithm. The Lempel-Ziv (LZ) algorithm is another option. Both Quic and LZ are local algorithms encoding each image separately. Global LZ (GLZ) is another proprietary Spice technology that uses LZ with history based global dictionary. GLZ takes advantage of repeating patterns among images to shrink the traffic and save bandwidth, which is critical in a WAN environment. Spice also offers an automatic mode for compression selection per image, where the choice between LZ/GLZ and Quic is heuristically based on image properties. Conceptually, synthetic images are better compressed with LZ/GLZ and real images are better with Quic. 
</para>
</section>

<section>
<title>Video Compression</title>

<para>
Spice uses loss-less compression for images sent to the client. However, video streams are handled differently. Spice server heuristically identifies video areas and sends them as a video stream coded using M-JPEG. This handling saves a lot of traffic, improving Spice performance, especially in a WAN environment. However, in some circumstances the heuristic behavior might cause low quality image (e.g.  identifying updated text area as a video stream). Video streaming can be chosen on server initiation and dynamically at run-time.
</para>
</section>

<section>
<title>Mouse modes</title>

<para>
Spice supports two mouse modes: server and client. The mode can be changed dynamically and is negotiated between the client and the server.
</para>
<orderedlist>
<listitem>
<para>
<emphasis role="bold">Server mouse</emphasis> - When a user clicks inside the Spice client window, the client mouse is captured and set invisible. In this mode, the server controls the mouse position on display. However, it might be problematic on WAN or a loaded server, where mouse cursor might have some latency or non-responsiveness.
</para>
</listitem>

<listitem>
<para>
<emphasis role="bold">Client mouse</emphasis> - Not captured and is used as the effective pointing device. For enabling client mouse, VDI host application must register an absolute pointing device (e.g. USB tablet in QEMU). This mode is appropriate for WAN or loaded server, since cursor has smooth motion and responsiveness. However, the cursor might loose synchronization (position and shape) for a while.
</para>
</listitem>

</orderedlist>
</section>

<section>
<title>Other Features</title>
<orderedlist>

<listitem>
<para>
<emphasis role="bold">Multiple Monitors</emphasis> -  any number of monitors is supported
</para>
</listitem>

<listitem>
<para>
<emphasis role="bold">Bidirectional Audio</emphasis> - Spice supports audio playback and recording. Playback is compressed using the CELT algorithm
</para>
</listitem>


<listitem>
<para>
<emphasis role="bold">Lip-sync</emphasis> - between video and audio. Available only when video streaming is enabled. 
</para>
</listitem>

<listitem>
<para>
<emphasis role="bold">Migration</emphasis> - switching channel connectivity for  supporting server migration
</para>
</listitem>

<listitem>
<para>
<emphasis role="bold">Pixmap caching</emphasis>
</para>
</listitem>


</orderedlist>
</section>
</section>
</chapter>

<chapter id="installation">
<title>Installation</title>

<section>
<title>Installing Spice in RHEL or Fedora environment</title>
<para>
Be aware that there is no build of spice-server for i386 so you can run only client part on i386. The reason for it is that there is no buld of qemu-kvm for RHEL of Fedora i386 either. 
</para>
<section>
<title>RHEL 6 and Fedora &gt;=13</title>
<para>
<screen>
yum install qemu-kvm spice-client
</screen>
</para>
<para>
Package spice-protocol will be downloaded automatically as a dependency for package kvm.
</para>
</section>
<section><title>RHEL 5</title>
<para>
<screen>
yum install kvm qspice-client
</screen>
</para>
<para>
Similarly as in RHEL6 package kvm has qspice-libs as a dependency.
</para>
</section>
<section><title>RHEVM Users</title>
<para>
<emphasis role="bold">RHEVM users could  be also interested in spice-xpi package as it's allow you to execute spice-client directly from the RHEVM UserPortal.</emphasis>
<screen>
yum install spice-xpi
</screen>
</para>
</section>
</section>
</chapter>

<chapter id="running_spice">
<title>Running Spice</title>
<para>
</para>
<section>
<title>Creating image</title>
<orderedlist>
<listitem>
<para>
<emphasis role="bold">A File based image</emphasis>
<screen>qemu-img create /path/to/image.img 10G</screen>
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">You can also use logical volumes in case that you already have at least one volume group configured</emphasis>
</para>
</listitem>
</orderedlist>
</section>
</chapter>
</book>