summaryrefslogtreecommitdiffstats
path: root/docs/manual/SpiceUserManual-Installation.xml
blob: 4e883acdc87d9000741263b8c7801f457a1cd921 (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
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rng" type="xml"?>

<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
    <title>Installation</title>
    
    <section xml:id="rhel_fedora">
        <title>Installing Spice on RHEL or Fedora </title>
        <para>
            Be aware that RHEL has no builds of qemu/spice-server for i386, only x86_64 builds are available.
        </para>
        <section>
            <title>RHEL &gt;=6 and Fedora &gt;=13</title>
            <para>
                <screen>yum install qemu-kvm virt-viewer</screen>
            </para>
            <para>
                The package spice-protocol will be downloaded automatically as a dependency of package kvm.
            </para>
        </section>
        <section><title>RHEVM Users</title>
            <para>
                <emphasis role="bold">
                    <link xlink:href="http://www.ovirt.org">oVirt</link>/RHEVM users
                    could be also interested in the spice-xpi package as it allows you
                    to execute spice-client directly from the oVirt/RHEVM UserPortal.
                </emphasis>
                <screen>yum install spice-xpi</screen>
            </para>
        </section>
    </section>
    
    <section xml:id="linux_generic">
        <title>Generic Build Instructions</title>
        
        <para>
            This section is for distributions that don't have *spice* packages in their repositories.
            It will show you step by step how to build the required spice components.
        </para>
        
        <section xml:id="req_client">
            <title>Client requirements</title>
            
            <orderedlist>
                <listitem><para><emphasis role="bold">autotools</emphasis></para></listitem>
                <listitem><para><emphasis role="bold">gtk+2 &gt; 2.18 or gtk+3</emphasis></para></listitem>
                <listitem><para><emphasis role="bold">celt = 0.5.1.3</emphasis> The exact version is required due to the lack of backwards compatibility in newer celt releases.</para></listitem>
                <listitem><para><emphasis role="bold">cyrus-sasl</emphasis></para></listitem>
                <listitem><para><emphasis role="bold">pixman</emphasis></para></listitem>
                <listitem><para><emphasis role="bold">openssl</emphasis></para></listitem>
                <listitem><para><emphasis role="bold">pyparsing</emphasis></para></listitem>
                <listitem><para><emphasis role="bold">usbredir</emphasis></para></listitem>
                <listitem><para><emphasis role="bold">PolicyKit</emphasis></para></listitem>
            </orderedlist>
        </section>
        
        <section xml:id="req_host">
            <title>Host requirements</title>
            <orderedlist>
                <listitem><para><emphasis role="bold">KVM supported by kernel</emphasis> (It should work also without KVM, but
                        it's not being tested as most Linux distrubitions already support
                        KVM.)</para></listitem>
            </orderedlist>
            
        </section>
        
        <section>
            <title>Guest requirements</title>
            <section>
                <title>Linux Guest</title>
                <para>
                    spice-vdagent requires virtio-serial support to be enabled. This is described in the <link xlink:href="SpiceUserManual-Basics.xml#basics">chapter Spice basics</link>.
                    Guest should have installed qxl driver (xorg-x11-drv-qxl on Fedora and RHEL).
                </para>
            </section>
            <section>
                <title>Windows Guest</title>
                <para>
                    Drivers for QXL and drivers for virtio-serial require Win XP SP3 and Win 7.
                </para>
            </section>
            
            <section xml:id="setting_be">
                <title>Setting up the build environment</title>
                
                <para>
                    <emphasis role="bold">This is a list of prerequisites on RHEL or Fedora. Install
                        equivalent packages for your distribution in case that you're not using RHEL
                        or Fedora.</emphasis>
                </para>
                <para>
                    <emphasis role="bold">All prerequisites for Windows are available in one big package which is available
                        at <link xlink:href="http://spice-space.org/download.html">http://spice-space.org/download.html</link>.</emphasis>
                </para>
                <screen>yum install git pixman-devel celt051-devel cegui-devel libjpeg-devel alsa-lib-devel log4cpp-devel \
                openssl-devel libXrandr-devel libgcrypt-devel SDL-devel nss-devel dev86 iasl pyparsing</screen>
                
                <para>
                    <emphasis role="bold">Package prerequisites for Ubuntu</emphasis>
                </para>
                <screen>apt-get install build-essential autoconf git-core libtool liblog4cpp5-dev libavcodec-dev \
                libssl-dev xlibmesa-glu-dev libasound-dev libpng12-dev libfreetype6-dev libfontconfig1-dev \
                libogg-dev libxrandr-dev kvm libgcrypt-dev libsdl-dev</screen>
                
            </section>
            
            <section xml:id="building_libcacard">
                <title>Building libcacard</title>
                <para>Fedora &gt;=14 RHEL &gt;=6.1 has libcacard already available. So you can install it directly trough yum.</para>
                <screen>yum install libcacard</screen>
                <para>Otherwise follow these instructions. <emphasis role="bold">The environment
                        variable $BUILD_ROOT will point to a directory with stored sources and will
                        be used during the whole build process. The variable $INST_ROOT will point to a
                        directory in which Spice will be installed.</emphasis></para>
                <screen>export BUILD_ROOT=/tmp/spice; mkdir $BUILD_ROOT; cd $BUILD_ROOT;
export INST_ROOT="/opt/spice"; mkdir $INST_ROOT
git clone git://anongit.freedesktop.org/~alon/libcacard
cd libcacard
./configure --prefix=/usr --libdir=/usr/lib64 # Ignore --libdir at Ubuntu
make
make install</screen>
                
            </section>
            
            <section xml:id="getting_client">
                <title>Getting client sources</title>
                
                <screen>cd $BUILD_ROOT
git clone git://cgit.freedesktop.org/spice/spice-protocol
git clone git://cgit.freedesktop.org/spice/spice
wget http://downloads.us.xiph.org/releases/celt/celt-0.5.1.3.tar.gz
tar xvzf celt-0.5.1.3.tar.gz
                </screen>
            </section>
            
            <section xml:id="getting_server">
                <title>Getting client/server sources</title>
                <para>Skip this section if you don't want to build server side.</para>
                <screen>cd $BUILD_ROOT
git clone git://cgit.freedesktop.org/spice/qemu
cd qemu; git checkout -b spice.v13 origin/spice.v13; cd ..
git clone git://cgit.freedesktop.org/spice/spice-protocol
git clone git://cgit.freedesktop.org/spice/spice
git clone git://cgit.freedesktop.org/spice/win32/vd_agent
git clone git://cgit.freedesktop.org/spice/win32/qxl
git clone git://cgit.freedesktop.org/spice/slirp
wget http://downloads.us.xiph.org/releases/celt/celt-0.5.1.3.tar.gz
tar xvzf celt-0.5.1.3.tar.gz</screen>
                
            </section>
            
            <section xml:id="building_common">
                <title>Building common sources.</title>
                <para>This part applies to both server and client build process.</para>
                <screen>cd $BUILD_ROOT/spice-protocol
mkdir m4
./autogen.sh --prefix=$INST_ROOT
sudo make install
cd $BUILD_ROOT/celt-0.5.1.3
./configure --prefix=$INST_ROOT
sudo make install
</screen>
                
            </section>
            <section>
                <title>Building client side tools</title>
                <screen>cd $BUILD_ROOT/spice
./autogen.sh --prefix=$INST_ROOT --enable-smartcard
cd client
sudo make install</screen>
            </section>
            
            <section>
                <title>Building server side tools</title>
                <para>These instructions contain flags for a minimal working build of qemu with Spice support enabled.
                    You might want to build qemu with  the --enable-io-thread option</para>
                <screen>cd $SRC_ROOT/qemu
./configure --prefix=$INST_ROOT --target-list=x86_64-softmmu --enable-spice
make</screen>
            </section>
            
        </section>
        
        <section>
            <title>Setting up PATH</title>
            <para>Last steps before starting with Spice are to set proper PATH variable.
            For example RHEL is using /usr/libexec as directory for spicec and qemu-kvm binaries.
            The following setup should be suitable for qemu and Spice built according to the instructions in
            this chapter.</para>
            
           
            <screen>echo "export PATH=$PATH:$INST_ROOT/bin:$BUILD_ROOT/x86_64-softmmu >> ~/.bashrc
source ~/.bashrc</screen>
            
            <para>You should now be able to access the qemu-system-x86_64 and spicec binaries.</para>
        </section>
    </section>
    
</chapter>