2007-11-27 15:41:32 +00:00
<?xml version="1.0" encoding="ISO-8859-1"?>
2008-04-25 16:23:51 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2008-04-23 17:08:31 +00:00
< html xmlns = "http://www.w3.org/1999/xhtml" >
<!--
This file is autogenerated from windows.html.in
Do not edit this file. Changes will be lost.
-->
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=ISO-8859-1" / >
< link rel = "stylesheet" type = "text/css" href = "main.css" / >
< link rel = "SHORTCUT ICON" href = "32favicon.png" / >
< title > libvirt: Windows support< / title >
< meta name = "description" content = "libvirt, virtualization, virtualization API" / >
< / head >
< body >
< div id = "header" >
< div id = "headerLogo" > < / div >
< div id = "headerSearch" >
2008-04-25 16:23:51 +00:00
< form action = "search.php" enctype = "application/x-www-form-urlencoded" method = "get" > < div >
< input id = "query" name = "query" type = "text" size = "12" value = "" / >
< input id = "submit" name = "submit" type = "submit" value = "Search" / >
< / div > < / form >
2008-04-23 17:08:31 +00:00
< / div >
< / div >
< div id = "body" >
2008-04-25 16:23:51 +00:00
< div id = "menu" >
< ul class = "l0" > < li >
< div >
< a title = "Front page of the libvirt website" class = "inactive" href = "index.html" > Home< / a >
< / div >
< / li > < li >
< div >
< a title = "Details of new features and bugs fixed in each release" class = "inactive" href = "news.html" > News< / a >
< / div >
< / li > < li >
< div >
< a title = "Get the latest source releases, binary builds and get access to the source repository" class = "inactive" href = "downloads.html" > Downloads< / a >
< / div >
< / li > < li >
< div >
< a title = "Information for users, administrators and developers" class = "active" href = "docs.html" > Documentation< / a >
< ul class = "l1" > < li >
< div >
< a title = "Information about deploying and using libvirt" class = "active" href = "deployment.html" > Deployment< / a >
< ul class = "l2" > < li >
< div >
< a title = "The URI formats used for connecting to libvirt" class = "inactive" href = "uri.html" > URI format< / a >
< / div >
< / li > < li >
< div >
< a title = "Enable remote access over TCP" class = "inactive" href = "remote.html" > Remote access< / a >
< / div >
< / li > < li >
< div >
< a title = "Configure authentication for the libvirt daemon" class = "inactive" href = "auth.html" > Authentication< / a >
< / div >
< / li > < li >
< div >
< span class = "active" > Windows port< / span >
< / div >
< / li > < / ul >
< / div >
< / li > < li >
< div >
< a title = "Overview of the logical subsystems in the libvirt API" class = "inactive" href = "intro.html" > Architecture< / a >
< / div >
< / li > < li >
< div >
< a title = "Description of the XML formats used in libvirt" class = "inactive" href = "format.html" > XML format< / a >
< / div >
< / li > < li >
< div >
< a title = "Hypervisor specific driver information" class = "inactive" href = "drivers.html" > Drivers< / a >
< / div >
< / li > < li >
< div >
< a title = "Reference manual for the C public API" class = "inactive" href = "html/index.html" > API reference< / a >
< / div >
< / li > < li >
< div >
< a title = "Bindings of the libvirt API for other languages" class = "inactive" href = "bindings.html" > Language bindings< / a >
< / div >
< / li > < / ul >
< / div >
< / li > < li >
< div >
< a title = "User contributed content" class = "inactive" href = "http://wiki.libvirt.org" > Wiki< / a >
< / div >
< / li > < li >
< div >
< a title = "Frequently asked questions" class = "inactive" href = "FAQ.html" > FAQ< / a >
< / div >
< / li > < li >
< div >
< a title = "How and where to report bugs and request features" class = "inactive" href = "bugs.html" > Bug reports< / a >
< / div >
< / li > < li >
< div >
< a title = "How to contact the developers via email and IRC" class = "inactive" href = "contact.html" > Contact< / a >
< / div >
< / li > < li >
< div >
< a title = "Miscellaneous links of interest related to libvirt" class = "inactive" href = "relatedlinks.html" > Related Links< / a >
< / div >
< / li > < li >
< div >
< a title = "Overview of all content on the website" class = "inactive" href = "sitemap.html" > Sitemap< / a >
< / div >
< / li > < / ul >
< / div >
2008-04-23 17:08:31 +00:00
< div id = "content" >
< h1 > Windows support< / h1 >
< p >
2007-11-28 13:22:16 +00:00
Instructions for compiling and installing libvirt on Windows.
2008-04-23 17:08:31 +00:00
< / p >
< ul > < li >
< a href = "#Windows_binaries" > Binaries< / a >
< / li > < li >
< a href = "#Windows_compiling" > Compiling from source< / a >
< / li > < / ul >
< h3 >
< a name = "Windows_binaries" id = "Windows_binaries" > Binaries< / a >
< / h3 >
< p >
2007-11-28 13:22:16 +00:00
Binaries will be available from
< a href = "ftp://libvirt.org/libvirt/win32" > the download area< / a >
(but we don't have binaries at the moment).
2008-04-23 17:08:31 +00:00
< / p >
< h3 >
< a name = "Windows_compiling" id = "Windows_compiling" > Compiling from source< / a >
< / h3 >
< p >
2007-11-28 13:22:16 +00:00
These are the steps to compile libvirt and the other
tools from source on Windows.
2008-04-23 17:08:31 +00:00
< / p >
< p >
2007-11-28 13:22:16 +00:00
You will need:
2008-04-23 17:08:31 +00:00
< / p >
< ol > < li > MS Windows. Microsoft makes free (as beer) versions
2007-11-28 13:22:16 +00:00
of some of its operating systems available to
< a href = "http://msdn.microsoft.com/" > MSDN subscribers< / a > .
We used Windows 2008 Server for testing, virtualized under
Linux using KVM-53 (earlier versions of KVM and QEMU won't
run recent versions of Windows because of lack of full ACPI
support, so make sure you have the latest KVM).
2008-04-23 17:08:31 +00:00
< / li > < li > < a href = "http://www.cygwin.com/" > Cygwin< / a > 's
2007-11-28 13:22:16 +00:00
< a href = "http://www.cygwin.com/setup.exe" > setup.exe< / a > .
2008-04-23 17:08:31 +00:00
< / li > < li > A large amount of free disk space to install Cygwin.
2007-11-28 13:22:16 +00:00
Make sure you have 10 GB free to install most Cygwin packages,
although if you pare down the list of dependencies you may
2008-04-23 17:08:31 +00:00
get away with much less. < / li > < li > A network connection for Windows, since Cygwin downloads packages
from the net as it installs. < / li > < li >
< a href = "http://www.libvirt.org/downloads.html" > Libvirt
latest version from CVS< / a >
< / li > < li > The latest source patch from
< a href = "ftp://libvirt.org/libvirt/win32" > the download area< / a > . < / li > < li > A version of Cygwin sunrpc, patched to support building
2007-11-29 16:21:52 +00:00
< code > librpc.dll< / code > .
A patch and a binary package are available from
2008-04-23 17:08:31 +00:00
< a href = "ftp://libvirt.org/libvirt/win32" > the download area< / a > . < / li > < / ol >
< p >
2007-11-28 13:22:16 +00:00
These are the steps to take to compile libvirt from
source on Windows:
2008-04-23 17:08:31 +00:00
< / p >
< ol > < li >
< p > Run Cygwin
2007-11-28 13:22:16 +00:00
< a href = "http://www.cygwin.com/setup.exe" > setup.exe< / a > .
When it starts up it will show a dialog like this:
< / p >
2008-04-23 17:08:31 +00:00
< img src = "windows-cygwin-1.png" width = "504" height = "388" alt = "Cygwin Net Release Setup Program" / > < / li > < li >
< p > Step through the setup program accepting defaults
2007-11-28 13:22:16 +00:00
or making choices as appropriate, until you get to the
screen for selecting packages:< / p >
2008-04-23 17:08:31 +00:00
< img src = "windows-cygwin-2.png" width = "505" height = "388" alt = "Cygwin Select Packages screen" / > < p >
2007-11-28 13:22:16 +00:00
The user interface here is very confusing. You have to
click the "recycling icon" as shown by the arrow:
< / p >
2008-04-23 17:08:31 +00:00
< img src = "windows-cygwin-3.png" width = "298" height = "200" alt = "Cygwin Recycling Icon" / > < p >
2007-11-28 13:22:16 +00:00
which takes the package (and all packages in the subtree)
through several states such as "Install", "Reinstall", "Keep",
"Skip", "Uninstall", etc.
< / p >
2008-04-23 17:08:31 +00:00
< / li > < li >
< p > You can install "All" (everything) or better select
2007-11-28 13:22:16 +00:00
just the groups and packages needed. Select the following
groups and packages for installation:
< / p >
2008-04-23 17:08:31 +00:00
< table > < tr > < th valign = "top" align = "right" > Groups < / th > < td >
2007-11-28 13:22:16 +00:00
Archive < br / >
Base < br / >
Devel < br / >
Editors < br / >
Mingw < br / >
Perl < br / >
Python < br / >
2008-04-23 17:08:31 +00:00
Shells < br / > < / td > < / tr > < tr > < th valign = "top" align = "right" > Packages < / th > < td >
2007-11-28 13:22:16 +00:00
openssh < br / >
2008-04-23 17:08:31 +00:00
sunrpc ≥ 4.0-4 (see below) < br / > < / td > < / tr > < / table > < / li > < li >
< p > Once Cygwin has finished installing, start a Cygwin bash shell
2007-11-28 13:22:16 +00:00
(either click on the desktop icon or look for Cygwin bash shell
in the Start menu). < / p >
2008-04-23 17:08:31 +00:00
< p > The very first time you start the Cygwin bash shell, you may
2007-11-28 17:17:06 +00:00
find you need to run the < code > mkpasswd< / code > and < code > mkgroup< / code >
commands in order to create < code > /etc/passwd< / code > and
< code > /etc/group< / code > files from Windows users. If this
is needed then a message is printed in the shell.
Note that you need to do this as Windows Administrator. < / p >
2008-04-23 17:08:31 +00:00
< / li > < li >
< p > Install Cygwin sunrpc ≥ 4.0-4 package, patched to include
2007-11-29 16:21:52 +00:00
< code > librpc.dll< / code > .
To do this, first check to see whether < code > /usr/lib/librpc.dll< / code >
exists. If it does, you're good to go and can skip to the next
step. < / p >
2008-04-23 17:08:31 +00:00
< p >
2007-11-29 16:21:52 +00:00
If you don't have this file, either install the binary package
< 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).
Or you can download the
< a href = "ftp://libvirt.org/libvirt/win32/sunrpc-4.0-dll.patch" > source patch< / a >
and apply it by hand to the Cygwin sunrpc package (eg. using
cygport).
< / p >
2008-04-23 17:08:31 +00:00
< / li > < li >
< p >
2007-11-28 13:22:16 +00:00
Check out
< a href = "http://www.libvirt.org/downloads.html" > Libvirt from CVS< / a > and
< a href = "ftp://libvirt.org/libvirt/win32" > apply the latest Windows patch< / a >
to the source.
< / p >
2008-04-23 17:08:31 +00:00
< / li > < li >
< p > Configure libvirt by doing: < / p >
< pre >
2007-11-28 13:22:16 +00:00
autoreconf
./configure --without-xen --without-qemu
< / pre >
2008-04-23 17:08:31 +00:00
< p > (The autoreconf step is probably optional). < / p >
< p > The configure step will tell you if you have all the
2007-11-28 13:22:16 +00:00
required parts installed. If something is missing you
will need to go back through Cygwin setup and install it.
< / p >
2008-04-23 17:08:31 +00:00
< / li > < li >
< p > Rebuild the XDR structures: < / p >
< pre >
2007-11-28 13:22:16 +00:00
rm qemud/remote_protocol.[ch] qemud/remote_dispatch_*.h
make -C qemud remote_protocol.c
< / pre >
2008-04-23 17:08:31 +00:00
< / li > < li >
< p > Build: < / p >
< pre >
2007-11-28 13:22:16 +00:00
make
< / pre >
2008-04-23 17:08:31 +00:00
< p > If this step is not successful, you should post a full
2007-11-28 13:22:16 +00:00
report < i > including complete messages< / i > to
< a href = "http://www.redhat.com/mailman/listinfo/libvir-list" > the
libvirt mailing list< / a > .
< / p >
2008-04-23 17:08:31 +00:00
< / li > < li >
< p > Test it. If you have access to a remote machine
2007-11-28 13:22:16 +00:00
running Xen or QEMU/KVM, and the libvirt daemon (< code > libvirtd< / code > )
then you should be able to connect to it and display
domains using, eg:
< / p >
2008-04-23 17:08:31 +00:00
< pre >
2007-11-28 13:22:16 +00:00
src/virsh.exe < a href = "http://libvirt.org/uri.html" > -c qemu://remote/system< / a > list --all
< / pre >
2008-04-23 17:08:31 +00:00
< p >
2007-11-28 13:22:16 +00:00
Please read more about < a href = "http://libvirt.org/remote.html" > remote
support< / a > before sending bug reports, to make sure that
any problems are really Windows and not just with remote
configuration / security.
< / p >
2008-04-23 17:08:31 +00:00
< / li > < li >
< p >
2007-11-28 13:22:16 +00:00
You may want to install the library and programs by doing:
< / p >
2008-04-23 17:08:31 +00:00
< pre >
2007-11-28 13:22:16 +00:00
make install
< / pre >
2008-04-23 17:08:31 +00:00
< / li > < li >
< p >
2007-11-29 16:21:52 +00:00
The above steps should also build and install Python modules.
However for reasons which I don't fully understand, Python won't
look in the
non-standard < code > /usr/local/lib/python*/site-packages/< / code >
directory by default so you may need to set the environment
variable PYTHONPATH:
< / p >
2008-04-23 17:08:31 +00:00
< pre >
2007-11-29 16:21:52 +00:00
export PYTHONPATH=/usr/local/lib/python2.5/site-packages
< / pre >
2008-04-23 17:08:31 +00:00
< p >
2007-11-29 16:21:52 +00:00
(Change the version number to your version of Python). You
can test Python support from the command line:
< / p >
2008-04-23 17:08:31 +00:00
< pre >
2007-11-29 16:21:52 +00:00
python
> > > import libvirt
> > > conn = libvirt.open ("test:///default")
> > > conn.listDomainsID ()
[1]
> > > dom = conn.lookupByID (1)
> > > dom.XMLDesc (0)
"< domain type='test' id='1'> ..."
< / pre >
2008-04-23 17:08:31 +00:00
< p >
2007-11-29 16:21:52 +00:00
The most common failure will be with < code > import libvirt< / code >
which usually indicates that either < code > PYTHONPATH< / code > is
wrong or a DLL cannot be loaded.
< / p >
2008-04-23 17:08:31 +00:00
< / li > < / ol >
< / div >
< / div >
< div id = "footer" >
< div id = "projects" >
< dl id = "p1" > < dt >
< a href = "http://augeas.net/" > Augeas< / a >
< / dt > < dd >
< span > A configuration editing tool and API< / span >
< / dd > < dt >
< a href = "http://libvirt.org/" > libvirt< / a >
< / dt > < dd >
< span > The open source virtualization API< / span >
< / dd > < / dl >
< dl id = "p2" > < dt >
< a href = "http://cobbler.et.redhat.com/" > Cobbler< / a >
< / dt > < dd >
< span > OS provisioning and profile management< / span >
< / dd > < dt >
< a href = "http://ovirt.org/" > oVirt< / a >
< / dt > < dd >
< span > Virtualization management across the data center< / span >
< / dd > < / dl >
< dl id = "p3" > < dt >
< a href = "http://freeipa.org/" > FreeIPA< / a >
< / dt > < dd >
< span > Identity, policy and audit management< / span >
< / dd > < dt >
< a href = "http://virt-manager.org/" > Virtual Machine Manager< / a >
< / dt > < dd >
< span > Virtualization management from the desktop< / span >
< / dd > < / dl >
< / div >
< / div >
< / body >
< / html >