~ubuntu-branches/ubuntu/maverick/libvirt/maverick

« back to all changes in this revision

Viewing changes to docs/windows.html.in

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2008-06-25 18:51:21 UTC
  • mto: (3.1.1 lenny) (1.2.1 upstream) (0.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: james.westby@ubuntu.com-20080625185121-8dku38gpoluks1bx
Tags: upstream-0.4.4
ImportĀ upstreamĀ versionĀ 0.4.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<html>
 
3
  <body>
 
4
    <h1 >Windows support</h1>
 
5
    <p>
 
6
Instructions for compiling and installing libvirt on Windows.
 
7
</p>
 
8
    <ul>
 
9
      <li>
 
10
        <a href="#Windows_binaries">Binaries</a>
 
11
      </li>
 
12
      <li>
 
13
        <a href="#Windows_compiling">Compiling from source</a>
 
14
      </li>
 
15
    </ul>
 
16
    <h3>
 
17
      <a name="Windows_binaries" id="Windows_binaries">Binaries</a>
 
18
    </h3>
 
19
    <p>
 
20
Binaries will be available from
 
21
<a href="ftp://libvirt.org/libvirt/win32">the download area</a>
 
22
(but we don't have binaries at the moment).
 
23
</p>
 
24
    <h3>
 
25
      <a name="Windows_compiling" id="Windows_compiling">Compiling from source</a>
 
26
    </h3>
 
27
    <p>
 
28
These are the steps to compile libvirt and the other
 
29
tools from source on Windows.
 
30
</p>
 
31
    <p>
 
32
You will need:
 
33
</p>
 
34
    <ol>
 
35
      <li> MS Windows.  Microsoft makes free (as beer) versions
 
36
of some of its operating systems available to
 
37
<a href="http://msdn.microsoft.com/">MSDN subscribers</a>.
 
38
We used Windows 2008 Server for testing, virtualized under
 
39
Linux using KVM-53 (earlier versions of KVM and QEMU won't
 
40
run recent versions of Windows because of lack of full ACPI
 
41
support, so make sure you have the latest KVM).
 
42
</li>
 
43
      <li><a href="http://www.cygwin.com/">Cygwin</a>'s
 
44
<a href="http://www.cygwin.com/setup.exe">setup.exe</a>.
 
45
</li>
 
46
      <li> A large amount of free disk space to install Cygwin.
 
47
Make sure you have 10 GB free to install most Cygwin packages,
 
48
although if you pare down the list of dependencies you may
 
49
get away with much less. </li>
 
50
      <li> A network connection for Windows, since Cygwin downloads packages
 
51
from the net as it installs. </li>
 
52
      <li>
 
53
        <a href="http://www.libvirt.org/downloads.html">Libvirt
 
54
latest version from CVS</a>
 
55
      </li>
 
56
      <li> The latest source patch from
 
57
<a href="ftp://libvirt.org/libvirt/win32">the download area</a>. </li>
 
58
      <li> A version of Cygwin sunrpc, patched to support building
 
59
  <code>librpc.dll</code>.
 
60
  A patch and a binary package are available from
 
61
  <a href="ftp://libvirt.org/libvirt/win32">the download area</a>. </li>
 
62
    </ol>
 
63
    <p>
 
64
These are the steps to take to compile libvirt from
 
65
source on Windows:
 
66
</p>
 
67
    <ol>
 
68
      <li>
 
69
        <p>Run Cygwin
 
70
    <a href="http://www.cygwin.com/setup.exe">setup.exe</a>.
 
71
    When it starts up it will show a dialog like this:
 
72
  </p>
 
73
        <img src="windows-cygwin-1.png" width="504" height="388" alt="Cygwin Net Release Setup Program"/>
 
74
      </li>
 
75
      <li>
 
76
        <p>Step through the setup program accepting defaults
 
77
    or making choices as appropriate, until you get to the
 
78
    screen for selecting packages:</p>
 
79
        <img src="windows-cygwin-2.png" width="505" height="388" alt="Cygwin Select Packages screen"/>
 
80
        <p>
 
81
    The user interface here is very confusing.  You have to
 
82
    click the "recycling icon" as shown by the arrow:
 
83
  </p>
 
84
        <img src="windows-cygwin-3.png" width="298" height="200" alt="Cygwin Recycling Icon"/>
 
85
        <p>
 
86
    which takes the package (and all packages in the subtree)
 
87
    through several states such as "Install", "Reinstall", "Keep",
 
88
    "Skip", "Uninstall", etc.
 
89
  </p>
 
90
      </li>
 
91
      <li>
 
92
        <p>You can install "All" (everything) or better select
 
93
    just the groups and packages needed.  Select the following
 
94
    groups and packages for installation:
 
95
  </p>
 
96
        <table>
 
97
          <tr>
 
98
            <th valign="top" align="right"> Groups </th>
 
99
            <td>
 
100
        Archive <br/>
 
101
        Base <br/>
 
102
        Devel <br/>
 
103
        Editors <br/>
 
104
        Mingw <br/>
 
105
        Perl <br/>
 
106
        Python <br/>
 
107
        Shells <br/></td>
 
108
          </tr>
 
109
          <tr>
 
110
            <th valign="top" align="right"> Packages </th>
 
111
            <td>
 
112
        openssh <br/>
 
113
        sunrpc &#x2265; 4.0-4 (see below) <br/></td>
 
114
          </tr>
 
115
        </table>
 
116
      </li>
 
117
      <li>
 
118
        <p> Once Cygwin has finished installing, start a Cygwin bash shell
 
119
    (either click on the desktop icon or look for Cygwin bash shell
 
120
    in the Start menu). </p>
 
121
        <p> The very first time you start the Cygwin bash shell, you may
 
122
    find you need to run the <code>mkpasswd</code> and <code>mkgroup</code>
 
123
    commands in order to create <code>/etc/passwd</code> and
 
124
    <code>/etc/group</code> files from Windows users.  If this
 
125
    is needed then a message is printed in the shell.
 
126
    Note that you need to do this as Windows Administrator. </p>
 
127
      </li>
 
128
      <li>
 
129
        <p> Install Cygwin sunrpc &#x2265; 4.0-4 package, patched to include
 
130
    <code>librpc.dll</code>.
 
131
    To do this, first check to see whether <code>/usr/lib/librpc.dll</code>
 
132
    exists.  If it does, you're good to go and can skip to the next
 
133
    step. </p>
 
134
        <p>
 
135
    If you don't have this file, either install the binary package
 
136
    <a href="ftp://libvirt.org/libvirt/win32/sunrpc-4.0-4.tar.bz2">sunrpc-4.0-4.tar.bz2</a> (just unpack it, as Administrator, in the Cygwin root directory).
 
137
    Or you can download the
 
138
    <a href="ftp://libvirt.org/libvirt/win32/sunrpc-4.0-dll.patch">source patch</a>
 
139
    and apply it by hand to the Cygwin sunrpc package (eg. using
 
140
    cygport).
 
141
  </p>
 
142
      </li>
 
143
      <li>
 
144
        <p>
 
145
    Check out
 
146
    <a href="http://www.libvirt.org/downloads.html">Libvirt from CVS</a> and
 
147
    <a href="ftp://libvirt.org/libvirt/win32">apply the latest Windows patch</a>
 
148
    to the source.
 
149
  </p>
 
150
      </li>
 
151
      <li>
 
152
        <p> Configure libvirt by doing: </p>
 
153
        <pre>
 
154
autoreconf
 
155
./configure --without-xen --without-qemu
 
156
</pre>
 
157
        <p> (The autoreconf step is probably optional). </p>
 
158
        <p> The configure step will tell you if you have all the
 
159
    required parts installed.  If something is missing you
 
160
    will need to go back through Cygwin setup and install it.
 
161
  </p>
 
162
      </li>
 
163
      <li>
 
164
        <p> Rebuild the XDR structures: </p>
 
165
        <pre>
 
166
rm qemud/remote_protocol.[ch] qemud/remote_dispatch_*.h
 
167
make -C qemud remote_protocol.c
 
168
</pre>
 
169
      </li>
 
170
      <li>
 
171
        <p> Build: </p>
 
172
        <pre>
 
173
make
 
174
</pre>
 
175
        <p> If this step is not successful, you should post a full
 
176
    report <i>including complete messages</i> to
 
177
    <a href="http://www.redhat.com/mailman/listinfo/libvir-list">the
 
178
      libvirt mailing list</a>.
 
179
  </p>
 
180
      </li>
 
181
      <li>
 
182
        <p> Test it.  If you have access to a remote machine
 
183
    running Xen or QEMU/KVM, and the libvirt daemon (<code>libvirtd</code>)
 
184
    then you should be able to connect to it and display
 
185
    domains using, eg:
 
186
  </p>
 
187
        <pre>
 
188
src/virsh.exe <a href="http://libvirt.org/uri.html">-c qemu://remote/system</a> list --all
 
189
</pre>
 
190
        <p>
 
191
    Please read more about <a href="http://libvirt.org/remote.html">remote
 
192
      support</a> before sending bug reports, to make sure that
 
193
    any problems are really Windows and not just with remote
 
194
    configuration / security.
 
195
  </p>
 
196
      </li>
 
197
      <li>
 
198
        <p>
 
199
    You may want to install the library and programs by doing:
 
200
  </p>
 
201
        <pre>
 
202
make install
 
203
</pre>
 
204
      </li>
 
205
      <li>
 
206
        <p>
 
207
    The above steps should also build and install Python modules.
 
208
    However for reasons which I don't fully understand, Python won't
 
209
    look in the
 
210
    non-standard <code>/usr/local/lib/python*/site-packages/</code>
 
211
    directory by default so you may need to set the environment
 
212
    variable PYTHONPATH:
 
213
  </p>
 
214
        <pre>
 
215
export PYTHONPATH=/usr/local/lib/python2.5/site-packages
 
216
</pre>
 
217
        <p>
 
218
    (Change the version number to your version of Python).  You
 
219
    can test Python support from the command line:
 
220
  </p>
 
221
        <pre>
 
222
python
 
223
&gt;&gt;&gt; import libvirt
 
224
&gt;&gt;&gt; conn = libvirt.open ("test:///default")
 
225
&gt;&gt;&gt; conn.listDomainsID ()
 
226
[1]
 
227
&gt;&gt;&gt; dom = conn.lookupByID (1)
 
228
&gt;&gt;&gt; dom.XMLDesc (0)
 
229
"&lt;domain type='test' id='1'&gt; ..."
 
230
</pre>
 
231
        <p>
 
232
    The most common failure will be with <code>import libvirt</code>
 
233
    which usually indicates that either <code>PYTHONPATH</code> is
 
234
    wrong or a DLL cannot be loaded.
 
235
  </p>
 
236
      </li>
 
237
    </ol>
 
238
  </body>
 
239
</html>