Compare commits
321 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
35472c9274 | ||
|
5c881f35c7 | ||
|
ff05b2c4f9 | ||
|
6ca5649625 | ||
|
39a427e8ba | ||
|
ca1cebdb9e | ||
|
1917cc05a3 | ||
|
35ca0db359 | ||
|
2abde0ac07 | ||
|
fe98b65947 | ||
|
db7159a150 | ||
|
220c90e4bb | ||
|
ee92a735cb | ||
|
b50e896cee | ||
|
c1e7b1fbd1 | ||
|
71d4ccb253 | ||
|
80550d01ae | ||
|
083962fa05 | ||
|
b520cf07f0 | ||
|
dd2f524c6b | ||
|
d325704a3f | ||
|
997d97c34e | ||
|
7725e01c1f | ||
|
38e6d7b981 | ||
|
3fcc90968c | ||
|
b2c5a91197 | ||
|
d6bce88ca3 | ||
|
758a066ab3 | ||
|
086c3fbab1 | ||
|
e9c00cbc63 | ||
|
f8e651117f | ||
|
6180670cd2 | ||
|
4d695acd86 | ||
|
400a5a9290 | ||
|
e48596773f | ||
|
2c5b4c5621 | ||
|
419cb87283 | ||
|
4779cf0ff5 | ||
|
5badf8c44b | ||
|
8cb0d0893f | ||
|
b1dcd198fa | ||
|
6f42946997 | ||
|
2fd84d39b4 | ||
|
69cba17cb0 | ||
|
c02482bdd8 | ||
|
20d781692a | ||
|
9649b0a8b4 | ||
|
819df25518 | ||
|
3883ef0360 | ||
|
b9964013c3 | ||
|
9a7bbc246b | ||
|
d13b354bf0 | ||
|
eddceda2f3 | ||
|
c27523e635 | ||
|
f81800cf23 | ||
|
d4ffc36fbc | ||
|
40b0176129 | ||
|
cba63bbc22 | ||
|
a69e46813f | ||
|
cf640bdf8e | ||
|
f7ebe9d012 | ||
|
00b610c8e9 | ||
|
4da16535d0 | ||
|
3fb882a3fe | ||
|
9af9f46b09 | ||
|
95b065590f | ||
|
b20e330d67 | ||
|
ca2765a2a0 | ||
|
b1b449b3e2 | ||
|
da284a74fb | ||
|
dfd51bfc21 | ||
|
87924a1345 | ||
|
6fba8c1f37 | ||
|
870094c1e1 | ||
|
568e6651ba | ||
|
aa57eae7b1 | ||
|
2a71d969e4 | ||
|
9a5d10efc9 | ||
|
8512c27e23 | ||
|
20b07c28ec | ||
|
da54890f52 | ||
|
d838a6bca8 | ||
|
2a6cfe8ee8 | ||
|
9fc5b7da1d | ||
|
cba21fd98d | ||
|
d020d73f30 | ||
|
66d095e673 | ||
|
340ab1c91c | ||
|
91b4315b81 | ||
|
49cb53fae9 | ||
|
855d8612a2 | ||
|
e858eda3a0 | ||
|
bba793dcf5 | ||
|
e8603e5f73 | ||
|
4cb2da8cd4 | ||
|
9373f0b71b | ||
|
d312193630 | ||
|
5814e39b32 | ||
|
d2c5e42fdd | ||
|
7223766077 | ||
|
762fcc7760 | ||
|
794d6c40a1 | ||
|
f1c2127bec | ||
|
45d6729f98 | ||
|
56f97e14ab | ||
|
96aedd9aa1 | ||
|
27e6e9f212 | ||
|
d66fa967b3 | ||
|
89a3feb8b6 | ||
|
04d6469141 | ||
|
3c3aaaf95f | ||
|
e570f87a3d | ||
|
52c4d49ca3 | ||
|
e6c5ae46f7 | ||
|
0889bdb844 | ||
|
73908b1d10 | ||
|
661a2e83ef | ||
|
934e7c2217 | ||
|
a570ecd600 | ||
|
dd85b621cf | ||
|
9225f9e12f | ||
|
a016b20fa4 | ||
|
17c787562d | ||
|
6503cb1217 | ||
|
2e2a81be22 | ||
|
a52a99f5d3 | ||
|
a25ac3ac7e | ||
|
a9846e98c7 | ||
|
95ae1a06bc | ||
|
84daddb0b9 | ||
|
5840d413ad | ||
|
29263ec243 | ||
|
55157abb0b | ||
|
c7bd2b052f | ||
|
4b5a793070 | ||
|
9274256d5b | ||
|
65a405dd04 | ||
|
b24a9f3e12 | ||
|
33ada8f147 | ||
|
07fdce4fd3 | ||
|
f6e7865d27 | ||
|
2a75b756d0 | ||
|
25a35c9ce5 | ||
|
5b3c356015 | ||
|
114b726f0d | ||
|
4e1e20c3a7 | ||
|
b5df0ffe74 | ||
|
bd670db3f0 | ||
|
1ae2604552 | ||
|
aa7d50ce82 | ||
|
ab73fe59be | ||
|
37b07d90bb | ||
|
b3f0d2ecba | ||
|
0089a2058f | ||
|
dfa1548496 | ||
|
c82cbf1d48 | ||
|
da5eb7f119 | ||
|
9096dc1a5f | ||
|
cb724f8d13 | ||
|
af57c143d4 | ||
|
eb6ef1f53e | ||
|
b4bbe640ef | ||
|
0f031d181f | ||
|
99f07394f4 | ||
|
52ab82bd1c | ||
|
7fba39bc52 | ||
|
e39afdb898 | ||
|
3e416ba91f | ||
|
f44e18ed93 | ||
|
328d7da106 | ||
|
158e70fc3b | ||
|
d4d8774468 | ||
|
3600eec4d1 | ||
|
67f5578681 | ||
|
fc8700e919 | ||
|
c82da02253 | ||
|
50f508efca | ||
|
e240feae95 | ||
|
5b66c62d47 | ||
|
f9ff58276f | ||
|
50b594e486 | ||
|
6b184ba1ce | ||
|
19d309025b | ||
|
73cfdbff65 | ||
|
9a42097bf4 | ||
|
7f756f519c | ||
|
3291646d45 | ||
|
e88212d583 | ||
|
d8a1c6b70c | ||
|
856a23c2bc | ||
|
ecd9a50b76 | ||
|
6ef9ea9bbf | ||
|
a0be049f67 | ||
|
48b9eb2d55 | ||
|
d1186c589f | ||
|
df4b23c9de | ||
|
d8978c90f9 | ||
|
6884836d95 | ||
|
4f1b3e4243 | ||
|
b5b4faea50 | ||
|
1d3218ab5e | ||
|
fd9f487aca | ||
|
41a3072338 | ||
|
8f755aa295 | ||
|
0ddca6ab09 | ||
|
ce5d17b316 | ||
|
443e37da42 | ||
|
3cc52164b1 | ||
|
d617c987b7 | ||
|
18c1491697 | ||
|
05aa969fc9 | ||
|
f6936215f1 | ||
|
68563e7ad6 | ||
|
b5f86fc038 | ||
|
282bd9dc61 | ||
|
a14f23f05c | ||
|
cd94771b1d | ||
|
cf2d303d0c | ||
|
2b25ea3e15 | ||
|
ab26f4e372 | ||
|
052ef069b1 | ||
|
655d3b2b87 | ||
|
707624b3d9 | ||
|
656875281a | ||
|
20c0657406 | ||
|
7dc3258a3c | ||
|
8d19662026 | ||
|
e28cfeb11d | ||
|
d0714c927c | ||
|
4a9f92f283 | ||
|
f065174ede | ||
|
763f71e51f | ||
|
180fb3b2b4 | ||
|
588b16bbd5 | ||
|
e36af9f8c1 | ||
|
aa829d7bcd | ||
|
75a5c8225b | ||
|
2cb6a0e887 | ||
|
0f28a21bb6 | ||
|
45e60ff0f1 | ||
|
6bbfd92d22 | ||
|
d070e1d1bc | ||
|
30e02e12c1 | ||
|
30aede2279 | ||
|
fae6eb83e7 | ||
|
ce43e865a1 | ||
|
9404d15dc1 | ||
|
f587a073c6 | ||
|
7910b77c29 | ||
|
3d8345422e | ||
|
99e11c19af | ||
|
da62dd1d13 | ||
|
05cee1a9ab | ||
|
54c3a530c7 | ||
|
18adb6cf82 | ||
|
d9f909d4cd | ||
|
f80cf4938a | ||
|
b5c7516e46 | ||
|
b109b1140c | ||
|
e173e81ed9 | ||
|
0129b9ac1d | ||
|
d63f0754e3 | ||
|
5531a13c5f | ||
|
6e2847b277 | ||
|
acae5f8633 | ||
|
c954ad8a3e | ||
|
3cf61dd5f0 | ||
|
372a14c673 | ||
|
1d655dd1bb | ||
|
622c0c7f70 | ||
|
881dd9dc43 | ||
|
ac620c2e4a | ||
|
8a55d381ae | ||
|
834bb44834 | ||
|
e3f725a171 | ||
|
dde004a70f | ||
|
b38be9da8c | ||
|
3dab791fc7 | ||
|
d2aec1138f | ||
|
9963f590c1 | ||
|
e3cac12ca8 | ||
|
0efe7ecc2d | ||
|
f2be8879b8 | ||
|
92d9128a77 | ||
|
61544d310e | ||
|
455d222457 | ||
|
3f76415724 | ||
|
4ceabdf570 | ||
|
4ecd1d6983 | ||
|
cea0c393aa | ||
|
7175699cbb | ||
|
413d8670ec | ||
|
965e7f1452 | ||
|
27ef74ff40 | ||
|
9b72feecc3 | ||
|
8dce8b828c | ||
|
3f62b1135e | ||
|
28f8deb29a | ||
|
f9d589cc41 | ||
|
194d0b8b0a | ||
|
ad8a04697f | ||
|
47e6324545 | ||
|
f25ef09fb5 | ||
|
c5031e2d1d | ||
|
a791cde7cb | ||
|
cc8b3237c5 | ||
|
3506eb7a7b | ||
|
07530184d5 | ||
|
a6c441662d | ||
|
2bfb07cb05 | ||
|
df7a458f66 | ||
|
26fdec39b4 | ||
|
cf51433172 | ||
|
e9df9ab66e | ||
|
bc5355bb57 | ||
|
8a98a23900 | ||
|
8fca254f5d | ||
|
779ac7ab69 | ||
|
cde4c634e7 | ||
|
d3b7ad3f33 | ||
|
b2ff41d81f |
@@ -14,7 +14,4 @@
|
||||
(nxml-mode . (
|
||||
(indent-tabs-mode . nil)
|
||||
))
|
||||
(perl-mode . (
|
||||
(indent-tabs-mode . nil)
|
||||
))
|
||||
)
|
||||
|
53
.gitignore
vendored
@@ -17,9 +17,7 @@
|
||||
*.rej
|
||||
*.s
|
||||
*~
|
||||
.#*
|
||||
.deps
|
||||
.gdb_history
|
||||
.git
|
||||
.git-module-status
|
||||
.libs
|
||||
@@ -27,7 +25,6 @@
|
||||
.memdump
|
||||
.sc-start-sc_*
|
||||
/ABOUT-NLS
|
||||
/AUTHORS
|
||||
/COPYING
|
||||
/ChangeLog
|
||||
/GNUmakefile
|
||||
@@ -56,17 +53,13 @@
|
||||
/daemon/libvirtd.8.in
|
||||
/daemon/libvirtd.init
|
||||
/daemon/libvirtd.pod
|
||||
/daemon/libvirtd.policy
|
||||
/daemon/libvirtd.service
|
||||
/daemon/test_libvirtd.aug
|
||||
/docs/apibuild.py.stamp
|
||||
/docs/devhelp/libvirt.devhelp
|
||||
/docs/hvsupport.html.in
|
||||
/docs/libvirt-api.xml
|
||||
/docs/libvirt-lxc-*.xml
|
||||
/docs/libvirt-qemu-*.xml
|
||||
/docs/libvirt-refs.xml
|
||||
/docs/search.php
|
||||
/docs/todo.html.in
|
||||
/examples/domain-events/events-c/event-test
|
||||
/examples/dominfo/info1
|
||||
@@ -86,56 +79,36 @@
|
||||
/ltmain.sh
|
||||
/m4/*
|
||||
/maint.mk
|
||||
/mingw-libvirt.spec
|
||||
/mingw32-libvirt.spec
|
||||
/mkinstalldirs
|
||||
/po/*
|
||||
/proxy/
|
||||
/python/generated.stamp
|
||||
/python/generator.py.stamp
|
||||
/python/libvirt-export.c
|
||||
/python/libvirt-lxc-export.c
|
||||
/python/libvirt-lxc.[ch]
|
||||
/python/libvirt-qemu-export.c
|
||||
/python/libvirt-qemu.[ch]
|
||||
/python/libvirt.[ch]
|
||||
/python/libvirt.py
|
||||
/python/libvirt_lxc.py
|
||||
/python/libvirt_qemu.py
|
||||
/run
|
||||
/sc_*
|
||||
/src/.*.stamp
|
||||
/src/esx/*.generated.*
|
||||
/src/hyperv/*.generated.*
|
||||
/src/libvirt*.def
|
||||
/src/libvirt.syms
|
||||
/src/libvirt_*.stp
|
||||
/src/libvirt_*helper
|
||||
/src/libvirt_*probes.h
|
||||
/src/libvirt_lxc
|
||||
/src/locking/lock_daemon_dispatch_stubs.h
|
||||
/src/locking/lock_protocol.[ch]
|
||||
/src/locking/qemu-lockd.conf
|
||||
/src/locking/qemu-sanlock.conf
|
||||
/src/locking/test_libvirt_sanlock.aug
|
||||
/src/lxc/lxc_controller_dispatch.h
|
||||
/src/lxc/lxc_monitor_dispatch.h
|
||||
/src/lxc/lxc_monitor_protocol.c
|
||||
/src/lxc/lxc_monitor_protocol.h
|
||||
/src/lxc/lxc_protocol.[ch]
|
||||
/src/lxc/test_libvirtd_lxc.aug
|
||||
/src/qemu/test_libvirtd_qemu.aug
|
||||
/src/probes.h
|
||||
/src/remote/*_client_bodies.h
|
||||
/src/remote/*_protocol.[ch]
|
||||
/src/rpc/virkeepaliveprotocol.[ch]
|
||||
/src/rpc/virnetprotocol.[ch]
|
||||
/src/test_libvirt*.aug
|
||||
/src/util/virkeymaps.h
|
||||
/src/virt-aa-helper
|
||||
/src/virtlockd
|
||||
/src/virtlockd.init
|
||||
/tests/*.log
|
||||
/tests/*.pid
|
||||
/tests/*.trs
|
||||
/tests/*xml2*test
|
||||
/tests/commandhelper
|
||||
/tests/commandtest
|
||||
@@ -146,7 +119,6 @@
|
||||
/tests/eventtest
|
||||
/tests/hashtest
|
||||
/tests/jsontest
|
||||
/tests/libvirtdconftest
|
||||
/tests/networkxml2argvtest
|
||||
/tests/nodeinfotest
|
||||
/tests/nwfilterxml2xmltest
|
||||
@@ -156,41 +128,24 @@
|
||||
/tests/openvzutilstest
|
||||
/tests/qemuargv2xmltest
|
||||
/tests/qemuhelptest
|
||||
/tests/qemumonitorjsontest
|
||||
/tests/qemumonitortest
|
||||
/tests/qemuxmlnstest
|
||||
/tests/qparamtest
|
||||
/tests/reconnect
|
||||
/tests/secaatest
|
||||
/tests/seclabeltest
|
||||
/tests/securityselinuxlabeltest
|
||||
/tests/securityselinuxtest
|
||||
/tests/sexpr2xmltest
|
||||
/tests/shunloadtest
|
||||
/tests/sockettest
|
||||
/tests/ssh
|
||||
/tests/statstest
|
||||
/tests/storagebackendsheepdogtest
|
||||
/tests/sysinfotest
|
||||
/tests/test_conf
|
||||
/tests/utiltest
|
||||
/tests/viratomictest
|
||||
/tests/virauthconfigtest
|
||||
/tests/virbitmaptest
|
||||
/tests/virbuftest
|
||||
/tests/vircgrouptest
|
||||
/tests/virdrivermoduletest
|
||||
/tests/virendiantest
|
||||
/tests/virhashtest
|
||||
/tests/viridentitytest
|
||||
/tests/virkeycodetest
|
||||
/tests/virkeyfiletest
|
||||
/tests/virlockspacetest
|
||||
/tests/virnet*test
|
||||
/tests/virportallocatortest
|
||||
/tests/virshtest
|
||||
/tests/virstoragetest
|
||||
/tests/virstringtest
|
||||
/tests/virtimetest
|
||||
/tests/viruritest
|
||||
/tests/vmx2xmltest
|
||||
@@ -199,7 +154,6 @@
|
||||
/tools/*.[18]
|
||||
/tools/libvirt-guests.init
|
||||
/tools/libvirt-guests.service
|
||||
/tools/libvirt-guests.sh
|
||||
/tools/virsh
|
||||
/tools/virsh-*-edit.c
|
||||
/tools/virt-*-validate
|
||||
@@ -210,14 +164,11 @@ Makefile.in
|
||||
TAGS
|
||||
coverage
|
||||
cscope.files
|
||||
cscope.in.out
|
||||
cscope.out
|
||||
cscope.po.out
|
||||
results.log
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
stamp-h1
|
||||
tags
|
||||
!/gnulib/lib/Makefile.am
|
||||
!/gnulib/tests/Makefile.am
|
||||
!/m4/virt-*.m4
|
||||
|
2
.gnulib
25
.mailmap
@@ -3,6 +3,7 @@
|
||||
# Email consolidation:
|
||||
# <Preferred address in AUTHORS> <other alias used by same author>
|
||||
|
||||
<amy.griffis@hp.com> <aron.griffis@hp.com>
|
||||
<bozzolan@gmail.com> <redshift@gmx.com>
|
||||
<charles_duffy@messageone.com> <charles@dyfis.net>
|
||||
<dfj@redhat.com> <dfj@dfj.bne.redhat.com>
|
||||
@@ -27,32 +28,10 @@
|
||||
<supriyak@linux.vnet.ibm.com> <supriyak@in.ibm.com>
|
||||
<neil@aldur.co.uk> <neil@brightbox.co.uk>
|
||||
<stefanb@us.ibm.com> <stefanb@linux.vnet.ibm.com>
|
||||
<stefanb@us.ibm.com> <stefannb@linux.vnet.ibm.com>
|
||||
<josh.durgin@inktank.com> <joshd@hq.newdream.net>
|
||||
<josh.durgin@inktank.com> <josh.durgin@dreamhost.com>
|
||||
<gerd@egidy.de> <lists@egidy.de>
|
||||
<gerd@egidy.de> <gerd.von.egidy@intra2net.com>
|
||||
<benoar@dolka.fr> <benjamin.cama@telecom-bretagne.eu>
|
||||
<zhlcindy@linux.vnet.ibm.com> <zhlcindy@gmail.com>
|
||||
<serge.hallyn@canonical.com> <serue@us.ibm.com>
|
||||
<pritesh.kothari@sun.com> <Pritesh.Kothari@Sun.COM>
|
||||
|
||||
# Name consolidation:
|
||||
# Preferred author spelling <preferred email>
|
||||
Alex Jia <ajia@redhat.com>
|
||||
Royce Lv <lvroyce@linux.vnet.ibm.com>
|
||||
Daniel J Walsh <dwalsh@redhat.com>
|
||||
Ján Tomko <jtomko@redhat.com>
|
||||
Gerd von Egidy <gerd@egidy.de>
|
||||
MATSUDA Daiki <matsudadik@intellilink.co.jp>
|
||||
Tang Chen <tangchen@cn.fujitsu.com>
|
||||
Peng Zhou <ailvpeng25@gmail.com>
|
||||
Dirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
|
||||
Thibault VINCENT <thibault.vincent@smartjog.com>
|
||||
Aurelien Rougemont <beorn@binaries.fr>
|
||||
Serge E. Hallyn <serge.hallyn@canonical.com>
|
||||
Henrik Persson E <henrik.e.persson@ericsson.com>
|
||||
Philipp Hahn <hahn@univention.de>
|
||||
Marco Bozzolan <bozzolan@gmail.com>
|
||||
Marco Bozzolan <redshift@gmx.com>
|
||||
Pritesh Kothari <pritesh.kothari@sun.com>
|
||||
Wen Ruo Lv <lvroyce@linux.vnet.ibm.com>
|
||||
|
255
AUTHORS
Normal file
@@ -0,0 +1,255 @@
|
||||
libvirt Authors
|
||||
===============
|
||||
|
||||
The libvirt project was initiated by:
|
||||
|
||||
Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
|
||||
|
||||
The primary maintainers and people with commit access rights:
|
||||
|
||||
Daniel Veillard <veillard@redhat.com>
|
||||
Daniel Berrange <berrange@redhat.com>
|
||||
Richard W.M. Jones <rjones@redhat.com>
|
||||
Mark McLoughlin <markmc@redhat.com>
|
||||
Anthony Liguori <aliguori@us.ibm.com>
|
||||
Jim Meyering <meyering@redhat.com>
|
||||
Jim Fehlig <jfehlig@suse.com>
|
||||
Chris Lalancette <clalance@redhat.com>
|
||||
Cole Robinson <crobinso@redhat.com>
|
||||
Guido Günther <agx@sigxcpu.org>
|
||||
John Levon <john.levon@sun.com>
|
||||
Matthias Bolte <matthias.bolte@googlemail.com>
|
||||
Jiří Denemark <jdenemar@redhat.com>
|
||||
Dave Allan <dallan@redhat.com>
|
||||
Laine Stump <laine@redhat.com>
|
||||
Stefan Berger <stefanb@us.ibm.com>
|
||||
Eric Blake <eblake@redhat.com>
|
||||
Justin Clift <jclift@redhat.com>
|
||||
Osier Yang <jyang@redhat.com>
|
||||
Wen Congyang <wency@cn.fujitsu.com>
|
||||
Michal Prívozník <mprivozn@redhat.com>
|
||||
Peter Krempa <pkrempa@redhat.com>
|
||||
Christophe Fergeau <cfergeau@redhat.com>
|
||||
Alex Jia <ajia@redhat.com>
|
||||
|
||||
Previous maintainers:
|
||||
Karel Zak <kzak@redhat.com>
|
||||
Atsushi SAKAI <sakaia@jp.fujitsu.com>
|
||||
Dave Leskovec <dlesko@linux.vnet.ibm.com>
|
||||
Dan Smith <danms@us.ibm.com>
|
||||
|
||||
Patches have also been contributed by:
|
||||
|
||||
David Lutterkort <dlutter@redhat.com>
|
||||
Andrew Puch <apuch@redhat.com>
|
||||
Philippe Berthault <philippe.berthault@Bull.net>
|
||||
Hugh Brock <hbrock@redhat.com>
|
||||
Michel Ponceau <michel.ponceau@bull.net>
|
||||
Jeremy Katz <katzj@redhat.com>
|
||||
Pete Vetere <pvetere@redhat.com>
|
||||
Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
|
||||
Saori Fukuta <fukuta.saori@jp.fujitsu.com>
|
||||
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
|
||||
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||
Nobuhiro Itou <fj0873gn@aa.jp.fujitsu.com>
|
||||
Masayuki Sunou <fj1826dm@aa.jp.fujitsu.com>
|
||||
Mark Johnson <johnson.nh@gmail.com>
|
||||
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
|
||||
Shuveb Hussain <shuveb@binarykarma.com>
|
||||
Jim Paris <jim@jtan.com>
|
||||
Daniel Hokka Zakrisson <daniel@hozac.com>
|
||||
Mads Chr. Olesen <shiyee@shiyee.dk>
|
||||
Anton Protopopov <aspsk2@gmail.com>
|
||||
Stefan de Konink <dekonink@kinkrsoftware.nl>
|
||||
Kaitlin Rupert <kaitlin@linux.vnet.ibm.com>
|
||||
Evgeniy Sokolov <evg@openvz.org>
|
||||
David Lively <dlively@virtualiron.com>
|
||||
Charles Duffy <Charles_Duffy@messageone.com>
|
||||
Nguyen Anh Quynh <aquynh@gmail.com>
|
||||
James Morris <jmorris@namei.org>
|
||||
Chris Wright <chrisw@redhat.com>
|
||||
Ben Guthro <ben.guthro@gmail.com>
|
||||
Shigeki Sakamoto <fj0588di@aa.jp.fujitsu.com>
|
||||
Gerd von Egidy <lists@egidy.de>
|
||||
Itamar Heim <iheim@redhat.com>
|
||||
Markus Armbruster <armbru@redhat.com>
|
||||
Ryota Ozaki <ozaki.ryota@gmail.com>
|
||||
Daniel J Walsh <dwalsh@redhat.com>
|
||||
Maximilian Wilhelm <max@rfc2324.org>
|
||||
Pritesh Kothari <Pritesh.Kothari@Sun.COM>
|
||||
Amit Shah <amit.shah@redhat.com>
|
||||
Florian Vichot <florian.vichot@diateam.net>
|
||||
Serge E. Hallyn <serue@us.ibm.com>
|
||||
Soren Hansen <soren@linux2go.dk>
|
||||
Abel Míguez Rodríguez<amiguezr@pdi.ucm.es>
|
||||
Doug Goldstein <cardoe@cardoe.com>
|
||||
Javier Fontan <jfontan@gmail.com>
|
||||
Federico Simoncelli <fsimonce@redhat.com>
|
||||
Amy Griffis <amy.griffis@hp.com>
|
||||
Henrik Persson E <henrik.e.persson@ericsson.com>
|
||||
Satoru SATOH <satoru.satoh@gmail.com>
|
||||
Paolo Bonzini <pbonzini@redhat.com>
|
||||
Miloslav Trmač <mitr@redhat.com>
|
||||
Jamie Strandboge <jamie@canonical.com>
|
||||
Gerhard Stenzel <gerhard.stenzel@de.ibm.com>
|
||||
Matthew Booth <mbooth@redhat.com>
|
||||
Diego Elio Pettenò <flameeyes@gmail.com>
|
||||
Adam Litke <agl@us.ibm.com>
|
||||
Steve Yarmie <steve.yarmie@gmail.com>
|
||||
Dan Kenigsberg <danken@redhat.com>
|
||||
Yuji NISHIDA <nishidy@nict.go.jp>
|
||||
Dustin Xiong <x_k_123@hotmail.com>
|
||||
Rolf Eike Beer <eike@sf-mail.de>
|
||||
Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
|
||||
Philipp Hahn <hahn@univention.de>
|
||||
Ed Swierk <eswierk@aristanetworks.com>
|
||||
Paolo Smiraglia <paolo.smiraglia@gmail.com>
|
||||
Sharadha Prabhakar <sharadha.prabhakar@citrix.com>
|
||||
Chris Wong <wongc-redhat@hoku.net>
|
||||
Daniel Berteaud <daniel@firewall-services.com>
|
||||
Dustin Kirkland <kirkland@canonical.com>
|
||||
Luiz Capitulino <lcapitulino@redhat.com>
|
||||
Ryan Harper <ryanh@us.ibm.com>
|
||||
Spencer Shimko <sshimko@tresys.com>
|
||||
Marco Bozzolan <bozzolan@gmail.com>
|
||||
Alex Williamson <alex.williamson@redhat.com>
|
||||
Ersek Laszlo <lacos@caesar.elte.hu>
|
||||
Kenneth Nagin <NAGIN@il.ibm.com>
|
||||
Klaus Ethgen <Klaus@Ethgen.de>
|
||||
Bryan Kearney <bkearney@redhat.com>
|
||||
Darry L. Pierce <dpierce@redhat.com>
|
||||
David Jorm <dfj@redhat.com>
|
||||
Eduardo Otubo <otubo@linux.vnet.ibm.com>
|
||||
Garry Dolley <gdolley@arpnetworks.com>
|
||||
Harshavardhana <harsha@gluster.com>
|
||||
Jonas Eriksson <jonas.j.eriksson@ericsson.com>
|
||||
Jun Koi <junkoi2004@gmail.com>
|
||||
Olivier Fourdan <ofourdan@redhat.com>
|
||||
Ron Yorston <rmy@tigress.co.uk>
|
||||
Shahar Klein <shaharklein@yahoo.com>
|
||||
Taizo ITO <taizo.ito@hde.co.jp>
|
||||
Thomas Treutner <thomas@scripty.at>
|
||||
Jean-Baptiste Rouault <jean-baptiste.rouault@diateam.net>
|
||||
Марк Коренберг <socketpair@gmail.com>
|
||||
Alan Pevec <apevec@redhat.com>
|
||||
Aurelien Rougemont <beorn@binaries.fr>
|
||||
Patrick Dignan <pat_dignan@dell.com>
|
||||
Serge Hallyn <serge.hallyn@canonical.com>
|
||||
Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
|
||||
Lai Jiangshan <laijs@cn.fujitsu.com>
|
||||
Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
|
||||
John Morrissey <jwm@horde.net>
|
||||
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
|
||||
Hu Tao <hutao@cn.fujitsu.com>
|
||||
Laurent Léonard <laurent@open-minds.org>
|
||||
MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
|
||||
Josh Durgin <josh.durgin@inktank.com>
|
||||
Roopa Prabhu <roprabhu@cisco.com>
|
||||
Paweł Krześniak <pawel.krzesniak@gmail.com>
|
||||
Kay Schubert <kayegypt@web.de>
|
||||
Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Juerg Haefliger <juerg.haefliger@hp.com>
|
||||
Matthias Dahl <mdvirt@designassembly.de>
|
||||
Niels de Vos <ndevos@redhat.com>
|
||||
Davidlohr Bueso <dave@gnu.org>
|
||||
Alon Levy <alevy@redhat.com>
|
||||
Hero Phương <herophuong93@gmail.com>
|
||||
Zdenek Styblik <stybla@turnovfree.net>
|
||||
Gui Jianfeng <guijianfeng@cn.fujitsu.com>
|
||||
Michal Novotny <minovotn@redhat.com>
|
||||
Markus Groß <gross@univention.de>
|
||||
Phil Petty <phpetty@cisco.com>
|
||||
Taku Izumi <izumi.taku@jp.fujitsu.com>
|
||||
Minoru Usui <usui@mxm.nes.nec.co.jp>
|
||||
Tiziano Mueller <dev-zero@gentoo.org>
|
||||
Thibault VINCENT <thibault.vincent@smartjog.com>
|
||||
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
|
||||
Jesse Cook <code.crashenx@gmail.com>
|
||||
Alexander Todorov <atodorov@otb.bg>
|
||||
Richard Laager <rlaager@wiktel.com>
|
||||
Mark Wu <dwu@redhat.com>
|
||||
Yufang Zhang <yuzhang@redhat.com>
|
||||
Supriya Kannery <supriyak@linux.vnet.ibm.com>
|
||||
Dirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
|
||||
Taisuke Yamada <tai@rakugaki.org>
|
||||
Heath Petersen <HeathPetersen@Kandre.com>
|
||||
Neil Wilson <neil@aldur.co.uk>
|
||||
Ohad Levy <ohadlevy@gmail.com>
|
||||
Michael Chapman <mike@very.puzzling.org>
|
||||
Daniel Gollub <gollub@b1-systems.de>
|
||||
David S. Wang <dwang2@cisco.com>
|
||||
Ruben Kerkhof <ruben@rubenkerkhof.com>
|
||||
Scott Moser <smoser@ubuntu.com>
|
||||
Guannan Ren <gren@redhat.com>
|
||||
John Williams <john.williams@petalogix.com>
|
||||
Michael Santos <michael.santos@gmail.com>
|
||||
Oskari Saarenmaa <os@ohmu.fi>
|
||||
Nan Zhang <nzhang@redhat.com>
|
||||
Wieland Hoffmann <themineo@googlemail.com>
|
||||
Douglas Schilling Landgraf <dougsland@redhat.com>
|
||||
Tom Vijlbrief <tom.vijlbrief@xs4all.nl>
|
||||
Shradha Shah <sshah@solarflare.com>
|
||||
Steve Hodgson <shodgson@solarflare.com>
|
||||
Xu He Jie <xuhj@linux.vnet.ibm.com>
|
||||
Lei Li <lilei@linux.vnet.ibm.com>
|
||||
Matthias Witte <witte@netzquadrat.de>
|
||||
Tang Chen <tangchen@cn.fujitsu.com>
|
||||
Dan Horák <dan@danny.cz>
|
||||
Sage Weil <sage@newdream.net>
|
||||
David L Stevens <dlstevens@us.ibm.com>
|
||||
Tyler Coumbes <coumbes@gmail.com>
|
||||
Wen Ruo Lv <lvroyce@linux.vnet.ibm.com>
|
||||
Patrice LACHANCE <patlachance@gmail.com>
|
||||
Eli Qiao <taget@linux.vnet.ibm.com>
|
||||
Michael Wood <esiotrot@gmail.com>
|
||||
Bharata B Rao <bharata@linux.vnet.ibm.com>
|
||||
Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
|
||||
Chang Liu <lingjiao.lc@taobao.com>
|
||||
Lorin Hochstein <lorin@isi.edu>
|
||||
Christian Franke <nobody@nowhere.ws>
|
||||
Prerna Saxena <prerna@linux.vnet.ibm.com>
|
||||
Michael Ellerman <michael@ellerman.id.au>
|
||||
Rommer <rommer@active.by>
|
||||
Yuri Chornoivan <yurchor@ukr.net>
|
||||
Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
|
||||
Martin Kletzander <mkletzan@redhat.com>
|
||||
Laszlo Ersek <lersek@redhat.com>
|
||||
Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
|
||||
Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
|
||||
Hendrik Schwartke <hendrik@os-t.de>
|
||||
Ansis Atteka <aatteka@nicira.com>
|
||||
Dan Wendlandt <dan@nicira.com>
|
||||
Kyle Mestery <kmestery@cisco.com>
|
||||
Lincoln Myers <lincoln_myers@yahoo.com>
|
||||
Peter Robinson <pbrobinson@gmail.com>
|
||||
Benjamin Cama <benoar@dolka.fr>
|
||||
Duncan Rance <libvirt@dunquino.com>
|
||||
Peng Zhou <ailvpeng25@gmail.com>
|
||||
Li Zhang <zhlcindy@linux.vnet.ibm.com>
|
||||
Stef Walter <stefw@gnome.org>
|
||||
Christian Benvenuti <benve@cisco.com>
|
||||
Ilja Livenson <ilja.livenson@gmail.com>
|
||||
Stefan Bader <stefan.bader@canonical.com>
|
||||
MATSUDA Daiki <matsudadik@intellilink.co.jp>
|
||||
Jan Kiszka <jan.kiszka@siemens.com>
|
||||
Ryan Woodsmall <rwoodsmall@gmail.com>
|
||||
Radu Caragea <dmns_serp@yahoo.com>
|
||||
Beat Jörg <Beat.Joerg@ssatr.ch>
|
||||
Gao feng <gaofeng@cn.fujitsu.com>
|
||||
Dipankar Sarma <dipankar@in.ibm.com>
|
||||
Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
|
||||
Thang Pham <thang.pham@us.ibm.com>
|
||||
Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com>
|
||||
Wido den Hollander <wido@widodh.nl>
|
||||
Gene Czarcinski <gene@czarc.net>
|
||||
Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Vladislav Bogdanov <bubble@hoster-ok.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
The libvirt Logo was designed by Diana Fong
|
||||
|
||||
-- End
|
||||
;; Local Variables:
|
||||
;; coding: utf-8
|
||||
;; End:
|
93
AUTHORS.in
@@ -1,93 +0,0 @@
|
||||
libvirt Authors
|
||||
===============
|
||||
|
||||
The libvirt project was initiated by:
|
||||
|
||||
Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
|
||||
|
||||
The primary maintainers and people with commit access rights:
|
||||
|
||||
Alex Jia <ajia@redhat.com>
|
||||
Anthony Liguori <aliguori@us.ibm.com>
|
||||
Chris Lalancette <clalance@redhat.com>
|
||||
Christophe Fergeau <cfergeau@redhat.com>
|
||||
Claudio Bley <cbley@av-test.de>
|
||||
Cole Robinson <crobinso@redhat.com>
|
||||
Daniel Berrange <berrange@redhat.com>
|
||||
Daniel Veillard <veillard@redhat.com>
|
||||
Dave Allan <dallan@redhat.com>
|
||||
Doug Goldstein <cardoe@gentoo.org>
|
||||
Eric Blake <eblake@redhat.com>
|
||||
Guannan Ren <gren@redhat.com>
|
||||
Guido Günther <agx@sigxcpu.org>
|
||||
Ján Tomko <jtomko@redhat.com>
|
||||
Jim Fehlig <jfehlig@suse.com>
|
||||
Jim Meyering <meyering@redhat.com>
|
||||
Jiří Denemark <jdenemar@redhat.com>
|
||||
John Ferlan <jferlan@redhat.com>
|
||||
John Levon <john.levon@sun.com>
|
||||
Justin Clift <jclift@redhat.com>
|
||||
Laine Stump <laine@redhat.com>
|
||||
Mark McLoughlin <markmc@redhat.com>
|
||||
Martin Kletzander <mkletzan@redhat.com>
|
||||
Matthias Bolte <matthias.bolte@googlemail.com>
|
||||
Michal Prívozník <mprivozn@redhat.com>
|
||||
Osier Yang <jyang@redhat.com>
|
||||
Peter Krempa <pkrempa@redhat.com>
|
||||
Richard W.M. Jones <rjones@redhat.com>
|
||||
Stefan Berger <stefanb@us.ibm.com>
|
||||
Wen Congyang <wency@cn.fujitsu.com>
|
||||
|
||||
Previous maintainers:
|
||||
|
||||
Atsushi SAKAI <sakaia@jp.fujitsu.com>
|
||||
Dan Smith <danms@us.ibm.com>
|
||||
Dave Leskovec <dlesko@linux.vnet.ibm.com>
|
||||
Karel Zak <kzak@redhat.com>
|
||||
|
||||
Patches have also been contributed by:
|
||||
|
||||
Abel Míguez Rodríguez <amiguezr@pdi.ucm.es>
|
||||
Amit Shah <amit.shah@redhat.com>
|
||||
Andrew Puch <apuch@redhat.com>
|
||||
Anton Protopopov <aspsk2@gmail.com>
|
||||
Ben Guthro <ben.guthro@gmail.com>
|
||||
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
|
||||
Daniel Hokka Zakrisson <daniel@hozac.com>
|
||||
Dan Wendlandt <dan@nicira.com>
|
||||
David Lively <dlively@virtualiron.com>
|
||||
David Lutterkort <dlutter@redhat.com>
|
||||
Evgeniy Sokolov <evg@openvz.org>
|
||||
Hugh Brock <hbrock@redhat.com>
|
||||
Itamar Heim <iheim@redhat.com>
|
||||
James Morris <jmorris@namei.org>
|
||||
Javier Fontan <jfontan@gmail.com>
|
||||
Jeremy Katz <katzj@redhat.com>
|
||||
Kaitlin Rupert <kaitlin@linux.vnet.ibm.com>
|
||||
Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
|
||||
Mads Chr. Olesen <shiyee@shiyee.dk>
|
||||
Mark Johnson <johnson.nh@gmail.com>
|
||||
Markus Armbruster <armbru@redhat.com>
|
||||
Masayuki Sunou <fj1826dm@aa.jp.fujitsu.com>
|
||||
Matthias Witte <witte@netzquadrat.de>
|
||||
Michel Ponceau <michel.ponceau@bull.net>
|
||||
Nobuhiro Itou <fj0873gn@aa.jp.fujitsu.com>
|
||||
Pete Vetere <pvetere@redhat.com>
|
||||
Philippe Berthault <philippe.berthault@Bull.net>
|
||||
Saori Fukuta <fukuta.saori@jp.fujitsu.com>
|
||||
Shigeki Sakamoto <fj0588di@aa.jp.fujitsu.com>
|
||||
Shuveb Hussain <shuveb@binarykarma.com>
|
||||
Stefan de Konink <dekonink@kinkrsoftware.nl>
|
||||
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
|
||||
|
||||
#authorslist#
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
The libvirt logo was designed by Diana Fong
|
||||
|
||||
-- End
|
||||
;; Local Variables:
|
||||
;; coding: utf-8
|
||||
;; End:
|
82
COPYING.LIB
@@ -1,8 +1,9 @@
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@@ -22,7 +23,8 @@ specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
@@ -55,7 +57,7 @@ modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
^L
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
@@ -87,9 +89,9 @@ libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes a de-facto standard. To achieve this, non-free programs must
|
||||
be allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
@@ -111,7 +113,7 @@ modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
^L
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
@@ -136,8 +138,8 @@ included without limitation in the term "modification".)
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
@@ -216,7 +218,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
^L
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
@@ -267,7 +269,7 @@ Library will still fall under Section 6.)
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
^L
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
@@ -303,10 +305,10 @@ of these things:
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
c) Accompany the work with a written offer, valid for at least
|
||||
three years, to give the same user the materials specified in
|
||||
Subsection 6a, above, for a charge no more than the cost of
|
||||
performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
@@ -329,7 +331,7 @@ restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
^L
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
@@ -370,7 +372,7 @@ subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
^L
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
@@ -384,9 +386,10 @@ all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
@@ -404,11 +407,11 @@ be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
@@ -422,7 +425,7 @@ conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
^L
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
@@ -456,19 +459,21 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
^L
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
@@ -485,16 +490,17 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your school, if any, to sign a "copyright disclaimer" for the library,
|
||||
if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
220
HACKING
@@ -1,6 +1,5 @@
|
||||
-*- buffer-read-only: t -*- vi: set ro:
|
||||
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY
|
||||
from docs/hacking.html.in!
|
||||
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY!
|
||||
|
||||
|
||||
|
||||
@@ -14,12 +13,7 @@ General tips for contributing patches
|
||||
(1) Discuss any large changes on the mailing list first. Post patches early and
|
||||
listen to feedback.
|
||||
|
||||
(2) Post patches in unified diff format, with git rename detection enabled. You
|
||||
need a one-time setup of:
|
||||
|
||||
git config diff.renames true
|
||||
|
||||
After that, a command similar to this should work:
|
||||
(2) Post patches in unified diff format. A command similar to this should work:
|
||||
|
||||
diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
|
||||
|
||||
@@ -27,76 +21,17 @@ or:
|
||||
|
||||
git diff > libvirt-myfeature.patch
|
||||
|
||||
Also, for code motion patches, you may find that "git diff --patience"
|
||||
provides an easier-to-read patch. However, the usual workflow of libvirt
|
||||
developer is:
|
||||
|
||||
git checkout master
|
||||
git pull
|
||||
git checkout -t origin -b workbranch
|
||||
Hack, committing any changes along the way
|
||||
|
||||
More hints on compiling can be found here <compiling.html>. When you want to
|
||||
post your patches:
|
||||
|
||||
git pull --rebase
|
||||
(fix any conflicts)
|
||||
git send-email --cover-letter --no-chain-reply-to --annotate \
|
||||
--to=libvir-list@redhat.com master
|
||||
|
||||
(Note that the "git send-email" subcommand may not be in the main git package
|
||||
and using it may require installion of a separate package, for example the
|
||||
"git-email" package in Fedora.) For a single patch you can omit
|
||||
"--cover-letter", but a series of two or more patches needs a cover letter. If
|
||||
you get tired of typing "--to=libvir-list@redhat.com" designation you can set
|
||||
it in git config:
|
||||
|
||||
git config sendemail.to libvir-list@redhat.com
|
||||
|
||||
Please follow this as close as you can, especially the rebase and git
|
||||
send-email part, as it makes life easier for other developers to review your
|
||||
patch set. One should avoid sending patches as attachments, but rather send
|
||||
them in email body along with commit message. If a developer is sending
|
||||
another version of the patch (e.g. to address review comments), he is advised
|
||||
to note differences to previous versions after the "---" line in the patch so
|
||||
that it helps reviewers but doesn't become part of git history. Moreover, such
|
||||
patch needs to be prefixed correctly with "--subject-prefix=PATCHv2" appended
|
||||
to "git send-email" (substitute "v2" with the correct version if needed
|
||||
though).
|
||||
|
||||
|
||||
|
||||
(3) In your commit message, make the summary line reasonably short (60 characters
|
||||
is typical), followed by a blank line, followed by any longer description of
|
||||
why your patch makes sense. If the patch fixes a regression, and you know what
|
||||
commit introduced the problem, mentioning that is useful. If the patch
|
||||
resolves a bugzilla report, mentioning the URL of the bug number is useful;
|
||||
but also summarize the issue rather than making all readers follow the link.
|
||||
You can use 'git shortlog -30' to get an idea of typical summary lines.
|
||||
Libvirt does not currently attach any meaning to Signed-off-by: lines, so it
|
||||
is up to you if you want to include or omit them in the commit message.
|
||||
|
||||
|
||||
|
||||
(4) Split large changes into a series of smaller patches, self-contained if
|
||||
(3) Split large changes into a series of smaller patches, self-contained if
|
||||
possible, with an explanation of each patch and an explanation of how the
|
||||
sequence of patches fits together. Moreover, please keep in mind that it's
|
||||
required to be able to compile cleanly (*including* "make check" and "make
|
||||
syntax-check") after each patch. A feature does not have to work until the end
|
||||
of a series, but intermediate patches must compile and not cause test-suite
|
||||
failures (this is to preserve the usefulness of "git bisect", among other
|
||||
things).
|
||||
sequence of patches fits together.
|
||||
|
||||
|
||||
|
||||
(5) Make sure your patches apply against libvirt GIT. Developers only follow GIT
|
||||
(4) Make sure your patches apply against libvirt GIT. Developers only follow GIT
|
||||
and don't care much about released versions.
|
||||
|
||||
(6) Run the automated tests on your code before submitting any changes. In
|
||||
particular, configure with compile warnings set to -Werror. This is done
|
||||
automatically for a git checkout; from a tarball, use:
|
||||
(5) Run the automated tests on your code before submitting any changes. In
|
||||
particular, configure with compile warnings set to -Werror:
|
||||
|
||||
./configure --enable-werror
|
||||
./configure --enable-compile-warnings=error
|
||||
|
||||
and run the tests:
|
||||
|
||||
@@ -104,11 +39,7 @@ and run the tests:
|
||||
make syntax-check
|
||||
make -C tests valgrind
|
||||
|
||||
|
||||
|
||||
Valgrind
|
||||
http://valgrind.org/is a test that checks for memory management issues, such as leaks or use of
|
||||
uninitialized variables.
|
||||
The latter test checks for memory leaks.
|
||||
|
||||
If you encounter any failing tests, the VIR_TEST_DEBUG environment variable
|
||||
may provide extra information to debug the failures. Larger values of
|
||||
@@ -121,92 +52,7 @@ Also, individual tests can be run from inside the "tests/" directory, like:
|
||||
|
||||
./qemuxml2xmltest
|
||||
|
||||
There is also a "./run" script at the top level, to make it easier to run
|
||||
programs that have not yet been installed, as well as to wrap invocations of
|
||||
various tests under gdb or Valgrind.
|
||||
|
||||
|
||||
|
||||
(7) The Valgrind test should produce similar output to "make check". If the output
|
||||
has traces within libvirt API's, then investigation is required in order to
|
||||
determine the cause of the issue. Output such as the following indicates some
|
||||
sort of leak:
|
||||
|
||||
==5414== 4 bytes in 1 blocks are definitely lost in loss record 3 of 89
|
||||
==5414== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
|
||||
==5414== by 0x34DE0AAB85: xmlStrndup (in /usr/lib64/libxml2.so.2.7.8)
|
||||
==5414== by 0x4CC97A6: virDomainVideoDefParseXML (domain_conf.c:7410)
|
||||
==5414== by 0x4CD581D: virDomainDefParseXML (domain_conf.c:10188)
|
||||
==5414== by 0x4CD8C73: virDomainDefParseNode (domain_conf.c:10640)
|
||||
==5414== by 0x4CD8DDB: virDomainDefParse (domain_conf.c:10590)
|
||||
==5414== by 0x41CB1D: testCompareXMLToArgvHelper (qemuxml2argvtest.c:100)
|
||||
==5414== by 0x41E20F: virtTestRun (testutils.c:161)
|
||||
==5414== by 0x41C7CB: mymain (qemuxml2argvtest.c:866)
|
||||
==5414== by 0x41E84A: virtTestMain (testutils.c:723)
|
||||
==5414== by 0x34D9021734: (below main) (in /usr/lib64/libc-2.15.so)
|
||||
|
||||
In this example, the "virDomainDefParseXML()" had an error path where the
|
||||
"virDomainVideoDefPtr video" pointer was not properly disposed. By simply
|
||||
adding a "virDomainVideoDefFree(video);" in the error path, the issue was
|
||||
resolved.
|
||||
|
||||
Another common mistake is calling a printing function, such as "VIR_DEBUG()"
|
||||
without initializing a variable to be printed. The following example involved
|
||||
a call which could return an error, but not set variables passed by reference
|
||||
to the call. The solution was to initialize the variables prior to the call.
|
||||
|
||||
==4749== Use of uninitialised value of size 8
|
||||
==4749== at 0x34D904650B: _itoa_word (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x34D9049118: vfprintf (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x34D9108F60: __vasprintf_chk (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x4CAEEF7: virVasprintf (stdio2.h:199)
|
||||
==4749== by 0x4C8A55E: virLogVMessage (virlog.c:814)
|
||||
==4749== by 0x4C8AA96: virLogMessage (virlog.c:751)
|
||||
==4749== by 0x4DA0056: virNetTLSContextCheckCertKeyUsage (virnettlscontext.c:225)
|
||||
==4749== by 0x4DA06DB: virNetTLSContextCheckCert (virnettlscontext.c:439)
|
||||
==4749== by 0x4DA1620: virNetTLSContextNew (virnettlscontext.c:562)
|
||||
==4749== by 0x4DA26FC: virNetTLSContextNewServer (virnettlscontext.c:927)
|
||||
==4749== by 0x409C39: testTLSContextInit (virnettlscontexttest.c:467)
|
||||
==4749== by 0x40AB8F: virtTestRun (testutils.c:161)
|
||||
|
||||
Valgrind will also find some false positives or code paths which cannot be
|
||||
resolved by making changes to the libvirt code. For these paths, it is
|
||||
possible to add a filter to avoid the errors. For example:
|
||||
|
||||
==4643== 7 bytes in 1 blocks are possibly lost in loss record 4 of 20
|
||||
==4643== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
|
||||
==4643== by 0x34D90853F1: strdup (in /usr/lib64/libc-2.15.so)
|
||||
==4643== by 0x34EEC2C08A: ??? (in /usr/lib64/libnl.so.1.1)
|
||||
==4643== by 0x34EEC15B81: ??? (in /usr/lib64/libnl.so.1.1)
|
||||
==4643== by 0x34D8C0EE15: call_init.part.0 (in /usr/lib64/ld-2.15.so)
|
||||
==4643== by 0x34D8C0EECF: _dl_init (in /usr/lib64/ld-2.15.so)
|
||||
==4643== by 0x34D8C01569: ??? (in /usr/lib64/ld-2.15.so)
|
||||
|
||||
|
||||
In this instance, it is acceptible to modify the "tests/.valgrind.supp" file
|
||||
in order to add a suppression filter. The filter should be unique enough to
|
||||
not suppress real leaks, but it should be generic enough to cover multiple
|
||||
code paths. The format of the entry can be found in the documentation found at
|
||||
the
|
||||
|
||||
Valgrind home page.
|
||||
http://valgrind.org/The following trace was added to "tests/.valgrind.supp" in order to suppress
|
||||
the warning:
|
||||
|
||||
{
|
||||
dlInitMemoryLeak1
|
||||
Memcheck:Leak
|
||||
fun:?alloc
|
||||
...
|
||||
fun:call_init.part.0
|
||||
fun:_dl_init
|
||||
...
|
||||
obj:*/lib*/ld-2.*so*
|
||||
}
|
||||
|
||||
|
||||
|
||||
(8) Update tests and/or documentation, particularly if you are adding a new
|
||||
(6) Update tests and/or documentation, particularly if you are adding a new
|
||||
feature or changing the output of a program.
|
||||
|
||||
|
||||
@@ -288,37 +134,6 @@ otherwise. For example, it is preferable to use "/* */" comments rather than
|
||||
declare them at the beginning of a scope, rather than immediately before use.
|
||||
|
||||
|
||||
Bracket spacing
|
||||
===============
|
||||
The keywords "if", "for", "while", and "switch" must have a single space
|
||||
following them before the opening bracket. E.g.
|
||||
|
||||
if(foo) // Bad
|
||||
if (foo) // Good
|
||||
|
||||
Function implementations mustnothave any whitespace between the function name and the opening bracket. E.g.
|
||||
|
||||
int foo (int wizz) // Bad
|
||||
int foo(int wizz) // Good
|
||||
|
||||
Function calls mustnothave any whitespace between the function name and the opening bracket. E.g.
|
||||
|
||||
bar = foo (wizz); // Bad
|
||||
bar = foo(wizz); // Good
|
||||
|
||||
Function typedefs mustnothave any whitespace between the closing bracket of the function name and
|
||||
opening bracket of the arg list. E.g.
|
||||
|
||||
typedef int (*foo) (int wizz); // Bad
|
||||
typedef int (*foo)(int wizz); // Good
|
||||
|
||||
There must not be any whitespace immediately following any opening bracket, or
|
||||
immediately prior to any closing bracket. E.g.
|
||||
|
||||
int foo( int wizz ); // Bad
|
||||
int foo(int wizz); // Good
|
||||
|
||||
|
||||
Curly braces
|
||||
============
|
||||
Omit the curly braces around an "if", "while", "for" etc. body only when that
|
||||
@@ -331,7 +146,7 @@ Omitting braces with a single-line body is fine:
|
||||
while (expr) // one-line body -> omitting curly braces is ok
|
||||
single_line_stmt();
|
||||
|
||||
However, the moment your loop/if/else body extends on to a second line, for
|
||||
However, the moment your loop/if/else body extends onto a second line, for
|
||||
whatever reason (even if it's just an added comment), then you should add
|
||||
braces. Otherwise, it would be too easy to insert a statement just before that
|
||||
comment (without adding braces), thinking it is already a multi-statement loop:
|
||||
@@ -601,7 +416,7 @@ File handling
|
||||
=============
|
||||
Usage of the "fdopen()", "close()", "fclose()" APIs is deprecated in libvirt
|
||||
code base to help avoiding double-closing of files or file descriptors, which
|
||||
is particularly dangerous in a multi-threaded application. Instead of these
|
||||
is particulary dangerous in a multi-threaded applications. Instead of these
|
||||
APIs, use the macros from virfile.h
|
||||
|
||||
- Open a file from a file descriptor:
|
||||
@@ -773,7 +588,7 @@ stick to the following general plan for all *.c source files:
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if WITH_NUMACTL Some system includes aren't supported
|
||||
#if HAVE_NUMACTL Some system includes aren't supported
|
||||
# include <numa.h> everywhere so need these #if guards.
|
||||
#endif
|
||||
|
||||
@@ -787,12 +602,9 @@ stick to the following general plan for all *.c source files:
|
||||
{
|
||||
...
|
||||
|
||||
Of particular note: *Do not* include libvirt/libvirt.h, libvirt/virterror.h,
|
||||
libvirt/libvirt-qemu.h, or libvirt/libvirt-lxc.h. They are included by
|
||||
"internal.h" already and there are some special reasons why you cannot include
|
||||
these files explicitly. One of the special cases, "libvirt/libvirt.h" is
|
||||
included prior to "internal.h" in "remote_protocol.x", to avoid exposing
|
||||
*_LAST enum elements.
|
||||
Of particular note: *Do not* include libvirt/libvirt.h or libvirt/virterror.h.
|
||||
It is included by "internal.h" already and there are some special reasons why
|
||||
you cannot include these files explicitly.
|
||||
|
||||
|
||||
Printf-style functions
|
||||
|
27
Makefile.am
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
## Copyright (C) 2005-2011 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
LCOV = lcov
|
||||
@@ -20,35 +20,33 @@ XML_EXAMPLES = \
|
||||
EXTRA_DIST = \
|
||||
ChangeLog-old \
|
||||
libvirt.spec libvirt.spec.in \
|
||||
mingw-libvirt.spec.in \
|
||||
mingw32-libvirt.spec.in \
|
||||
libvirt.pc.in \
|
||||
autobuild.sh \
|
||||
Makefile.nonreentrant \
|
||||
autogen.sh \
|
||||
cfg.mk \
|
||||
examples/domain-events/events-python \
|
||||
run.in \
|
||||
AUTHORS.in \
|
||||
$(XML_EXAMPLES)
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libvirt.pc
|
||||
|
||||
NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html.in
|
||||
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
$(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl \
|
||||
$(top_srcdir)/docs/news.html.in \
|
||||
| perl -0777 -pe 's/\n\n+$$/\n/' \
|
||||
| perl -pe 's/[ \t]+$$//' \
|
||||
> $@-t && mv $@-t $@ ; fi
|
||||
> $@-t && mv $@-t $@ ; fi );
|
||||
|
||||
$(top_srcdir)/HACKING: $(top_srcdir)/docs/hacking1.xsl $(top_srcdir)/docs/hacking2.xsl \
|
||||
$(top_srcdir)/docs/wrapstring.xsl $(top_srcdir)/docs/hacking.html.in
|
||||
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
$(XSLTPROC) --nonet $(top_srcdir)/docs/hacking1.xsl $(top_srcdir)/docs/hacking.html.in | \
|
||||
$(XSLTPROC) --nonet $(top_srcdir)/docs/hacking2.xsl - \
|
||||
| perl -0777 -pe 's/\n\n+$$/\n/' \
|
||||
> $@-t && mv $@-t $@ ; fi;
|
||||
> $@-t && mv $@-t $@ ; fi );
|
||||
|
||||
rpm: clean
|
||||
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
|
||||
@@ -79,25 +77,16 @@ MAINTAINERCLEANFILES = .git-module-status
|
||||
# disable this check
|
||||
distuninstallcheck:
|
||||
|
||||
dist-hook: gen-ChangeLog gen-AUTHORS
|
||||
dist-hook: gen-ChangeLog
|
||||
|
||||
# Generate the ChangeLog file (with all entries since the switch to git)
|
||||
# and insert it into the directory we're about to use to create a tarball.
|
||||
gen_start_date = 2009-07-04
|
||||
.PHONY: gen-ChangeLog
|
||||
gen-ChangeLog:
|
||||
$(AM_V_GEN)if test -d .git; then \
|
||||
if test -d .git; then \
|
||||
$(top_srcdir)/build-aux/gitlog-to-changelog \
|
||||
--since=$(gen_start_date) > $(distdir)/cl-t; \
|
||||
rm -f $(distdir)/ChangeLog; \
|
||||
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
||||
fi
|
||||
|
||||
.PHONY: gen-AUTHORS
|
||||
gen-AUTHORS:
|
||||
$(AM_V_GEN)if test -d $(srcdir)/.git; then \
|
||||
out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u`" && \
|
||||
perl -p -e "s/#authorslist#// and print '$$out'" \
|
||||
< $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
|
||||
mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
|
||||
fi
|
||||
|
49
autobuild.sh
@@ -20,8 +20,7 @@ cd build
|
||||
../autogen.sh --prefix="$AUTOBUILD_INSTALL_ROOT" \
|
||||
--enable-test-coverage \
|
||||
--disable-nls \
|
||||
--enable-werror \
|
||||
--enable-static
|
||||
--enable-werror
|
||||
|
||||
# If the MAKEFLAGS envvar does not yet include a -j option,
|
||||
# add -jN where N depends on the number of processors.
|
||||
@@ -51,30 +50,30 @@ test -x /usr/bin/lcov && make cov
|
||||
rm -f *.tar.gz
|
||||
make dist
|
||||
|
||||
if test -n "$AUTOBUILD_COUNTER" ; then
|
||||
if [ -n "$AUTOBUILD_COUNTER" ]; then
|
||||
EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
|
||||
else
|
||||
NOW=`date +"%s"`
|
||||
EXTRA_RELEASE=".$USER$NOW"
|
||||
fi
|
||||
|
||||
if test -f /usr/bin/rpmbuild ; then
|
||||
if [ -f /usr/bin/rpmbuild ]; then
|
||||
rpmbuild --nodeps \
|
||||
--define "extra_release $EXTRA_RELEASE" \
|
||||
--define "_sourcedir `pwd`" \
|
||||
-ba --clean libvirt.spec
|
||||
fi
|
||||
|
||||
# Test mingw32 cross-compile
|
||||
if test -x /usr/bin/i686-w64-mingw32-gcc ; then
|
||||
# Test mingw cross-compile
|
||||
if [ -x /usr/bin/i686-pc-mingw32-gcc ]; then
|
||||
make distclean
|
||||
|
||||
PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
|
||||
CC="i686-w64-mingw32-gcc" \
|
||||
PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig" \
|
||||
CC="i686-pc-mingw32-gcc" \
|
||||
../configure \
|
||||
--build=$(uname -m)-w64-linux \
|
||||
--host=i686-w64-mingw32 \
|
||||
--prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
|
||||
--build=$(uname -m)-pc-linux \
|
||||
--host=i686-pc-mingw32 \
|
||||
--prefix="$AUTOBUILD_INSTALL_ROOT/i686-pc-mingw32/sys-root/mingw" \
|
||||
--enable-werror \
|
||||
--without-libvirtd \
|
||||
--without-python
|
||||
@@ -82,33 +81,13 @@ if test -x /usr/bin/i686-w64-mingw32-gcc ; then
|
||||
make
|
||||
make install
|
||||
|
||||
fi
|
||||
#set -o pipefail
|
||||
#make check 2>&1 | tee "$RESULTS"
|
||||
|
||||
# Test mingw64 cross-compile
|
||||
if test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
|
||||
make distclean
|
||||
|
||||
PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
|
||||
CC="x86_64-w64-mingw32-gcc" \
|
||||
../configure \
|
||||
--build=$(uname -m)-w64-linux \
|
||||
--host=x86_64-w64-mingw32 \
|
||||
--prefix="$AUTOBUILD_INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw" \
|
||||
--enable-werror \
|
||||
--without-libvirtd \
|
||||
--without-python
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test -x /usr/bin/i686-w64-mingw32-gcc && test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
|
||||
if test -f /usr/bin/rpmbuild ; then
|
||||
if [ -f /usr/bin/rpmbuild ]; then
|
||||
rpmbuild --nodeps \
|
||||
--define "extra_release $EXTRA_RELEASE" \
|
||||
--define "_sourcedir `pwd`" \
|
||||
-ba --clean mingw-libvirt.spec
|
||||
-ba --clean mingw32-libvirt.spec
|
||||
fi
|
||||
fi
|
||||
|
36
autogen.sh
@@ -1,8 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
set -e
|
||||
|
||||
srcdir=`dirname "$0"`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
@@ -21,8 +19,7 @@ if test "x$1" = "x--no-git"; then
|
||||
no_git=" $1"
|
||||
shift
|
||||
fi
|
||||
if test -z "$NOCONFIGURE" ; then
|
||||
if test "x$1" = "x--system"; then
|
||||
if test "x$1" = "x--system"; then
|
||||
shift
|
||||
prefix=/usr
|
||||
libdir=$prefix/lib
|
||||
@@ -33,12 +30,11 @@ if test -z "$NOCONFIGURE" ; then
|
||||
fi
|
||||
EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir"
|
||||
echo "Running ./configure with $EXTRA_ARGS $@"
|
||||
else
|
||||
else
|
||||
if test -z "$*" && test ! -f "$THEDIR/config.status"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Compute the hash we'll use to determine whether rerunning bootstrap
|
||||
@@ -49,10 +45,6 @@ fi
|
||||
# we rerun bootstrap to pull in those diffs.
|
||||
bootstrap_hash()
|
||||
{
|
||||
if test "$no_git"; then
|
||||
echo no-git
|
||||
return
|
||||
fi
|
||||
git submodule status | sed 's/^[ +-]//;s/ .*//'
|
||||
git hash-object bootstrap.conf
|
||||
git ls-tree -d HEAD gnulib/local | awk '{print $3}'
|
||||
@@ -65,37 +57,19 @@ bootstrap_hash()
|
||||
# the required file po/Makevars.
|
||||
# Only run bootstrap from a git checkout, never from a tarball.
|
||||
if test -d .git; then
|
||||
curr_status=.git-module-status t=
|
||||
if test "$no_git"; then
|
||||
t=no-git
|
||||
elif test -d .gnulib; then
|
||||
t=$(bootstrap_hash; git diff .gnulib)
|
||||
fi
|
||||
case $t:${CLEAN_SUBMODULE+set} in
|
||||
*:set) ;;
|
||||
*-dirty*)
|
||||
echo "error: gnulib submodule is dirty, please investigate" 2>&1
|
||||
echo "set env-var CLEAN_SUBMODULE to discard gnulib changes" 2>&1
|
||||
exit 1 ;;
|
||||
esac
|
||||
# Keep this test in sync with cfg.mk:_update_required
|
||||
curr_status=.git-module-status
|
||||
t=$(bootstrap_hash; git diff .gnulib)
|
||||
if test "$t" = "$(cat $curr_status 2>/dev/null)" \
|
||||
&& test -f "po/Makevars" && test -f AUTHORS; then
|
||||
&& test -f "po/Makevars"; then
|
||||
# good, it's up to date, all we need is autoreconf
|
||||
autoreconf -if
|
||||
else
|
||||
if test -z "$no_git" && test ${CLEAN_SUBMODULE+set}; then
|
||||
echo cleaning up submodules...
|
||||
git submodule foreach 'git clean -dfqx && git reset --hard'
|
||||
fi
|
||||
echo running bootstrap$no_git...
|
||||
./bootstrap$no_git --bootstrap-sync && bootstrap_hash > $curr_status \
|
||||
|| { echo "Failed to bootstrap, please investigate."; exit 1; }
|
||||
fi
|
||||
fi
|
||||
|
||||
test -n "$NOCONFIGURE" && exit 0
|
||||
|
||||
cd "$THEDIR"
|
||||
|
||||
if test "x$OBJ_DIR" != x; then
|
||||
|
113
bootstrap
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2013-07-03.20; # UTC
|
||||
scriptversion=2012-07-19.14; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -140,21 +140,20 @@ po_download_command_format2=\
|
||||
"wget --mirror -nd -q -np -A.po -P '%s' \
|
||||
http://translationproject.org/latest/%s/"
|
||||
|
||||
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
||||
# fall back to the package name (1st argument with munging)
|
||||
extract_package_name='
|
||||
/^AC_INIT(\[*/{
|
||||
s///
|
||||
/^[^,]*,[^,]*,[^,]*,[ []*\([^][ ,)]\)/{
|
||||
s//\1/
|
||||
s/[],)].*//
|
||||
/^AC_INIT(/{
|
||||
/.*,.*,.*, */{
|
||||
s///
|
||||
s/[][]//g
|
||||
s/)$//
|
||||
p
|
||||
q
|
||||
}
|
||||
s/[],)].*//
|
||||
s/AC_INIT(\[*//
|
||||
s/]*,.*//
|
||||
s/^GNU //
|
||||
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
|
||||
s/[^A-Za-z0-9_]/-/g
|
||||
p
|
||||
}
|
||||
'
|
||||
@@ -256,12 +255,12 @@ esac
|
||||
# Extra files from gnulib, which override files from other sources.
|
||||
test -z "${gnulib_extra_files}" && \
|
||||
gnulib_extra_files="
|
||||
build-aux/install-sh
|
||||
build-aux/mdate-sh
|
||||
build-aux/texinfo.tex
|
||||
build-aux/depcomp
|
||||
build-aux/config.guess
|
||||
build-aux/config.sub
|
||||
$build_aux/install-sh
|
||||
$build_aux/mdate-sh
|
||||
$build_aux/texinfo.tex
|
||||
$build_aux/depcomp
|
||||
$build_aux/config.guess
|
||||
$build_aux/config.sub
|
||||
doc/INSTALL
|
||||
"
|
||||
|
||||
@@ -307,34 +306,34 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Bootstrapping from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
# Strip blank and comment lines to leave significant entries.
|
||||
gitignore_entries() {
|
||||
sed '/^#/d; /^$/d' "$@"
|
||||
# Ensure that lines starting with ! sort last, per gitignore conventions
|
||||
# for whitelisting exceptions after a more generic blacklist pattern.
|
||||
sort_patterns() {
|
||||
sort -u "$@" | sed '/^!/ {
|
||||
H
|
||||
d
|
||||
}
|
||||
$ {
|
||||
P
|
||||
x
|
||||
s/^\n//
|
||||
}' | sed '/^$/d'
|
||||
}
|
||||
|
||||
# If $STR is not already on a line by itself in $FILE, insert it at the start.
|
||||
# Entries are inserted at the start of the ignore list to ensure existing
|
||||
# entries starting with ! are not overridden. Such entries support
|
||||
# whitelisting exceptions after a more generic blacklist pattern.
|
||||
insert_if_absent() {
|
||||
# If $STR is not already on a line by itself in $FILE, insert it,
|
||||
# sorting the new contents of the file and replacing $FILE with the result.
|
||||
insert_sorted_if_absent() {
|
||||
file=$1
|
||||
str=$2
|
||||
test -f $file || touch $file
|
||||
test -r $file || die "Error: failed to read ignore file: $file"
|
||||
duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
|
||||
if [ "$duplicate_entries" ] ; then
|
||||
die "Error: Duplicate entries in $file: " $duplicate_entries
|
||||
fi
|
||||
linesold=$(gitignore_entries $file | wc -l)
|
||||
linesnew=$(echo "$str" | gitignore_entries - $file | sort -u | wc -l)
|
||||
if [ $linesold != $linesnew ] ; then
|
||||
{ echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
|
||||
|| die "insert_if_absent $file $str: failed"
|
||||
fi
|
||||
echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \
|
||||
|| { echo "$str" | sort_patterns - $file > $file.bak \
|
||||
&& mv $file.bak $file; } \
|
||||
|| die "insert_sorted_if_absent $file $str: failed"
|
||||
}
|
||||
|
||||
# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
|
||||
# insert_if_absent.
|
||||
# insert_sorted_if_absent.
|
||||
insert_vc_ignore() {
|
||||
vc_ignore_file="$1"
|
||||
pattern="$2"
|
||||
@@ -345,7 +344,7 @@ insert_vc_ignore() {
|
||||
# .gitignore entry.
|
||||
pattern=$(echo "$pattern" | sed s,^,/,);;
|
||||
esac
|
||||
insert_if_absent "$vc_ignore_file" "$pattern"
|
||||
insert_sorted_if_absent "$vc_ignore_file" "$pattern"
|
||||
}
|
||||
|
||||
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
|
||||
@@ -551,7 +550,7 @@ fi
|
||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||
|
||||
# See if we can use gnulib's git-merge-changelog merge driver.
|
||||
if $use_git && test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
||||
if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
||||
if git config merge.merge-changelog.driver >/dev/null ; then
|
||||
:
|
||||
elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then
|
||||
@@ -574,17 +573,13 @@ git_modules_config () {
|
||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||
}
|
||||
|
||||
if $use_git; then
|
||||
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||
fi
|
||||
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||
|
||||
# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
|
||||
# submodule, for use in the rest of the script.
|
||||
# Get gnulib files.
|
||||
|
||||
case ${GNULIB_SRCDIR--} in
|
||||
-)
|
||||
# Note that $use_git is necessarily true in this case.
|
||||
if git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
echo "$0: getting gnulib files..."
|
||||
git submodule init || exit $?
|
||||
@@ -605,8 +600,8 @@ case ${GNULIB_SRCDIR--} in
|
||||
GNULIB_SRCDIR=$gnulib_path
|
||||
;;
|
||||
*)
|
||||
# Use GNULIB_SRCDIR directly or as a reference.
|
||||
if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
|
||||
# Use GNULIB_SRCDIR as a reference.
|
||||
if test -d "$GNULIB_SRCDIR"/.git && \
|
||||
git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
echo "$0: getting gnulib files..."
|
||||
if git submodule -h|grep -- --reference > /dev/null; then
|
||||
@@ -632,19 +627,12 @@ case ${GNULIB_SRCDIR--} in
|
||||
;;
|
||||
esac
|
||||
|
||||
# $GNULIB_SRCDIR now points to the version of gnulib to use, and
|
||||
# we no longer need to use git or $gnulib_path below here.
|
||||
|
||||
if $bootstrap_sync; then
|
||||
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
|
||||
echo "$0: updating bootstrap and restarting..."
|
||||
case $(sh -c 'echo "$1"' -- a) in
|
||||
a) ignored=--;;
|
||||
*) ignored=ignored;;
|
||||
esac
|
||||
exec sh -c \
|
||||
'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
|
||||
$ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
||||
-- "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
||||
"$0" "$@" --no-bootstrap-sync
|
||||
}
|
||||
fi
|
||||
@@ -901,21 +889,20 @@ find "$m4_base" "$source_base" \
|
||||
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||
-type l -xtype l -delete > /dev/null 2>&1
|
||||
|
||||
# Invoke autoreconf with --force --install to ensure upgrades of tools
|
||||
# such as ylwrap.
|
||||
AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
|
||||
|
||||
# Some systems (RHEL 5) are using ancient autotools, for which the
|
||||
# --no-recursive option had not been invented. Detect that lack and
|
||||
# omit the option when it's not supported. FIXME in 2017: remove this
|
||||
# hack when RHEL 5 autotools are updated, or when they become irrelevant.
|
||||
no_recursive=
|
||||
case $($AUTORECONF --help) in
|
||||
*--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
|
||||
*--no-recursive*) no_recursive=--no-recursive;;
|
||||
esac
|
||||
|
||||
# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
|
||||
echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
|
||||
AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
|
||||
echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
|
||||
"$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
|
||||
AUTOPOINT=true LIBTOOLIZE=true \
|
||||
$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
|
||||
|| die "autoreconf failed"
|
||||
|
||||
# Get some extra files from gnulib, overriding existing files.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2010-2013 Red Hat, Inc.
|
||||
# Copyright (C) 2010-2012 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
@@ -13,14 +13,14 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules='
|
||||
accept
|
||||
areadlink
|
||||
autobuild
|
||||
base64
|
||||
bind
|
||||
bitrotate
|
||||
@@ -31,22 +31,18 @@ c-strcasestr
|
||||
calloc-posix
|
||||
canonicalize-lgpl
|
||||
chown
|
||||
clock-time
|
||||
close
|
||||
connect
|
||||
configmake
|
||||
count-one-bits
|
||||
crypto/md5
|
||||
crypto/sha256
|
||||
dirname-lgpl
|
||||
environ
|
||||
execinfo
|
||||
fclose
|
||||
fcntl
|
||||
fcntl-h
|
||||
fdatasync
|
||||
ffs
|
||||
ffsl
|
||||
fnmatch
|
||||
fsync
|
||||
func
|
||||
@@ -66,15 +62,12 @@ intprops
|
||||
ioctl
|
||||
isatty
|
||||
largefile
|
||||
ldexp
|
||||
listen
|
||||
localeconv
|
||||
maintainer-makefile
|
||||
manywarnings
|
||||
mkostemp
|
||||
mkostemps
|
||||
mkstemp
|
||||
mkstemps
|
||||
mktempd
|
||||
net_if
|
||||
netdb
|
||||
nonblocking
|
||||
openpty
|
||||
@@ -92,13 +85,11 @@ regex
|
||||
random_r
|
||||
sched
|
||||
send
|
||||
setenv
|
||||
setsockopt
|
||||
sigaction
|
||||
sigpipe
|
||||
snprintf
|
||||
socket
|
||||
stat-time
|
||||
stdarg
|
||||
stpcpy
|
||||
strchrnul
|
||||
@@ -226,15 +217,15 @@ if `(${PYTHON_CONFIG-python-config} --version;
|
||||
PYTHON_CONFIG=true
|
||||
fi
|
||||
|
||||
# Automake requires that ChangeLog and AUTHORS exist.
|
||||
touch AUTHORS ChangeLog || exit 1
|
||||
# Automake requires that ChangeLog exist.
|
||||
touch ChangeLog || exit 1
|
||||
|
||||
# Override bootstrap's list - we don't use mdate-sh or texinfo.tex.
|
||||
gnulib_extra_files="
|
||||
build-aux/install-sh
|
||||
build-aux/depcomp
|
||||
build-aux/config.guess
|
||||
build-aux/config.sub
|
||||
$build_aux/install-sh
|
||||
$build_aux/depcomp
|
||||
$build_aux/config.guess
|
||||
$build_aux/config.sub
|
||||
doc/INSTALL
|
||||
"
|
||||
|
||||
|
@@ -1,71 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# augeas-gentest.pl: Generate an augeas test file, from an
|
||||
# example config file + test file template
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Authors:
|
||||
# Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
die "syntax: $0 CONFIG TEMPLATE AUGTEST\n" unless @ARGV == 3;
|
||||
|
||||
my $config = shift @ARGV;
|
||||
my $template = shift @ARGV;
|
||||
my $augtest = shift @ARGV;
|
||||
|
||||
open AUGTEST, ">", $augtest or die "cannot create $augtest: $!";
|
||||
|
||||
$SIG{__DIE__} = sub {
|
||||
unlink $augtest;
|
||||
};
|
||||
|
||||
open CONFIG, "<", $config or die "cannot read $config: $!";
|
||||
open TEMPLATE, "<", $template or die "cannot read $template: $!";
|
||||
|
||||
my $group = 0;
|
||||
while (<TEMPLATE>) {
|
||||
if (/::CONFIG::/) {
|
||||
my $group = 0;
|
||||
print AUGTEST " let conf = \"";
|
||||
while (<CONFIG>) {
|
||||
if (/^#\w/) {
|
||||
s/^#//;
|
||||
s/\"/\\\"/g;
|
||||
print AUGTEST $_;
|
||||
$group = /\[\s$/;
|
||||
} elsif ($group) {
|
||||
s/\"/\\\"/g;
|
||||
if (/#\s*\]/) {
|
||||
$group = 0;
|
||||
}
|
||||
if (/^#/) {
|
||||
s/^#//;
|
||||
print AUGTEST $_;
|
||||
}
|
||||
}
|
||||
}
|
||||
print AUGTEST "\"\n";
|
||||
} else {
|
||||
print AUGTEST $_;
|
||||
}
|
||||
}
|
||||
|
||||
close TEMPLATE;
|
||||
close CONFIG;
|
||||
close AUGTEST or die "cannot save $augtest: $!";
|
@@ -1,116 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# bracket-spacing.pl: Report any usage of 'function (..args..)'
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Authors:
|
||||
# Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $ret = 0;
|
||||
my $incomment = 0;
|
||||
|
||||
foreach my $file (@ARGV) {
|
||||
open FILE, $file;
|
||||
|
||||
while (defined (my $line = <FILE>)) {
|
||||
my $data = $line;
|
||||
|
||||
# Kill any quoted strongs
|
||||
$data =~ s,".*?","XXX",g;
|
||||
|
||||
# Kill any C++ style comments
|
||||
$data =~ s,//.*$,//,;
|
||||
|
||||
next if $data =~ /^#/;
|
||||
|
||||
# Kill contents of multi-line comments
|
||||
# and detect end of multi-line comments
|
||||
if ($incomment) {
|
||||
if ($data =~ m,\*/,) {
|
||||
$incomment = 0;
|
||||
$data =~ s,^.*\*/,*/,;
|
||||
} else {
|
||||
$data = "";
|
||||
}
|
||||
}
|
||||
|
||||
# Kill single line comments, and detect
|
||||
# start of multi-line comments
|
||||
if ($data =~ m,/\*.*\*/,) {
|
||||
$data =~ s,/\*.*\*/,/* */,;
|
||||
} elsif ($data =~ m,/\*,) {
|
||||
$incomment = 1;
|
||||
$data =~ s,/\*.*,/*,;
|
||||
}
|
||||
|
||||
# We need to match things like
|
||||
#
|
||||
# int foo (int bar, bool wizz);
|
||||
# foo (bar, wizz);
|
||||
#
|
||||
# but not match things like:
|
||||
#
|
||||
# typedef int (*foo)(bar wizz)
|
||||
#
|
||||
# we can't do this (efficiently) without
|
||||
# missing things like
|
||||
#
|
||||
# foo (*bar, wizz);
|
||||
#
|
||||
while ($data =~ /(\w+)\s\((?!\*)/) {
|
||||
my $kw = $1;
|
||||
|
||||
# Allow space after keywords only
|
||||
if ($kw =~ /^(if|for|while|switch|return)$/) {
|
||||
$data =~ s/($kw\s\()/XXX(/;
|
||||
} else {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# Require whitespace immediately after keywords,
|
||||
# but none after the opening bracket
|
||||
while ($data =~ /(if|for|while|switch|return)\(/ ||
|
||||
$data =~ /(if|for|while|switch|return)\s+\(\s/) {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
|
||||
# Forbid whitespace between )( of a function typedef
|
||||
while ($data =~ /\(\*\w+\)\s+\(/) {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
|
||||
# Forbid whitespace following ( or prior to )
|
||||
while ($data =~ /\S\s+\)/ ||
|
||||
$data =~ /\(\s+\S/) {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
}
|
||||
|
||||
exit $ret;
|
331
cfg.mk
@@ -1,5 +1,5 @@
|
||||
# Customize Makefile.maint. -*- makefile -*-
|
||||
# Copyright (C) 2008-2013 Red Hat, Inc.
|
||||
# Copyright (C) 2008-2012 Red Hat, Inc.
|
||||
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -13,8 +13,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Use alpha.gnu.org for alpha and beta releases.
|
||||
# Use ftp.gnu.org for major releases.
|
||||
@@ -43,6 +42,7 @@ _test_script_regex = \<\(init\|test-lib\)\.sh\>
|
||||
# Tests not to run as part of "make distcheck".
|
||||
local-checks-to-skip = \
|
||||
changelog-check \
|
||||
check-AUTHORS \
|
||||
makefile-check \
|
||||
makefile_path_separator_check \
|
||||
patch-check \
|
||||
@@ -84,7 +84,7 @@ local-checks-to-skip = \
|
||||
ifeq ($(filter dist%, $(MAKECMDGOALS)), )
|
||||
local-checks-to-skip += sc_vulnerable_makefile_CVE-2012-3386
|
||||
else
|
||||
distdir: sc_vulnerable_makefile_CVE-2012-3386.z
|
||||
distdir: sc_vulnerable_makefile_CVE-2012-3386
|
||||
endif
|
||||
|
||||
# Files that should never cause syntax check failures.
|
||||
@@ -93,15 +93,11 @@ VC_LIST_ALWAYS_EXCLUDE_REGEX = \
|
||||
|
||||
# Functions like free() that are no-ops on NULL arguments.
|
||||
useless_free_options = \
|
||||
--name=VBOX_UTF16_FREE \
|
||||
--name=VBOX_UTF8_FREE \
|
||||
--name=VBOX_COM_UNALLOC_MEM \
|
||||
--name=VIR_FREE \
|
||||
--name=qemuCapsFree \
|
||||
--name=qemuMigrationCookieFree \
|
||||
--name=qemuMigrationCookieGraphicsFree \
|
||||
--name=sexpr_free \
|
||||
--name=usbFreeDevice \
|
||||
--name=virBandwidthDefFree \
|
||||
--name=virBitmapFree \
|
||||
--name=virCPUDefFree \
|
||||
@@ -148,9 +144,20 @@ useless_free_options = \
|
||||
--name=virJSONValueFree \
|
||||
--name=virLastErrFreeData \
|
||||
--name=virNetMessageFree \
|
||||
--name=virNetClientFree \
|
||||
--name=virNetClientProgramFree \
|
||||
--name=virNetClientStreamFree \
|
||||
--name=virNetServerFree \
|
||||
--name=virNetServerClientFree \
|
||||
--name=virNetServerMDNSFree \
|
||||
--name=virNetServerMDNSEntryFree \
|
||||
--name=virNetServerMDNSGroupFree \
|
||||
--name=virNetServerProgramFree \
|
||||
--name=virNetServerServiceFree \
|
||||
--name=virNetSocketFree \
|
||||
--name=virNetSASLContextFree \
|
||||
--name=virNetSASLSessionFree \
|
||||
--name=virNetTLSSessionFree \
|
||||
--name=virNWFilterDefFree \
|
||||
--name=virNWFilterEntryFree \
|
||||
--name=virNWFilterHashTableFree \
|
||||
@@ -163,8 +170,6 @@ useless_free_options = \
|
||||
--name=virNetworkObjFree \
|
||||
--name=virNodeDeviceDefFree \
|
||||
--name=virNodeDeviceObjFree \
|
||||
--name=virObjectUnref \
|
||||
--name=virObjectFreeCallback \
|
||||
--name=virSecretDefFree \
|
||||
--name=virStorageEncryptionFree \
|
||||
--name=virStorageEncryptionSecretFree \
|
||||
@@ -306,7 +311,6 @@ sc_flags_usage:
|
||||
@test "$$(cat $(srcdir)/include/libvirt/libvirt.h.in \
|
||||
$(srcdir)/include/libvirt/virterror.h \
|
||||
$(srcdir)/include/libvirt/libvirt-qemu.h \
|
||||
$(srcdir)/include/libvirt/libvirt-lxc.h \
|
||||
| grep -c '\(long\|unsigned\) flags')" != 4 && \
|
||||
{ echo '$(ME): new API should use "unsigned int flags"' 1>&2; \
|
||||
exit 1; } || :
|
||||
@@ -319,14 +323,14 @@ sc_flags_usage:
|
||||
|
||||
# Avoid functions that should only be called via macro counterparts.
|
||||
sc_prohibit_internal_functions:
|
||||
@prohibit='vir(Free|AllocN?|ReallocN|(Insert|Delete)ElementsN|File(Close|Fclose|Fdopen)) *\(' \
|
||||
@prohibit='vir(Free|AllocN?|ReallocN|File(Close|Fclose|Fdopen)) *\(' \
|
||||
halt='use VIR_ macros instead of internal functions' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Avoid raw malloc and free, except in documentation comments.
|
||||
sc_prohibit_raw_allocation:
|
||||
@prohibit='^.[^*].*\<((m|c|re)alloc|free) *\([^)]' \
|
||||
halt='use VIR_ macros from viralloc.h instead of malloc/free' \
|
||||
halt='use VIR_ macros from memory.h instead of malloc/free' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Avoid functions that can lead to double-close bugs.
|
||||
@@ -344,12 +348,6 @@ sc_prohibit_fork_wrappers:
|
||||
halt='use virCommand for child processes' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Prefer mkostemp with O_CLOEXEC.
|
||||
sc_prohibit_mkstemp:
|
||||
@prohibit='[^"]\<mkstemps? *\(' \
|
||||
halt='use mkostemp with O_CLOEXEC instead of mkstemp' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# access with X_OK accepts directories, but we can't exec() those.
|
||||
# access with F_OK or R_OK is okay, though.
|
||||
sc_prohibit_access_xok:
|
||||
@@ -363,18 +361,7 @@ snp_ = strncmp *\(.+\)
|
||||
sc_prohibit_strncmp:
|
||||
@prohibit='! *strncmp *\(|\<$(snp_) *[!=]=|[!=]= *$(snp_)' \
|
||||
exclude=':# *define STR(N?EQLEN|PREFIX)\(' \
|
||||
halt='use STREQLEN or STRPREFIX instead of str''ncmp' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# strtol and friends are too easy to misuse
|
||||
sc_prohibit_strtol:
|
||||
@prohibit='\bstrto(u?ll?|[ui]max) *\(' \
|
||||
exclude='exempt from syntax-check' \
|
||||
halt='use virStrToLong_*, not strtol variants' \
|
||||
$(_sc_search_regexp)
|
||||
@prohibit='\bstrto[df] *\(' \
|
||||
exclude='exempt from syntax-check' \
|
||||
halt='use virStrToDouble, not strtod variants' \
|
||||
halt='$(ME): use STREQLEN or STRPREFIX instead of str''ncmp' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use virAsprintf rather than as'printf since *strp is undefined on error.
|
||||
@@ -389,12 +376,6 @@ sc_prohibit_setuid:
|
||||
halt='use virSetUIDGID, not raw set*id' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Don't compare *id_t against raw -1.
|
||||
sc_prohibit_risky_id_promotion:
|
||||
@prohibit='\b(user|group|[ug]id) *[=!]= *-' \
|
||||
halt='cast -1 to ([ug]id_t) before comparing against id' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use snprintf rather than s'printf, even if buffer is provably large enough,
|
||||
# since gnulib has more guarantees for snprintf portability
|
||||
sc_prohibit_sprintf:
|
||||
@@ -403,7 +384,7 @@ sc_prohibit_sprintf:
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_readlink:
|
||||
@prohibit='\<readlink *\(' \
|
||||
@prohibit='readlink *\(' \
|
||||
halt='use virFileResolveLink, not readlink' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
@@ -461,7 +442,7 @@ sc_size_of_brackets:
|
||||
# Ensure that no C source file, docs, or rng schema uses TABs for
|
||||
# indentation. Also match *.h.in files, to get libvirt.h.in. Exclude
|
||||
# files in gnulib, since they're imported.
|
||||
space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py|pl|syms)|(daemon|tools)/.*\.in)
|
||||
space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py|syms)|(daemon|tools)/.*\.in)
|
||||
sc_TAB_in_indentation:
|
||||
@prohibit='^ * ' \
|
||||
in_vc_files='$(space_indent_files)$$' \
|
||||
@@ -493,12 +474,6 @@ sc_prohibit_gethostby:
|
||||
halt='use getaddrinfo, not gethostby*' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# dirname and basename from <libgen.h> are not required to be thread-safe
|
||||
sc_prohibit_libgen:
|
||||
@prohibit='( (base|dir)name *\(|include .libgen\.h)' \
|
||||
halt='use functions from gnulib "dirname.h", not <libgen.h>' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# raw xmlGetProp requires some nasty casts
|
||||
sc_prohibit_xmlGetProp:
|
||||
@prohibit='\<xmlGetProp *\(' \
|
||||
@@ -531,12 +506,46 @@ sc_avoid_attribute_unused_in_header:
|
||||
# |grep -vE '^(qsort|if|close|assert|fputc|free|N_|vir.*GetName|.*Unlock|virNodeListDevices|virHashRemoveEntry|freeaddrinfo|.*[fF]ree|xdrmem_create|xmlXPathFreeObject|virUUIDFormat|openvzSetProgramSentinal|polkit_action_unref)$'
|
||||
|
||||
msg_gen_function =
|
||||
msg_gen_function += ESX_ERROR
|
||||
msg_gen_function += ESX_VI_ERROR
|
||||
msg_gen_function += HYPERV_ERROR
|
||||
msg_gen_function += PHYP_ERROR
|
||||
msg_gen_function += VIR_ERROR
|
||||
msg_gen_function += VMX_ERROR
|
||||
msg_gen_function += XENXS_ERROR
|
||||
msg_gen_function += eventReportError
|
||||
msg_gen_function += ifaceError
|
||||
msg_gen_function += interfaceReportError
|
||||
msg_gen_function += iptablesError
|
||||
msg_gen_function += lxcError
|
||||
msg_gen_function += libxlError
|
||||
msg_gen_function += macvtapError
|
||||
msg_gen_function += networkReportError
|
||||
msg_gen_function += nodeReportError
|
||||
msg_gen_function += openvzError
|
||||
msg_gen_function += pciReportError
|
||||
msg_gen_function += qemuReportError
|
||||
msg_gen_function += qemudDispatchClientFailure
|
||||
msg_gen_function += regerror
|
||||
msg_gen_function += remoteError
|
||||
msg_gen_function += remoteDispatchFormatError
|
||||
msg_gen_function += statsError
|
||||
msg_gen_function += streamsReportError
|
||||
msg_gen_function += usbReportError
|
||||
msg_gen_function += umlReportError
|
||||
msg_gen_function += vah_error
|
||||
msg_gen_function += vah_warning
|
||||
msg_gen_function += vboxError
|
||||
msg_gen_function += virCommandError
|
||||
msg_gen_function += virConfError
|
||||
msg_gen_function += virCPUReportError
|
||||
msg_gen_function += virEventError
|
||||
msg_gen_function += virDomainReportError
|
||||
msg_gen_function += virGenericReportError
|
||||
msg_gen_function += virHashError
|
||||
msg_gen_function += virHookReportError
|
||||
msg_gen_function += virInterfaceReportError
|
||||
msg_gen_function += virJSONError
|
||||
msg_gen_function += virLibConnError
|
||||
msg_gen_function += virLibDomainError
|
||||
msg_gen_function += virLibDomainSnapshotError
|
||||
@@ -547,21 +556,39 @@ msg_gen_function += virLibNWFilterError
|
||||
msg_gen_function += virLibSecretError
|
||||
msg_gen_function += virLibStoragePoolError
|
||||
msg_gen_function += virLibStorageVolError
|
||||
msg_gen_function += virNetworkReportError
|
||||
msg_gen_function += virNodeDeviceReportError
|
||||
msg_gen_function += virNWFilterReportError
|
||||
msg_gen_function += virRaiseError
|
||||
msg_gen_function += virReportError
|
||||
msg_gen_function += virReportErrorHelper
|
||||
msg_gen_function += virReportSystemError
|
||||
msg_gen_function += virSecretReportError
|
||||
msg_gen_function += virSecurityReportError
|
||||
msg_gen_function += virSexprError
|
||||
msg_gen_function += virSmbiosReportError
|
||||
msg_gen_function += virSocketError
|
||||
msg_gen_function += virStatsError
|
||||
msg_gen_function += virStorageReportError
|
||||
msg_gen_function += virUtilError
|
||||
msg_gen_function += virXMLError
|
||||
msg_gen_function += virXenInotifyError
|
||||
msg_gen_function += virXenStoreError
|
||||
msg_gen_function += virXendError
|
||||
msg_gen_function += vmwareError
|
||||
msg_gen_function += xenapiSessionErrorHandler
|
||||
msg_gen_function += xenUnifiedError
|
||||
msg_gen_function += xenXMError
|
||||
|
||||
# Uncomment the following and run "make syntax-check" to see diagnostics
|
||||
# that are not yet marked for translation, but that need to be rewritten
|
||||
# so that they are translatable.
|
||||
# msg_gen_function += fprintf
|
||||
# msg_gen_function += testError
|
||||
# msg_gen_function += virXenError
|
||||
# msg_gen_function += vshPrint
|
||||
# msg_gen_function += vshError
|
||||
|
||||
func_or := $(shell echo $(msg_gen_function)|tr -s ' ' '|')
|
||||
func_or := $(shell printf '$(msg_gen_function)'|tr -s '[[:space:]]' '|')
|
||||
func_re := ($(func_or))
|
||||
|
||||
# Look for diagnostics that aren't marked for translation.
|
||||
@@ -572,7 +599,7 @@ func_re := ($(func_or))
|
||||
sc_libvirt_unmarked_diagnostics:
|
||||
@prohibit='\<$(func_re) *\([^"]*"[^"]*[a-z]{3}' \
|
||||
exclude='_\(' \
|
||||
halt='found unmarked diagnostic(s)' \
|
||||
halt='$(ME): found unmarked diagnostic(s)' \
|
||||
$(_sc_search_regexp)
|
||||
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
||||
grep -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
||||
@@ -595,39 +622,6 @@ sc_prohibit_newline_at_end_of_diagnostic:
|
||||
&& { echo '$(ME): newline at end of message(s)' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Look for diagnostics that lack a % in the format string, except that we
|
||||
# allow VIR_ERROR to do this, and ignore functions that take a single
|
||||
# string rather than a format argument.
|
||||
sc_prohibit_diagnostic_without_format:
|
||||
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
||||
grep -A2 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
||||
| sed -rn -e ':l; /[,"]$$/ {N;b l;}' \
|
||||
-e '/(xenapiSessionErrorHandler|vah_(error|warning))/d' \
|
||||
-e '/\<$(func_re) *\([^"]*"([^%"]|"\n[^"]*")*"[,)]/p' \
|
||||
| grep -vE 'VIR_ERROR' && \
|
||||
{ echo '$(ME): found diagnostic without %' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# The strings "" and "%s" should never be marked for translation.
|
||||
# Files under tests/ and examples/ should not be translated.
|
||||
sc_prohibit_useless_translation:
|
||||
@prohibit='_\("(%s)?"\)' \
|
||||
halt='found useless translation' \
|
||||
$(_sc_search_regexp)
|
||||
@prohibit='\<N?_ *\(' \
|
||||
in_vc_files='^(tests|examples)/' \
|
||||
halt='no translations in tests or examples' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# When splitting a diagnostic across lines, ensure that there is a space
|
||||
# or \n on one side of the split.
|
||||
sc_require_whitespace_in_translation:
|
||||
@grep -n -A1 '"$$' $$($(VC_LIST_EXCEPT)) \
|
||||
| sed -ne ':l; /"$$/ {N;b l;}; s/"\n[^"]*"/""/g; s/\\n/ /g' \
|
||||
-e '/_(.*[^\ ]""[^\ ]/p' | grep . && \
|
||||
{ echo '$(ME): missing whitespace at line split' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Enforce recommended preprocessor indentation style.
|
||||
sc_preprocessor_indentation:
|
||||
@if cppi --version >/dev/null 2>&1; then \
|
||||
@@ -638,23 +632,6 @@ sc_preprocessor_indentation:
|
||||
echo '$(ME): skipping test $@: cppi not installed' 1>&2; \
|
||||
fi
|
||||
|
||||
# Enforce similar spec file indentation style, by running cppi on a
|
||||
# (comment-only) C file that mirrors the same layout as the spec file.
|
||||
sc_spec_indentation:
|
||||
@if cppi --version >/dev/null 2>&1; then \
|
||||
for f in $$($(VC_LIST_EXCEPT) | grep '\.spec\.in$$'); do \
|
||||
sed -e 's|#|// #|; s|%ifn*\(arch\)* |#if a // |' \
|
||||
-e 's/%\(else\|endif\|define\)/#\1/' \
|
||||
-e 's/^\( *\)\1\1\1#/#\1/' \
|
||||
-e 's|^\( *[^#/ ]\)|// \1|; s|^\( */[^/]\)|// \1|' $$f \
|
||||
| cppi -a -c 2>&1 | sed "s|standard input|$$f|"; \
|
||||
done | { if grep . >&2; then false; else :; fi; } \
|
||||
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
||||
exit 1; }; \
|
||||
else \
|
||||
echo '$(ME): skipping test $@: cppi not installed' 1>&2; \
|
||||
fi
|
||||
|
||||
sc_copyright_format:
|
||||
@require='Copyright .*Red 'Hat', Inc\.' \
|
||||
containing='Copyright .*Red 'Hat \
|
||||
@@ -667,13 +644,6 @@ sc_copyright_format:
|
||||
halt='spell Red Hat as two words' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Prefer the new URL listing over the old street address listing when
|
||||
# calling out where to get a copy of the [L]GPL.
|
||||
sc_copyright_address:
|
||||
@prohibit=Boston,' MA' \
|
||||
halt='Point to <http://www.gnu.org/licenses/>, not an address' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Some functions/macros produce messages intended solely for developers
|
||||
# and maintainers. Do not mark them for translation.
|
||||
sc_prohibit_gettext_markup:
|
||||
@@ -689,8 +659,6 @@ sc_prohibit_cross_inclusion:
|
||||
@for dir in $(cross_dirs); do \
|
||||
case $$dir in \
|
||||
util/) safe="util";; \
|
||||
locking/) \
|
||||
safe="($$dir|util|conf|rpc)";; \
|
||||
cpu/ | locking/ | network/ | rpc/ | security/) \
|
||||
safe="($$dir|util|conf)";; \
|
||||
xenapi/ | xenxs/ ) safe="($$dir|util|conf|xen)";; \
|
||||
@@ -714,59 +682,6 @@ sc_require_enum_last_marker:
|
||||
{ echo '$(ME): enum impl needs to use _LAST marker' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# In Python files we don't want to end lines with a semicolon like in C
|
||||
sc_prohibit_semicolon_at_eol_in_python:
|
||||
@prohibit='^[^#].*\;$$' \
|
||||
in_vc_files='\.py$$' \
|
||||
halt="Don't use semicolon at eol in python files" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# mymain() in test files should use return, not exit, for nicer output
|
||||
sc_prohibit_exit_in_tests:
|
||||
@prohibit='\<exit *\(' \
|
||||
in_vc_files='^tests/' \
|
||||
halt='use return, not exit(), in tests' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Don't include duplicate header in the source (either *.c or *.h)
|
||||
sc_prohibit_duplicate_header:
|
||||
@fail=0; for i in $$($(VC_LIST_EXCEPT) | grep '\.[chx]$$'); do \
|
||||
awk '/# *include.*\.h/ { \
|
||||
match($$0, /[<"][^>"]*[">]/); \
|
||||
arr[substr($$0, RSTART + 1, RLENGTH - 2)]++; \
|
||||
} \
|
||||
END { \
|
||||
for (key in arr) { \
|
||||
if (arr[key] > 1) { \
|
||||
fail=1; \
|
||||
printf("%d %s are included\n", arr[key], key); \
|
||||
} \
|
||||
} \
|
||||
if (fail == 1) { \
|
||||
printf("duplicate header(s) in " FILENAME "\n"); \
|
||||
exit 1; \
|
||||
} \
|
||||
}' $$i || fail=1; \
|
||||
done; \
|
||||
if test $$fail -eq 1; then \
|
||||
{ echo "$(ME)": avoid duplicate headers >&2; exit 1; } \
|
||||
fi;
|
||||
|
||||
# Don't include "libvirt/*.h" in "" form.
|
||||
sc_prohibit_include_public_headers_quote:
|
||||
@prohibit='# *include *"libvirt/.*\.h"' \
|
||||
in_vc_files='\.[ch]$$' \
|
||||
halt='Do not include libvirt/*.h in internal source' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Don't include "libvirt/*.h" in <> form. Except for external tools,
|
||||
# e.g. Python binding, examples and tools subdirectories.
|
||||
sc_prohibit_include_public_headers_brackets:
|
||||
@prohibit='# *include *<libvirt/.*\.h>' \
|
||||
in_vc_files='\.[ch]$$' \
|
||||
halt='Do not include libvirt/*.h in internal source' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# We don't use this feature of maint.mk.
|
||||
prev_version_file = /dev/null
|
||||
|
||||
@@ -780,15 +695,11 @@ ifeq (0,$(MAKELEVEL))
|
||||
# b653eda3ac4864de205419d9f41eec267cb89eeb .gnulib (v0.0-2286-gb653eda)
|
||||
# $ cat .git-module-status
|
||||
# b653eda3ac4864de205419d9f41eec267cb89eeb
|
||||
#
|
||||
# Keep this logic in sync with autogen.sh.
|
||||
_submodule_hash = sed 's/^[ +-]//;s/ .*//'
|
||||
_update_required := $(shell \
|
||||
cd '$(srcdir)'; \
|
||||
test -d .git || { echo 0; exit; }; \
|
||||
test -f po/Makevars || { echo 1; exit; }; \
|
||||
test -f AUTHORS || { echo 1; exit; }; \
|
||||
test "no-git" = "$$(cat $(_curr_status))" && { echo 0; exit; }; \
|
||||
actual=$$(git submodule status | $(_submodule_hash); \
|
||||
git hash-object bootstrap.conf; \
|
||||
git ls-tree -d HEAD gnulib/local | awk '{print $$3}'; \
|
||||
@@ -798,11 +709,24 @@ ifeq (0,$(MAKELEVEL))
|
||||
_clean_requested = $(filter %clean,$(MAKECMDGOALS))
|
||||
ifeq (1,$(_update_required)$(_clean_requested))
|
||||
$(info INFO: gnulib update required; running ./autogen.sh first)
|
||||
$(shell touch $(srcdir)/AUTHORS $(srcdir)/ChangeLog)
|
||||
maint.mk Makefile: _autogen
|
||||
Makefile: _autogen
|
||||
endif
|
||||
endif
|
||||
|
||||
# Give credit where due:
|
||||
# Ensure that each commit author email address (possibly mapped via
|
||||
# git log's .mailmap) appears in our AUTHORS file.
|
||||
sc_check_author_list:
|
||||
@fail=0; \
|
||||
for i in $$(git log --pretty=format:%aE%n|sort -u|grep -v '^$$'); do \
|
||||
sanitized=$$(echo "$$i"|LC_ALL=C sed 's/\([^a-zA-Z0-9_@-]\)/\\\1/g'); \
|
||||
grep -iq "<$$sanitized>" $(srcdir)/AUTHORS \
|
||||
|| { printf '%s\n' "$$i" >&2; fail=1; }; \
|
||||
done; \
|
||||
test $$fail = 1 \
|
||||
&& echo '$(ME): committer(s) not listed in AUTHORS' >&2; \
|
||||
test $$fail = 0
|
||||
|
||||
# It is necessary to call autogen any time gnulib changes. Autogen
|
||||
# reruns configure, then we regenerate all Makefiles at once.
|
||||
.PHONY: _autogen
|
||||
@@ -811,12 +735,7 @@ _autogen:
|
||||
./config.status
|
||||
|
||||
# regenerate HACKING as part of the syntax-check
|
||||
syntax-check: $(top_srcdir)/HACKING bracket-spacing-check
|
||||
|
||||
bracket-spacing-check:
|
||||
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.c$$'`; \
|
||||
$(PERL) $(top_srcdir)/build-aux/bracket-spacing.pl $$files || \
|
||||
(echo $(ME): incorrect whitespace around brackets, see HACKING for rules && exit 1)
|
||||
syntax-check: $(top_srcdir)/HACKING
|
||||
|
||||
# sc_po_check can fail if generated files are not built first
|
||||
sc_po_check: \
|
||||
@@ -831,99 +750,79 @@ $(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protoco
|
||||
$(MAKE) -C src remote/remote_client_bodies.h
|
||||
|
||||
# List all syntax-check exemptions:
|
||||
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.h$$
|
||||
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.c$$
|
||||
|
||||
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(vircommand|virutil)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon
|
||||
_test1=shunloadtest|virnettlscontexttest|vircgroupmock
|
||||
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(command|util)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller
|
||||
exclude_file_name_regexp--sc_avoid_write = \
|
||||
^(src/($(_src1))|daemon/libvirtd|tools/console|tests/($(_test1)))\.c$$
|
||||
^(src/($(_src1))|daemon/libvirtd|tools/console|tests/(shunload|virnettlscontext)test)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_bindtextdomain = ^(tests|examples)/
|
||||
|
||||
exclude_file_name_regexp--sc_copyright_address = \
|
||||
^COPYING\.LIB$$
|
||||
|
||||
exclude_file_name_regexp--sc_flags_usage = ^(docs/|src/util/virnetdevtap\.c$$|tests/vircgroupmock\.c$$)
|
||||
exclude_file_name_regexp--sc_flags_usage = ^(docs/|src/util/virnetdevtap\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
|
||||
^(src/rpc/gendispatch\.pl$$|tests/)
|
||||
^src/rpc/gendispatch\.pl$$
|
||||
|
||||
exclude_file_name_regexp--sc_po_check = ^(docs/|src/rpc/gendispatch\.pl$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_VIR_ERR_NO_MEMORY = \
|
||||
^(include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virerror\.c)$$
|
||||
^(include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virterror\.c)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_access_xok = ^src/util/virutil\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_access_xok = ^src/util/util\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
|
||||
^python/(libvirt-(lxc-|qemu-)?override|typewrappers)\.c$$
|
||||
^python/(libvirt-(qemu-)?override|typewrappers)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_asprintf = \
|
||||
^(bootstrap.conf$$|src/util/virutil\.c$$|examples/domain-events/events-c/event-test\.c$$|tests/vircgroupmock\.c$$)
|
||||
^(bootstrap.conf$$|src/util/util\.c$$|examples/domain-events/events-c/event-test\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_close = \
|
||||
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c|tests/vircgroupmock\.c)$$)
|
||||
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c)$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
|
||||
(^tests/(qemuhelp|nodeinfo)data/|\.(gif|ico|png|diff)$$)
|
||||
(^tests/qemuhelpdata/|\.(gif|ico|png|diff)$$)
|
||||
|
||||
_src2=src/(util/vircommand|libvirt|lxc/lxc_controller|locking/lock_daemon)
|
||||
_src2=src/(util/command|libvirt|lxc/lxc_controller)
|
||||
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
|
||||
(^($(_src2)|tests/testutils|daemon/libvirtd)\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/virutil\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/util\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_internal_functions = \
|
||||
^src/(util/(viralloc|virutil|virfile)\.[hc]|esx/esx_vi\.c)$$
|
||||
^src/(util/(memory|util|virfile)\.[hc]|esx/esx_vi\.c)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_newline_at_end_of_diagnostic = \
|
||||
^src/rpc/gendispatch\.pl$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
|
||||
^((po|tests)/|docs/.*(py|html\.in)|run.in$$)
|
||||
^((po|tests)/|docs/.*py$$|tools/(virsh|console)\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
|
||||
^(docs/hacking\.html\.in)|(src/util/viralloc\.[ch]|examples/.*|tests/securityselinuxhelper\.c|tests/vircgroupmock\.c)$$
|
||||
^(src/util/memory\.[ch]|examples/.*)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_readlink = \
|
||||
^src/(util/virutil|lxc/lxc_container)\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_readlink = ^src/util/util\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/virutil\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/util\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_sprintf = \
|
||||
^(docs/hacking\.html\.in)|(examples/systemtap/.*stp)|(src/dtrace2systemtap\.pl)|(src/rpc/gensystemtap\.pl)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virutil\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_strncpy = \
|
||||
^(src/util/util|tools/virsh)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_strtol = \
|
||||
^src/(util/virsexpr|(vbox|xen|xenxs)/.*)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/virxml\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/xml\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_xmlURI = ^src/util/viruri\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_return_as_function = \.py$$
|
||||
|
||||
_virsh_includes=(edit|domain-monitor|domain|volume|pool|network|interface|nwfilter|secret|snapshot|host|nodedev)
|
||||
exclude_file_name_regexp--sc_require_config_h = ^(examples/|tools/virsh-$(_virsh_includes)\.c$$)
|
||||
exclude_file_name_regexp--sc_require_config_h = ^examples/
|
||||
|
||||
exclude_file_name_regexp--sc_require_config_h_first = ^(examples/|tools/virsh-$(_virsh_includes)\.c$$)
|
||||
exclude_file_name_regexp--sc_require_config_h_first = ^examples/
|
||||
|
||||
exclude_file_name_regexp--sc_trailing_blank = \
|
||||
(/qemuhelpdata/|/sysinfodata/.*\.data|\.(fig|gif|ico|png)$$)
|
||||
exclude_file_name_regexp--sc_trailing_blank = \.(fig|gif|ico|png)$$
|
||||
|
||||
exclude_file_name_regexp--sc_unmarked_diagnostics = \
|
||||
^(docs/apibuild.py|tests/virt-aa-helper-test)$$
|
||||
|
||||
exclude_file_name_regexp--sc_size_of_brackets = cfg.mk
|
||||
|
||||
exclude_file_name_regexp--sc_correct_id_types = \
|
||||
(^src/locking/lock_protocol.x$$)
|
||||
|
||||
exclude_file_name_regexp--sc_m4_quote_check = m4/virt-lib.m4
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_include_public_headers_quote = \
|
||||
^src/internal\.h$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_include_public_headers_brackets = \
|
||||
^(python/|tools/|examples/|include/libvirt/(virterror|libvirt-(qemu|lxc))\.h$$)
|
||||
|
1466
configure.ac
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2013 Red Hat, Inc.
|
||||
## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
INCLUDES = \
|
||||
@@ -17,31 +17,26 @@ CLEANFILES =
|
||||
|
||||
DAEMON_GENERATED = \
|
||||
$(srcdir)/remote_dispatch.h \
|
||||
$(srcdir)/lxc_dispatch.h \
|
||||
$(srcdir)/qemu_dispatch.h \
|
||||
$(NULL)
|
||||
$(srcdir)/qemu_dispatch.h
|
||||
|
||||
DAEMON_SOURCES = \
|
||||
libvirtd.c libvirtd.h \
|
||||
libvirtd-config.c libvirtd-config.h \
|
||||
remote.c remote.h \
|
||||
stream.c stream.h \
|
||||
../src/remote/remote_protocol.c \
|
||||
../src/remote/lxc_protocol.c \
|
||||
../src/remote/qemu_protocol.c \
|
||||
$(DAEMON_GENERATED)
|
||||
|
||||
DISTCLEANFILES =
|
||||
EXTRA_DIST = \
|
||||
remote_dispatch.h \
|
||||
lxc_dispatch.h \
|
||||
qemu_dispatch.h \
|
||||
libvirtd.conf \
|
||||
libvirtd.init.in \
|
||||
libvirtd.upstart \
|
||||
libvirtd.policy.in \
|
||||
libvirtd.policy-0 \
|
||||
libvirtd.policy-1 \
|
||||
libvirtd.sasl \
|
||||
libvirtd.service.in \
|
||||
libvirtd.sysconf \
|
||||
libvirtd.sysctl \
|
||||
libvirtd.aug \
|
||||
@@ -49,7 +44,7 @@ EXTRA_DIST = \
|
||||
libvirtd.qemu.logrotate.in \
|
||||
libvirtd.lxc.logrotate.in \
|
||||
libvirtd.uml.logrotate.in \
|
||||
test_libvirtd.aug.in \
|
||||
test_libvirtd.aug \
|
||||
THREADS.txt \
|
||||
libvirtd.pod.in \
|
||||
libvirtd.8.in \
|
||||
@@ -58,23 +53,17 @@ EXTRA_DIST = \
|
||||
BUILT_SOURCES =
|
||||
|
||||
REMOTE_PROTOCOL = $(top_srcdir)/src/remote/remote_protocol.x
|
||||
LXC_PROTOCOL = $(top_srcdir)/src/remote/lxc_protocol.x
|
||||
QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
|
||||
|
||||
$(srcdir)/remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(REMOTE_PROTOCOL)
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
--mode=server remote REMOTE $(REMOTE_PROTOCOL) > $@
|
||||
|
||||
$(srcdir)/lxc_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(LXC_PROTOCOL)
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
--mode=server lxc LXC $(LXC_PROTOCOL) > $@
|
||||
$(AM_V_GEN)perl -w $(srcdir)/../src/rpc/gendispatch.pl -b remote \
|
||||
$(REMOTE_PROTOCOL) > $@
|
||||
|
||||
$(srcdir)/qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(QEMU_PROTOCOL)
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
--mode=server qemu QEMU $(QEMU_PROTOCOL) > $@
|
||||
$(AM_V_GEN)perl -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu \
|
||||
$(QEMU_PROTOCOL) > $@
|
||||
|
||||
if WITH_LIBVIRTD
|
||||
|
||||
@@ -91,13 +80,12 @@ augeas_DATA = libvirtd.aug
|
||||
augeastestsdir = $(datadir)/augeas/lenses/tests
|
||||
augeastests_DATA = test_libvirtd.aug
|
||||
|
||||
CLEANFILES += test_libvirtd.aug
|
||||
|
||||
libvirtd.8: $(srcdir)/libvirtd.8.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
sed \
|
||||
-e 's![@]sysconfdir[@]!$(sysconfdir)!g' \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
-e 's![@]remote_pid_file[@]!$(REMOTE_PID_FILE)!g' \
|
||||
< $< > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd_SOURCES = $(DAEMON_SOURCES)
|
||||
@@ -105,49 +93,38 @@ libvirtd_SOURCES = $(DAEMON_SOURCES)
|
||||
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
|
||||
libvirtd_CFLAGS = \
|
||||
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
|
||||
$(XDR_CFLAGS) $(POLKIT_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \
|
||||
$(WARN_CFLAGS) $(PIE_CFLAGS) \
|
||||
$(XDR_CFLAGS) $(POLKIT_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(COVERAGE_CFLAGS) \
|
||||
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
|
||||
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \
|
||||
-DREMOTE_PID_FILE="\"$(REMOTE_PID_FILE)\""
|
||||
|
||||
libvirtd_LDFLAGS = \
|
||||
$(WARN_LDFLAGS) \
|
||||
$(PIE_LDFLAGS) \
|
||||
$(RELRO_LDFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(COVERAGE_LDFLAGS)
|
||||
|
||||
libvirtd_LDADD = \
|
||||
$(LIBXML_LIBS) \
|
||||
$(GNUTLS_LIBS) \
|
||||
$(SASL_LIBS) \
|
||||
$(DBUS_LIBS) \
|
||||
$(POLKIT_LIBS) \
|
||||
$(LIBNL_LIBS)
|
||||
$(POLKIT_LIBS)
|
||||
|
||||
if WITH_DTRACE_PROBES
|
||||
libvirtd_LDADD += ../src/libvirt_probes.lo
|
||||
libvirtd_LDADD += ../src/probes.o
|
||||
endif
|
||||
|
||||
libvirtd_LDADD += \
|
||||
../src/libvirt-lxc.la \
|
||||
../src/libvirt-qemu.la
|
||||
|
||||
if ! WITH_DRIVER_MODULES
|
||||
if WITH_QEMU
|
||||
libvirtd_LDADD += ../src/libvirt_driver_qemu.la
|
||||
if WITH_DTRACE_PROBES
|
||||
libvirtd_LDADD += ../src/libvirt_qemu_probes.lo
|
||||
endif
|
||||
endif
|
||||
|
||||
if WITH_LXC
|
||||
libvirtd_LDADD += ../src/libvirt_driver_lxc.la
|
||||
endif
|
||||
|
||||
if WITH_XEN
|
||||
libvirtd_LDADD += ../src/libvirt_driver_xen.la
|
||||
endif
|
||||
|
||||
if WITH_LIBXL
|
||||
libvirtd_LDADD += ../src/libvirt_driver_libxl.la
|
||||
endif
|
||||
@@ -156,7 +133,7 @@ if WITH_UML
|
||||
libvirtd_LDADD += ../src/libvirt_driver_uml.la
|
||||
endif
|
||||
|
||||
if WITH_STORAGE
|
||||
if WITH_STORAGE_DIR
|
||||
libvirtd_LDADD += ../src/libvirt_driver_storage.la
|
||||
endif
|
||||
|
||||
@@ -164,7 +141,7 @@ if WITH_NETWORK
|
||||
libvirtd_LDADD += ../src/libvirt_driver_network.la
|
||||
endif
|
||||
|
||||
if WITH_INTERFACE
|
||||
if WITH_NETCF
|
||||
libvirtd_LDADD += ../src/libvirt_driver_interface.la
|
||||
endif
|
||||
|
||||
@@ -183,23 +160,16 @@ endif
|
||||
|
||||
libvirtd_LDADD += ../src/libvirt.la
|
||||
|
||||
if WITH_POLKIT
|
||||
if WITH_POLKIT0
|
||||
if HAVE_POLKIT
|
||||
if HAVE_POLKIT0
|
||||
policydir = $(datadir)/PolicyKit/policy
|
||||
policyauth = auth_admin_keep_session
|
||||
policyfile = libvirtd.policy-0
|
||||
else
|
||||
policydir = $(datadir)/polkit-1/actions
|
||||
policyauth = auth_admin_keep
|
||||
policyfile = libvirtd.policy-1
|
||||
endif
|
||||
endif
|
||||
|
||||
libvirtd.policy: libvirtd.policy.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN) sed \
|
||||
-e 's|[@]authaction[@]|$(policyauth)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
BUILT_SOURCES += libvirtd.policy
|
||||
|
||||
install-data-local: install-init-redhat install-init-systemd install-init-upstart \
|
||||
install-data-sasl install-data-polkit \
|
||||
install-logrotate install-sysctl
|
||||
@@ -214,10 +184,10 @@ uninstall-local:: uninstall-init-redhat uninstall-init-systemd uninstall-init-up
|
||||
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
|
||||
rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
|
||||
|
||||
if WITH_POLKIT
|
||||
if HAVE_POLKIT
|
||||
install-data-polkit::
|
||||
$(MKDIR_P) $(DESTDIR)$(policydir)
|
||||
$(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
||||
$(INSTALL_DATA) $(srcdir)/$(policyfile) $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
||||
uninstall-data-polkit::
|
||||
rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
||||
rmdir $(DESTDIR)$(policydir) || :
|
||||
@@ -235,26 +205,26 @@ LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
|
||||
BUILT_SOURCES += $(LOGROTATE_CONFS)
|
||||
|
||||
libvirtd.logrotate: libvirtd.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
sed \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
< $< > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.qemu.logrotate: libvirtd.qemu.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
sed \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
< $< > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.uml.logrotate: libvirtd.uml.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
@@ -287,16 +257,14 @@ uninstall-sysconfig:
|
||||
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
|
||||
|
||||
if WITH_SYSCTL
|
||||
# Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on
|
||||
# /usr/lib/sysctl.d/ even when libdir is /usr/lib64
|
||||
install-sysctl:
|
||||
$(MKDIR_P) $(DESTDIR)$(prefix)/lib/sysctl.d
|
||||
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysctl.d
|
||||
$(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
|
||||
$(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
||||
$(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
||||
|
||||
uninstall-sysctl:
|
||||
rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
||||
rmdir $(DESTDIR)$(prefix)/lib/sysctl.d || :
|
||||
rm -f $(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
||||
rmdir $(DESTDIR)$(sysconfdir)/sysctl.d || :
|
||||
else
|
||||
install-sysctl:
|
||||
uninstall-sysctl:
|
||||
@@ -336,6 +304,7 @@ uninstall-init-upstart:
|
||||
endif # LIBVIRT_INIT_SCRIPT_UPSTART
|
||||
|
||||
|
||||
EXTRA_DIST += libvirtd.service.in
|
||||
if LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
|
||||
SYSTEMD_UNIT_DIR = /lib/systemd/system
|
||||
@@ -355,33 +324,27 @@ uninstall-init-systemd:
|
||||
endif # LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
|
||||
libvirtd.init: libvirtd.init.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
$(AM_V_GEN)sed \
|
||||
-e s!\@localstatedir\@!$(localstatedir)!g \
|
||||
-e s!\@sbindir\@!$(sbindir)!g \
|
||||
-e s!\@sysconfdir\@!$(sysconfdir)!g \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.service: libvirtd.service.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
< $< > $@-t && \
|
||||
$(AM_V_GEN)sed \
|
||||
-e s!\@localstatedir\@!$(localstatedir)!g \
|
||||
-e s!\@sbindir\@!$(sbindir)!g \
|
||||
-e s!\@sysconfdir\@!$(sysconfdir)!g \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
check-local: check-augeas
|
||||
|
||||
AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
|
||||
|
||||
test_libvirtd.aug: test_libvirtd.aug.in $(srcdir)/libvirtd.conf
|
||||
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libvirtd.conf $< $@
|
||||
|
||||
check-augeas: test_libvirtd.aug
|
||||
check-local:
|
||||
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
|
||||
'$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \
|
||||
'$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug; \
|
||||
fi
|
||||
|
||||
|
||||
@@ -397,13 +360,12 @@ endif # WITH_LIBVIRTD
|
||||
POD2MAN = pod2man -c "Virtualization Support" \
|
||||
-r "$(PACKAGE)-$(VERSION)" -s 8
|
||||
|
||||
$(srcdir)/libvirtd.8.in: libvirtd.pod.in $(top_srcdir)/configure.ac
|
||||
$(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ \
|
||||
&& if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi
|
||||
$(srcdir)/libvirtd.8.in: libvirtd.pod.in
|
||||
$(AM_V_GEN)$(POD2MAN) $< $@
|
||||
|
||||
# This is needed for clients too, so can't wrap in
|
||||
# the WITH_LIBVIRTD conditional
|
||||
if WITH_SASL
|
||||
if HAVE_SASL
|
||||
install-data-sasl:
|
||||
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sasl2/
|
||||
$(INSTALL_DATA) $(srcdir)/libvirtd.sasl $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
|
||||
|
@@ -40,7 +40,7 @@ The server lock is used in conjunction with a condition variable
|
||||
to pass jobs from the event loop thread to the workers. The main
|
||||
event loop thread handles I/O from the client socket, and once a
|
||||
complete RPC message has been read off the wire (and optionally
|
||||
decrypted), it will be placed on the 'dx' job queue for the
|
||||
decrypted), it will be placed onto the 'dx' job queue for the
|
||||
associated client object. The job condition will be signalled and
|
||||
a worker will wakup and process it.
|
||||
|
||||
|
@@ -1,492 +0,0 @@
|
||||
/*
|
||||
* libvirtd.c: daemon start of day, guest process & i/o management
|
||||
*
|
||||
* Copyright (C) 2006-2012 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "libvirtd-config.h"
|
||||
#include "virconf.h"
|
||||
#include "viralloc.h"
|
||||
#include "virerror.h"
|
||||
#include "virlog.h"
|
||||
#include "rpc/virnetserver.h"
|
||||
#include "configmake.h"
|
||||
#include "remote/remote_protocol.h"
|
||||
#include "remote/remote_driver.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_CONF
|
||||
|
||||
/* Allocate an array of malloc'd strings from the config file, filename
|
||||
* (used only in diagnostics), using handle "conf". Upon error, return -1
|
||||
* and free any allocated memory. Otherwise, save the array in *list_arg
|
||||
* and return 0.
|
||||
*/
|
||||
static int
|
||||
remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list_arg,
|
||||
const char *filename)
|
||||
{
|
||||
char **list;
|
||||
virConfValuePtr p = virConfGetValue(conf, key);
|
||||
if (!p)
|
||||
return 0;
|
||||
|
||||
switch (p->type) {
|
||||
case VIR_CONF_STRING:
|
||||
if (VIR_ALLOC_N(list, 2) < 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("failed to allocate memory for %s config list"),
|
||||
key);
|
||||
return -1;
|
||||
}
|
||||
list[0] = strdup(p->str);
|
||||
list[1] = NULL;
|
||||
if (list[0] == NULL) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("failed to allocate memory for %s config list value"),
|
||||
key);
|
||||
VIR_FREE(list);
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_CONF_LIST: {
|
||||
int i, len = 0;
|
||||
virConfValuePtr pp;
|
||||
for (pp = p->list; pp; pp = pp->next)
|
||||
len++;
|
||||
if (VIR_ALLOC_N(list, 1+len) < 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("failed to allocate memory for %s config list"),
|
||||
key);
|
||||
return -1;
|
||||
}
|
||||
for (i = 0, pp = p->list; pp; ++i, pp = pp->next) {
|
||||
if (pp->type != VIR_CONF_STRING) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("remoteReadConfigFile: %s: %s:"
|
||||
" must be a string or list of strings"),
|
||||
filename, key);
|
||||
VIR_FREE(list);
|
||||
return -1;
|
||||
}
|
||||
list[i] = strdup(pp->str);
|
||||
if (list[i] == NULL) {
|
||||
int j;
|
||||
for (j = 0 ; j < i ; j++)
|
||||
VIR_FREE(list[j]);
|
||||
VIR_FREE(list);
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("failed to allocate memory for %s config list value"),
|
||||
key);
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
list[i] = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("remoteReadConfigFile: %s: %s:"
|
||||
" must be a string or list of strings"),
|
||||
filename, key);
|
||||
return -1;
|
||||
}
|
||||
|
||||
*list_arg = list;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* A helper function used by each of the following macros. */
|
||||
static int
|
||||
checkType(virConfValuePtr p, const char *filename,
|
||||
const char *key, virConfType required_type)
|
||||
{
|
||||
if (p->type != required_type) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("remoteReadConfigFile: %s: %s: invalid type:"
|
||||
" got %s; expected %s"), filename, key,
|
||||
virConfTypeName(p->type),
|
||||
virConfTypeName(required_type));
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* If there is no config data for the key, #var_name, then do nothing.
|
||||
If there is valid data of type VIR_CONF_STRING, and strdup succeeds,
|
||||
store the result in var_name. Otherwise, (i.e. invalid type, or strdup
|
||||
failure), give a diagnostic and "goto" the cleanup-and-fail label. */
|
||||
#define GET_CONF_STR(conf, filename, var_name) \
|
||||
do { \
|
||||
virConfValuePtr p = virConfGetValue(conf, #var_name); \
|
||||
if (p) { \
|
||||
if (checkType(p, filename, #var_name, VIR_CONF_STRING) < 0) \
|
||||
goto error; \
|
||||
VIR_FREE(data->var_name); \
|
||||
if (!(data->var_name = strdup(p->str))) { \
|
||||
virReportOOMError(); \
|
||||
goto error; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Like GET_CONF_STR, but for integral values. */
|
||||
#define GET_CONF_INT(conf, filename, var_name) \
|
||||
do { \
|
||||
virConfValuePtr p = virConfGetValue(conf, #var_name); \
|
||||
if (p) { \
|
||||
if (checkType(p, filename, #var_name, VIR_CONF_LONG) < 0) \
|
||||
goto error; \
|
||||
data->var_name = p->l; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, const char *filename) {
|
||||
virConfValuePtr p;
|
||||
|
||||
p = virConfGetValue(conf, key);
|
||||
if (!p)
|
||||
return 0;
|
||||
|
||||
if (checkType(p, filename, key, VIR_CONF_STRING) < 0)
|
||||
return -1;
|
||||
|
||||
if (!p->str)
|
||||
return 0;
|
||||
|
||||
if (STREQ(p->str, "none")) {
|
||||
*auth = VIR_NET_SERVER_SERVICE_AUTH_NONE;
|
||||
#if WITH_SASL
|
||||
} else if (STREQ(p->str, "sasl")) {
|
||||
*auth = VIR_NET_SERVER_SERVICE_AUTH_SASL;
|
||||
#endif
|
||||
} else if (STREQ(p->str, "polkit")) {
|
||||
*auth = VIR_NET_SERVER_SERVICE_AUTH_POLKIT;
|
||||
} else {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("remoteReadConfigFile: %s: %s: unsupported auth %s"),
|
||||
filename, key, p->str);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
daemonConfigFilePath(bool privileged, char **configfile)
|
||||
{
|
||||
if (privileged) {
|
||||
if (!(*configfile = strdup(SYSCONFDIR "/libvirt/libvirtd.conf")))
|
||||
goto no_memory;
|
||||
} else {
|
||||
char *configdir = NULL;
|
||||
|
||||
if (!(configdir = virGetUserConfigDirectory()))
|
||||
goto error;
|
||||
|
||||
if (virAsprintf(configfile, "%s/libvirtd.conf", configdir) < 0) {
|
||||
VIR_FREE(configdir);
|
||||
goto no_memory;
|
||||
}
|
||||
VIR_FREE(configdir);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
no_memory:
|
||||
virReportOOMError();
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct daemonConfig*
|
||||
daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct daemonConfig *data;
|
||||
char *localhost;
|
||||
int ret;
|
||||
|
||||
if (VIR_ALLOC(data) < 0) {
|
||||
virReportOOMError();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data->listen_tls = 1;
|
||||
data->listen_tcp = 0;
|
||||
|
||||
if (!(data->tls_port = strdup(LIBVIRTD_TLS_PORT)))
|
||||
goto no_memory;
|
||||
if (!(data->tcp_port = strdup(LIBVIRTD_TCP_PORT)))
|
||||
goto no_memory;
|
||||
|
||||
/* Only default to PolicyKit if running as root */
|
||||
#if WITH_POLKIT
|
||||
if (privileged) {
|
||||
data->auth_unix_rw = REMOTE_AUTH_POLKIT;
|
||||
data->auth_unix_ro = REMOTE_AUTH_POLKIT;
|
||||
} else {
|
||||
#endif
|
||||
data->auth_unix_rw = REMOTE_AUTH_NONE;
|
||||
data->auth_unix_ro = REMOTE_AUTH_NONE;
|
||||
#if WITH_POLKIT
|
||||
}
|
||||
#endif
|
||||
|
||||
if (data->auth_unix_rw == REMOTE_AUTH_POLKIT)
|
||||
data->unix_sock_rw_perms = strdup("0777"); /* Allow world */
|
||||
else
|
||||
data->unix_sock_rw_perms = strdup("0700"); /* Allow user only */
|
||||
data->unix_sock_ro_perms = strdup("0777"); /* Always allow world */
|
||||
if (!data->unix_sock_ro_perms ||
|
||||
!data->unix_sock_rw_perms)
|
||||
goto no_memory;
|
||||
|
||||
#if WITH_SASL
|
||||
data->auth_tcp = REMOTE_AUTH_SASL;
|
||||
#else
|
||||
data->auth_tcp = REMOTE_AUTH_NONE;
|
||||
#endif
|
||||
data->auth_tls = REMOTE_AUTH_NONE;
|
||||
|
||||
data->mdns_adv = 0;
|
||||
|
||||
data->min_workers = 5;
|
||||
data->max_workers = 20;
|
||||
data->max_clients = 20;
|
||||
|
||||
data->prio_workers = 5;
|
||||
|
||||
data->max_requests = 20;
|
||||
data->max_client_requests = 5;
|
||||
|
||||
data->log_buffer_size = 64;
|
||||
|
||||
data->audit_level = 1;
|
||||
data->audit_logging = 0;
|
||||
|
||||
data->keepalive_interval = 5;
|
||||
data->keepalive_count = 5;
|
||||
data->keepalive_required = 0;
|
||||
|
||||
localhost = virGetHostname(NULL);
|
||||
if (localhost == NULL) {
|
||||
/* we couldn't resolve the hostname; assume that we are
|
||||
* running in disconnected operation, and report a less
|
||||
* useful Avahi string
|
||||
*/
|
||||
ret = virAsprintf(&data->mdns_name, "Virtualization Host");
|
||||
} else {
|
||||
char *tmp;
|
||||
/* Extract the host part of the potentially FQDN */
|
||||
if ((tmp = strchr(localhost, '.')))
|
||||
*tmp = '\0';
|
||||
ret = virAsprintf(&data->mdns_name, "Virtualization Host %s",
|
||||
localhost);
|
||||
}
|
||||
VIR_FREE(localhost);
|
||||
if (ret < 0)
|
||||
goto no_memory;
|
||||
|
||||
return data;
|
||||
|
||||
no_memory:
|
||||
virReportOOMError();
|
||||
daemonConfigFree(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
daemonConfigFree(struct daemonConfig *data)
|
||||
{
|
||||
char **tmp;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
VIR_FREE(data->listen_addr);
|
||||
VIR_FREE(data->tls_port);
|
||||
VIR_FREE(data->tcp_port);
|
||||
|
||||
VIR_FREE(data->unix_sock_ro_perms);
|
||||
VIR_FREE(data->unix_sock_rw_perms);
|
||||
VIR_FREE(data->unix_sock_group);
|
||||
VIR_FREE(data->unix_sock_dir);
|
||||
VIR_FREE(data->mdns_name);
|
||||
|
||||
tmp = data->tls_allowed_dn_list;
|
||||
while (tmp && *tmp) {
|
||||
VIR_FREE(*tmp);
|
||||
tmp++;
|
||||
}
|
||||
VIR_FREE(data->tls_allowed_dn_list);
|
||||
|
||||
tmp = data->sasl_allowed_username_list;
|
||||
while (tmp && *tmp) {
|
||||
VIR_FREE(*tmp);
|
||||
tmp++;
|
||||
}
|
||||
VIR_FREE(data->sasl_allowed_username_list);
|
||||
|
||||
VIR_FREE(data->key_file);
|
||||
VIR_FREE(data->ca_file);
|
||||
VIR_FREE(data->cert_file);
|
||||
VIR_FREE(data->crl_file);
|
||||
|
||||
VIR_FREE(data->host_uuid);
|
||||
VIR_FREE(data->log_filters);
|
||||
VIR_FREE(data->log_outputs);
|
||||
|
||||
VIR_FREE(data);
|
||||
}
|
||||
|
||||
static int
|
||||
daemonConfigLoadOptions(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
virConfPtr conf)
|
||||
{
|
||||
GET_CONF_INT(conf, filename, listen_tcp);
|
||||
GET_CONF_INT(conf, filename, listen_tls);
|
||||
GET_CONF_STR(conf, filename, tls_port);
|
||||
GET_CONF_STR(conf, filename, tcp_port);
|
||||
GET_CONF_STR(conf, filename, listen_addr);
|
||||
|
||||
if (remoteConfigGetAuth(conf, "auth_unix_rw", &data->auth_unix_rw, filename) < 0)
|
||||
goto error;
|
||||
#if WITH_POLKIT
|
||||
/* Change default perms to be wide-open if PolicyKit is enabled.
|
||||
* Admin can always override in config file
|
||||
*/
|
||||
if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) {
|
||||
VIR_FREE(data->unix_sock_rw_perms);
|
||||
if (!(data->unix_sock_rw_perms = strdup("0777"))) {
|
||||
virReportOOMError();
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (remoteConfigGetAuth(conf, "auth_unix_ro", &data->auth_unix_ro, filename) < 0)
|
||||
goto error;
|
||||
if (remoteConfigGetAuth(conf, "auth_tcp", &data->auth_tcp, filename) < 0)
|
||||
goto error;
|
||||
if (remoteConfigGetAuth(conf, "auth_tls", &data->auth_tls, filename) < 0)
|
||||
goto error;
|
||||
|
||||
GET_CONF_STR(conf, filename, unix_sock_group);
|
||||
GET_CONF_STR(conf, filename, unix_sock_ro_perms);
|
||||
GET_CONF_STR(conf, filename, unix_sock_rw_perms);
|
||||
|
||||
GET_CONF_STR(conf, filename, unix_sock_dir);
|
||||
|
||||
GET_CONF_INT(conf, filename, mdns_adv);
|
||||
GET_CONF_STR(conf, filename, mdns_name);
|
||||
|
||||
GET_CONF_INT(conf, filename, tls_no_sanity_certificate);
|
||||
GET_CONF_INT(conf, filename, tls_no_verify_certificate);
|
||||
|
||||
GET_CONF_STR(conf, filename, key_file);
|
||||
GET_CONF_STR(conf, filename, cert_file);
|
||||
GET_CONF_STR(conf, filename, ca_file);
|
||||
GET_CONF_STR(conf, filename, crl_file);
|
||||
|
||||
if (remoteConfigGetStringList(conf, "tls_allowed_dn_list",
|
||||
&data->tls_allowed_dn_list, filename) < 0)
|
||||
goto error;
|
||||
|
||||
|
||||
if (remoteConfigGetStringList(conf, "sasl_allowed_username_list",
|
||||
&data->sasl_allowed_username_list, filename) < 0)
|
||||
goto error;
|
||||
|
||||
|
||||
GET_CONF_INT(conf, filename, min_workers);
|
||||
GET_CONF_INT(conf, filename, max_workers);
|
||||
GET_CONF_INT(conf, filename, max_clients);
|
||||
|
||||
GET_CONF_INT(conf, filename, prio_workers);
|
||||
|
||||
GET_CONF_INT(conf, filename, max_requests);
|
||||
GET_CONF_INT(conf, filename, max_client_requests);
|
||||
|
||||
GET_CONF_INT(conf, filename, audit_level);
|
||||
GET_CONF_INT(conf, filename, audit_logging);
|
||||
|
||||
GET_CONF_STR(conf, filename, host_uuid);
|
||||
|
||||
GET_CONF_INT(conf, filename, log_level);
|
||||
GET_CONF_STR(conf, filename, log_filters);
|
||||
GET_CONF_STR(conf, filename, log_outputs);
|
||||
GET_CONF_INT(conf, filename, log_buffer_size);
|
||||
|
||||
GET_CONF_INT(conf, filename, keepalive_interval);
|
||||
GET_CONF_INT(conf, filename, keepalive_count);
|
||||
GET_CONF_INT(conf, filename, keepalive_required);
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* Read the config file if it exists.
|
||||
* Only used in the remote case, hence the name.
|
||||
*/
|
||||
int
|
||||
daemonConfigLoadFile(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
bool allow_missing)
|
||||
{
|
||||
virConfPtr conf;
|
||||
int ret;
|
||||
|
||||
if (allow_missing &&
|
||||
access(filename, R_OK) == -1 &&
|
||||
errno == ENOENT)
|
||||
return 0;
|
||||
|
||||
conf = virConfReadFile(filename, 0);
|
||||
if (!conf)
|
||||
return -1;
|
||||
|
||||
ret = daemonConfigLoadOptions(data, filename, conf);
|
||||
virConfFree(conf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int daemonConfigLoadData(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
const char *filedata)
|
||||
{
|
||||
virConfPtr conf;
|
||||
int ret;
|
||||
|
||||
conf = virConfReadMem(filedata, strlen(filedata), 0);
|
||||
if (!conf)
|
||||
return -1;
|
||||
|
||||
ret = daemonConfigLoadOptions(data, filename, conf);
|
||||
virConfFree(conf);
|
||||
return ret;
|
||||
}
|
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* libvirtd.c: daemon start of day, guest process & i/o management
|
||||
*
|
||||
* Copyright (C) 2006-2012 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __LIBVIRTD_CONFIG_H__
|
||||
# define __LIBVIRTD_CONFIG_H__
|
||||
|
||||
# include "internal.h"
|
||||
|
||||
struct daemonConfig {
|
||||
char *host_uuid;
|
||||
|
||||
int listen_tls;
|
||||
int listen_tcp;
|
||||
char *listen_addr;
|
||||
char *tls_port;
|
||||
char *tcp_port;
|
||||
|
||||
char *unix_sock_ro_perms;
|
||||
char *unix_sock_rw_perms;
|
||||
char *unix_sock_group;
|
||||
char *unix_sock_dir;
|
||||
|
||||
int auth_unix_rw;
|
||||
int auth_unix_ro;
|
||||
int auth_tcp;
|
||||
int auth_tls;
|
||||
|
||||
int mdns_adv;
|
||||
char *mdns_name;
|
||||
|
||||
int tls_no_verify_certificate;
|
||||
int tls_no_sanity_certificate;
|
||||
char **tls_allowed_dn_list;
|
||||
char **sasl_allowed_username_list;
|
||||
|
||||
char *key_file;
|
||||
char *cert_file;
|
||||
char *ca_file;
|
||||
char *crl_file;
|
||||
|
||||
int min_workers;
|
||||
int max_workers;
|
||||
int max_clients;
|
||||
|
||||
int prio_workers;
|
||||
|
||||
int max_requests;
|
||||
int max_client_requests;
|
||||
|
||||
int log_level;
|
||||
char *log_filters;
|
||||
char *log_outputs;
|
||||
int log_buffer_size;
|
||||
|
||||
int audit_level;
|
||||
int audit_logging;
|
||||
|
||||
int keepalive_interval;
|
||||
unsigned int keepalive_count;
|
||||
int keepalive_required;
|
||||
};
|
||||
|
||||
|
||||
int daemonConfigFilePath(bool privileged, char **configfile);
|
||||
struct daemonConfig* daemonConfigNew(bool privileged);
|
||||
void daemonConfigFree(struct daemonConfig *data);
|
||||
int daemonConfigLoadFile(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
bool allow_missing);
|
||||
int daemonConfigLoadData(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
const char *filedata);
|
||||
|
||||
#endif /* __LIBVIRTD_CONFIG_H__ */
|
1144
daemon/libvirtd.c
@@ -251,7 +251,7 @@
|
||||
|
||||
# The minimum limit sets the number of workers to start up
|
||||
# initially. If the number of active clients exceeds this,
|
||||
# then more threads are spawned, up to max_workers limit.
|
||||
# then more threads are spawned, upto max_workers limit.
|
||||
# Typically you'd want max_workers to equal maximum number
|
||||
# of clients allowed
|
||||
#min_workers = 5
|
||||
@@ -267,7 +267,7 @@
|
||||
# at least as large as max_workers. Beyond this, RPC requests
|
||||
# will be read into memory and queued. This directly impact
|
||||
# memory usage, currently each request requires 256 KB of
|
||||
# memory. So by default up to 5 MB of memory is used
|
||||
# memory. So by default upto 5 MB of memory is used
|
||||
#
|
||||
# XXX this isn't actually enforced yet, only the per-client
|
||||
# limit is used so far
|
||||
@@ -291,13 +291,10 @@
|
||||
# Logging filters:
|
||||
# A filter allows to select a different logging level for a given category
|
||||
# of logs
|
||||
# The format for a filter is one of:
|
||||
# The format for a filter is:
|
||||
# x:name
|
||||
# x:+name
|
||||
# where name is a string which is matched against source file name,
|
||||
# e.g., "remote", "qemu", or "util/json", the optional "+" prefix
|
||||
# tells libvirt to log stack trace for each message matching name,
|
||||
# and x is the minimal level where matching messages should be logged:
|
||||
# where name is a match string e.g. remote or qemu
|
||||
# the x prefix is the minimal level where matching messages should be logged
|
||||
# 1: DEBUG
|
||||
# 2: INFO
|
||||
# 3: WARNING
|
||||
@@ -308,7 +305,7 @@
|
||||
#
|
||||
# e.g. to only get warning or errors from the remote layer and only errors
|
||||
# from the event layer:
|
||||
#log_filters="3:remote 4:event"
|
||||
#log_filters = "3:remote 4:event"
|
||||
|
||||
# Logging outputs:
|
||||
# An output is one of the places to save logging information
|
||||
@@ -327,7 +324,7 @@
|
||||
#
|
||||
# Multiple output can be defined, they just need to be separated by spaces.
|
||||
# e.g. to log all warnings and errors to syslog under the libvirtd ident:
|
||||
#log_outputs="3:syslog:libvirtd"
|
||||
#log_outputs = "3:syslog:libvirtd"
|
||||
#
|
||||
|
||||
# Log debug buffer size: default 64
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
@@ -32,11 +32,10 @@
|
||||
# include <rpc/types.h>
|
||||
# include <rpc/xdr.h>
|
||||
# include "remote_protocol.h"
|
||||
# include "lxc_protocol.h"
|
||||
# include "qemu_protocol.h"
|
||||
# include "virlog.h"
|
||||
# include "virthread.h"
|
||||
# if WITH_SASL
|
||||
# include "logging.h"
|
||||
# include "threads.h"
|
||||
# if HAVE_SASL
|
||||
# include "virnetsaslcontext.h"
|
||||
# endif
|
||||
# include "virnetserverprogram.h"
|
||||
@@ -53,7 +52,7 @@ struct daemonClientPrivate {
|
||||
|
||||
int domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LAST];
|
||||
|
||||
# if WITH_SASL
|
||||
# if HAVE_SASL
|
||||
virNetSASLSessionPtr sasl;
|
||||
# endif
|
||||
|
||||
@@ -67,7 +66,7 @@ struct daemonClientPrivate {
|
||||
bool keepalive_supported;
|
||||
};
|
||||
|
||||
# if WITH_SASL
|
||||
# if HAVE_SASL
|
||||
extern virNetSASLContextPtr saslCtxt;
|
||||
# endif
|
||||
extern virNetServerProgramPtr remoteProgram;
|
||||
|
@@ -54,10 +54,7 @@ Use this name for the PID file, overriding the default value.
|
||||
|
||||
=item B<-t, --timeout> I<SECONDS>
|
||||
|
||||
Exit after timeout period (in seconds) elapse with no client connections
|
||||
or registered resources. Be aware that resources such as autostart
|
||||
networks will result in never reaching the timeout, even when there are
|
||||
no client connections.
|
||||
Exit after timeout period (in seconds) expires.
|
||||
|
||||
=item B<-v, --verbose>
|
||||
|
||||
@@ -75,74 +72,41 @@ On receipt of B<SIGHUP> libvirtd will reload its configuration.
|
||||
|
||||
=head1 FILES
|
||||
|
||||
=head2 When run as B<root>.
|
||||
|
||||
=over
|
||||
|
||||
=item F<SYSCONFDIR/libvirtd.conf>
|
||||
=item F<@sysconfdir@/libvirtd.conf>
|
||||
|
||||
The default configuration file used by libvirtd, unless overridden on the
|
||||
command line using the B<-f>|B<--config> option.
|
||||
|
||||
=item F<LOCALSTATEDIR/run/libvirt/libvirt-sock>
|
||||
=item F<@localstatedir@/run/libvirt/libvirt-sock>
|
||||
|
||||
=item F<LOCALSTATEDIR/run/libvirt/libvirt-sock-ro>
|
||||
=item F<@localstatedir@/run/libvirt/libvirt-sock-ro>
|
||||
|
||||
The sockets libvirtd will use.
|
||||
The sockets libvirtd will use when B<run as root>.
|
||||
|
||||
=item F<SYSCONFDIR/pki/CA/cacert.pem>
|
||||
=item F<$HOME/.libvirt/libvirt-sock>
|
||||
|
||||
The socket libvirtd will use when run as a B<non-root> user.
|
||||
|
||||
=item F<@sysconfdir@/pki/CA/cacert.pem>
|
||||
|
||||
The TLS B<Certificate Authority> certificate libvirtd will use.
|
||||
|
||||
=item F<SYSCONFDIR/pki/libvirt/servercert.pem>
|
||||
=item F<@sysconfdir@/pki/libvirt/servercert.pem>
|
||||
|
||||
The TLS B<Server> certificate libvirtd will use.
|
||||
|
||||
=item F<SYSCONFDIR/pki/libvirt/private/serverkey.pem>
|
||||
=item F<@sysconfdir@/pki/libvirt/private/serverkey.pem>
|
||||
|
||||
The TLS B<Server> private key libvirtd will use.
|
||||
|
||||
=item F<LOCALSTATEDIR/run/libvirtd.pid>
|
||||
=item F<@remote_pid_file@>
|
||||
|
||||
The PID file to use, unless overridden by the B<-p>|B<--pid-file> option.
|
||||
|
||||
=back
|
||||
|
||||
=head2 When run as B<non-root>.
|
||||
|
||||
=over
|
||||
|
||||
=item F<$XDG_CONFIG_HOME/libvirtd.conf>
|
||||
|
||||
The default configuration file used by libvirtd, unless overridden on the
|
||||
command line using the B<-f>|B<--config> option.
|
||||
|
||||
=item F<$XDG_RUNTIME_DIR/libvirt/libvirt-sock>
|
||||
|
||||
The socket libvirtd will use.
|
||||
|
||||
=item F<$HOME/.pki/libvirt/cacert.pem>
|
||||
|
||||
The TLS B<Certificate Authority> certificate libvirtd will use.
|
||||
|
||||
=item F<$HOME/.pki/libvirt/servercert.pem>
|
||||
|
||||
The TLS B<Server> certificate libvirtd will use.
|
||||
|
||||
=item F<$HOME/.pki/libvirt/serverkey.pem>
|
||||
|
||||
The TLS B<Server> private key libvirtd will use.
|
||||
|
||||
=item F<$XDG_RUNTIME_DIR/libvirt/libvirtd.pid>
|
||||
|
||||
The PID file to use, unless overridden by the B<-p>|B<--pid-file> option.
|
||||
|
||||
=item If $XDG_CONFIG_HOME is not set in your environment, libvirtd will use F<$HOME/.config>
|
||||
|
||||
=item If $XDG_RUNTIME_DIR is not set in your environment, libvirtd will use F<$HOME/.cache>
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
To retrieve the version of libvirtd:
|
||||
@@ -154,8 +118,8 @@ To retrieve the version of libvirtd:
|
||||
To start libvirtd, instructing it to daemonize and create a PID file:
|
||||
|
||||
# libvirtd -d
|
||||
# ls -la LOCALSTATEDIR/run/libvirtd.pid
|
||||
-rw-r--r-- 1 root root 6 Jul 9 02:40 LOCALSTATEDIR/run/libvirtd.pid
|
||||
# ls -la @remote_pid_file@
|
||||
-rw-r--r-- 1 root root 6 Jul 9 02:40 @remote_pid_file@
|
||||
#
|
||||
|
||||
=head1 BUGS
|
||||
@@ -186,7 +150,7 @@ Please refer to the AUTHORS file distributed with libvirt.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (C) 2006-2012 Red Hat, Inc., and the authors listed in the
|
||||
Copyright (C) 2006-2010 Red Hat, Inc., and the authors listed in the
|
||||
libvirt AUTHORS file.
|
||||
|
||||
=head1 LICENSE
|
||||
|
42
daemon/libvirtd.policy-0
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
|
||||
<!--
|
||||
Policy definitions for libvirt daemon
|
||||
|
||||
Copyright (c) 2007 Daniel P. Berrange <berrange redhat com>
|
||||
|
||||
libvirt is licensed to you under the GNU Lesser General Public License
|
||||
version 2. See COPYING for details.
|
||||
|
||||
NOTE: If you make changes to this file, make sure to validate the file
|
||||
using the polkit-policy-file-validate(1) tool. Changes made to this
|
||||
file are instantly applied.
|
||||
-->
|
||||
|
||||
<policyconfig>
|
||||
<action id="org.libvirt.unix.monitor">
|
||||
<description>Monitor local virtualized systems</description>
|
||||
<message>System policy prevents monitoring of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Any program can use libvirt in read-only mode for monitoring,
|
||||
even if not part of a session -->
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
||||
<action id="org.libvirt.unix.manage">
|
||||
<description>Manage local virtualized systems</description>
|
||||
<message>System policy prevents management of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Only a program in the active host session can use libvirt in
|
||||
read-write mode for management, and we require user password -->
|
||||
<allow_any>auth_admin</allow_any>
|
||||
<allow_inactive>auth_admin</allow_inactive>
|
||||
<allow_active>auth_admin_keep_session</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
</policyconfig>
|
42
daemon/libvirtd.policy-1
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
|
||||
<!--
|
||||
Policy definitions for libvirt daemon
|
||||
|
||||
Copyright (c) 2007 Daniel P. Berrange <berrange redhat com>
|
||||
|
||||
libvirt is licensed to you under the GNU Lesser General Public License
|
||||
version 2. See COPYING for details.
|
||||
|
||||
NOTE: If you make changes to this file, make sure to validate the file
|
||||
using the polkit-policy-file-validate(1) tool. Changes made to this
|
||||
file are instantly applied.
|
||||
-->
|
||||
|
||||
<policyconfig>
|
||||
<action id="org.libvirt.unix.monitor">
|
||||
<description>Monitor local virtualized systems</description>
|
||||
<message>System policy prevents monitoring of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Any program can use libvirt in read-only mode for monitoring,
|
||||
even if not part of a session -->
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
||||
<action id="org.libvirt.unix.manage">
|
||||
<description>Manage local virtualized systems</description>
|
||||
<message>System policy prevents management of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Only a program in the active host session can use libvirt in
|
||||
read-write mode for management, and we require user password -->
|
||||
<allow_any>auth_admin</allow_any>
|
||||
<allow_inactive>auth_admin</allow_inactive>
|
||||
<allow_active>auth_admin_keep</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
</policyconfig>
|
@@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
|
||||
<!--
|
||||
Policy definitions for libvirt daemon
|
||||
|
||||
Copyright (C) 2012 Red Hat, Inc.
|
||||
Copyright (C) 2007 Daniel P. Berrange <berrange redhat com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<policyconfig>
|
||||
<action id="org.libvirt.unix.monitor">
|
||||
<description>Monitor local virtualized systems</description>
|
||||
<message>System policy prevents monitoring of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Any program can use libvirt in read-only mode for monitoring,
|
||||
even if not part of a session -->
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
||||
<action id="org.libvirt.unix.manage">
|
||||
<description>Manage local virtualized systems</description>
|
||||
<message>System policy prevents management of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Any program can use libvirt in read/write mode if they
|
||||
provide the root password -->
|
||||
<allow_any>@authaction@</allow_any>
|
||||
<allow_inactive>@authaction@</allow_inactive>
|
||||
<allow_active>@authaction@</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
</policyconfig>
|
@@ -7,8 +7,6 @@
|
||||
Description=Virtualization daemon
|
||||
Before=libvirt-guests.service
|
||||
After=network.target
|
||||
After=dbus.service
|
||||
After=iscsid.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/sysconfig/libvirtd
|
||||
|
1414
daemon/remote.c
@@ -14,8 +14,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Richard W.M. Jones <rjones@redhat.com>
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
@@ -32,14 +32,10 @@
|
||||
extern virNetServerProgramProc remoteProcs[];
|
||||
extern size_t remoteNProcs;
|
||||
|
||||
extern virNetServerProgramProc lxcProcs[];
|
||||
extern size_t lxcNProcs;
|
||||
|
||||
extern virNetServerProgramProc qemuProcs[];
|
||||
extern size_t qemuNProcs;
|
||||
|
||||
void remoteClientFreeFunc(void *data);
|
||||
void *remoteClientInitHook(virNetServerClientPtr client,
|
||||
void *opaque);
|
||||
int remoteClientInitHook(virNetServerPtr srv,
|
||||
virNetServerClientPtr client);
|
||||
|
||||
#endif /* __LIBVIRTD_REMOTE_H__ */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
@@ -25,13 +25,17 @@
|
||||
|
||||
#include "stream.h"
|
||||
#include "remote.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
#include "memory.h"
|
||||
#include "logging.h"
|
||||
#include "virnetserverclient.h"
|
||||
#include "virerror.h"
|
||||
#include "virterror_internal.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_STREAMS
|
||||
|
||||
#define virNetError(code, ...) \
|
||||
virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
struct daemonClientStream {
|
||||
daemonClientPrivatePtr priv;
|
||||
int refs;
|
||||
@@ -104,6 +108,14 @@ daemonStreamMessageFinished(virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
daemonStreamEventFreeFunc(void *opaque)
|
||||
{
|
||||
virNetServerClientPtr client = opaque;
|
||||
|
||||
virNetServerClientFree(client);
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback that gets invoked when a stream becomes writable/readable
|
||||
*/
|
||||
@@ -148,14 +160,6 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
|
||||
virNetServerClientClose(client);
|
||||
goto cleanup;
|
||||
}
|
||||
/* If we detected EOF during read processing,
|
||||
* then clear hangup/error conditions, since
|
||||
* we want the client to see the EOF message
|
||||
* we just sent them
|
||||
*/
|
||||
if (stream->recvEOF)
|
||||
events = events & ~(VIR_STREAM_EVENT_HANGUP |
|
||||
VIR_STREAM_EVENT_ERROR);
|
||||
}
|
||||
|
||||
/* If we have a completion/abort message, always process it */
|
||||
@@ -229,11 +233,11 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
|
||||
virStreamEventRemoveCallback(stream->st);
|
||||
virStreamAbort(stream->st);
|
||||
if (events & VIR_STREAM_EVENT_HANGUP)
|
||||
virReportError(VIR_ERR_RPC,
|
||||
"%s", _("stream had unexpected termination"));
|
||||
virNetError(VIR_ERR_RPC,
|
||||
"%s", _("stream had unexpected termination"));
|
||||
else
|
||||
virReportError(VIR_ERR_RPC,
|
||||
"%s", _("stream had I/O failure"));
|
||||
virNetError(VIR_ERR_RPC,
|
||||
"%s", _("stream had I/O failure"));
|
||||
|
||||
msg = virNetMessageNew(false);
|
||||
if (!msg) {
|
||||
@@ -332,12 +336,14 @@ daemonCreateClientStream(virNetServerClientPtr client,
|
||||
|
||||
stream->refs = 1;
|
||||
stream->priv = priv;
|
||||
stream->prog = virObjectRef(prog);
|
||||
stream->prog = prog;
|
||||
stream->procedure = header->proc;
|
||||
stream->serial = header->serial;
|
||||
stream->filterID = -1;
|
||||
stream->st = st;
|
||||
|
||||
virNetServerProgramRef(prog);
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
@@ -363,7 +369,7 @@ int daemonFreeClientStream(virNetServerClientPtr client,
|
||||
VIR_DEBUG("client=%p, proc=%d, serial=%d",
|
||||
client, stream->procedure, stream->serial);
|
||||
|
||||
virObjectUnref(stream->prog);
|
||||
virNetServerProgramFree(stream->prog);
|
||||
|
||||
msg = stream->rx;
|
||||
while (msg) {
|
||||
@@ -409,11 +415,10 @@ int daemonAddClientStream(virNetServerClientPtr client,
|
||||
|
||||
if (virStreamEventAddCallback(stream->st, 0,
|
||||
daemonStreamEvent, client,
|
||||
virObjectFreeCallback) < 0)
|
||||
daemonStreamEventFreeFunc) < 0)
|
||||
return -1;
|
||||
|
||||
virObjectRef(client);
|
||||
|
||||
virNetServerClientRef(client);
|
||||
if ((stream->filterID = virNetServerClientAddFilter(client,
|
||||
daemonStreamFilter,
|
||||
stream)) < 0) {
|
||||
@@ -613,13 +618,13 @@ daemonStreamHandleAbort(virNetServerClientPtr client,
|
||||
virStreamAbort(stream->st);
|
||||
|
||||
if (msg->header.status == VIR_NET_ERROR)
|
||||
virReportError(VIR_ERR_RPC,
|
||||
"%s", _("stream aborted at client request"));
|
||||
virNetError(VIR_ERR_RPC,
|
||||
"%s", _("stream aborted at client request"));
|
||||
else {
|
||||
VIR_WARN("unexpected stream status %d", msg->header.status);
|
||||
virReportError(VIR_ERR_RPC,
|
||||
_("stream aborted with unexpected status %d"),
|
||||
msg->header.status);
|
||||
virNetError(VIR_ERR_RPC,
|
||||
_("stream aborted with unexpected status %d"),
|
||||
msg->header.status);
|
||||
}
|
||||
|
||||
return virNetServerProgramSendReplyError(remoteProgram,
|
||||
@@ -697,7 +702,7 @@ daemonStreamHandleWrite(virNetServerClientPtr client,
|
||||
|
||||
/*
|
||||
* Invoked when a stream is signalled as having data
|
||||
* available to read. This reads up to one message
|
||||
* available to read. This reads upto one message
|
||||
* worth of data, and then queues that for transmission
|
||||
* to the client.
|
||||
*
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
553
daemon/test_libvirtd.aug
Normal file
@@ -0,0 +1,553 @@
|
||||
module Test_libvirtd =
|
||||
let conf = "# Master libvirt daemon configuration file
|
||||
#
|
||||
# For further information consult http://libvirt.org/format.html
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Network connectivity controls
|
||||
#
|
||||
|
||||
# Flag listening for secure TLS connections on the public TCP/IP port.
|
||||
# NB, must pass the --listen flag to the libvirtd process for this to
|
||||
# have any effect.
|
||||
#
|
||||
# It is necessary to setup a CA and issue server certificates before
|
||||
# using this capability.
|
||||
#
|
||||
# This is enabled by default, uncomment this to disable it
|
||||
listen_tls = 0
|
||||
|
||||
# Listen for unencrypted TCP connections on the public TCP/IP port.
|
||||
# NB, must pass the --listen flag to the libvirtd process for this to
|
||||
# have any effect.
|
||||
#
|
||||
# Using the TCP socket requires SASL authentication by default. Only
|
||||
# SASL mechanisms which support data encryption are allowed. This is
|
||||
# DIGEST_MD5 and GSSAPI (Kerberos5)
|
||||
#
|
||||
# This is disabled by default, uncomment this to enable it.
|
||||
listen_tcp = 1
|
||||
|
||||
|
||||
|
||||
# Override the port for accepting secure TLS connections
|
||||
# This can be a port number, or service name
|
||||
#
|
||||
tls_port = \"16514\"
|
||||
|
||||
# Override the port for accepting insecure TCP connections
|
||||
# This can be a port number, or service name
|
||||
#
|
||||
tcp_port = \"16509\"
|
||||
|
||||
|
||||
# Override the default configuration which binds to all network
|
||||
# interfaces. This can be a numeric IPv4/6 address, or hostname
|
||||
#
|
||||
listen_addr = \"192.168.0.1\"
|
||||
|
||||
|
||||
# Flag toggling mDNS advertizement of the libvirt service.
|
||||
#
|
||||
# Alternatively can disable for all services on a host by
|
||||
# stopping the Avahi daemon
|
||||
#
|
||||
# This is disabled by default, uncomment this to enable it
|
||||
mdns_adv = 1
|
||||
|
||||
# Override the default mDNS advertizement name. This must be
|
||||
# unique on the immediate broadcast network.
|
||||
#
|
||||
# The default is \"Virtualization Host HOSTNAME\", where HOSTNAME
|
||||
# is subsituted for the short hostname of the machine (without domain)
|
||||
#
|
||||
mdns_name = \"Virtualization Host Joe Demo\"
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# UNIX socket access controls
|
||||
#
|
||||
|
||||
# Set the UNIX domain socket group ownership. This can be used to
|
||||
# allow a 'trusted' set of users access to management capabilities
|
||||
# without becoming root.
|
||||
#
|
||||
# This is restricted to 'root' by default.
|
||||
unix_sock_group = \"libvirt\"
|
||||
|
||||
# Set the UNIX socket permissions for the R/O socket. This is used
|
||||
# for monitoring VM status only
|
||||
#
|
||||
# Default allows any user. If setting group ownership may want to
|
||||
# restrict this to:
|
||||
unix_sock_ro_perms = \"0777\"
|
||||
|
||||
# Set the UNIX socket permissions for the R/W socket. This is used
|
||||
# for full management of VMs
|
||||
#
|
||||
# Default allows only root. If PolicyKit is enabled on the socket,
|
||||
# the default will change to allow everyone (eg, 0777)
|
||||
#
|
||||
# If not using PolicyKit and setting group ownership for access
|
||||
# control then you may want to relax this to:
|
||||
unix_sock_rw_perms = \"0770\"
|
||||
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Authentication.
|
||||
#
|
||||
# - none: do not perform auth checks. If you can connect to the
|
||||
# socket you are allowed. This is suitable if there are
|
||||
# restrictions on connecting to the socket (eg, UNIX
|
||||
# socket permissions), or if there is a lower layer in
|
||||
# the network providing auth (eg, TLS/x509 certificates)
|
||||
#
|
||||
# - sasl: use SASL infrastructure. The actual auth scheme is then
|
||||
# controlled from /etc/sasl2/libvirt.conf. For the TCP
|
||||
# socket only GSSAPI & DIGEST-MD5 mechanisms will be used.
|
||||
# For non-TCP or TLS sockets, any scheme is allowed.
|
||||
#
|
||||
# - polkit: use PolicyKit to authenticate. This is only suitable
|
||||
# for use on the UNIX sockets. The default policy will
|
||||
# require a user to supply their own password to gain
|
||||
# full read/write access (aka sudo like), while anyone
|
||||
# is allowed read/only access.
|
||||
#
|
||||
# Set an authentication scheme for UNIX read-only sockets
|
||||
# By default socket permissions allow anyone to connect
|
||||
#
|
||||
# To restrict monitoring of domains you may wish to enable
|
||||
# an authentication mechanism here
|
||||
auth_unix_ro = \"none\"
|
||||
|
||||
# Set an authentication scheme for UNIX read-write sockets
|
||||
# By default socket permissions only allow root. If PolicyKit
|
||||
# support was compiled into libvirt, the default will be to
|
||||
# use 'polkit' auth.
|
||||
#
|
||||
# If the unix_sock_rw_perms are changed you may wish to enable
|
||||
# an authentication mechanism here
|
||||
auth_unix_rw = \"none\"
|
||||
|
||||
# Change the authentication scheme for TCP sockets.
|
||||
#
|
||||
# If you don't enable SASL, then all TCP traffic is cleartext.
|
||||
# Don't do this outside of a dev/test scenario. For real world
|
||||
# use, always enable SASL and use the GSSAPI or DIGEST-MD5
|
||||
# mechanism in /etc/sasl2/libvirt.conf
|
||||
auth_tcp = \"sasl\"
|
||||
|
||||
# Change the authentication scheme for TLS sockets.
|
||||
#
|
||||
# TLS sockets already have encryption provided by the TLS
|
||||
# layer, and limited authentication is done by certificates
|
||||
#
|
||||
# It is possible to make use of any SASL authentication
|
||||
# mechanism as well, by using 'sasl' for this option
|
||||
auth_tls = \"none\"
|
||||
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# TLS x509 certificate configuration
|
||||
#
|
||||
|
||||
|
||||
# Override the default server key file path
|
||||
#
|
||||
key_file = \"/etc/pki/libvirt/private/serverkey.pem\"
|
||||
|
||||
# Override the default server certificate file path
|
||||
#
|
||||
cert_file = \"/etc/pki/libvirt/servercert.pem\"
|
||||
|
||||
# Override the default CA certificate path
|
||||
#
|
||||
ca_file = \"/etc/pki/CA/cacert.pem\"
|
||||
|
||||
# Specify a certificate revocation list.
|
||||
#
|
||||
# Defaults to not using a CRL, uncomment to enable it
|
||||
crl_file = \"/etc/pki/CA/crl.pem\"
|
||||
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Authorization controls
|
||||
#
|
||||
|
||||
|
||||
# Flag to disable verification of client certificates
|
||||
#
|
||||
# Client certificate verification is the primary authentication mechanism.
|
||||
# Any client which does not present a certificate signed by the CA
|
||||
# will be rejected.
|
||||
#
|
||||
# Default is to always verify. Uncommenting this will disable
|
||||
# verification - make sure an IP whitelist is set
|
||||
tls_no_verify_certificate = 1
|
||||
tls_no_sanity_certificate = 1
|
||||
|
||||
|
||||
# A whitelist of allowed x509 Distinguished Names
|
||||
# This list may contain wildcards such as
|
||||
#
|
||||
# \"C=GB,ST=London,L=London,O=Red Hat,CN=*\"
|
||||
#
|
||||
# See the POSIX fnmatch function for the format of the wildcards.
|
||||
#
|
||||
# NB If this is an empty list, no client can connect, so comment out
|
||||
# entirely rather than using empty list to disable these checks
|
||||
#
|
||||
# By default, no DN's are checked
|
||||
tls_allowed_dn_list = [\"DN1\", \"DN2\"]
|
||||
|
||||
|
||||
# A whitelist of allowed SASL usernames. The format for usernames
|
||||
# depends on the SASL authentication mechanism. Kerberos usernames
|
||||
# look like username@REALM
|
||||
#
|
||||
# This list may contain wildcards such as
|
||||
#
|
||||
# \"*@EXAMPLE.COM\"
|
||||
#
|
||||
# See the POSIX fnmatch function for the format of the wildcards.
|
||||
#
|
||||
# NB If this is an empty list, no client can connect, so comment out
|
||||
# entirely rather than using empty list to disable these checks
|
||||
#
|
||||
# By default, no Username's are checked
|
||||
sasl_allowed_username_list = [
|
||||
\"joe@EXAMPLE.COM\",
|
||||
\"fred@EXAMPLE.COM\"
|
||||
]
|
||||
|
||||
|
||||
#################################################################
|
||||
#
|
||||
# Processing controls
|
||||
#
|
||||
|
||||
# The maximum number of concurrent client connections to allow
|
||||
# over all sockets combined.
|
||||
max_clients = 20
|
||||
|
||||
|
||||
# The minimum limit sets the number of workers to start up
|
||||
# initially. If the number of active clients exceeds this,
|
||||
# then more threads are spawned, upto max_workers limit.
|
||||
# Typically you'd want max_workers to equal maximum number
|
||||
# of clients allowed
|
||||
min_workers = 5
|
||||
max_workers = 20
|
||||
|
||||
# Total global limit on concurrent RPC calls. Should be
|
||||
# at least as large as max_workers. Beyond this, RPC requests
|
||||
# will be read into memory and queued. This directly impact
|
||||
# memory usage, currently each request requires 256 KB of
|
||||
# memory. So by default upto 5 MB of memory is used
|
||||
max_requests = 20
|
||||
|
||||
# Limit on concurrent requests from a single client
|
||||
# connection. To avoid one client monopolizing the server
|
||||
# this should be a small fraction of the global max_requests
|
||||
# and max_workers parameter
|
||||
max_client_requests = 5
|
||||
|
||||
# Logging level:
|
||||
log_level = 4
|
||||
|
||||
# Logging outputs:
|
||||
log_outputs=\"4:stderr\"
|
||||
|
||||
# Logging filters:
|
||||
log_filters=\"a\"
|
||||
|
||||
# Auditing:
|
||||
audit_level = 2
|
||||
"
|
||||
|
||||
test Libvirtd.lns get conf =
|
||||
{ "#comment" = "Master libvirt daemon configuration file" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "For further information consult http://libvirt.org/format.html" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Network connectivity controls" }
|
||||
{ "#comment" = "" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Flag listening for secure TLS connections on the public TCP/IP port." }
|
||||
{ "#comment" = "NB, must pass the --listen flag to the libvirtd process for this to" }
|
||||
{ "#comment" = "have any effect." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "It is necessary to setup a CA and issue server certificates before" }
|
||||
{ "#comment" = "using this capability." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "This is enabled by default, uncomment this to disable it" }
|
||||
{ "listen_tls" = "0" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Listen for unencrypted TCP connections on the public TCP/IP port." }
|
||||
{ "#comment" = "NB, must pass the --listen flag to the libvirtd process for this to" }
|
||||
{ "#comment" = "have any effect." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Using the TCP socket requires SASL authentication by default. Only" }
|
||||
{ "#comment" = "SASL mechanisms which support data encryption are allowed. This is" }
|
||||
{ "#comment" = "DIGEST_MD5 and GSSAPI (Kerberos5)" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "This is disabled by default, uncomment this to enable it." }
|
||||
{ "listen_tcp" = "1" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the port for accepting secure TLS connections" }
|
||||
{ "#comment" = "This can be a port number, or service name" }
|
||||
{ "#comment" = "" }
|
||||
{ "tls_port" = "16514" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the port for accepting insecure TCP connections" }
|
||||
{ "#comment" = "This can be a port number, or service name" }
|
||||
{ "#comment" = "" }
|
||||
{ "tcp_port" = "16509" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the default configuration which binds to all network" }
|
||||
{ "#comment" = "interfaces. This can be a numeric IPv4/6 address, or hostname" }
|
||||
{ "#comment" = "" }
|
||||
{ "listen_addr" = "192.168.0.1" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Flag toggling mDNS advertizement of the libvirt service." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Alternatively can disable for all services on a host by" }
|
||||
{ "#comment" = "stopping the Avahi daemon" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "This is disabled by default, uncomment this to enable it" }
|
||||
{ "mdns_adv" = "1" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the default mDNS advertizement name. This must be" }
|
||||
{ "#comment" = "unique on the immediate broadcast network." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "The default is \"Virtualization Host HOSTNAME\", where HOSTNAME" }
|
||||
{ "#comment" = "is subsituted for the short hostname of the machine (without domain)" }
|
||||
{ "#comment" = "" }
|
||||
{ "mdns_name" = "Virtualization Host Joe Demo" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "UNIX socket access controls" }
|
||||
{ "#comment" = "" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Set the UNIX domain socket group ownership. This can be used to" }
|
||||
{ "#comment" = "allow a 'trusted' set of users access to management capabilities" }
|
||||
{ "#comment" = "without becoming root." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "This is restricted to 'root' by default." }
|
||||
{ "unix_sock_group" = "libvirt" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Set the UNIX socket permissions for the R/O socket. This is used" }
|
||||
{ "#comment" = "for monitoring VM status only" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Default allows any user. If setting group ownership may want to" }
|
||||
{ "#comment" = "restrict this to:" }
|
||||
{ "unix_sock_ro_perms" = "0777" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Set the UNIX socket permissions for the R/W socket. This is used" }
|
||||
{ "#comment" = "for full management of VMs" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Default allows only root. If PolicyKit is enabled on the socket," }
|
||||
{ "#comment" = "the default will change to allow everyone (eg, 0777)" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "If not using PolicyKit and setting group ownership for access" }
|
||||
{ "#comment" = "control then you may want to relax this to:" }
|
||||
{ "unix_sock_rw_perms" = "0770" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Authentication." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "- none: do not perform auth checks. If you can connect to the" }
|
||||
{ "#comment" = "socket you are allowed. This is suitable if there are" }
|
||||
{ "#comment" = "restrictions on connecting to the socket (eg, UNIX" }
|
||||
{ "#comment" = "socket permissions), or if there is a lower layer in" }
|
||||
{ "#comment" = "the network providing auth (eg, TLS/x509 certificates)" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "- sasl: use SASL infrastructure. The actual auth scheme is then" }
|
||||
{ "#comment" = "controlled from /etc/sasl2/libvirt.conf. For the TCP" }
|
||||
{ "#comment" = "socket only GSSAPI & DIGEST-MD5 mechanisms will be used." }
|
||||
{ "#comment" = "For non-TCP or TLS sockets, any scheme is allowed." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "- polkit: use PolicyKit to authenticate. This is only suitable" }
|
||||
{ "#comment" = "for use on the UNIX sockets. The default policy will" }
|
||||
{ "#comment" = "require a user to supply their own password to gain" }
|
||||
{ "#comment" = "full read/write access (aka sudo like), while anyone" }
|
||||
{ "#comment" = "is allowed read/only access." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Set an authentication scheme for UNIX read-only sockets" }
|
||||
{ "#comment" = "By default socket permissions allow anyone to connect" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "To restrict monitoring of domains you may wish to enable" }
|
||||
{ "#comment" = "an authentication mechanism here" }
|
||||
{ "auth_unix_ro" = "none" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Set an authentication scheme for UNIX read-write sockets" }
|
||||
{ "#comment" = "By default socket permissions only allow root. If PolicyKit" }
|
||||
{ "#comment" = "support was compiled into libvirt, the default will be to" }
|
||||
{ "#comment" = "use 'polkit' auth." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "If the unix_sock_rw_perms are changed you may wish to enable" }
|
||||
{ "#comment" = "an authentication mechanism here" }
|
||||
{ "auth_unix_rw" = "none" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Change the authentication scheme for TCP sockets." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "If you don't enable SASL, then all TCP traffic is cleartext." }
|
||||
{ "#comment" = "Don't do this outside of a dev/test scenario. For real world" }
|
||||
{ "#comment" = "use, always enable SASL and use the GSSAPI or DIGEST-MD5" }
|
||||
{ "#comment" = "mechanism in /etc/sasl2/libvirt.conf" }
|
||||
{ "auth_tcp" = "sasl" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Change the authentication scheme for TLS sockets." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "TLS sockets already have encryption provided by the TLS" }
|
||||
{ "#comment" = "layer, and limited authentication is done by certificates" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "It is possible to make use of any SASL authentication" }
|
||||
{ "#comment" = "mechanism as well, by using 'sasl' for this option" }
|
||||
{ "auth_tls" = "none" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "TLS x509 certificate configuration" }
|
||||
{ "#comment" = "" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the default server key file path" }
|
||||
{ "#comment" = "" }
|
||||
{ "key_file" = "/etc/pki/libvirt/private/serverkey.pem" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the default server certificate file path" }
|
||||
{ "#comment" = "" }
|
||||
{ "cert_file" = "/etc/pki/libvirt/servercert.pem" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Override the default CA certificate path" }
|
||||
{ "#comment" = "" }
|
||||
{ "ca_file" = "/etc/pki/CA/cacert.pem" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Specify a certificate revocation list." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Defaults to not using a CRL, uncomment to enable it" }
|
||||
{ "crl_file" = "/etc/pki/CA/crl.pem" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Authorization controls" }
|
||||
{ "#comment" = "" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Flag to disable verification of client certificates" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Client certificate verification is the primary authentication mechanism." }
|
||||
{ "#comment" = "Any client which does not present a certificate signed by the CA" }
|
||||
{ "#comment" = "will be rejected." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "Default is to always verify. Uncommenting this will disable" }
|
||||
{ "#comment" = "verification - make sure an IP whitelist is set" }
|
||||
{ "tls_no_verify_certificate" = "1" }
|
||||
{ "tls_no_sanity_certificate" = "1" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "A whitelist of allowed x509 Distinguished Names" }
|
||||
{ "#comment" = "This list may contain wildcards such as" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "\"C=GB,ST=London,L=London,O=Red Hat,CN=*\"" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "See the POSIX fnmatch function for the format of the wildcards." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "NB If this is an empty list, no client can connect, so comment out" }
|
||||
{ "#comment" = "entirely rather than using empty list to disable these checks" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "By default, no DN's are checked" }
|
||||
{ "tls_allowed_dn_list"
|
||||
{ "1" = "DN1"}
|
||||
{ "2" = "DN2"}
|
||||
}
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "A whitelist of allowed SASL usernames. The format for usernames" }
|
||||
{ "#comment" = "depends on the SASL authentication mechanism. Kerberos usernames" }
|
||||
{ "#comment" = "look like username@REALM" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "This list may contain wildcards such as" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "\"*@EXAMPLE.COM\"" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "See the POSIX fnmatch function for the format of the wildcards." }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "NB If this is an empty list, no client can connect, so comment out" }
|
||||
{ "#comment" = "entirely rather than using empty list to disable these checks" }
|
||||
{ "#comment" = "" }
|
||||
{ "#comment" = "By default, no Username's are checked" }
|
||||
{ "sasl_allowed_username_list"
|
||||
{ "1" = "joe@EXAMPLE.COM" }
|
||||
{ "2" = "fred@EXAMPLE.COM" }
|
||||
}
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "################################################################"}
|
||||
{ "#comment" = ""}
|
||||
{ "#comment" = "Processing controls"}
|
||||
{ "#comment" = ""}
|
||||
{ "#empty" }
|
||||
{ "#comment" = "The maximum number of concurrent client connections to allow"}
|
||||
{ "#comment" = "over all sockets combined."}
|
||||
{ "max_clients" = "20" }
|
||||
{ "#empty" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "The minimum limit sets the number of workers to start up"}
|
||||
{ "#comment" = "initially. If the number of active clients exceeds this,"}
|
||||
{ "#comment" = "then more threads are spawned, upto max_workers limit."}
|
||||
{ "#comment" = "Typically you'd want max_workers to equal maximum number"}
|
||||
{ "#comment" = "of clients allowed"}
|
||||
{ "min_workers" = "5" }
|
||||
{ "max_workers" = "20" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Total global limit on concurrent RPC calls. Should be" }
|
||||
{ "#comment" = "at least as large as max_workers. Beyond this, RPC requests" }
|
||||
{ "#comment" = "will be read into memory and queued. This directly impact" }
|
||||
{ "#comment" = "memory usage, currently each request requires 256 KB of" }
|
||||
{ "#comment" = "memory. So by default upto 5 MB of memory is used" }
|
||||
{ "max_requests" = "20" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Limit on concurrent requests from a single client" }
|
||||
{ "#comment" = "connection. To avoid one client monopolizing the server" }
|
||||
{ "#comment" = "this should be a small fraction of the global max_requests" }
|
||||
{ "#comment" = "and max_workers parameter" }
|
||||
{ "max_client_requests" = "5" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Logging level:" }
|
||||
{ "log_level" = "4" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Logging outputs:" }
|
||||
{ "log_outputs" = "4:stderr" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Logging filters:" }
|
||||
{ "log_filters" = "a" }
|
||||
{ "#empty" }
|
||||
{ "#comment" = "Auditing:" }
|
||||
{ "audit_level" = "2" }
|
@@ -1,49 +0,0 @@
|
||||
module Test_libvirtd =
|
||||
::CONFIG::
|
||||
|
||||
test Libvirtd.lns get conf =
|
||||
{ "listen_tls" = "0" }
|
||||
{ "listen_tcp" = "1" }
|
||||
{ "tls_port" = "16514" }
|
||||
{ "tcp_port" = "16509" }
|
||||
{ "listen_addr" = "192.168.0.1" }
|
||||
{ "mdns_adv" = "1" }
|
||||
{ "mdns_name" = "Virtualization Host Joe Demo" }
|
||||
{ "unix_sock_group" = "libvirt" }
|
||||
{ "unix_sock_ro_perms" = "0777" }
|
||||
{ "unix_sock_rw_perms" = "0770" }
|
||||
{ "unix_sock_dir" = "/var/run/libvirt" }
|
||||
{ "auth_unix_ro" = "none" }
|
||||
{ "auth_unix_rw" = "none" }
|
||||
{ "auth_tcp" = "sasl" }
|
||||
{ "auth_tls" = "none" }
|
||||
{ "key_file" = "/etc/pki/libvirt/private/serverkey.pem" }
|
||||
{ "cert_file" = "/etc/pki/libvirt/servercert.pem" }
|
||||
{ "ca_file" = "/etc/pki/CA/cacert.pem" }
|
||||
{ "crl_file" = "/etc/pki/CA/crl.pem" }
|
||||
{ "tls_no_sanity_certificate" = "1" }
|
||||
{ "tls_no_verify_certificate" = "1" }
|
||||
{ "tls_allowed_dn_list"
|
||||
{ "1" = "DN1"}
|
||||
{ "2" = "DN2"}
|
||||
}
|
||||
{ "sasl_allowed_username_list"
|
||||
{ "1" = "joe@EXAMPLE.COM" }
|
||||
{ "2" = "fred@EXAMPLE.COM" }
|
||||
}
|
||||
{ "max_clients" = "20" }
|
||||
{ "min_workers" = "5" }
|
||||
{ "max_workers" = "20" }
|
||||
{ "prio_workers" = "5" }
|
||||
{ "max_requests" = "20" }
|
||||
{ "max_client_requests" = "5" }
|
||||
{ "log_level" = "3" }
|
||||
{ "log_filters" = "3:remote 4:event" }
|
||||
{ "log_outputs" = "3:syslog:libvirtd" }
|
||||
{ "log_buffer_size" = "64" }
|
||||
{ "audit_level" = "2" }
|
||||
{ "audit_logging" = "1" }
|
||||
{ "host_uuid" = "00000000-0000-0000-0000-000000000000" }
|
||||
{ "keepalive_interval" = "5" }
|
||||
{ "keepalive_count" = "5" }
|
||||
{ "keepalive_required" = "1" }
|
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>404 page not found</h1>
|
||||
|
||||
<p>
|
||||
Someone appears to have eaten the <del>penguin</del>
|
||||
page you were looking for. You might want to try
|
||||
</p>
|
||||
<ul>
|
||||
<li>going back to the <a href="http://libvirt.org/">home page</a> to find
|
||||
a collection of links to interesting pages on this site</li>
|
||||
<li>using the search box at the top right corner of the screen to
|
||||
locate the content on this site or mailing list archives</li>
|
||||
</ul>
|
||||
|
||||
<p class="image">
|
||||
<img src="/libvirtLogo404.png" alt="libvirt Logo"/>
|
||||
</p>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -81,10 +81,6 @@ dot_html_in = $(notdir $(wildcard $(srcdir)/*.html.in)) \
|
||||
hvsupport.html.in
|
||||
dot_html = $(dot_html_in:%.html.in=%.html)
|
||||
|
||||
dot_php_in = $(notdir $(wildcard $(srcdir)/*.php.in))
|
||||
dot_php_code_in = $(dot_php_in:%.php.in=%.php.code.in)
|
||||
dot_php = $(dot_php_in:%.php.in=%.php)
|
||||
|
||||
patches = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/api_extension/*.patch))
|
||||
|
||||
xml = \
|
||||
@@ -95,12 +91,8 @@ qemu_xml = \
|
||||
libvirt-qemu-api.xml \
|
||||
libvirt-qemu-refs.xml
|
||||
|
||||
lxc_xml = \
|
||||
libvirt-lxc-api.xml \
|
||||
libvirt-lxc-refs.xml
|
||||
|
||||
apidir = $(pkgdatadir)/api
|
||||
api_DATA = libvirt-api.xml libvirt-qemu-api.xml libvirt-lxc-api.xml
|
||||
api_DATA = libvirt-api.xml libvirt-qemu-api.xml
|
||||
|
||||
fig = \
|
||||
libvirt-net-logical.fig \
|
||||
@@ -120,9 +112,8 @@ EXTRA_DIST= \
|
||||
hacking1.xsl hacking2.xsl wrapstring.xsl \
|
||||
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
|
||||
$(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
|
||||
$(xml) $(qemu_xml) $(lxc_xml) $(fig) $(png) $(css) \
|
||||
$(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\
|
||||
$(internals_html_in) $(internals_html) \
|
||||
$(xml) $(qemu_xml) $(fig) $(png) $(css) \
|
||||
$(patches) $(internals_html_in) $(internals_html) \
|
||||
sitemap.html.in \
|
||||
todo.pl hvsupport.pl todo.cfg-example
|
||||
|
||||
@@ -130,17 +121,14 @@ MAINTAINERCLEANFILES = \
|
||||
$(addprefix $(srcdir)/,$(dot_html)) \
|
||||
$(addprefix $(srcdir)/,$(apihtml)) \
|
||||
$(addprefix $(srcdir)/,$(devhelphtml)) \
|
||||
$(addprefix $(srcdir)/,$(internals_html)) \
|
||||
$(addprefix $(srcdir)/,$(dot_php))
|
||||
$(addprefix $(srcdir)/,$(internals_html))
|
||||
|
||||
all-am: web
|
||||
|
||||
api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
|
||||
qemu_api: $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
|
||||
lxc_api: $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
|
||||
|
||||
web: $(dot_html) $(internals_html) html/index.html devhelp/index.html \
|
||||
$(dot_php)
|
||||
web: $(dot_html) $(internals_html) html/index.html devhelp/index.html
|
||||
|
||||
todo.html.in: todo.pl
|
||||
if [ -f todo.cfg ]; then \
|
||||
@@ -157,8 +145,7 @@ todo:
|
||||
$(MAKE) todo.html
|
||||
|
||||
hvsupport.html.in: $(srcdir)/hvsupport.pl $(srcdir)/../src/libvirt_public.syms \
|
||||
$(srcdir)/../src/libvirt_qemu.syms $(srcdir)/../src/libvirt_lxc.syms \
|
||||
$(srcdir)/../src/driver.h
|
||||
$(srcdir)/../src/libvirt_qemu.syms $(srcdir)/../src/driver.h
|
||||
$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(srcdir)/../src > $@ || { rm $@ && exit 1; }
|
||||
|
||||
.PHONY: todo
|
||||
@@ -193,19 +180,6 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
|
||||
|| { rm $(srcdir)/$@ && exit 1; }; \
|
||||
else echo "missing XHTML1 DTD" ; fi ; fi
|
||||
|
||||
%.php.tmp: %.php.in site.xsl page.xsl sitemap.html.in
|
||||
@if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Generating $@"; \
|
||||
$(XSLTPROC) --stringparam pagename $(@:.tmp=) --nonet --html \
|
||||
$(top_srcdir)/docs/site.xsl $< > $@ \
|
||||
|| { rm $@ && exit 1; }; fi
|
||||
|
||||
%.php: %.php.tmp %.php.code.in
|
||||
@if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Scripting $@"; \
|
||||
sed -e '/<a id="php_placeholder"><\/a>/r '"$(srcdir)/$@.code.in" \
|
||||
-e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
|
||||
|| { rm $(srcdir)/$@ && exit 1; }; fi
|
||||
|
||||
html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
|
||||
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||
@@ -226,16 +200,12 @@ $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
|
||||
|
||||
python_generated_files = \
|
||||
$(srcdir)/html/libvirt-libvirt.html \
|
||||
$(srcdir)/html/libvirt-libvirt-lxc.html \
|
||||
$(srcdir)/html/libvirt-libvirt-qemu.html \
|
||||
$(srcdir)/html/libvirt-virterror.html \
|
||||
$(srcdir)/libvirt-api.xml \
|
||||
$(srcdir)/libvirt-refs.xml \
|
||||
$(srcdir)/libvirt-lxc-api.xml \
|
||||
$(srcdir)/libvirt-lxc-refs.xml \
|
||||
$(srcdir)/libvirt-qemu-api.xml \
|
||||
$(srcdir)/libvirt-qemu-refs.xml \
|
||||
$(NULL)
|
||||
$(srcdir)/libvirt-qemu-refs.xml
|
||||
|
||||
APIBUILD=$(srcdir)/apibuild.py
|
||||
APIBUILD_STAMP=$(APIBUILD).stamp
|
||||
@@ -245,15 +215,11 @@ $(python_generated_files): $(APIBUILD_STAMP)
|
||||
|
||||
$(APIBUILD_STAMP): $(srcdir)/apibuild.py \
|
||||
$(srcdir)/../include/libvirt/libvirt.h.in \
|
||||
$(srcdir)/../include/libvirt/libvirt-lxc.h \
|
||||
$(srcdir)/../include/libvirt/libvirt-qemu.h \
|
||||
$(srcdir)/../include/libvirt/virterror.h \
|
||||
$(srcdir)/../src/libvirt.c \
|
||||
$(srcdir)/../src/libvirt-lxc.c \
|
||||
$(srcdir)/../src/libvirt-qemu.c \
|
||||
$(srcdir)/../src/util/virerror.c \
|
||||
$(srcdir)/../src/util/virevent.c \
|
||||
$(srcdir)/../src/util/virtypedparam.c
|
||||
$(srcdir)/../src/util/virterror.c
|
||||
$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(APIBUILD)
|
||||
touch $@
|
||||
|
||||
@@ -266,10 +232,9 @@ clean-local:
|
||||
maintainer-clean-local: clean-local
|
||||
rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml todo.html.in hvsupport.html.in
|
||||
rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
|
||||
rm -rf $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
|
||||
rm -rf $(APIBUILD_STAMP)
|
||||
|
||||
rebuild: api qemu_api lxc_api all
|
||||
rebuild: api qemu_api all
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||
@@ -287,7 +252,6 @@ install-data-local:
|
||||
for file in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
|
||||
done
|
||||
$(INSTALL_DATA) $(srcdir)/libvirtLogo.png $(DESTDIR)$(pkgdatadir)
|
||||
|
||||
uninstall-local:
|
||||
for h in $(apihtml); do rm $(DESTDIR)$(HTML_DIR)/$$h; done
|
||||
|
263
docs/api.html.in
@@ -8,28 +8,26 @@
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<h2><a name="Objects">Objects Exposed</a></h2>
|
||||
<p> As defined in the <a href="goals.html">goals section</a>, the libvirt
|
||||
API is designed to expose all the resources needed to manage the
|
||||
virtualization support of recent operating systems. The first object
|
||||
manipulated through the API is the <code>virConnectPtr</code>, which
|
||||
represents the connection to a hypervisor. Any application using libvirt
|
||||
is likely to start using the
|
||||
<h2><a name="Objects">Objects exposed</a></h2>
|
||||
<p> As defined in the <a href="goals.html">goals section</a>, libvirt
|
||||
API need to expose all the resources needed to manage the virtualization
|
||||
support of recent operating systems. The first object manipulated though
|
||||
the API is <code>virConnectPtr</code> which represent a connection to
|
||||
an hypervisor. Any application using libvirt is likely to start using the
|
||||
API by calling one of <a href="html/libvirt-libvirt.html#virConnectOpen"
|
||||
>the virConnectOpen functions</a>. You will note that those functions take
|
||||
a name argument which is actually a <a href="uri.html">connection URI</a>
|
||||
to select the right hypervisor to open.
|
||||
A URI is needed to allow remote connections and also select between
|
||||
different possible hypervisors. For example, on a Linux system it may be
|
||||
possible to use both KVM and LinuxContainers on the same node. A NULL
|
||||
name will default to a preselected hypervisor, but it's probably not a
|
||||
a name argument which is actually an URI to select the right hypervisor to
|
||||
open, this is needed to allow remote connections and also select between
|
||||
different possible hypervisors (for example on a Linux system it may be
|
||||
possible to use both KVM and LinuxContainers on the same node). A NULL
|
||||
name will default to a preselected hypervisor but it's probably not a
|
||||
wise thing to do in most cases. See the <a href="uri.html">connection
|
||||
URI</a> page for a full descriptions of the values allowed.</p>
|
||||
<p> Once the application obtains a <code class='docref'>virConnectPtr</code>
|
||||
connection to the hypervisor it can then use it to manage the hypervisor's
|
||||
available domains and related virtualization
|
||||
resources, such as storage and networking. All those are
|
||||
exposed as first class objects and connected to the hypervisor connection
|
||||
<p> Once the application obtained a <code class='docref'>virConnectPtr</code>
|
||||
connection to the
|
||||
hypervisor it can then use it to manage domains and related resources
|
||||
available for virtualization like storage and networking. All those are
|
||||
exposed as first class objects, and connected to the hypervisor connection
|
||||
(and the node or cluster where it is available).</p>
|
||||
<p class="image">
|
||||
<img alt="first class objects exposed by the API"
|
||||
@@ -37,201 +35,92 @@
|
||||
</p>
|
||||
<p> The figure above shows the five main objects exported by the API:</p>
|
||||
<ul>
|
||||
<li><code class='docref'>virConnectPtr</code>
|
||||
<p>Represents the connection to a hypervisor. Use one of the
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a>
|
||||
functions to obtain connection to the hypervisor which is then used
|
||||
as a parameter to other connection API's.</p></li>
|
||||
<li><code class='docref'>virDomainPtr</code>
|
||||
<p>Represents one domain either active or defined (i.e. existing as
|
||||
permanent config file and storage but not currently running on that
|
||||
node). The function <code class='docref'>virConnectListAllDomains</code>
|
||||
lists all the domains for the hypervisor.</p></li>
|
||||
<li><code class='docref'>virNetworkPtr</code>
|
||||
<p>Represents one network either active or defined (i.e. existing
|
||||
as permanent config file and storage but not currently activated).
|
||||
The function <code class='docref'>virConnectListAllNetworks</code>
|
||||
lists all the virtualization networks for the hypervisor.</p></li>
|
||||
<li><code class='docref'>virStorageVolPtr</code>
|
||||
<p>Represents one storage volume generally used
|
||||
<li>virConnectPtr: represent a connection to an hypervisor.</li>
|
||||
<li>virDomainPtr: represent one domain either active or defined (i.e.
|
||||
existing as permanent config file and storage but not currently running
|
||||
on that node). The function <code class='docref'>virConnectListDomains</code>
|
||||
allows to list all the IDs for the domains active on this hypervisor.</li>
|
||||
<li>virNetworkPtr: represent one network either active or defined (i.e.
|
||||
existing as permanent config file and storage but not currently activated.
|
||||
The function <code class='docref'>virConnectListNetworks</code>
|
||||
allows to list all the virtualization networks actived on this node.</li>
|
||||
<li>virStorageVolPtr: represent one storage volume, usually this is used
|
||||
as a block device available to one of the domains. The function
|
||||
<code class="docref">virStorageVolLookupByPath</code> finds
|
||||
the storage volume object based on its path on the node.</p></li>
|
||||
<li><code class='docref'>virStoragePoolPtr</code>
|
||||
<p>Represents a storage pool, which is a logical area
|
||||
used to allocate and store storage volumes. The function
|
||||
<code class='docref'>virConnectListAllStoragePools</code> lists
|
||||
all of the virtualization storage pools on the hypervisor. The function
|
||||
<code class="docref">virStoragePoolLookupByVolume</code> finds
|
||||
the storage pool containing a given storage volume.</p></li>
|
||||
<code class="docref">virStorageVolLookupByPath</code> allows to find
|
||||
the object based on its path on the node.</li>
|
||||
<li>virStoragePoolPtr: represent a storage pool, i.e. a logical area
|
||||
which can be used to allocate and store storage volumes. The function
|
||||
<code class="docref">virStoragePoolLookupByVolume</code> allows to find
|
||||
the storage pool containing a given storage volume.</li>
|
||||
</ul>
|
||||
<p> Most objects manipulated by the library can also be represented using
|
||||
<p> Most object manipulated by the library can also be represented using
|
||||
XML descriptions. This is used primarily to create those object, but is
|
||||
also helpful to modify or save their description back.</p>
|
||||
<p> Domains, networks, and storage pools can be either <code>active</code>
|
||||
<p> Domains, network and storage pools can be either <code>active</code>
|
||||
i.e. either running or available for immediate use, or
|
||||
<code>defined</code> in which case they are inactive but there is
|
||||
a permanent definition available in the system for them. Based on this
|
||||
they can be activated dynamically in order to be used.</p>
|
||||
<p> Most objects can also be named in various ways:</p>
|
||||
thay can be activated dynamically in order to be used.</p>
|
||||
<p> Most kind of object can also be named in various ways:</p>
|
||||
<ul>
|
||||
<li><code>name</code>
|
||||
<p>A user friendly identifier but whose uniqueness
|
||||
cannot be guaranteed between two nodes.</p></li>
|
||||
<li><code>ID</code>
|
||||
<p>A runtime unique identifier
|
||||
provided by the hypervisor for one given activation of the object;
|
||||
however, it becomes invalid once the resource is deactivated.</p></li >
|
||||
<li><code>UUID</code>
|
||||
<p> A 16 byte unique identifier
|
||||
<li>by their <code>name</code>, an user friendly identifier but
|
||||
whose unicity cannot be garanteed between two nodes.</li>
|
||||
<li>by their <code>ID</code>, which is a runtime unique identifier
|
||||
provided by the hypervisor for one given activation of the object,
|
||||
but it becomes invalid once the resource is deactivated.</li >
|
||||
<li>by their <code>UUID</code>, a 16 bytes unique identifier
|
||||
as defined in <a href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>,
|
||||
which is guaranteed to be unique for long term usage and across a
|
||||
set of nodes.</p></li>
|
||||
which is garanteed to be unique for long term usage and across a
|
||||
set of nodes.</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="Functions">Functions and Naming Conventions</a></h2>
|
||||
<h2><a name="Functions">Functions and naming
|
||||
conventions</a></h2>
|
||||
<p> The naming of the functions present in the library is usually
|
||||
composed by a prefix describing the object associated to the function
|
||||
made of a prefix describing the object associated to the function
|
||||
and a verb describing the action on that object.</p>
|
||||
<p> For each first class object you will find APIs
|
||||
<p> For each first class object you will find apis
|
||||
for the following actions:</p>
|
||||
<ul>
|
||||
<li><b>Lookup</b> [...LookupBy...]
|
||||
<p>Used to perform lookups on objects by some type of identifier,
|
||||
such as:</p>
|
||||
<ul>
|
||||
<li><code class='docref'>virDomainLookupByID</code></li>
|
||||
<li><code class='docref'>virDomainLookupByName</code></li>
|
||||
<li><code class='docref'>virDomainLookupByUUID</code></li>
|
||||
<li><code class='docref'>virDomainLookupByUUIDString</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Enumeration</b> [virConnectList..., virConnectNumOf...]
|
||||
<p>Used to enumerate a set of object available to an given
|
||||
hypervisor connection such as:</p>
|
||||
<ul>
|
||||
<li><code class='docref'>virConnectListDomains</code></li>
|
||||
<li><code class='docref'>virConnectNumOfDomains</code></li>
|
||||
<li><code class='docref'>virConnectListNetworks</code></li>
|
||||
<li><code class='docref'>virConnectListStoragePools</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Description</b> [...GetInfo]
|
||||
<p>Generic accessor providing a set of generic information about an
|
||||
object, such as: </p>
|
||||
<ul>
|
||||
<li><code class='docref'>virNodeGetInfo</code></li>
|
||||
<li><code class='docref'>virDomainGetInfo</code></li>
|
||||
<li><code class='docref'>virStoragePoolGetInfo</code></li>
|
||||
<li><code class='docref'>virStorageVolGetInfo</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Accessors</b> [...Get..., ...Set...]
|
||||
<p>Specific accessors used to query or modify data for the given object,
|
||||
such as: </p>
|
||||
<ul>
|
||||
<li><code class='docref'>virConnectGetType</code></li>
|
||||
<li><code class='docref'>virDomainGetMaxMemory</code></li>
|
||||
<li><code class='docref'>virDomainSetMemory</code></li>
|
||||
<li><code class='docref'>virDomainGetVcpus</code></li>
|
||||
<li><code class='docref'>virStoragePoolSetAutostart</code></li>
|
||||
<li><code class='docref'>virNetworkGetBridgeName</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Creation</b> [...Create, ...CreateXML]
|
||||
<p>Used to create and start objects. The ...CreateXML APIs will create
|
||||
the object based on an XML description, while the ...Create APIs will
|
||||
create the object based on existing object pointer, such as: </p>
|
||||
<ul>
|
||||
<li><code class='docref'>virDomainCreate</code></li>
|
||||
<li><code class='docref'>virDomainCreateXML</code></li>
|
||||
<li><code class='docref'>virNetworkCreate</code></li>
|
||||
<li><code class='docref'>virNetworkCreateXML</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Destruction</b> [...Destroy]
|
||||
<p>Used to shutdown or deactivate and destroy objects, such as: </p>
|
||||
<ul>
|
||||
<li><code class='docref'>virDomainDestroy</code></li>
|
||||
<li><code class='docref'>virNetworkDestroy</code></li>
|
||||
<li><code class='docref'>virStoragePoolDestroy</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Lookup</b>:...LookupByName,</li>
|
||||
<li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
|
||||
those are used to enumerate a set of object available to an given
|
||||
hypervisor connection like:
|
||||
<code class='docref'>virConnectListDomains</code>,
|
||||
<code class='docref'>virConnectNumOfDomains</code>,
|
||||
<code class='docref'>virConnectListNetworks</code>,
|
||||
<code class='docref'>virConnectListStoragePools</code>, etc.</li>
|
||||
<li><b>Description</b>: ...GetInfo: those are generic accessor providing
|
||||
a set of informations about an object, they are
|
||||
<code class='docref'>virNodeGetInfo</code>,
|
||||
<code class='docref'>virDomainGetInfo</code>,
|
||||
<code class='docref'>virStoragePoolGetInfo</code>,
|
||||
<code class='docref'>virStorageVolGetInfo</code>.</li>
|
||||
<li><b>Accessors</b>: ...Get... and ...Set...: those are more specific
|
||||
accessors to query or modify the given object, like
|
||||
<code class='docref'>virConnectGetType</code>,
|
||||
<code class='docref'>virDomainGetMaxMemory</code>,
|
||||
<code class='docref'>virDomainSetMemory</code>,
|
||||
<code class='docref'>virDomainGetVcpus</code>,
|
||||
<code class='docref'>virStoragePoolSetAutostart</code>,
|
||||
<code class='docref'>virNetworkGetBridgeName</code>, etc.</li>
|
||||
<li><b>Creation</b>: </li>
|
||||
<li><b>Destruction</b>: ... </li>
|
||||
</ul>
|
||||
<p> For more in-depth details of the storage related APIs see
|
||||
<a href="storage.html">the storage management page</a>.
|
||||
</p>
|
||||
<h2><a name="Drivers">The libvirt Drivers</a></h2>
|
||||
<p>Drivers are the basic building block for libvirt functionality
|
||||
to support the capability to handle specific hypervisor driver calls.
|
||||
Drivers are discovered and registered during connection processing as
|
||||
part of the <code class='docref'>virInitialize</code> API. Each driver
|
||||
has a registration API which loads up the driver specific function
|
||||
references for the libvirt APIs to call. The following is a simplistic
|
||||
view of the hypervisor driver mechanism. Consider the stacked list of
|
||||
drivers as a series of modules that can be plugged into the architecture
|
||||
depending on how libvirt is configured to be built.</p>
|
||||
<h2><a name="Driver">The libvirt drivers</a></h2>
|
||||
<p></p>
|
||||
<p class="image">
|
||||
<img alt="The libvirt driver architecture"
|
||||
src="libvirt-driver-arch.png"/>
|
||||
</p>
|
||||
<p>The driver architecture is also used to support other virtualization
|
||||
components such as storage, storage pools, host device, networking,
|
||||
network interfaces, and network filters.</p>
|
||||
<p>See the <a href="drivers.html">libvirt drivers</a> page for more
|
||||
information on hypervisor and storage specific drivers.</p>
|
||||
<p>Not all drivers support every virtualization function possible.
|
||||
The <a href="hvsupport.html">libvirt API support matrix</a> lists
|
||||
the various functions and support found in each driver by the version
|
||||
support was added into libvirt.
|
||||
</p>
|
||||
<h2><a name="Remote">Daemon and Remote Access</a></h2>
|
||||
<p>Access to libvirt drivers is primarily handled by the libvirtd
|
||||
daemon through the <a href="remote.html">remote</a> driver via an
|
||||
<a href="internals/rpc.html">RPC</a>. Some hypervisors do support
|
||||
client-side connections and responses, such as Test, OpenVZ, VMware,
|
||||
Power VM (phyp), VirtualBox (vbox), ESX, Hyper-V, Xen, and Parallels.
|
||||
The libvirtd daemon service is started on the host at system boot
|
||||
time and can also be restarted at any time by a properly privileged
|
||||
user, such as root. The libvirtd daemon uses the same libvirt API
|
||||
<code class='docref'>virInitialize</code> sequence as applications
|
||||
for client-side driver registrations, but then extends the registered
|
||||
driver list to encompass all known drivers supported for all driver
|
||||
types supported on the host. </p>
|
||||
<p>The libvirt client <a href="apps.html">applications</a> use a
|
||||
<a href="uri.html">URI</a> to obtain the <code>virConnectPtr</code>.
|
||||
The <code>virConnectPtr</code> keeps track of the driver connection
|
||||
plus a variety of other connections (network, interface, storage, etc.).
|
||||
The <code>virConnectPtr</code> is then used as a parameter to other
|
||||
virtualization <a href="#Functions">functions</a>. Depending upon the
|
||||
driver being used, calls will be routed through the remote driver to
|
||||
the libvirtd daemon. The daemon will reference the connection specific
|
||||
driver in order to retreive the requested information and then pass
|
||||
back status and/or data through the connection back to the application.
|
||||
The application can then decide what to do with that data, such as
|
||||
display, write log data, etc. <a href="migration.html">Migration</a>
|
||||
is an example of many facets of the architecture in use.</p>
|
||||
|
||||
<h2><a name="Remote">Daemon and remote access</a></h2>
|
||||
<p></p>
|
||||
<p class="image">
|
||||
<img alt="The libvirt daemon and remote architecture"
|
||||
src="libvirt-daemon-arch.png"/>
|
||||
</p>
|
||||
<p>
|
||||
The key takeaway from the above diagram is that there is a remote driver
|
||||
which handles transactions for a majority of the drivers. The libvirtd
|
||||
daemon running on the host will receive transaction requests from the
|
||||
remote driver and will then query the hypervisor driver as specified in
|
||||
the <code>virConnectPtr</code> in order to fetch the data. The data will
|
||||
then be returned through the remote driver to the client application
|
||||
for processing.
|
||||
</p>
|
||||
<p>If you are interested in contributing to libvirt, read the
|
||||
<a href="http://wiki.libvirt.org/page/FAQ">FAQ</a> and
|
||||
<a href="hacking.html">hacking</a> guidelines to gain an understanding
|
||||
of basic rules and guidelines. In order to add new API functionality
|
||||
follow the instructions regarding
|
||||
<a href="api_extension.html">implementing a new API in libvirt</a>.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,4 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Implementing a new API in Libvirt</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Implementing a new API in Libvirt</h1>
|
||||
|
||||
|
139
docs/apibuild.py
@@ -10,7 +10,6 @@
|
||||
import os, sys
|
||||
import string
|
||||
import glob
|
||||
import re
|
||||
|
||||
quiet=True
|
||||
warnings=0
|
||||
@@ -24,9 +23,8 @@ included_files = {
|
||||
"libvirt.h": "header with general libvirt API definitions",
|
||||
"virterror.h": "header with error specific API definitions",
|
||||
"libvirt.c": "Main interfaces for the libvirt library",
|
||||
"virerror.c": "implements error handling and reporting code for libvirt",
|
||||
"virevent.c": "event loop for monitoring file handles",
|
||||
"virtypedparam.c": "virTypedParameters APIs",
|
||||
"virterror.c": "implements error handling and reporting code for libvirt",
|
||||
"event.c": "event loop for monitoring file handles",
|
||||
}
|
||||
|
||||
qemu_included_files = {
|
||||
@@ -34,11 +32,6 @@ qemu_included_files = {
|
||||
"libvirt-qemu.c": "Implementations for the QEMU specific APIs",
|
||||
}
|
||||
|
||||
lxc_included_files = {
|
||||
"libvirt-lxc.h": "header with LXC specific API definitions",
|
||||
"libvirt-lxc.c": "Implementations for the LXC specific APIs",
|
||||
}
|
||||
|
||||
ignored_words = {
|
||||
"ATTRIBUTE_UNUSED": (0, "macro keyword"),
|
||||
"ATTRIBUTE_SENTINEL": (0, "macro keyword"),
|
||||
@@ -50,7 +43,6 @@ ignored_words = {
|
||||
}
|
||||
|
||||
ignored_functions = {
|
||||
"virConnectSupportsFeature": "private function for remote access",
|
||||
"virDomainMigrateFinish": "private function for migration",
|
||||
"virDomainMigrateFinish2": "private function for migration",
|
||||
"virDomainMigratePerform": "private function for migration",
|
||||
@@ -63,10 +55,14 @@ ignored_functions = {
|
||||
"virDomainMigratePrepare3": "private function for migration",
|
||||
"virDomainMigrateConfirm3": "private function for migration",
|
||||
"virDomainMigratePrepareTunnel3": "private function for tunnelled migration",
|
||||
"virDrvSupportsFeature": "private function for remote access",
|
||||
"DllMain": "specific function for Win32",
|
||||
"virTypedParameterArrayValidate": "internal function in virtypedparam.c",
|
||||
"virTypedParameterAssign": "internal function in virtypedparam.c",
|
||||
"virTypedParameterAssignFromStr": "internal function in virtypedparam.c",
|
||||
"virEventAddHandle": "internal function in event.c",
|
||||
"virEventUpdateHandle": "internal function in event.c",
|
||||
"virEventRemoveHandle": "internal function in event.c",
|
||||
"virEventAddTimeout": "internal function in event.c",
|
||||
"virEventUpdateTimeout": "internal function in event.c",
|
||||
"virEventRemoveTimeout": "internal function in event.c",
|
||||
}
|
||||
|
||||
ignored_macros = {
|
||||
@@ -244,6 +240,8 @@ class index:
|
||||
self.includes[name] = d
|
||||
elif type == "struct":
|
||||
self.structs[name] = d
|
||||
elif type == "struct":
|
||||
self.structs[name] = d
|
||||
elif type == "union":
|
||||
self.unions[name] = d
|
||||
elif type == "enum":
|
||||
@@ -409,7 +407,7 @@ class CLexer:
|
||||
return self.lineno
|
||||
|
||||
def push(self, token):
|
||||
self.tokens.insert(0, token)
|
||||
self.tokens.insert(0, token);
|
||||
|
||||
def debug(self):
|
||||
print "Last token: ", self.last
|
||||
@@ -429,7 +427,7 @@ class CLexer:
|
||||
if line[0] == '#':
|
||||
self.tokens = map((lambda x: ('preproc', x)),
|
||||
string.split(line))
|
||||
break
|
||||
break;
|
||||
l = len(line)
|
||||
if line[0] == '"' or line[0] == "'":
|
||||
end = line[0]
|
||||
@@ -658,18 +656,27 @@ class CParser:
|
||||
lines = string.split(comment, "\n")
|
||||
item = None
|
||||
for line in lines:
|
||||
line = line.lstrip().lstrip('*').lstrip()
|
||||
|
||||
m = re.match('([_.a-zA-Z0-9]+):(.*)', line)
|
||||
if m:
|
||||
item = m.group(1)
|
||||
line = m.group(2).lstrip()
|
||||
|
||||
if item:
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
while line != "" and line[0] == '*':
|
||||
line = line[1:]
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
try:
|
||||
(it, line) = string.split(line, ":", 1)
|
||||
item = it
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
if res.has_key(item):
|
||||
res[item] = res[item] + " " + line
|
||||
else:
|
||||
res[item] = line
|
||||
except:
|
||||
if item != None:
|
||||
if res.has_key(item):
|
||||
res[item] = res[item] + " " + line
|
||||
else:
|
||||
res[item] = line
|
||||
self.index.info = res
|
||||
|
||||
def strip_lead_star(self, line):
|
||||
@@ -699,7 +706,7 @@ class CParser:
|
||||
if self.top_comment == "":
|
||||
self.top_comment = com
|
||||
if self.comment == None or com[0] == '*':
|
||||
self.comment = com
|
||||
self.comment = com;
|
||||
else:
|
||||
self.comment = self.comment + com
|
||||
token = self.lexer.token()
|
||||
@@ -897,7 +904,7 @@ class CParser:
|
||||
while i < nbargs:
|
||||
if args[i][1] == arg:
|
||||
args[i] = (args[i][0], arg, desc)
|
||||
break
|
||||
break;
|
||||
i = i + 1
|
||||
if i >= nbargs:
|
||||
if not quiet:
|
||||
@@ -1141,10 +1148,10 @@ class CParser:
|
||||
type = type + token[1]
|
||||
token = self.token()
|
||||
elif token != None and token[0] == 'sep' and token[1] == ';':
|
||||
break
|
||||
break;
|
||||
elif token != None and token[0] == 'name':
|
||||
type = base_type
|
||||
continue
|
||||
continue;
|
||||
else:
|
||||
self.error("parsing typedef: expecting ';'", token)
|
||||
return token
|
||||
@@ -1239,7 +1246,7 @@ class CParser:
|
||||
else:
|
||||
self.error("parseStruct: name", token)
|
||||
token = self.token()
|
||||
self.type = base_type
|
||||
self.type = base_type;
|
||||
self.struct_fields = fields
|
||||
#self.debug("end parseStruct", token)
|
||||
#print fields
|
||||
@@ -1289,7 +1296,7 @@ class CParser:
|
||||
else:
|
||||
self.error("parseUnion: name", token)
|
||||
token = self.token()
|
||||
self.type = base_type
|
||||
self.type = base_type;
|
||||
self.union_fields = fields
|
||||
# self.debug("end parseUnion", token)
|
||||
# print fields
|
||||
@@ -1633,7 +1640,7 @@ class CParser:
|
||||
self.type = self.type + token[1]
|
||||
token = self.token()
|
||||
if token == None or token[0] != "name" :
|
||||
self.error("parsing function type, name expected", token)
|
||||
self.error("parsing function type, name expected", token);
|
||||
return token
|
||||
self.type = self.type + token[1]
|
||||
nametok = token
|
||||
@@ -1643,14 +1650,14 @@ class CParser:
|
||||
token = self.token()
|
||||
if token != None and token[0] == "sep" and token[1] == '(':
|
||||
token = self.token()
|
||||
type = self.type
|
||||
token = self.parseSignature(token)
|
||||
self.type = type
|
||||
type = self.type;
|
||||
token = self.parseSignature(token);
|
||||
self.type = type;
|
||||
else:
|
||||
self.error("parsing function type, '(' expected", token)
|
||||
self.error("parsing function type, '(' expected", token);
|
||||
return token
|
||||
else:
|
||||
self.error("parsing function type, ')' expected", token)
|
||||
self.error("parsing function type, ')' expected", token);
|
||||
return token
|
||||
self.lexer.push(token)
|
||||
token = nametok
|
||||
@@ -1675,7 +1682,7 @@ class CParser:
|
||||
self.type = self.type + token[1]
|
||||
token = self.token()
|
||||
else:
|
||||
self.error("parsing array type, ']' expected", token)
|
||||
self.error("parsing array type, ']' expected", token);
|
||||
return token
|
||||
elif token != None and token[0] == "sep" and token[1] == ':':
|
||||
# remove :12 in case it's a limited int size
|
||||
@@ -1752,7 +1759,6 @@ class CParser:
|
||||
"virDomainSetMaxMemory" : (False, ("memory")),
|
||||
"virDomainSetMemory" : (False, ("memory")),
|
||||
"virDomainSetMemoryFlags" : (False, ("memory")),
|
||||
"virDomainBlockCommit" : (False, ("bandwidth")),
|
||||
"virDomainBlockJobSetSpeed" : (False, ("bandwidth")),
|
||||
"virDomainBlockPull" : (False, ("bandwidth")),
|
||||
"virDomainBlockRebase" : (False, ("bandwidth")),
|
||||
@@ -1904,7 +1910,7 @@ class CParser:
|
||||
self.index_add(self.name, self.filename, static,
|
||||
"function", d)
|
||||
token = self.token()
|
||||
token = self.parseBlock(token)
|
||||
token = self.parseBlock(token);
|
||||
elif token[1] == ',':
|
||||
self.comment = None
|
||||
self.index_add(self.name, self.filename, static,
|
||||
@@ -1948,24 +1954,12 @@ class docBuilder:
|
||||
self.includes = includes + included_files.keys()
|
||||
elif name == "libvirt-qemu":
|
||||
self.includes = includes + qemu_included_files.keys()
|
||||
elif name == "libvirt-lxc":
|
||||
self.includes = includes + lxc_included_files.keys()
|
||||
self.modules = {}
|
||||
self.headers = {}
|
||||
self.idx = index()
|
||||
self.xref = {}
|
||||
self.index = {}
|
||||
self.basename = name
|
||||
self.errors = 0
|
||||
|
||||
def warning(self, msg):
|
||||
global warnings
|
||||
warnings = warnings + 1
|
||||
print msg
|
||||
|
||||
def error(self, msg):
|
||||
self.errors += 1
|
||||
print >>sys.stderr, "Error:", msg
|
||||
|
||||
def indexString(self, id, str):
|
||||
if str == None:
|
||||
@@ -2014,7 +2008,7 @@ class docBuilder:
|
||||
for header in self.headers.keys():
|
||||
parser = CParser(header)
|
||||
idx = parser.parse()
|
||||
self.headers[header] = idx
|
||||
self.headers[header] = idx;
|
||||
self.idx.merge(idx)
|
||||
|
||||
def scanModules(self):
|
||||
@@ -2032,19 +2026,19 @@ class docBuilder:
|
||||
skip = 1
|
||||
for incl in self.includes:
|
||||
if string.find(file, incl) != -1:
|
||||
skip = 0
|
||||
skip = 0;
|
||||
break
|
||||
if skip == 0:
|
||||
self.modules[file] = None
|
||||
self.modules[file] = None;
|
||||
files = glob.glob(directory + "/*.h")
|
||||
for file in files:
|
||||
skip = 1
|
||||
for incl in self.includes:
|
||||
if string.find(file, incl) != -1:
|
||||
skip = 0
|
||||
skip = 0;
|
||||
break
|
||||
if skip == 0:
|
||||
self.headers[file] = None
|
||||
self.headers[file] = None;
|
||||
self.scanHeaders()
|
||||
self.scanModules()
|
||||
|
||||
@@ -2067,11 +2061,11 @@ class docBuilder:
|
||||
val = eval(info[0])
|
||||
except:
|
||||
val = info[0]
|
||||
output.write(" value='%s'" % (val))
|
||||
output.write(" value='%s'" % (val));
|
||||
if info[2] != None and info[2] != '':
|
||||
output.write(" type='%s'" % info[2])
|
||||
output.write(" type='%s'" % info[2]);
|
||||
if info[1] != None and info[1] != '':
|
||||
output.write(" info='%s'" % escape(info[1]))
|
||||
output.write(" info='%s'" % escape(info[1]));
|
||||
output.write("/>\n")
|
||||
|
||||
def serialize_macro(self, output, name):
|
||||
@@ -2119,7 +2113,7 @@ class docBuilder:
|
||||
if self.idx.structs.has_key(name) and ( \
|
||||
type(self.idx.structs[name].info) == type(()) or
|
||||
type(self.idx.structs[name].info) == type([])):
|
||||
output.write(">\n")
|
||||
output.write(">\n");
|
||||
try:
|
||||
for field in self.idx.structs[name].info:
|
||||
desc = field[2]
|
||||
@@ -2136,7 +2130,7 @@ class docBuilder:
|
||||
self.warning("Failed to serialize struct %s" % (name))
|
||||
output.write(" </struct>\n")
|
||||
else:
|
||||
output.write("/>\n")
|
||||
output.write("/>\n");
|
||||
else :
|
||||
output.write(" <typedef name='%s' file='%s' type='%s'" % (
|
||||
name, self.modulename_file(id.header), id.info))
|
||||
@@ -2176,7 +2170,7 @@ class docBuilder:
|
||||
if apstr != "":
|
||||
apstr = apstr + " && "
|
||||
apstr = apstr + cond
|
||||
output.write(" <cond>%s</cond>\n"% (apstr))
|
||||
output.write(" <cond>%s</cond>\n"% (apstr));
|
||||
try:
|
||||
(ret, params, desc) = id.info
|
||||
output.write(" <info><![CDATA[%s]]></info>\n" % (desc))
|
||||
@@ -2184,8 +2178,6 @@ class docBuilder:
|
||||
if ret[0] != None:
|
||||
if ret[0] == "void":
|
||||
output.write(" <return type='void'/>\n")
|
||||
elif (ret[1] == None or ret[1] == '') and not ignored_functions.has_key(name):
|
||||
self.error("Missing documentation for return of function `%s'" % name)
|
||||
else:
|
||||
output.write(" <return type='%s' info='%s'/>\n" % (
|
||||
ret[0], escape(ret[1])))
|
||||
@@ -2193,17 +2185,13 @@ class docBuilder:
|
||||
for param in params:
|
||||
if param[0] == 'void':
|
||||
continue
|
||||
if (param[2] == None or param[2] == ''):
|
||||
if ignored_functions.has_key(name):
|
||||
output.write(" <arg name='%s' type='%s' info=''/>\n" % (param[1], param[0]))
|
||||
else:
|
||||
self.error("Missing documentation for arg `%s' of function `%s'" % (param[1], name))
|
||||
if param[2] == None:
|
||||
output.write(" <arg name='%s' type='%s' info=''/>\n" % (param[1], param[0]))
|
||||
else:
|
||||
output.write(" <arg name='%s' type='%s' info='%s'/>\n" % (param[1], param[0], escape(param[2])))
|
||||
self.indexString(name, param[2])
|
||||
except:
|
||||
print >>sys.stderr, "Exception:", sys.exc_info()[1]
|
||||
self.warning("Failed to save function %s info: %s" % (name, `id.info`))
|
||||
self.warning("Failed to save function %s info: " % name, `id.info`)
|
||||
output.write(" </%s>\n" % (id.type))
|
||||
|
||||
def serialize_exports(self, output, file):
|
||||
@@ -2388,7 +2376,7 @@ class docBuilder:
|
||||
letter = id[0]
|
||||
output.write(" <letter name='%s'>\n" % (letter))
|
||||
output.write(" <word name='%s'>\n" % (id))
|
||||
tokens = index[id]
|
||||
tokens = index[id];
|
||||
tokens.sort()
|
||||
tok = None
|
||||
for token in tokens:
|
||||
@@ -2467,10 +2455,6 @@ class docBuilder:
|
||||
output.write("</api>\n")
|
||||
output.close()
|
||||
|
||||
if self.errors > 0:
|
||||
print >>sys.stderr, "apibuild.py: %d error(s) encountered during generation" % self.errors
|
||||
sys.exit(3)
|
||||
|
||||
filename = "%s/%s-refs.xml" % (self.path, self.name)
|
||||
if not quiet:
|
||||
print "Saving XML Cross References %s" % (filename)
|
||||
@@ -2483,8 +2467,8 @@ class docBuilder:
|
||||
|
||||
|
||||
def rebuild(name):
|
||||
if name not in ["libvirt", "libvirt-qemu", "libvirt-lxc"]:
|
||||
self.warning("rebuild() failed, unknown module %s") % name
|
||||
if name not in ["libvirt", "libvirt-qemu"]:
|
||||
self.warning("rebuild() failed, unkown module %s") % name
|
||||
return None
|
||||
builder = None
|
||||
srcdir = os.environ["srcdir"]
|
||||
@@ -2526,7 +2510,6 @@ if __name__ == "__main__":
|
||||
else:
|
||||
rebuild("libvirt")
|
||||
rebuild("libvirt-qemu")
|
||||
rebuild("libvirt-lxc")
|
||||
if warnings > 0:
|
||||
sys.exit(2)
|
||||
else:
|
||||
|
@@ -188,7 +188,7 @@
|
||||
A general purpose desktop management tool, able to manage
|
||||
virtual machines across both local and remotely accessed
|
||||
hypervisors. It is targeted at home and small office usage
|
||||
up to managing 10-20 hosts and their VMs.
|
||||
upto managing 10-20 hosts and their VMs.
|
||||
</dd>
|
||||
<dt><a href="http://virt-manager.org/">virt-viewer</a></dt>
|
||||
<dd>
|
||||
@@ -212,14 +212,6 @@
|
||||
modular Web Services architecture.
|
||||
</dd>
|
||||
|
||||
<dt><a href="http://www.eucalyptus.com">Eucalyptus</a></dt>
|
||||
<dd>
|
||||
Eucalyptus is an on-premise Infrastructure as a Service cloud
|
||||
software platform that is open source and
|
||||
AWS-compatible. Eucalyptus uses libivrt virtualization API to
|
||||
directly interact with Xen and KVM hypervisors.
|
||||
</dd>
|
||||
|
||||
<dt><a href="http://www.nimbusproject.org">Nimbus</a></dt>
|
||||
<dd>
|
||||
Nimbus is an open-source toolkit focused on providing
|
||||
@@ -227,14 +219,6 @@
|
||||
community. It uses libvirt for communication with all KVM and Xen
|
||||
virtual machines.
|
||||
</dd>
|
||||
|
||||
<dt><a href="http://snooze.inria.fr">Snooze</a></dt>
|
||||
<dd>
|
||||
Snooze is an open-source scalable, autonomic, and energy-efficient
|
||||
virtual machine (VM) management framework for private clouds. It
|
||||
integrates libvirt for VM monitoring, live migration, and life-cycle
|
||||
management.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a name="libraries">Libraries</a></h2>
|
||||
|
@@ -25,7 +25,7 @@ for the authentication file using the following sequence:
|
||||
variable.</li>
|
||||
<li>The file path specified by the "authfile=/some/file" URI
|
||||
query parameter</li>
|
||||
<li>The file $XDG_CONFIG_HOME/libvirt/auth.conf</li>
|
||||
<li>The file $HOME/.libvirt/auth.conf</li>
|
||||
<li>The file /etc/libvirt/auth.conf</li>
|
||||
</ol>
|
||||
|
||||
@@ -253,15 +253,13 @@ Plugin "gssapiv2" [loaded], API version: 4
|
||||
features: WANT_CLIENT_FIRST|PROXY_AUTHENTICATION|NEED_SERVER_FQDN
|
||||
</pre>
|
||||
<p>
|
||||
Next it is necessary for the administrator of the Kerberos realm to
|
||||
issue a principal for the libvirt server. There needs to be one
|
||||
principal per host running the libvirt daemon. The principal should be
|
||||
named <code>libvirt/full.hostname@KERBEROS.REALM</code>. This is
|
||||
typically done by running the <code>kadmin.local</code> command on the
|
||||
Kerberos server, though some Kerberos servers have alternate ways of
|
||||
setting up service principals. Once created, the principal should be
|
||||
exported to a keytab, copied to the host running the libvirt daemon
|
||||
and placed in <code>/etc/libvirt/krb5.tab</code>
|
||||
Next it is necessary for the administrator of the Kerberos realm to issue a principle
|
||||
for the libvirt server. There needs to be one principle per host running the libvirt
|
||||
daemon. The principle should be named <code>libvirt/full.hostname@KERBEROS.REALM</code>.
|
||||
This is typically done by running the <code>kadmin.local</code> command on the Kerberos
|
||||
server, though some Kerberos servers have alternate ways of setting up service principles.
|
||||
Once created, the principle should be exported to a keytab, copied to the host running
|
||||
the libvirt daemon and placed in <code>/etc/libvirt/krb5.tab</code>
|
||||
</p>
|
||||
<pre>
|
||||
# kadmin.local
|
||||
@@ -283,7 +281,7 @@ kadmin.local: quit
|
||||
</pre>
|
||||
<p>
|
||||
Any client application wishing to connect to a Kerberos enabled libvirt server
|
||||
merely needs to run <code>kinit</code> to gain a user principal. This may well
|
||||
merely needs to run <code>kinit</code> to gain a user principle. This may well
|
||||
be done automatically when a user logs into a desktop session, if PAM is setup
|
||||
to authenticate against Kerberos.
|
||||
</p>
|
||||
|
@@ -126,7 +126,7 @@
|
||||
<p>
|
||||
It may also happen that the libvirt daemon itself crashes or gets stuck,
|
||||
in the first case run it (as root) under gdb, and reproduce the sequence
|
||||
leading to the crash, similarly to a normal program provide the
|
||||
leading to the crash, similary to a normal program provide the
|
||||
"bt" backtrace information to where gdb will have stopped.<br/>
|
||||
But if libvirtd gets stuck, for example seems to stop processing
|
||||
commands, try to attach to the faulty daemon and issue a gdb command
|
||||
|
@@ -1,285 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<h1>Control Groups Resource Management</h1>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<p>
|
||||
The QEMU and LXC drivers make use of the Linux "Control Groups" facility
|
||||
for applying resource management to their virtual machines and containers.
|
||||
</p>
|
||||
|
||||
<h2><a name="requiredControllers">Required controllers</a></h2>
|
||||
|
||||
<p>
|
||||
The control groups filesystem supports multiple "controllers". By default
|
||||
the init system (such as systemd) should mount all controllers compiled
|
||||
into the kernel at <code>/sys/fs/cgroup/$CONTROLLER-NAME</code>. Libvirt
|
||||
will never attempt to mount any controllers itself, merely detect where
|
||||
they are mounted.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The QEMU driver is capable of using the <code>cpuset</code>,
|
||||
<code>cpu</code>, <code>memory</code>, <code>blkio</code> and
|
||||
<code>devices</code> controllers. None of them are compulsory.
|
||||
If any controller is not mounted, the resource management APIs
|
||||
which use it will cease to operate. It is possible to explicitly
|
||||
turn off use of a controller, even when mounted, via the
|
||||
<code>/etc/libvirt/qemu.conf</code> configuration file.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The LXC driver is capable of using the <code>cpuset</code>,
|
||||
<code>cpu</code>, <code>cpuset</code>, <code>freezer</code>,
|
||||
<code>memory</code>, <code>blkio</code> and <code>devices</code>
|
||||
controllers. The <code>cpuset</code>, <code>devices</code>
|
||||
and <code>memory</code> controllers are compulsory. Without
|
||||
them mounted, no containers can be started. If any of the
|
||||
other controllers are not mounted, the resource management APIs
|
||||
which use them will cease to operate.
|
||||
</p>
|
||||
|
||||
<h2><a name="currentLayout">Current cgroups layout</a></h2>
|
||||
|
||||
<p>
|
||||
As of libvirt 1.0.5 or later, the cgroups layout created by libvirt has been
|
||||
simplified, in order to facilitate the setup of resource control policies by
|
||||
administrators / management applications. The layout is based on the concepts of
|
||||
"partitions" and "consumers". Each virtual machine or container is a consumer,
|
||||
and has a corresponding cgroup named <code>$VMNAME.libvirt-{qemu,lxc}</code>.
|
||||
Each consumer is associated with exactly one partition, which also have a
|
||||
corresponding cgroup usually named <code>$PARTNAME.partition</code>. The
|
||||
exceptions to this naming rule are the three top level default partitions,
|
||||
named <code>/system</code> (for system services), <code>/user</code> (for
|
||||
user login sessions) and <code>/machine</code> (for virtual machines and
|
||||
containers). By default every consumer will of course be associated with
|
||||
the <code>/machine</code> partition. This leads to a hierarchy that looks
|
||||
like
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ROOT
|
||||
|
|
||||
+- system
|
||||
| |
|
||||
| +- libvirtd.service
|
||||
|
|
||||
+- machine
|
||||
|
|
||||
+- vm1.libvirt-qemu
|
||||
| |
|
||||
| +- emulator
|
||||
| +- vcpu0
|
||||
| +- vcpu1
|
||||
|
|
||||
+- vm2.libvirt-qemu
|
||||
| |
|
||||
| +- emulator
|
||||
| +- vcpu0
|
||||
| +- vcpu1
|
||||
|
|
||||
+- vm3.libvirt-qemu
|
||||
| |
|
||||
| +- emulator
|
||||
| +- vcpu0
|
||||
| +- vcpu1
|
||||
|
|
||||
+- container1.libvirt-lxc
|
||||
|
|
||||
+- container2.libvirt-lxc
|
||||
|
|
||||
+- container3.libvirt-lxc
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The default cgroups layout ensures that, when there is contention for
|
||||
CPU time, it is shared equally between system services, user sessions
|
||||
and virtual machines / containers. This prevents virtual machines from
|
||||
locking the administrator out of the host, or impacting execution of
|
||||
system services. Conversely, when there is no contention from
|
||||
system services / user sessions, it is possible for virtual machines
|
||||
to fully utilize the host CPUs.
|
||||
</p>
|
||||
|
||||
<h2><a name="customPartiton">Using custom partitions</a></h2>
|
||||
|
||||
<p>
|
||||
If there is a need to apply resource constraints to groups of
|
||||
virtual machines or containers, then the single default
|
||||
partition <code>/machine</code> may not be sufficiently
|
||||
flexible. The administrator may wish to sub-divide the
|
||||
default partition, for example into "testing" and "production"
|
||||
partitions, and then assign each guest to a specific
|
||||
sub-partition. This is achieved via a small element addition
|
||||
to the guest domain XML config, just below the main <code>domain</code>
|
||||
element
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<resource>
|
||||
<partition>/machine/production</partition>
|
||||
</resource>
|
||||
...
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Libvirt will not auto-create the cgroups directory to back
|
||||
this partition. In the future, libvirt / virsh will provide
|
||||
APIs / commands to create custom partitions, but currently
|
||||
this is left as an exercise for the administrator. For
|
||||
example, given the XML config above, the admin would need
|
||||
to create a cgroup named '/machine/production.partition'
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# cd /sys/fs/cgroup
|
||||
# for i in blkio cpu,cpuacct cpuset devices freezer memory net_cls perf_event
|
||||
do
|
||||
mkdir $i/machine/production.partition
|
||||
done
|
||||
# for i in cpuset.cpus cpuset.mems
|
||||
do
|
||||
cat cpuset/machine/$i > cpuset/machine/production.partition/$i
|
||||
done
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
<strong>Note:</strong> the cgroups directory created as a ".partition"
|
||||
suffix, but the XML config does not require this suffix.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Note:</strong> the ability to place guests in custom
|
||||
partitions is only available with libvirt >= 1.0.5, using
|
||||
the new cgroup layout. The legacy cgroups layout described
|
||||
later did not support customization per guest.
|
||||
</p>
|
||||
|
||||
<h2><a name="resourceAPIs">Resource management APIs/commands</a></h2>
|
||||
|
||||
<p>
|
||||
Since libvirt aims to provide an API which is portable across
|
||||
hypervisors, the concept of cgroups is not exposed directly
|
||||
in the API or XML configuration. It is considered to be an
|
||||
internal implementation detail. Instead libvirt provides a
|
||||
set of APIs for applying resource controls, which are then
|
||||
mapped to corresponding cgroup tunables
|
||||
</p>
|
||||
|
||||
<h3>Scheduler tuning</h3>
|
||||
|
||||
<p>
|
||||
Parameters from the "cpu" controller are exposed via the
|
||||
<code>schedinfo</code> command in virsh.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh schedinfo demo
|
||||
Scheduler : posix
|
||||
cpu_shares : 1024
|
||||
vcpu_period : 100000
|
||||
vcpu_quota : -1
|
||||
emulator_period: 100000
|
||||
emulator_quota : -1</pre>
|
||||
|
||||
|
||||
<h3>Block I/O tuning</h3>
|
||||
|
||||
<p>
|
||||
Parameters from the "blkio" controller are exposed via the
|
||||
<code>bkliotune</code> command in virsh.
|
||||
</p>
|
||||
|
||||
|
||||
<pre>
|
||||
# virsh blkiotune demo
|
||||
weight : 500
|
||||
device_weight : </pre>
|
||||
|
||||
<h3>Memory tuning</h3>
|
||||
|
||||
<p>
|
||||
Parameters from the "memory" controller are exposed via the
|
||||
<code>memtune</code> command in virsh.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
# virsh memtune demo
|
||||
hard_limit : 580192
|
||||
soft_limit : unlimited
|
||||
swap_hard_limit: unlimited
|
||||
</pre>
|
||||
|
||||
<h3>Network tuning</h3>
|
||||
|
||||
<p>
|
||||
The <code>net_cls</code> is not currently used. Instead traffic
|
||||
filter policies are set directly against individual virtual
|
||||
network interfaces.
|
||||
</p>
|
||||
|
||||
<h2><a name="legacyLayout">Legacy cgroups layout</a></h2>
|
||||
|
||||
<p>
|
||||
Prior to libvirt 1.0.5, the cgroups layout created by libvirt was different
|
||||
from that described above, and did not allow for administrator customization.
|
||||
Libvirt used a fixed, 3-level hierarchy <code>libvirt/{qemu,lxc}/$VMNAME</code>
|
||||
which was rooted at the point in the hierarchy where libvirtd itself was
|
||||
located. So if libvirtd was placed at <code>/system/libvirtd.service</code>
|
||||
by systemd, the groups for each virtual machine / container would be located
|
||||
at <code>/system/libvirtd.service/libvirt/{qemu,lxc}/$VMNAME</code>. In addition
|
||||
to this, the QEMU drivers further child groups for each vCPU thread and the
|
||||
emulator thread(s). This leads to a hierarchy that looked like
|
||||
</p>
|
||||
|
||||
|
||||
<pre>
|
||||
$ROOT
|
||||
|
|
||||
+- system
|
||||
|
|
||||
+- libvirtd.service
|
||||
|
|
||||
+- libvirt
|
||||
|
|
||||
+- qemu
|
||||
| |
|
||||
| +- vm1
|
||||
| | |
|
||||
| | +- emulator
|
||||
| | +- vcpu0
|
||||
| | +- vcpu1
|
||||
| |
|
||||
| +- vm2
|
||||
| | |
|
||||
| | +- emulator
|
||||
| | +- vcpu0
|
||||
| | +- vcpu1
|
||||
| |
|
||||
| +- vm3
|
||||
| |
|
||||
| +- emulator
|
||||
| +- vcpu0
|
||||
| +- vcpu1
|
||||
|
|
||||
+- lxc
|
||||
|
|
||||
+- container1
|
||||
|
|
||||
+- container2
|
||||
|
|
||||
+- container3
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Although current releases are much improved, historically the use of deep
|
||||
hierarchies has had a significant negative impact on the kernel scalability.
|
||||
The legacy libvirt cgroups layout highlighted these problems, to the detriment
|
||||
of the performance of virtual machines and containers.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
@@ -64,36 +64,8 @@
|
||||
checkout it is necessary to generate the configure script and Makefile.in
|
||||
templates using the <code>autogen.sh</code> command. By default when
|
||||
the <code>configure</code> script is run from within a GIT checkout, it
|
||||
will turn on -Werror for builds. This can be disabled with
|
||||
--disable-werror, but this is not recommended.
|
||||
</p>
|
||||
<p>
|
||||
Libvirt takes advantage of
|
||||
the <a href="http://www.gnu.org/software/gnulib/">gnulib</a>
|
||||
project to provide portability to a number of platforms. This
|
||||
is normally done dynamically via a git submodule in
|
||||
the <code>.gnulib</code> subdirectory, which is auto-updated as
|
||||
needed when you do incremental builds. Setting the environment
|
||||
variable <code>GNULIB_SRCDIR</code> to a local directory
|
||||
containing a git checkout of gnulib will let you reduce local
|
||||
disk space requirements and network download time, regardless of
|
||||
which actual commit you have in that reference directory.
|
||||
</p>
|
||||
<p>
|
||||
However, if you are developing on a platform where git is not
|
||||
available, or are behind a firewall that does not allow for git
|
||||
to easily obtain the gnulib submodule, it is possible to instead
|
||||
use a static mode of operation where you are then responsible
|
||||
for updating the git submodule yourself. In this mode, you must
|
||||
track the exact gnulib commit needed by libvirt (usually not the
|
||||
latest gnulib.git) via alternative means, such as a shared NFS
|
||||
drive or manual download, and run this any time libvirt.git
|
||||
updates the commit stored in the .gnulib submodule:</p>
|
||||
<pre>
|
||||
$ GNULIB_SRCDIR=/path/to/gnulib ./autogen.sh --no-git
|
||||
</pre>
|
||||
|
||||
<p>To build & install libvirt to your home
|
||||
will turn on -Werror for builds. This can be disabled with --disable-werror,
|
||||
but this is not recommended. To build & install libvirt to your home
|
||||
directory the following commands can be run:
|
||||
</p>
|
||||
|
||||
@@ -129,11 +101,18 @@
|
||||
|
||||
<p>
|
||||
It is also possible to run virsh directly from the source tree
|
||||
using the ./run script (which sets some environment variables):
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ ./run ./tools/virsh ....
|
||||
$ ./tools/virsh ....
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
A normal configuration of libvirt will build hypervisor drivers
|
||||
as loadable modules. When running from a non-installed source
|
||||
tree, libvirtd will attempt to find the modules from the same
|
||||
source tree. If this is not possible though, you can explicitly
|
||||
set <code>LIBVIRT_DRIVER_DIR=/path/to/source/tree/src/.libs</code>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -29,11 +29,9 @@
|
||||
<li><strong><a href="drvvmware.html">VMware Workstation/Player</a></strong></li>
|
||||
<li><strong><a href="drvxen.html">Xen</a></strong></li>
|
||||
<li><strong><a href="drvhyperv.html">Microsoft Hyper-V</a></strong></li>
|
||||
<li><strong><a href="drvphyp.html">IBM PowerVM (phyp)</a></strong></li>
|
||||
<li><strong><a href="drvparallels.html">Parallels</a></strong></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="storage">Storage drivers</a></h2>
|
||||
<h2><a name="stroage">Storage drivers</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><strong><a href="storage.html#StorageBackendDir">Directory backend</a></strong></li>
|
||||
@@ -44,8 +42,6 @@
|
||||
<li><strong><a href="storage.html#StorageBackendISCSI">iSCSI backend</a></strong></li>
|
||||
<li><strong><a href="storage.html#StorageBackendSCSI">SCSI backend</a></strong></li>
|
||||
<li><strong><a href="storage.html#StorageBackendMultipath">Multipath backend</a></strong></li>
|
||||
<li><strong><a href="storage.html#StorageBackendRBD">RBD (RADOS Block Device) backend</a></strong></li>
|
||||
<li><strong><a href="storage.html#StorageBackendSheepdog">Sheepdog backend</a></strong></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -2,10 +2,10 @@
|
||||
<h1>VMware ESX hypervisor driver</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
The libvirt VMware ESX driver can manage VMware ESX/ESXi 3.5/4.x/5.x and
|
||||
The libvirt VMware ESX driver can manage VMware ESX/ESXi 3.5/4.x and
|
||||
VMware GSX 2.0, also called VMware Server 2.0, and possibly later
|
||||
versions. <span class="since">Since 0.8.3</span> the driver can also
|
||||
connect to a VMware vCenter 2.5/4.x/5.x (VPX).
|
||||
connect to a VMware vCenter 2.5/4.x (VPX).
|
||||
</p>
|
||||
|
||||
<h2><a name="project">Project Links</a></h2>
|
||||
|
@@ -1,67 +0,0 @@
|
||||
<html><body>
|
||||
<h1>Parallels Cloud Server driver</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
The libvirt Parallels driver can manage Parallels Cloud Server starting from version 6.0.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="project">Project Links</a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
The <a href="http://www.parallels.com/products/server/baremetal/sp/">Parallels Cloud Server</a> Virtualization Solution.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a name="uri">Connections to the Parallels Cloud Server driver</a></h2>
|
||||
<p>
|
||||
The libvirt Parallels driver is a single-instance privileged driver, with a driver name of 'parallels'. Some example connection URIs for the libvirt driver are:
|
||||
</p>
|
||||
<pre>
|
||||
parallels:///system (local access)
|
||||
parallels+unix:///system (local access)
|
||||
parallels://example.com/system (remote access, TLS/x509)
|
||||
parallels+tcp://example.com/system (remote access, SASl/Kerberos)
|
||||
parallels+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2><a name="example">Example guest domain XML configuration</a></h2>
|
||||
|
||||
<p>
|
||||
Parallels driver require at least one hard disk for new domains
|
||||
at this time. It is used for defining directory, where VM should
|
||||
be created.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<domain type='parallels'>
|
||||
<name>demo</name>
|
||||
<uuid>54cdecad-4492-4e31-a209-33cc21d64057</uuid>
|
||||
<description>some description</description>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<vcpu placement='static'>2</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64'>hvm</type>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>destroy</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/storage/vol1'/>
|
||||
<target dev='hda'/>
|
||||
</disk>
|
||||
<video>
|
||||
<model type='vga' vram='33554432' heads='1'>
|
||||
<acceleration accel3d='no' accel2d='no'/>
|
||||
</model>
|
||||
</video>
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
</pre>
|
||||
|
||||
</body></html>
|
@@ -1,47 +0,0 @@
|
||||
<html><body>
|
||||
<h1>IBM PowerVM hypervisor driver (phyp)</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
The IBM PowerVM driver can manage both HMC and IVM PowerVM
|
||||
guests. VIOS connections are tunneled through HMC.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="project">Project Links</a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
The <a href="http://www-03.ibm.com/systems/power/software/virtualization/index.html">IBM
|
||||
PowerVM</a> hypervisor
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a name="uri">Connections to the PowerVM driver</a></h2>
|
||||
<p>
|
||||
Some example remote connection URIs for the driver are:
|
||||
</p>
|
||||
<pre>
|
||||
phyp://user@hmc/system (HMC connection)
|
||||
phyp://user@ivm/system (IVM connection)
|
||||
</pre>
|
||||
<p>
|
||||
<strong>Note</strong>: In contrast to other drivers, the
|
||||
PowerVM (or phyp) driver is a client-side-only driver,
|
||||
internally using ssh to connect to the specified hmc or ivm
|
||||
server. Therefore, the <a href="remote.html">remote transport
|
||||
mechanism</a> provided by the remote driver and libvirtd will
|
||||
not work, and you cannot use URIs like
|
||||
<code>phyp+ssh://example.com</code>.
|
||||
</p>
|
||||
|
||||
|
||||
<h3><a name="uriformat">URI Format</a></h3>
|
||||
<p>
|
||||
URIs have this general form (<code>[...]</code> marks an
|
||||
optional part, <code>{...|...}</code> marks a mandatory choice).
|
||||
</p>
|
||||
<pre>
|
||||
phyp://[username@]{hmc|ivm}/managed_system
|
||||
</pre>
|
||||
|
||||
</body></html>
|
@@ -54,7 +54,7 @@
|
||||
The libvirt QEMU driver is a multi-instance driver, providing a single
|
||||
system wide privileged driver (the "system" instance), and per-user
|
||||
unprivileged drivers (the "session" instance). The URI driver protocol
|
||||
is "qemu". Some example connection URIs for the libvirt driver are:
|
||||
is "qemu". Some example conection URIs for the libvirt driver are:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -476,7 +476,7 @@ $ virsh domxml-from-native qemu-argv demo.args
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
<p>NB, don't include the literal \ in the args, put everything on one line</p>
|
||||
<p>NB, don't include the literral \ in the args, put everything on one line</p>
|
||||
|
||||
<h3><a name="xmlexport">Converting from domain XML to QEMU args</a></h3>
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
The libvirt Test driver is a per-process fake hypervisor driver,
|
||||
with a driver name of 'test'. The driver maintains all its state
|
||||
in memory. It can start with a pre-configured default config, or
|
||||
be given a path to an alternate config. Some example connection URIs
|
||||
be given a path to a alternate config. Some example conection URIs
|
||||
for the libvirt driver are:
|
||||
</p>
|
||||
|
||||
|
@@ -53,21 +53,13 @@
|
||||
the <code>/etc/xen</code> directory. It is important not to place
|
||||
any other non-config files in this directory.
|
||||
</li>
|
||||
<li>
|
||||
<strong>libxl</strong>: Starting with Xen 4.2, the legacy XenD/xm
|
||||
toolstack is deprecated in favor of libxl, also commonly called
|
||||
libxenlight. libvirt supports this new Xen toolstack via the
|
||||
libxl driver. If XenD is enabled, the legacy xen driver consisting
|
||||
of the above mentioned channels will be used. If XenD is disabled,
|
||||
the libxl driver will be used.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="uri">Connections to Xen driver</a></h2>
|
||||
|
||||
<p>
|
||||
The libvirt Xen driver is a single-instance privileged driver,
|
||||
with a driver name of 'xen'. Some example connection URIs for
|
||||
with a driver name of 'xen'. Some example conection URIs for
|
||||
the libvirt driver are:
|
||||
</p>
|
||||
|
||||
|
@@ -198,7 +198,7 @@ using an XML format. At a high level the format looks like this:
|
||||
</p>
|
||||
<p>The <code><rule></code> element is where all the interesting stuff
|
||||
happens. It has three attributes, an action, a traffic direction and an
|
||||
optional priority. E.g.:
|
||||
optional priority. eg:
|
||||
</p>
|
||||
<pre><rule action='drop' direction='out' priority='500'></pre>
|
||||
<p>Within the rule there are a wide variety of elements allowed, which
|
||||
@@ -317,7 +317,7 @@ Bridge chain: PREROUTING, entries: 1, policy: ACCEPT
|
||||
|
||||
Bridge chain: POSTROUTING, entries: 1, policy: ACCEPT
|
||||
-o vnet0 -j libvirt-O-vnet0</pre>
|
||||
<p>To keep things manageable and easy to follow, the driver will then
|
||||
<p>To keep things managable and easy to follow, the driver will then
|
||||
create further sub-chains for each protocol then it needs to match
|
||||
against:
|
||||
</p>
|
||||
|
@@ -15,14 +15,8 @@
|
||||
|
||||
<p>
|
||||
The root element required for all virtual networks is
|
||||
named <code>network</code> and has no configurable attributes
|
||||
(although <span class="since">since 0.10.0</span> there is one
|
||||
optional read-only attribute - when examining the live
|
||||
configuration of a network, the
|
||||
attribute <code>connections</code>, if present, specifies the
|
||||
number of guest interfaces currently connected via this
|
||||
network). The network XML format is
|
||||
available <span class="since">since 0.3.0</span>
|
||||
named <code>network</code> and has no attributes.
|
||||
The network XML format is available <span class="since">since 0.3.0</span>
|
||||
</p>
|
||||
|
||||
<h3><a name="elementsMetadata">General metadata</a></h3>
|
||||
@@ -33,7 +27,7 @@
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network ipv6='yes'>
|
||||
<network>
|
||||
<name>default</name>
|
||||
<uuid>3e3fce45-4f53-4fa7-bb32-11f34168b82b</uuid>
|
||||
...</pre>
|
||||
@@ -52,12 +46,6 @@
|
||||
The format must be RFC 4122 compliant, eg <code>3e3fce45-4f53-4fa7-bb32-11f34168b82b</code>.
|
||||
If omitted when defining/creating a new network, a random
|
||||
UUID is generated. <span class="since">Since 0.3.0</span></dd>
|
||||
<dt><code>ipv6='yes'</code></dt>
|
||||
<dd>The new, optional parameter <code>ipv6='yes'</code> enables
|
||||
a network definition with no IPv6 gateway addresses specified
|
||||
to have guest-to-guest communications. For further information,
|
||||
see the example below for the example with no gateway addresses.
|
||||
<span class="since">Since 1.0.1</span></dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsConnect">Connectivity</a></h3>
|
||||
@@ -136,39 +124,6 @@
|
||||
network, and to/from the host to the guests, are
|
||||
unrestricted and not NATed.<span class="since">Since
|
||||
0.4.2</span>
|
||||
|
||||
<p><span class="since">Since 1.0.3</span> it is possible to
|
||||
specify a public IPv4 address and port range to be used for
|
||||
the NAT by using the <code><nat></code> subelement.
|
||||
The address range is set with the <code><address></code>
|
||||
subelements and <code>start</code> and <code>stop</code>
|
||||
attributes:
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<forward mode='nat'>
|
||||
<nat>
|
||||
<address start='1.2.3.4' end='1.2.3.10'/>
|
||||
</nat>
|
||||
</forward>
|
||||
...</pre>
|
||||
<p>
|
||||
An singe IPv4 address can be set by setting
|
||||
<code>start</code> and <code>end</code> attributes to
|
||||
the same value.
|
||||
</p>
|
||||
<p>
|
||||
The port range to be used for the <code><nat></code> can
|
||||
be set via the subelement <code><port></code>:
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<forward mode='nat'>
|
||||
<nat>
|
||||
<port start='500' end='1000'/>
|
||||
</nat>
|
||||
</forward>
|
||||
...</pre>
|
||||
</dd>
|
||||
|
||||
<dt><code>route</code></dt>
|
||||
@@ -192,17 +147,10 @@
|
||||
This network describes either 1) an existing host bridge
|
||||
that was configured outside of libvirt (if
|
||||
a <code><bridge name='xyz'/></code> element has been
|
||||
specified, <span class="since">Since 0.9.4</span>), 2) an
|
||||
existing Open vSwitch bridge that was configured outside of
|
||||
libvirt (if both a <code><bridge name='xyz'/></code>
|
||||
element <b>and</b> a <code><virtualport
|
||||
type='openvswitch'/></code> have been
|
||||
specified <span class="since">Since 0.10.0</span>) 3) an
|
||||
interface or group of interfaces to be used for a "direct"
|
||||
connection via macvtap using macvtap's "bridge" mode (if
|
||||
the forward element has one or
|
||||
more <code><interface></code>
|
||||
subelements, <span class="since">Since 0.9.4</span>)
|
||||
specified), or 2) an interface or group of interfaces to
|
||||
be used for a "direct" connection via macvtap using
|
||||
macvtap's "bridge" mode (if the forward element has one or
|
||||
more <code><interface></code> subelements)
|
||||
(see <a href="formatdomain.html#elementsNICSDirect">Direct
|
||||
attachment to physical interface</a> for descriptions of
|
||||
the various macvtap modes). libvirt doesn't attempt to
|
||||
@@ -262,56 +210,6 @@
|
||||
(usually either a domain start, or a hotplug interface
|
||||
attach to a domain).<span class="since">Since 0.9.4</span>
|
||||
</dd>
|
||||
<dt><code>hostdev</code></dt>
|
||||
<dd>
|
||||
This network facilitates PCI Passthrough of a network
|
||||
device. A network device is chosen from the interface
|
||||
pool and directly assigned to the guest using generic
|
||||
device passthrough, after first optionally setting the
|
||||
device's MAC address and vlan tag to the configured value,
|
||||
and optionally associating the device with an 802.1Qbh
|
||||
capable switch using a <code><virtualport></code>
|
||||
element. Note that - due to limitations in standard
|
||||
single-port PCI ethernet card driver design - only SR-IOV
|
||||
(Single Root I/O Virtualization) virtual function (VF)
|
||||
devices can be assigned in this manner; to assign a
|
||||
standard single-port PCI or PCIe ethernet card to a guest,
|
||||
use the traditional <code>< hostdev></code> device
|
||||
definition. <span class="since"> Since 0.10.0</span>
|
||||
|
||||
<p>
|
||||
To use VFIO device assignment rather than
|
||||
traditional/legacy KVM device assignment (VFIO is a new
|
||||
method of device assignment that is compatible with UEFI
|
||||
Secure Boot), a <forward type='hostdev'> interface
|
||||
can have an optional <code>driver</code> sub-element
|
||||
with a <code>name</code> attribute set to "vfio". To use
|
||||
legacy KVM device assignment you can
|
||||
set <code>name</code> to "kvm" (or simply omit the
|
||||
<driver> element, since "kvm" is currently the
|
||||
default).
|
||||
<span class="since">Since 1.0.5 (QEMU and KVM only, requires kernel 3.6 or newer)</span>
|
||||
</p>
|
||||
|
||||
<p>Note that this "intelligent passthrough" of network
|
||||
devices is very similar to the functionality of a
|
||||
standard <code>< hostdev></code> device, the
|
||||
difference being that this method allows specifying a MAC
|
||||
address, vlan tag, and <code><virtualport ></code>
|
||||
for the passed-through device. If these capabilities are
|
||||
not required, if you have a standard single-port PCI,
|
||||
PCIe, or USB network card that doesn't support SR-IOV (and
|
||||
hence would anyway lose the configured MAC address during
|
||||
reset after being assigned to the guest domain), or if you
|
||||
are using a version of libvirt older than 0.10.0, you
|
||||
should use a standard
|
||||
<code><hostdev></code> device definition in the
|
||||
domain's configuration to assign the device to the guest
|
||||
instead of defining an <code><interface
|
||||
type='network'></code> pointing to a network
|
||||
with <code><forward mode='hostdev'/></code>.
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
As mentioned above, a <code><forward></code> element can
|
||||
have multiple <code><interface></code> subelements, each
|
||||
@@ -328,22 +226,12 @@
|
||||
</forward>
|
||||
...
|
||||
</pre>
|
||||
<p>
|
||||
<span class="since">since 0.10.0</span>,
|
||||
<code><interface></code> also has an optional read-only
|
||||
attribute - when examining the live configuration of a
|
||||
network, the attribute <code>connections</code>, if present,
|
||||
specifies the number of guest interfaces currently connected
|
||||
via this physical interface.
|
||||
</p>
|
||||
<p>
|
||||
Additionally, <span class="since">since 0.9.10</span>, libvirt
|
||||
allows a shorthand for specifying all virtual interfaces
|
||||
associated with a single physical function, by using
|
||||
the <code><pf></code> subelement to call out the
|
||||
corresponding physical interface associated with multiple
|
||||
virtual interfaces:
|
||||
</p>
|
||||
Additionally, <span class="since">since 0.9.10</span>, libvirt
|
||||
allows a shorthand for specifying all virtual interfaces
|
||||
associated with a single physical function, by using
|
||||
the <code><pf></code> subelement to call out the
|
||||
corresponding physical interface associated with multiple
|
||||
virtual interfaces:
|
||||
<pre>
|
||||
...
|
||||
<forward mode='passthrough'>
|
||||
@@ -361,40 +249,6 @@
|
||||
particular, 'passthrough' mode, and 'private' mode when using
|
||||
802.1Qbh), libvirt will choose an unused physical interface
|
||||
or, if it can't find an unused interface, fail the operation.</p>
|
||||
|
||||
<p>
|
||||
<span class="since">since 0.10.0</span> When using forward
|
||||
mode 'hostdev', the interface pool is specified with a list
|
||||
of <code><address></code> elements, each of which has
|
||||
<code>< type></code> (must always be <code>'pci'</code>,
|
||||
<code><domain></code>, <code><bus></code>,
|
||||
<code><slot></code>, and <code><function></code>
|
||||
attributes.
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<forward mode='hostdev' managed='yes'>
|
||||
<driver name='vfio'/>
|
||||
<address type='pci' domain='0' bus='4' slot='0' function='1'/>
|
||||
<address type='pci' domain='0' bus='4' slot='0' function='2'/>
|
||||
<address type='pci' domain='0' bus='4' slot='0' function='3'/>
|
||||
</forward>
|
||||
...
|
||||
</pre>
|
||||
|
||||
Alternatively the interface pool can also be defined using a
|
||||
single physical function <code><pf></code> subelement to
|
||||
call out the corresponding physical interface associated with
|
||||
multiple virtual interfaces (similar to passthrough mode):
|
||||
|
||||
<pre>
|
||||
...
|
||||
<forward mode='hostdev' managed='yes'>
|
||||
<pf dev='eth0'/>
|
||||
</forward>
|
||||
...
|
||||
</pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h5><a name="elementQoS">Quality of service</a></h5>
|
||||
@@ -429,56 +283,6 @@
|
||||
<span class="since">Since 0.9.4</span>
|
||||
</p>
|
||||
|
||||
<h5><a name="elementVlanTag">Setting VLAN tag (on supported network types only)</a></h5>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<devices>
|
||||
<interface type='bridge'>
|
||||
<b><vlan trunk='yes'></b>
|
||||
<b><tag id='42'/></b>
|
||||
<b><tag id='47'/></b>
|
||||
<b></vlan></b>
|
||||
<source bridge='ovsbr0'/>
|
||||
<virtualport type='openvswitch'>
|
||||
<parameters interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
|
||||
</virtualport>
|
||||
</interface>
|
||||
<devices>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
If (and only if) the network type supports vlan tagging
|
||||
transparent to the guest, an optional <code><vlan></code>
|
||||
element can specify one or more vlan tags to apply to the
|
||||
traffic of all guests using this
|
||||
network <span class="since">Since 0.10.0</span>. (openvswitch
|
||||
and type='hostdev' SR-IOV networks do support transparent vlan
|
||||
tagging of guest traffic; everything else, including standard
|
||||
linux bridges and libvirt's own virtual networks, <b>do not</b>
|
||||
support it. 802.1Qbh (vn-link) and 802.1Qbg (VEPA) switches
|
||||
provide their own way (outside of libvirt) to tag guest traffic
|
||||
onto specific vlans.) As expected, the <code>tag</code>
|
||||
attribute specifies which vlan tag to use. If a network has more
|
||||
than one <code><vlan></code> element defined, it is
|
||||
assumed that the user wants to do VLAN trunking using all the
|
||||
specified tags. In the case that vlan trunking with a single tag
|
||||
is desired, the optional attribute <code>trunk='yes'</code> can
|
||||
be added to the vlan element.
|
||||
</p>
|
||||
<p>
|
||||
<code><vlan></code> elements can also be specified in
|
||||
a <code><portgroup></code> element, as well as directly in
|
||||
a domain's <code><interface></code> element. In the case
|
||||
that a vlan tag is specified in multiple locations, the setting
|
||||
in <code><interface></code> takes precedence, followed by
|
||||
the setting in the <code><portgroup></code> selected by
|
||||
the interface config. The <code><vlan></code>
|
||||
in <code><network></code> will be selected only if none is
|
||||
given in <code><portgroup></code>
|
||||
or <code><interface></code>.
|
||||
</p>
|
||||
|
||||
<h5><a name="elementsPortgroup">Portgroups</a></h5>
|
||||
|
||||
<pre>
|
||||
@@ -533,15 +337,9 @@
|
||||
default portgroup will be used. If no portgroup is given in the
|
||||
interface definition, and there is no default portgroup, then
|
||||
none will be used. Any <code><bandwidth></code>
|
||||
|
||||
specified directly in the domain XML will take precedence over
|
||||
any setting in the chosen portgroup. if
|
||||
a <code><virtualport></code> is specified in the portgroup
|
||||
(and/or directly in the network definition), the multiple
|
||||
virtualports will be merged, and any parameter that is specified
|
||||
in more than one virtualport, and is not identical, will be
|
||||
considered an error, and will prevent the interface from
|
||||
starting.
|
||||
or <code><virtualport></code> specified directly in the
|
||||
domain XML will take precedence over any setting in the chosen
|
||||
portgroup.
|
||||
</p>
|
||||
|
||||
<h3><a name="elementsAddress">Addressing</a></h3>
|
||||
@@ -631,10 +429,8 @@
|
||||
dotted-decimal format, or an IPv6 address in standard
|
||||
colon-separated hexadecimal format, that will be configured on
|
||||
the bridge
|
||||
device associated with the virtual network. To the guests this IPv4
|
||||
address will be their IPv4 default route. For IPv6, the default route is
|
||||
established via Router Advertisement.
|
||||
For IPv4 addresses, the <code>netmask</code>
|
||||
device associated with the virtual network. To the guests this
|
||||
address will be their default route. For IPv4 addresses, the <code>netmask</code>
|
||||
attribute defines the significant bits of the network address,
|
||||
again specified in dotted-decimal format. For IPv6 addresses,
|
||||
and as an alternate method for IPv4 addresses, you can specify
|
||||
@@ -643,13 +439,10 @@
|
||||
could also be given as <code>prefix='24'</code>. The <code>family</code>
|
||||
attribute is used to specify the type of address - 'ipv4' or 'ipv6'; if no
|
||||
<code>family</code> is given, 'ipv4' is assumed. A network can have more than
|
||||
one of each family of address defined, but only a single IPv4 address can have a
|
||||
<code>dhcp</code> or <code>tftp</code> element. <span class="since">Since 0.3.0 </span>
|
||||
one of each family of address defined, but only a single address can have a
|
||||
<code>dhcp</code> or <code>tftp</code> element. <span class="since">Since 0.3.0;
|
||||
IPv6, multiple addresses on a single network, <code>family</code>, and
|
||||
<code>prefix</code> are support <span class="since">Since 0.8.7</span>.
|
||||
Similar to IPv4, one IPv6 address per network can also have
|
||||
a <code>dhcp</code> definition. <span class="since">Since 1.0.1</span>
|
||||
|
||||
<code>prefix</code> since 0.8.7</span>
|
||||
<dl>
|
||||
<dt><code>tftp</code></dt>
|
||||
<dd>Immediately within
|
||||
@@ -667,44 +460,30 @@
|
||||
optional <code>dhcp</code> element. The presence of this element
|
||||
enables DHCP services on the virtual network. It will further
|
||||
contain one or more <code>range</code> elements. The
|
||||
<code>dhcp</code> element supported for both
|
||||
IPv4 <span class="since">Since 0.3.0</span>
|
||||
and IPv6 <span class="since">Since 1.0.1</span>, but
|
||||
only for one IP address of each type per network.
|
||||
<code>dhcp</code> element is not supported for IPv6, and
|
||||
is only supported on a single IP address per network for IPv4.
|
||||
<span class="since">Since 0.3.0</span>
|
||||
<dl>
|
||||
<dt><code>range</code></dt>
|
||||
<dd>The <code>start</code> and <code>end</code> attributes on the
|
||||
<code>range</code> element specify the boundaries of a pool of
|
||||
addresses to be provided to DHCP clients. These two addresses
|
||||
IPv4 addresses to be provided to DHCP clients. These two addresses
|
||||
must lie within the scope of the network defined on the parent
|
||||
<code>ip</code> element. There may be zero or more
|
||||
<code>range</code> elements specified.
|
||||
<span class="since">Since 0.3.0</span>
|
||||
<code>range</code> can be specified for one IPv4 address,
|
||||
one IPv6 address, or both. <span class="since">Since 1.0.1</span>
|
||||
<code>ip</code> element. <span class="since">Since 0.3.0</span>
|
||||
</dd>
|
||||
<dt><code>host</code></dt>
|
||||
<dd>Within the <code>dhcp</code> element there may be zero or more
|
||||
<code>host</code> elements. These specify hosts which will be given
|
||||
<code>host</code> elements; these specify hosts which will be given
|
||||
names and predefined IP addresses by the built-in DHCP server. Any
|
||||
IPv4 <code>host</code> element must specify the MAC address of the host to be assigned
|
||||
such element must specify the MAC address of the host to be assigned
|
||||
a given name (via the <code>mac</code> attribute), the IP to be
|
||||
assigned to that host (via the <code>ip</code> attribute), and the
|
||||
name to be given that host by the DHCP server (via the
|
||||
<code>name</code> attribute). <span class="since">Since 0.4.5</span>
|
||||
An IPv6 <code>host</code> element differs slightly from that for IPv4:
|
||||
there is no <code>mac</code> attribute since a MAC address has no
|
||||
defined meaning in IPv6. Instead, the <code>name</code> attribute is
|
||||
used to identify the host to be assigned the IPv6 address. For DHCPv6,
|
||||
the name is the plain name of the client host sent by the
|
||||
client to the server. Note that this method of assigning a
|
||||
specific IP address can also be used instead of the <code>mac</code>
|
||||
attribute for IPv4. <span class="since">Since 1.0.1</span>
|
||||
</dd>
|
||||
<dt><code>bootp</code></dt>
|
||||
<dd>The optional <code>bootp</code>
|
||||
element specifies BOOTP options to be provided by the DHCP
|
||||
server for IPv4 only.
|
||||
element specifies BOOTP options to be provided by the DHCP server.
|
||||
Two attributes are supported: <code>file</code> is mandatory and
|
||||
gives the file to be used for the boot image; <code>server</code> is
|
||||
optional and gives the address of the TFTP server from which the boot
|
||||
@@ -747,29 +526,6 @@
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" />
|
||||
</network></pre>
|
||||
|
||||
|
||||
<p>
|
||||
Below is a variation of the above example which adds an IPv6
|
||||
dhcp range definition.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<name>default6</name>
|
||||
<bridge name="virbr0" />
|
||||
<forward mode="nat"/>
|
||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="192.168.122.2" end="192.168.122.254" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" >
|
||||
<dhcp>
|
||||
<range start="2001:db8:ca2:2:1::10" end="2001:db8:ca2:2:1::ff" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesRoute">Routed network config</a></h3>
|
||||
|
||||
<p>
|
||||
@@ -794,36 +550,6 @@
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" />
|
||||
</network></pre>
|
||||
|
||||
<p>
|
||||
Below is another IPv6 variation. Instead of a dhcp range being
|
||||
specified, this example has a couple of IPv6 host definitions.
|
||||
Note that most of the dhcp host definitions use an "id" (client
|
||||
id or DUID) since this has proven to be a more reliable way
|
||||
of specifying the interface and its association with an IPv6
|
||||
address. The first is a DUID-LLT, the second a DUID-LL, and
|
||||
the third a DUID-UUID. <span class="since">Since 1.0.3</span>
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<name>local6</name>
|
||||
<bridge name="virbr1" />
|
||||
<forward mode="route" dev="eth1"/>
|
||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="192.168.122.2" end="192.168.122.254" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" >
|
||||
<dhcp>
|
||||
<host name="paul" ip="2001:db8:ca2:2:3::1" />
|
||||
<host id="0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66" ip="2001:db8:ca2:2:3::2" />
|
||||
<host id="0:3:0:1:0:16:3e:11:22:33" name="ralph" ip="2001:db8:ca2:2:3::3" />
|
||||
<host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="badbob" ip="2001:db8:ca2:2:3::4" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesPrivate">Isolated network config</a></h3>
|
||||
|
||||
<p>
|
||||
@@ -846,31 +572,6 @@
|
||||
<ip family="ipv6" address="2001:db8:ca2:3::1" prefix="64" />
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesPrivate6">Isolated IPv6 network config</a></h3>
|
||||
|
||||
<p>
|
||||
This variation of an isolated network defines only IPv6.
|
||||
Note that most of the dhcp host definitions use an "id" (client
|
||||
id or DUID) since this has proven to be a more reliable way
|
||||
of specifying the interface and its association with an IPv6
|
||||
address. The first is a DUID-LLT, the second a DUID-LL, and
|
||||
the third a DUID-UUID. <span class="since">Since 1.0.3</span>
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<name>sixnet</name>
|
||||
<bridge name="virbr6" />
|
||||
<ip family="ipv6" address="2001:db8:ca2:6::1" prefix="64" >
|
||||
<dhcp>
|
||||
<host name="peter" ip="2001:db8:ca2:6:6::1" />
|
||||
<host id="0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66" ip="2001:db8:ca2:6:6::2" />
|
||||
<host id="0:3:0:1:0:16:3e:11:22:33" name="dariusz" ip="2001:db8:ca2:6:6::3" />
|
||||
<host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="anita" ip="2001:db8:ca2:6:6::4" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesBridge">Using an existing host bridge</a></h3>
|
||||
|
||||
<p>
|
||||
@@ -924,25 +625,5 @@
|
||||
</forward>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesNoGateway">Network config with no gateway addresses</a></h3>
|
||||
|
||||
<p>
|
||||
A valid network definition can contain no IPv4 or IPv6 addresses. Such a definition
|
||||
can be used for a "very private" or "very isolated" network since it will not be
|
||||
possible to communicate with the virtualization host via this network. However,
|
||||
this virtual network interface can be used for communication between virtual guest
|
||||
systems. This works for IPv4 and <span class="since">(Since 1.0.1)</span> IPv6.
|
||||
However, the new ipv6='yes' must be added for guest-to-guest IPv6
|
||||
communication.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network ipv6='yes'>
|
||||
<name>nogw</name>
|
||||
<uuid>7a3b7497-1ec7-8aef-6d5c-38dff9109e93</uuid>
|
||||
<bridge name="virbr2" stp="on" delay="0" />
|
||||
<mac address='00:16:3E:5D:C7:9E'/>
|
||||
</network></pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -136,18 +136,14 @@
|
||||
<dd>The SCSI host number.</dd>
|
||||
<dt><code>capability</code></dt>
|
||||
<dd>Current capabilities include "vports_ops" (indicates
|
||||
vport operations are supported) and "fc_host". "vport_ops"
|
||||
could contain two optional sub-elements: <code>vports</code>,
|
||||
and <code>max_vports</code>. <code>vports</code> shows the
|
||||
number of vport in use. <code>max_vports</code> shows the
|
||||
maximum vports the HBA supports. "fc_host" implies following
|
||||
sub-elements: <code>wwnn</code>, <code>wwpn</code>, and
|
||||
<code>fabric_wwn</code>.
|
||||
vport operations are supported) and "fc_host", the later
|
||||
implies following sub-elements: <code>wwnn</code>,
|
||||
<code>wwpn</code>, <code>fabric_wwn</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><code>scsi</code></dt>
|
||||
<dd>Describes a SCSI device. Sub-elements include:
|
||||
<dd>Desribes a SCSI device. Sub-elements include:
|
||||
<dl>
|
||||
<dt><code>host</code></dt>
|
||||
<dd>The SCSI host containing the device.</dd>
|
||||
@@ -188,7 +184,7 @@
|
||||
available.</dd>
|
||||
<dt><code>capability</code></dt>
|
||||
<dd>If present, an additional capability is listed via
|
||||
the attribute <code>type</code>. Current capabilities
|
||||
the attribute <code>type</code>. Current capabilites
|
||||
include "hotpluggable" and "removable", with the
|
||||
latter implying the following
|
||||
sub-elements: <code>media_available</code> (0 or
|
||||
|
@@ -371,118 +371,6 @@
|
||||
Further, the notation of $VARIABLE is short-hand for $VARIABLE[@0]. The
|
||||
former notation always assumes the iterator with Id '0'.
|
||||
<p>
|
||||
|
||||
<h3><a name="nwfelemsRulesAdvIPAddrDetection">Automatic IP address detection</a></h3>
|
||||
<p>
|
||||
The detection of IP addresses used on a virtual machine's interface
|
||||
is automatically activated if the variable <code>IP</code> is referenced
|
||||
but no value has been assigned to it.
|
||||
<span class="since">Since 0.9.13</span>
|
||||
the variable <code>CTRL_IP_LEARNING</code> can be used to specify
|
||||
the IP address learning method to use. Valid values are <code>any</code>,
|
||||
<code>dhcp</code>, or <code>none</code>.
|
||||
<br/><br/>
|
||||
The value <code>any</code> means that libvirt may use any packet to
|
||||
determine the address in use by a virtual machine, which is the default
|
||||
behavior if the variable <code>CTRL_IP_LEARNING</code> is not set. This method
|
||||
will only detect a single IP address on an interface.
|
||||
Once a VM's IP address has been detected, its IP network traffic
|
||||
will be locked to that address, if for example IP address spoofing
|
||||
is prevented by one of its filters. In that case the user of the VM
|
||||
will not be able to change the IP address on the interface inside
|
||||
the VM, which would be considered IP address spoofing.
|
||||
When a VM is migrated to another host or resumed after a suspend operation,
|
||||
the first packet sent by the VM will again determine the IP address it can
|
||||
use on a particular interface.
|
||||
<br/><br>
|
||||
A value of <code>dhcp</code> specifies that libvirt should only honor DHCP
|
||||
server-assigned addresses with valid leases. This method supports the detection
|
||||
and usage of multiple IP address per interface.
|
||||
When a VM is resumed after a suspend operation, still valid IP address leases
|
||||
are applied to its filters. Otherwise the VM is expected to again use DHCP to obtain new
|
||||
IP addresses. The migration of a VM to another physical host requires that
|
||||
the VM again runs the DHCP protocol.
|
||||
<br/><br/>
|
||||
Use of <code>CTRL_IP_LEARNING=dhcp</code> (DHCP snooping) provides additional
|
||||
anti-spoofing security, especially when combined with a filter allowing
|
||||
only trusted DHCP servers to assign addresses. To enable this, set the
|
||||
variable <code>DHCPSERVER</code> to the IP address of a valid DHCP server
|
||||
and provide filters that use this variable to filter incoming DHCP responses.
|
||||
<br/><br/>
|
||||
When DHCP snooping is enabled and the DHCP lease expires,
|
||||
the VM will no longer be able to use the IP address until it acquires a
|
||||
new, valid lease from a DHCP server. If the VM is migrated, it must get
|
||||
a new valid DHCP lease to use an IP address (e.g., by
|
||||
bringing the VM interface down and up again).
|
||||
<br/><br/>
|
||||
Note that automatic DHCP detection listens to the DHCP traffic
|
||||
the VM exchanges with the DHCP server of the infrastructure. To avoid
|
||||
denial-of-service attacks on libvirt, the evaluation of those packets
|
||||
is rate-limited, meaning that a VM sending an excessive number of DHCP
|
||||
packets per second on an interface will not have all of those packets
|
||||
evaluated and thus filters may not get adapted. Normal DHCP client
|
||||
behavior is assumed to send a low number of DHCP packets per second.
|
||||
Further, it is important to setup appropriate filters on all VMs in
|
||||
the infrastructure to avoid them being able to send DHCP
|
||||
packets. Therefore VMs must either be prevented from sending UDP and TCP
|
||||
traffic from port 67 to port 68 or the <code>DHCPSERVER</code>
|
||||
variable should be used on all VMs to restrict DHCP server messages to
|
||||
only be allowed to originate from trusted DHCP servers. At the same
|
||||
time anti-spoofing prevention must be enabled on all VMs in the subnet.
|
||||
<br/><br/>
|
||||
If <code>CTRL_IP_LEARNING</code> is set to <code>none</code>, libvirt does not do
|
||||
IP address learning and referencing <code>IP</code> without assigning it an
|
||||
explicit value is an error.
|
||||
<br/><br/>
|
||||
The following XML provides an example for the activation of IP address learning
|
||||
using the DHCP snooping method:
|
||||
</p>
|
||||
<pre>
|
||||
<interface type='bridge'>
|
||||
<source bridge='virbr0'/>
|
||||
<filterref filter='clean-traffic'>
|
||||
<parameter name='CTRL_IP_LEARNING' value='dhcp'/>
|
||||
</filterref>
|
||||
</interface>
|
||||
</pre>
|
||||
|
||||
<h3><a name="nwfelemsReservedVars">Reserved Variables</a></h3>
|
||||
<p>
|
||||
The following table lists reserved variables in use by libvirt.
|
||||
</p>
|
||||
<table class="top_table">
|
||||
<tr>
|
||||
<th> Variable Name </th>
|
||||
<th> Semantics </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> MAC </td>
|
||||
<td> The MAC address of the interface </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> IP </td>
|
||||
<td> The list of IP addresses in use by an interface </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> IPV6 </td>
|
||||
<td> Not currently implemented:
|
||||
the list of IPV6 addresses in use by an interface </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> DHCPSERVER </td>
|
||||
<td> The list of IP addresses of trusted DHCP servers</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> DHCPSERVERV6 </td>
|
||||
<td> Not currently implemented:
|
||||
The list of IPv6 addresses of trusted DHCP servers</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> CTRL_IP_LEARNING </td>
|
||||
<td> The choice of the IP address detection mode </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a name="nwfelems">Element and attribute overview</a></h2>
|
||||
|
||||
<p>
|
||||
@@ -605,7 +493,7 @@
|
||||
</ul>
|
||||
<p>
|
||||
The above example indicates that the traffic of type <code>ip</code>
|
||||
will be associated with the chain 'ipv4' and the rule will have
|
||||
will be asscociated with the chain 'ipv4' and the rule will have
|
||||
priority 500. If for example another filter is referenced whose
|
||||
traffic of type <code>ip</code> is also associated with the chain
|
||||
'ipv4' then that filter's rules will be ordered relative to the priority
|
||||
@@ -632,7 +520,7 @@
|
||||
<ul>
|
||||
<li>UINT8 : 8 bit integer; range 0-255</li>
|
||||
<li>UINT16: 16 bit integer; range 0-65535</li>
|
||||
<li>MAC_ADDR: MAC address in dotted decimal format, i.e., 00:11:22:33:44:55</li>
|
||||
<li>MAC_ADDR: MAC adrress in dotted decimal format, i.e., 00:11:22:33:44:55</li>
|
||||
<li>MAC_MASK: MAC address mask in MAC address format, i.e., FF:FF:FF:FC:00:00</li>
|
||||
<li>IP_ADDR: IP address in dotted decimal format, i.e., 10.1.2.3</li>
|
||||
<li>IP_MASK: IP address mask in either dotted decimal format (255.255.248.0) or CIDR mask (0-32)</li>
|
||||
@@ -640,11 +528,6 @@
|
||||
<li>IPV6_MASK: IPv6 mask in numbers format (FFFF:FFFF:FC00::) or CIDR mask (0-128)</li>
|
||||
<li>STRING: A string</li>
|
||||
<li>BOOLEAN: 'true', 'yes', '1' or 'false', 'no', '0'</li>
|
||||
<li>IPSETFLAGS: The source and destination flags of the ipset described
|
||||
by up to 6 'src' or 'dst' elements selecting features from either
|
||||
the source or destination part of the packet header; example:
|
||||
src,src,dst. The number of 'selectors' to provide here depends
|
||||
on the type of ipset that is referenced.</li>
|
||||
</ul>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@@ -810,7 +693,7 @@
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>UINT8</td>
|
||||
<td>Bridge Protocol Data Unit (BPDU) type</td>
|
||||
<td>Bridge Protcol Data Unit (BPDU) type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>flags</td>
|
||||
@@ -1286,16 +1169,6 @@
|
||||
<td>STRING</td>
|
||||
<td>TCP-only: format of mask/flags with mask and flags each being a comma separated list of SYN,ACK,URG,PSH,FIN,RST or NONE or ALL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@@ -1396,16 +1269,6 @@
|
||||
<td>STRING</td>
|
||||
<td>comma separated list of NEW,ESTABLISHED,RELATED,INVALID or NONE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@@ -1495,16 +1358,6 @@
|
||||
<td>STRING</td>
|
||||
<td>comma separated list of NEW,ESTABLISHED,RELATED,INVALID or NONE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@@ -1606,16 +1459,6 @@
|
||||
<td>STRING</td>
|
||||
<td>TCP-only: format of mask/flags with mask and flags each being a comma separated list of SYN,ACK,URG,PSH,FIN,RST or NONE or ALL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@@ -1702,16 +1545,6 @@
|
||||
<td>STRING</td>
|
||||
<td>comma separated list of NEW,ESTABLISHED,RELATED,INVALID or NONE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@@ -1786,16 +1619,6 @@
|
||||
<td>STRING</td>
|
||||
<td>comma separated list of NEW,ESTABLISHED,RELATED,INVALID or NONE</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipset <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>STRING</td>
|
||||
<td>The name of an IPSet managed outside of libvirt</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ipsetflags <span class="since">(Since 0.9.13)</span></td>
|
||||
<td>IPSETFLAGS</td>
|
||||
<td>flags for the IPSet; requires ipset attribute</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<br/><br/>
|
||||
@@ -1806,7 +1629,6 @@
|
||||
The following sections discuss advanced filter configuration
|
||||
topics.
|
||||
</p>
|
||||
|
||||
<h4><a name="nwfelemsRulesAdvTracking">Connection tracking</a></h4>
|
||||
<p>
|
||||
The network filtering subsystem (on Linux) makes use of the connection
|
||||
@@ -1911,7 +1733,7 @@
|
||||
unresponsive due to its traffic being dropped.
|
||||
Therefore, the limit of connections should be rather high so that
|
||||
fluctuations in new TCP connections don't cause odd
|
||||
traffic behavior in relation to idle connections.
|
||||
traffic behavior in relaton to idle connections.
|
||||
</p>
|
||||
|
||||
<h2><a name="nwfcli">Command line tools</a></h2>
|
||||
@@ -2053,7 +1875,7 @@
|
||||
tree that instantiates iptables or ip6tables rules, a rule to let
|
||||
the UDP packet pass will also be necessary to be provided for those
|
||||
filtering layers. This can be
|
||||
achieved with a rule containing an appropriate <code>udp</code> or
|
||||
achieved with a rule containing an approriate <code>udp</code> or
|
||||
<code>udp-ipv6</code> traffic filtering node.
|
||||
</p>
|
||||
|
||||
@@ -2253,7 +2075,7 @@
|
||||
</pre>
|
||||
<p>
|
||||
Before trying out a filter using the <code>RELATED</code> state,
|
||||
you have to make sure that the appropriate connection tracking module
|
||||
you have to make sure that the approriate connection tracking module
|
||||
has been loaded into the host's kernel. Depending on the version of the
|
||||
kernel, you must run either one of the following two commands before
|
||||
the ftp connection with the VM is established.
|
||||
@@ -2339,6 +2161,36 @@
|
||||
filtering subsystem.
|
||||
</p>
|
||||
|
||||
<h3><a name="nwflimitsIP">IP Address Detection</a></h3>
|
||||
<p>
|
||||
In case a network filter references the variable
|
||||
<i>IP</i> and no variable was defined in any higher layer
|
||||
references to the filter, IP address detection will automatically
|
||||
be started when the filter is to be instantiated (VM start, interface
|
||||
hotplug event). Only IPv4
|
||||
addresses can be detected and only a single IP address
|
||||
legitimately in use by a VM on a single interface will be detected.
|
||||
In case a VM was to use multiple IP address on a single interface
|
||||
(IP aliasing),
|
||||
the IP addresses would have to be provided explicitly either
|
||||
in the network filter itself or as variables used in attributes'
|
||||
values. These
|
||||
variables must then be defined in a higher level reference to the filter
|
||||
and each assigned the value of the IP address that the VM is expected
|
||||
to be using.
|
||||
Different IP addresses in use by multiple interfaces of a VM
|
||||
(one IP address each) will be independently detected.
|
||||
<br/><br/>
|
||||
Once a VM's IP address has been detected, its IP network traffic
|
||||
may be locked to that address, if for example IP address spoofing
|
||||
is prevented by one of its filters. In that case the user of the VM
|
||||
will not be able to change the IP address on the interface inside
|
||||
the VM, which would be considered IP address spoofing.
|
||||
<br/><br/>
|
||||
In case a VM is resumed after suspension or migrated, IP address
|
||||
detection will be restarted.
|
||||
</p>
|
||||
|
||||
<h3><a name="nwflimitsmigr">VM Migration</a></h3>
|
||||
<p>
|
||||
VM migration is only supported if the whole filter tree
|
||||
|
@@ -66,18 +66,6 @@
|
||||
device</a>. <span class="since">Since 0.9.7</span>.
|
||||
</p>
|
||||
|
||||
<h3>Usage type "iscsi"</h3>
|
||||
|
||||
<p>
|
||||
This secret is associated with an iSCSI target for CHAP authentication.
|
||||
The <code><usage type='iscsi'></code> element must contain
|
||||
a single <code>target</code> element that specifies a usage name
|
||||
for the secret. The iSCSI secret can then be used by UUID or by
|
||||
this usage name via the <code><auth></code> element of
|
||||
a <a href="domain.html#elementsDisks">disk
|
||||
device</a>. <span class="since">Since 1.0.4</span>.
|
||||
</p>
|
||||
|
||||
<h2><a name="example">Example</a></h2>
|
||||
|
||||
<pre>
|
||||
|
@@ -24,7 +24,7 @@
|
||||
since the snapshot in a single file) and external (the
|
||||
snapshot is one file, and the changes since the snapshot are
|
||||
in another file).</dd>
|
||||
<dt>memory state (or VM state)</dt>
|
||||
<dt>VM state</dt>
|
||||
<dd>Tracks only the state of RAM and all other resources in use
|
||||
by the VM. If the disks are unmodified between the time a VM
|
||||
state snapshot is taken and restored, then the guest will
|
||||
@@ -33,7 +33,7 @@
|
||||
corruption.</dd>
|
||||
<dt>system checkpoint</dt>
|
||||
<dd>A combination of disk snapshots for all disks as well as VM
|
||||
memory state, which can be used to resume the guest from where it
|
||||
state, which can be used to resume the guest from where it
|
||||
left off with symptoms similar to hibernation (that is, TCP
|
||||
connections in the guest may have timed out, but no files or
|
||||
processes are lost).</dd>
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<p>
|
||||
Libvirt can manage all three types of snapshots. For now, VM
|
||||
state (memory) snapshots are created only by
|
||||
state snapshots are created only by
|
||||
the <code>virDomainSave()</code>, <code>virDomainSaveFlags</code>,
|
||||
and <code>virDomainManagedSave()</code> functions, and restored
|
||||
via the <code>virDomainRestore()</code>,
|
||||
@@ -106,17 +106,6 @@
|
||||
description is omitted when initially creating the snapshot,
|
||||
then this field will be empty.
|
||||
</dd>
|
||||
<dt><code>memory</code></dt>
|
||||
<dd>On input, this is an optional request for how to handle VM
|
||||
memory state. For an offline domain or a disk-only snapshot,
|
||||
attribute <code>snapshot</code> must be <code>no</code>, since
|
||||
there is no VM state saved; otherwise, the attribute can
|
||||
be <code>internal</code> if the memory state is piggy-backed with
|
||||
other internal disk state, or <code>external</code> along with
|
||||
a second attribute <code>file</code> giving the absolute path
|
||||
of the file holding the VM memory state. <span class="since">Since
|
||||
1.0.1</span>
|
||||
</dd>
|
||||
<dt><code>disks</code></dt>
|
||||
<dd>On input, this is an optional listing of specific
|
||||
instructions for disk snapshots; it is needed when making a
|
||||
@@ -146,9 +135,8 @@
|
||||
the <a href="formatdomain.html#elementsDisks">disk
|
||||
devices</a> specified for the domain at the time of the
|
||||
snapshot. The attribute <code>snapshot</code> is
|
||||
optional, and the possible values are the same as the
|
||||
<code>snapshot</code> attribute for
|
||||
<a href="formatdomain.html#elementsDisks">disk devices</a>
|
||||
optional, and has the same values of the disk device
|
||||
element for a domain
|
||||
(<code>no</code>, <code>internal</code>,
|
||||
or <code>external</code>). Some hypervisors like ESX
|
||||
require that if specified, the snapshot mode must not
|
||||
@@ -184,7 +172,7 @@
|
||||
to <code>virDomainRevertToSnapshot()</code>. Additionally,
|
||||
this field can be the value "disk-snapshot"
|
||||
(<span class="since">since 0.9.5</span>) when it represents
|
||||
only a disk snapshot (no VM memory state), and reverting to this
|
||||
only a disk snapshot (no VM state), and reverting to this
|
||||
snapshot will default to an inactive guest. Readonly.
|
||||
</dd>
|
||||
<dt><code>parent</code></dt>
|
||||
@@ -234,7 +222,6 @@
|
||||
<parent>
|
||||
<name>bare-os-install</name>
|
||||
</parent>
|
||||
<memory snapshot='no'/>
|
||||
<disks>
|
||||
<disk name='vda' snapshot='external'>
|
||||
<driver type='qcow2'/>
|
||||
|
@@ -75,14 +75,6 @@
|
||||
</source>
|
||||
...</pre>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<source>
|
||||
<source>
|
||||
<adapter type='fc_host' parent='scsi_host5' wwnn='20000000c9831b4b' wwpn='10000000c9831b4b'/>
|
||||
</source>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>device</code></dt>
|
||||
<dd>Provides the source for pools backed by physical devices.
|
||||
@@ -92,27 +84,12 @@
|
||||
<dt><code>directory</code></dt>
|
||||
<dd>Provides the source for pools backed by directories. May
|
||||
only occur once. Contains a single attribute <code>path</code>
|
||||
which is the fully qualified path to the backing directory.
|
||||
which is the fully qualified path to the block device node.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>adapter</code></dt>
|
||||
<dd>Provides the source for pools backed by SCSI adapters. May
|
||||
only occur once. Attribute <code>name</code> is the SCSI adapter
|
||||
name (ex. "scsi_host1". NB, although a name such as "host1" is
|
||||
still supported for backwards compatibility, it is not recommended).
|
||||
Attribute <code>type</code> (<span class="since">1.0.5</span>)
|
||||
specifies the adapter type. Valid values are "fc_host" and "scsi_host".
|
||||
If omitted and the <code>name</code> attribute is specified, then it
|
||||
defaults to "scsi_host". To keep backwards compatibility, the attribute
|
||||
<code>type</code> is optional for the "scsi_host" adapter, but
|
||||
mandatory for the "fc_host" adapter. Attributes <code>wwnn</code>
|
||||
(Word Wide Node Name) and <code>wwpn</code> (Word Wide Port Name)
|
||||
(<span class="since">1.0.4</span>) are used by the "fc_host" adapter
|
||||
to uniquely identify the device in the Fibre Channel storage fabric
|
||||
(the device can be either a HBA or vHBA). Both wwnn and wwpn should
|
||||
be specified (See command 'virsh nodedev-dumpxml' to known how to get
|
||||
wwnn/wwpn of a (v)HBA). The optional attribute <code>parent</code>
|
||||
(<span class="since">1.0.4</span>) specifies the parent device for
|
||||
the "fc_host" adapter.
|
||||
only occur once. Contains a single attribute <code>name</code>
|
||||
which is the SCSI adapter name (ex. "host1").
|
||||
<span class="since">Since 0.6.2</span></dd>
|
||||
<dt><code>host</code></dt>
|
||||
<dd>Provides the source for pools backed by storage from a
|
||||
@@ -124,7 +101,7 @@
|
||||
<dt><code>name</code></dt>
|
||||
<dd>Provides the source for pools backed by storage from a
|
||||
named element (e.g., a logical volume group name).
|
||||
Contains a string identifier.
|
||||
remote server. Contains a string identifier.
|
||||
<span class="since">Since 0.4.5</span></dd>
|
||||
<dt><code>format</code></dt>
|
||||
<dd>Provides information about the format of the pool. This
|
||||
@@ -164,11 +141,6 @@
|
||||
<mode>0744</mode>
|
||||
<label>virt_image_t</label>
|
||||
</permissions>
|
||||
<timestamps>
|
||||
<atime>1341933637.273190990</atime>
|
||||
<mtime>1341930622.047245868</mtime>
|
||||
<ctime>1341930622.047245868</ctime>
|
||||
</timestamps>
|
||||
<encryption type='...'>
|
||||
...
|
||||
</encryption>
|
||||
@@ -200,19 +172,6 @@
|
||||
contains the MAC (eg SELinux) label string.
|
||||
<span class="since">Since 0.4.1</span>
|
||||
</dd>
|
||||
<dt><code>timestamps</code></dt>
|
||||
<dd>Provides timing information about the volume. Up to four
|
||||
sub-elements are present,
|
||||
where <code>atime</code>, <code>btime</code>, <code>ctime</code>
|
||||
and <code>mtime</code> hold the access, birth, change and
|
||||
modification time of the volume, where known. The used time
|
||||
format is <seconds>.<nanoseconds> since the
|
||||
beginning of the epoch (1 Jan 1970). If nanosecond resolution
|
||||
is 0 or otherwise unsupported by the host OS or filesystem,
|
||||
then the nanoseconds part is omitted. This is a readonly
|
||||
attribute and is ignored when creating a volume.
|
||||
<span class="since">Since 0.10.0</span>
|
||||
</dd>
|
||||
<dt><code>encryption</code></dt>
|
||||
<dd>If present, specifies how the volume is encrypted. See
|
||||
the <a href="formatstorageencryption.html">Storage Encryption</a> page
|
||||
@@ -273,11 +232,7 @@
|
||||
allocated at time of creation. If set to a value smaller than the
|
||||
capacity, the pool has the <strong>option</strong> of deciding
|
||||
to sparsely allocate a volume. It does not have to honour requests
|
||||
for sparse allocation though. Different types of pools may treat
|
||||
sparse volumes differently. For example, the <code>logical</code>
|
||||
pool will not automatically expand volume's allocation when it
|
||||
gets full; the user is responsible for doing that or configuring
|
||||
dmeventd to do so automatically.<br/>
|
||||
for sparse allocation though.<br/>
|
||||
<br/>
|
||||
By default this is specified in bytes, but an optional attribute
|
||||
<code>unit</code> can be specified to adjust the passed value.
|
||||
|
@@ -4,7 +4,7 @@ body {
|
||||
padding: 0px;
|
||||
color: rgb(0,0,0);
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: smaller;
|
||||
font-size: 80%;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,8 @@ h6 {
|
||||
dl dt {
|
||||
margin-left: 1em;
|
||||
margin-right: 2em;
|
||||
font-weight: bold;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
dl dd {
|
||||
|
@@ -9,12 +9,8 @@
|
||||
<li>Discuss any large changes on the mailing list first. Post patches
|
||||
early and listen to feedback.</li>
|
||||
|
||||
<li><p>Post patches in unified diff format, with git rename
|
||||
detection enabled. You need a one-time setup of:</p>
|
||||
<pre>
|
||||
git config diff.renames true
|
||||
</pre>
|
||||
<p>After that, a command similar to this should work:</p>
|
||||
<li><p>Post patches in unified diff format. A command similar to this
|
||||
should work:</p>
|
||||
<pre>
|
||||
diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
|
||||
</pre>
|
||||
@@ -22,86 +18,18 @@
|
||||
or:
|
||||
</p>
|
||||
<pre>
|
||||
git diff > libvirt-myfeature.patch
|
||||
git diff > libvirt-myfeature.patch
|
||||
</pre>
|
||||
<p>Also, for code motion patches, you may find that <code>git
|
||||
diff --patience</code> provides an easier-to-read patch.
|
||||
However, the usual workflow of libvirt developer is:</p>
|
||||
<pre>
|
||||
git checkout master
|
||||
git pull
|
||||
git checkout -t origin -b workbranch
|
||||
Hack, committing any changes along the way
|
||||
</pre>
|
||||
<p>More hints on compiling can be
|
||||
found <a href="compiling.html">here</a>. When you want to
|
||||
post your patches:</p>
|
||||
<pre>
|
||||
git pull --rebase
|
||||
(fix any conflicts)
|
||||
git send-email --cover-letter --no-chain-reply-to --annotate \
|
||||
--to=libvir-list@redhat.com master
|
||||
</pre>
|
||||
<p>(Note that the "git send-email" subcommand may not be in
|
||||
the main git package and using it may require installion of a
|
||||
separate package, for example the "git-email" package in
|
||||
Fedora.) For a single patch you can omit
|
||||
<code>--cover-letter</code>, but a series of two or more
|
||||
patches needs a cover letter. If you get tired of typing
|
||||
<code>--to=libvir-list@redhat.com</code> designation you can
|
||||
set it in git config:</p>
|
||||
<pre>
|
||||
git config sendemail.to libvir-list@redhat.com
|
||||
</pre>
|
||||
<p>Please follow this as close as you can, especially the rebase and
|
||||
git send-email part, as it makes life easier for other developers to
|
||||
review your patch set. One should avoid sending patches as attachments,
|
||||
but rather send them in email body along with commit message. If a
|
||||
developer is sending another version of the patch (e.g. to address
|
||||
review comments), he is advised to note differences to previous
|
||||
versions after the <code>---</code> line in the patch so that it helps
|
||||
reviewers but doesn't become part of git history. Moreover, such patch
|
||||
needs to be prefixed correctly with
|
||||
<code>--subject-prefix=PATCHv2</code> appended to <code>git
|
||||
send-email</code> (substitute <code>v2</code> with the correct
|
||||
version if needed though).</p>
|
||||
</li>
|
||||
|
||||
<li><p>In your commit message, make the summary line reasonably
|
||||
short (60 characters is typical), followed by a blank line,
|
||||
followed by any longer description of why your patch makes
|
||||
sense. If the patch fixes a regression, and you know what
|
||||
commit introduced the problem, mentioning that is useful.
|
||||
If the patch resolves a bugzilla report, mentioning the URL
|
||||
of the bug number is useful; but also summarize the issue
|
||||
rather than making all readers follow the link. You can use
|
||||
'git shortlog -30' to get an idea of typical summary lines.
|
||||
Libvirt does not currently attach any meaning to
|
||||
Signed-off-by: lines, so it is up to you if you want to
|
||||
include or omit them in the commit message.
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li><p>Split large changes into a series of smaller patches,
|
||||
self-contained if possible, with an explanation of each patch
|
||||
and an explanation of how the sequence of patches fits
|
||||
together. Moreover, please keep in mind that it's required to
|
||||
be able to compile cleanly (<b>including</b> <code>make
|
||||
check</code> and <code>make syntax-check</code>) after each
|
||||
patch. A feature does not have to work until the end of a
|
||||
series, but intermediate patches must compile and not cause
|
||||
test-suite failures (this is to preserve the usefulness
|
||||
of <code>git bisect</code>, among other things).</p>
|
||||
</li>
|
||||
|
||||
<li>Split large changes into a series of smaller patches, self-contained
|
||||
if possible, with an explanation of each patch and an explanation of how
|
||||
the sequence of patches fits together.</li>
|
||||
<li>Make sure your patches apply against libvirt GIT. Developers
|
||||
only follow GIT and don't care much about released versions.</li>
|
||||
<li><p>Run the automated tests on your code before submitting any changes.
|
||||
In particular, configure with compile warnings set to
|
||||
-Werror. This is done automatically for a git checkout; from a
|
||||
tarball, use:</p>
|
||||
In particular, configure with compile warnings set to -Werror:</p>
|
||||
<pre>
|
||||
./configure --enable-werror
|
||||
./configure --enable-compile-warnings=error
|
||||
</pre>
|
||||
<p>
|
||||
and run the tests:
|
||||
@@ -111,9 +39,8 @@
|
||||
make syntax-check
|
||||
make -C tests valgrind
|
||||
</pre>
|
||||
<p><a href="http://valgrind.org/">Valgrind</a> is a test that checks
|
||||
for memory management issues, such as leaks or use of uninitialized
|
||||
variables.
|
||||
<p>
|
||||
The latter test checks for memory leaks.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -134,99 +61,7 @@
|
||||
<pre>
|
||||
./qemuxml2xmltest
|
||||
</pre>
|
||||
<p>There is also a <code>./run</code> script at the top level,
|
||||
to make it easier to run programs that have not yet been
|
||||
installed, as well as to wrap invocations of various tests
|
||||
under gdb or Valgrind.
|
||||
</p>
|
||||
|
||||
</li>
|
||||
<li><p>The Valgrind test should produce similar output to
|
||||
<code>make check</code>. If the output has traces within libvirt
|
||||
API's, then investigation is required in order to determine the
|
||||
cause of the issue. Output such as the following indicates some
|
||||
sort of leak:
|
||||
</p>
|
||||
<pre>
|
||||
==5414== 4 bytes in 1 blocks are definitely lost in loss record 3 of 89
|
||||
==5414== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
|
||||
==5414== by 0x34DE0AAB85: xmlStrndup (in /usr/lib64/libxml2.so.2.7.8)
|
||||
==5414== by 0x4CC97A6: virDomainVideoDefParseXML (domain_conf.c:7410)
|
||||
==5414== by 0x4CD581D: virDomainDefParseXML (domain_conf.c:10188)
|
||||
==5414== by 0x4CD8C73: virDomainDefParseNode (domain_conf.c:10640)
|
||||
==5414== by 0x4CD8DDB: virDomainDefParse (domain_conf.c:10590)
|
||||
==5414== by 0x41CB1D: testCompareXMLToArgvHelper (qemuxml2argvtest.c:100)
|
||||
==5414== by 0x41E20F: virtTestRun (testutils.c:161)
|
||||
==5414== by 0x41C7CB: mymain (qemuxml2argvtest.c:866)
|
||||
==5414== by 0x41E84A: virtTestMain (testutils.c:723)
|
||||
==5414== by 0x34D9021734: (below main) (in /usr/lib64/libc-2.15.so)
|
||||
</pre>
|
||||
<p>In this example, the <code>virDomainDefParseXML()</code> had
|
||||
an error path where the <code>virDomainVideoDefPtr video</code>
|
||||
pointer was not properly disposed. By simply adding a
|
||||
<code>virDomainVideoDefFree(video);</code> in the error path,
|
||||
the issue was resolved.
|
||||
</p>
|
||||
|
||||
<p>Another common mistake is calling a printing function, such as
|
||||
<code>VIR_DEBUG()</code> without initializing a variable to be
|
||||
printed. The following example involved a call which could return
|
||||
an error, but not set variables passed by reference to the call.
|
||||
The solution was to initialize the variables prior to the call.
|
||||
</p>
|
||||
<pre>
|
||||
==4749== Use of uninitialised value of size 8
|
||||
==4749== at 0x34D904650B: _itoa_word (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x34D9049118: vfprintf (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x34D9108F60: __vasprintf_chk (in /usr/lib64/libc-2.15.so)
|
||||
==4749== by 0x4CAEEF7: virVasprintf (stdio2.h:199)
|
||||
==4749== by 0x4C8A55E: virLogVMessage (virlog.c:814)
|
||||
==4749== by 0x4C8AA96: virLogMessage (virlog.c:751)
|
||||
==4749== by 0x4DA0056: virNetTLSContextCheckCertKeyUsage (virnettlscontext.c:225)
|
||||
==4749== by 0x4DA06DB: virNetTLSContextCheckCert (virnettlscontext.c:439)
|
||||
==4749== by 0x4DA1620: virNetTLSContextNew (virnettlscontext.c:562)
|
||||
==4749== by 0x4DA26FC: virNetTLSContextNewServer (virnettlscontext.c:927)
|
||||
==4749== by 0x409C39: testTLSContextInit (virnettlscontexttest.c:467)
|
||||
==4749== by 0x40AB8F: virtTestRun (testutils.c:161)
|
||||
</pre>
|
||||
<p>Valgrind will also find some false positives or code paths
|
||||
which cannot be resolved by making changes to the libvirt code.
|
||||
For these paths, it is possible to add a filter to avoid the
|
||||
errors. For example:
|
||||
</p>
|
||||
<pre>
|
||||
==4643== 7 bytes in 1 blocks are possibly lost in loss record 4 of 20
|
||||
==4643== at 0x4A0881C: malloc (vg_replace_malloc.c:270)
|
||||
==4643== by 0x34D90853F1: strdup (in /usr/lib64/libc-2.15.so)
|
||||
==4643== by 0x34EEC2C08A: ??? (in /usr/lib64/libnl.so.1.1)
|
||||
==4643== by 0x34EEC15B81: ??? (in /usr/lib64/libnl.so.1.1)
|
||||
==4643== by 0x34D8C0EE15: call_init.part.0 (in /usr/lib64/ld-2.15.so)
|
||||
==4643== by 0x34D8C0EECF: _dl_init (in /usr/lib64/ld-2.15.so)
|
||||
==4643== by 0x34D8C01569: ??? (in /usr/lib64/ld-2.15.so)
|
||||
|
||||
</pre>
|
||||
<p>In this instance, it is acceptible to modify the
|
||||
<code>tests/.valgrind.supp</code> file in order to add a
|
||||
suppression filter. The filter should be unique enough to
|
||||
not suppress real leaks, but it should be generic enough to
|
||||
cover multiple code paths. The format of the entry can be
|
||||
found in the documentation found at the
|
||||
<a href="http://valgrind.org/">Valgrind home page.</a>
|
||||
The following trace was added to <code>tests/.valgrind.supp</code>
|
||||
in order to suppress the warning:
|
||||
</p>
|
||||
<pre>
|
||||
{
|
||||
dlInitMemoryLeak1
|
||||
Memcheck:Leak
|
||||
fun:?alloc
|
||||
...
|
||||
fun:call_init.part.0
|
||||
fun:_dl_init
|
||||
...
|
||||
obj:*/lib*/ld-2.*so*
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Update tests and/or documentation, particularly if you are adding
|
||||
a new feature or changing the output of a program.</li>
|
||||
@@ -328,55 +163,6 @@
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="bracket_spacing">Bracket spacing</a></h2>
|
||||
|
||||
<p>
|
||||
The keywords <code>if</code>, <code>for</code>, <code>while</code>,
|
||||
and <code>switch</code> must have a single space following them
|
||||
before the opening bracket. E.g.
|
||||
</p>
|
||||
<pre>
|
||||
if(foo) // Bad
|
||||
if (foo) // Good
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Function implementations must <strong>not</strong> have any whitespace
|
||||
between the function name and the opening bracket. E.g.
|
||||
</p>
|
||||
<pre>
|
||||
int foo (int wizz) // Bad
|
||||
int foo(int wizz) // Good
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Function calls must <strong>not</strong> have any whitespace
|
||||
between the function name and the opening bracket. E.g.
|
||||
</p>
|
||||
<pre>
|
||||
bar = foo (wizz); // Bad
|
||||
bar = foo(wizz); // Good
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Function typedefs must <strong>not</strong> have any whitespace
|
||||
between the closing bracket of the function name and opening
|
||||
bracket of the arg list. E.g.
|
||||
</p>
|
||||
<pre>
|
||||
typedef int (*foo) (int wizz); // Bad
|
||||
typedef int (*foo)(int wizz); // Good
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
There must not be any whitespace immediately following any
|
||||
opening bracket, or immediately prior to any closing bracket. E.g.
|
||||
</p>
|
||||
<pre>
|
||||
int foo( int wizz ); // Bad
|
||||
int foo(int wizz); // Good
|
||||
</pre>
|
||||
|
||||
<h2><a name="curly_braces">Curly braces</a></h2>
|
||||
|
||||
<p>
|
||||
@@ -396,7 +182,7 @@
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
However, the moment your loop/if/else body extends on to a second
|
||||
However, the moment your loop/if/else body extends onto a second
|
||||
line, for whatever reason (even if it's just an added comment), then
|
||||
you should add braces. Otherwise, it would be too easy to insert a
|
||||
statement just before that comment (without adding braces), thinking
|
||||
@@ -517,7 +303,7 @@
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h2><a name="preprocessor">Preprocessor</a></h2>
|
||||
<h2><a href="types">Preprocessor</a></h2>
|
||||
|
||||
<p>
|
||||
For variadic macros, stick with C99 syntax:
|
||||
@@ -535,7 +321,7 @@
|
||||
#endif
|
||||
</pre>
|
||||
|
||||
<h2><a name="types">C types</a></h2>
|
||||
<h2><a href="types">C types</a></h2>
|
||||
|
||||
<p>
|
||||
Use the right type.
|
||||
@@ -719,8 +505,8 @@
|
||||
<p>
|
||||
Usage of the <code>fdopen()</code>, <code>close()</code>, <code>fclose()</code>
|
||||
APIs is deprecated in libvirt code base to help avoiding double-closing of files
|
||||
or file descriptors, which is particularly dangerous in a multi-threaded
|
||||
application. Instead of these APIs, use the macros from virfile.h
|
||||
or file descriptors, which is particulary dangerous in a multi-threaded
|
||||
applications. Instead of these APIs, use the macros from virfile.h
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
@@ -915,7 +701,7 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if WITH_NUMACTL Some system includes aren't supported
|
||||
#if HAVE_NUMACTL Some system includes aren't supported
|
||||
# include <numa.h> everywhere so need these #if guards.
|
||||
#endif
|
||||
|
||||
@@ -931,12 +717,10 @@
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Of particular note: <b>Do not</b> include libvirt/libvirt.h,
|
||||
libvirt/virterror.h, libvirt/libvirt-qemu.h, or libvirt/libvirt-lxc.h.
|
||||
They are included by "internal.h" already and there are some special reasons
|
||||
why you cannot include these files explicitly. One of the special cases,
|
||||
"libvirt/libvirt.h" is included prior to "internal.h" in "remote_protocol.x",
|
||||
to avoid exposing *_LAST enum elements.
|
||||
Of particular note: <b>Do not</b> include libvirt/libvirt.h or
|
||||
libvirt/virterror.h. It is included by "internal.h" already and there
|
||||
are some special reasons why you cannot include these files
|
||||
explicitly.
|
||||
</p>
|
||||
|
||||
|
||||
|
@@ -18,8 +18,7 @@
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:text>-*- buffer-read-only: t -*- vi: set ro:
|
||||
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY
|
||||
from docs/hacking.html.in!
|
||||
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY!
|
||||
|
||||
|
||||
|
||||
|
@@ -101,7 +101,7 @@
|
||||
<h5><a name="qemu">/etc/libvirt/hooks/qemu</a></h5>
|
||||
<ul>
|
||||
<li>Before a QEMU guest is started, the qemu hook script is
|
||||
called in three locations; if any location fails, the guest
|
||||
called in two locations; if either location fails, the guest
|
||||
is not started. The first location, <span class="since">since
|
||||
0.9.0</span>, is before libvirt performs any resource
|
||||
labeling, and the hook can allocate resources not managed by
|
||||
@@ -110,11 +110,7 @@
|
||||
The second location, available <span class="since">Since
|
||||
0.8.0</span>, occurs after libvirt has finished labeling
|
||||
all resources, but has not yet started the guest, called as:<br/>
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre>
|
||||
The third location, <span class="since">0.9.13</span>,
|
||||
occurs after the QEMU process has successfully started up:<br/>
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name started begin -</pre>
|
||||
</li>
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre></li>
|
||||
<li>When a QEMU guest is stopped, the qemu hook script is called
|
||||
in two locations, to match the startup.
|
||||
First, <span class="since">since 0.8.0</span>, the hook is
|
||||
@@ -134,51 +130,15 @@
|
||||
script returns failure or the output XML is not valid, incoming
|
||||
migration will be canceled. This hook may be used, e.g., to change
|
||||
location of disk images for incoming domains.</li>
|
||||
<li><span class="since">Since 0.9.13</span>, the qemu hook script
|
||||
is also called when the libvirtd daemon restarts and reconnects
|
||||
to previously running QEMU processes. If the script fails, the
|
||||
existing QEMU process will be killed off. It is called as:
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name reconnect begin -</pre>
|
||||
</li>
|
||||
<li><span class="since">Since 0.9.13</span>, the qemu hook script
|
||||
is also called when the QEMU driver is told to attach to an
|
||||
externally launched QEMU process. It is called as:
|
||||
<pre>/etc/libvirt/hooks/qemu guest_name attach begin -</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h5><a name="lxc">/etc/libvirt/hooks/lxc</a></h5>
|
||||
<ul>
|
||||
<li>Before a LXC guest is started, the lxc hook script is
|
||||
called in three locations; if any location fails, the guest
|
||||
is not started. The first location, <span class="since">since
|
||||
0.9.13</span>, is before libvirt performs any resource
|
||||
labeling, and the hook can allocate resources not managed by
|
||||
libvirt such as DRBD or missing bridges. This is called as:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name prepare begin -</pre>
|
||||
The second location, available <span class="since">Since
|
||||
0.8.0</span>, occurs after libvirt has finished labeling
|
||||
all resources, but has not yet started the guest, called as:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name start begin -</pre>
|
||||
The third location, <span class="since">0.9.13</span>,
|
||||
occurs after the LXC process has successfully started up:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name started begin -</pre>
|
||||
</li>
|
||||
<li>When an LXC guest is started, the lxc hook script is called as:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name start begin -</pre></li>
|
||||
<li>When a LXC guest is stopped, the lxc hook script is called
|
||||
in two locations, to match the startup.
|
||||
First, <span class="since">since 0.8.0</span>, the hook is
|
||||
called before libvirt restores any labels:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name stopped end -</pre>
|
||||
Then, after libvirt has released all resources, the hook is
|
||||
called again, <span class="since">since 0.9.0</span>, to allow
|
||||
any additional resource cleanup:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name release end -</pre></li>
|
||||
<li><span class="since">Since 0.9.13</span>, the lxc hook script
|
||||
is also called when the libvirtd daemon restarts and reconnects
|
||||
to previously running LXC processes. If the script fails, the
|
||||
existing LXC process will be killed off. It is called as:
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name reconnect begin -</pre>
|
||||
</li>
|
||||
as:<br/>
|
||||
<pre>/etc/libvirt/hooks/lxc guest_name stopped end -</pre></li>
|
||||
</ul>
|
||||
<br/>
|
||||
|
||||
@@ -239,14 +199,13 @@
|
||||
<p>If a hook script returns with an exit code of 0, the libvirt daemon
|
||||
regards this as successful and performs no logging of it.</p>
|
||||
<p>However, if a hook script returns with a non zero exit code, the libvirt
|
||||
daemon regards this as a failure, logs its return code, and
|
||||
daemon regards this as a failure, logs it with return code 256, and
|
||||
additionally logs anything on stderr the hook script returns.</p>
|
||||
<p>For example, a hook script might use this code to indicate failure,
|
||||
and send a text string to stderr:</p>
|
||||
<pre>echo "Could not find required XYZZY" >&2
|
||||
exit 1</pre>
|
||||
<p>The resulting entry in the libvirt log will appear as:</p>
|
||||
<pre>20:02:40.297: error : virHookCall:285 : Hook script execution failed: internal error Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
HOME=/root USER=root LOGNAME=root /etc/libvirt/hooks/qemu qemu prepare begin -) unexpected exit status 1: Could not find required XYZZY</pre>
|
||||
<pre>20:02:40.297: error : virHookCall:416 : Hook script execution failed: Hook script /etc/libvirt/hooks/qemu qemu failed with error code 256:Could not find required XYZZY</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -11,14 +11,13 @@ my $srcdir = shift @ARGV;
|
||||
|
||||
my $symslibvirt = "$srcdir/libvirt_public.syms";
|
||||
my $symsqemu = "$srcdir/libvirt_qemu.syms";
|
||||
my $symslxc = "$srcdir/libvirt_lxc.syms";
|
||||
my $drivertable = "$srcdir/driver.h";
|
||||
|
||||
my %groupheaders = (
|
||||
"virDriver" => "Hypervisor APIs",
|
||||
"virNetworkDriver" => "Virtual Network APIs",
|
||||
"virInterfaceDriver" => "Host Interface APIs",
|
||||
"virNodeDeviceDriver" => "Host Device APIs",
|
||||
"virDeviceMonitor" => "Host Device APIs",
|
||||
"virStorageDriver" => "Storage Pool APIs",
|
||||
"virSecretDriver" => "Secret APIs",
|
||||
"virNWFilterDriver" => "Network Filter APIs",
|
||||
@@ -28,9 +27,9 @@ my %groupheaders = (
|
||||
my @srcs;
|
||||
find({
|
||||
wanted => sub {
|
||||
if (m!$srcdir/.*/\w+_(driver|tmpl|monitor|hal|udev)\.c$!) {
|
||||
push @srcs, $_ if $_ !~ /vbox_driver\.c/;
|
||||
}
|
||||
if (m!$srcdir/.*/\w+_(driver|tmpl|monitor|hal|udev)\.c$!) {
|
||||
push @srcs, $_ if $_ !~ /vbox_driver\.c/;
|
||||
}
|
||||
}, no_chdir => 1}, $srcdir);
|
||||
my $line;
|
||||
|
||||
@@ -48,26 +47,26 @@ while (defined($line = <FILE>)) {
|
||||
next if $line =~ /^\s*$/;
|
||||
next if $line =~ /^\s*(global|local):/;
|
||||
if ($line =~ /^\s*LIBVIRT_(\d+\.\d+\.\d+)\s*{\s*$/) {
|
||||
if (defined $vers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$vers = $1;
|
||||
if (defined $vers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$vers = $1;
|
||||
} elsif ($line =~ /\s*}\s*;\s*$/) {
|
||||
if (defined $prevvers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
if (defined $prevvers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
} elsif ($line =~ /\s*}\s*LIBVIRT_(\d+\.\d+\.\d+)\s*;\s*$/) {
|
||||
if ($1 ne $prevvers) {
|
||||
die "malformed syms file $1 != $vers";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
if ($1 ne $prevvers) {
|
||||
die "malformed syms file $1 != $vers";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
|
||||
$apis{$1} = $vers;
|
||||
$apis{$1} = $vers;
|
||||
} else {
|
||||
die "unexpected data $line\n";
|
||||
die "unexpected data $line\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,65 +86,26 @@ while (defined($line = <FILE>)) {
|
||||
next if $line =~ /^\s*$/;
|
||||
next if $line =~ /^\s*(global|local):/;
|
||||
if ($line =~ /^\s*LIBVIRT_QEMU_(\d+\.\d+\.\d+)\s*{\s*$/) {
|
||||
if (defined $vers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$vers = $1;
|
||||
if (defined $vers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$vers = $1;
|
||||
} elsif ($line =~ /\s*}\s*;\s*$/) {
|
||||
if (defined $prevvers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
if (defined $prevvers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
} elsif ($line =~ /\s*}\s*LIBVIRT_QEMU_(\d+\.\d+\.\d+)\s*;\s*$/) {
|
||||
if ($1 ne $prevvers) {
|
||||
die "malformed syms file $1 != $vers";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
if ($1 ne $prevvers) {
|
||||
die "malformed syms file $1 != $vers";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
|
||||
$apis{$1} = $vers;
|
||||
$apis{$1} = $vers;
|
||||
} else {
|
||||
die "unexpected data $line\n";
|
||||
}
|
||||
}
|
||||
|
||||
close FILE;
|
||||
|
||||
|
||||
# And the same for the LXC specific APIs
|
||||
|
||||
open FILE, "<$symslxc"
|
||||
or die "cannot read $symslxc: $!";
|
||||
|
||||
$prevvers = undef;
|
||||
$vers = undef;
|
||||
while (defined($line = <FILE>)) {
|
||||
chomp $line;
|
||||
next if $line =~ /^\s*#/;
|
||||
next if $line =~ /^\s*$/;
|
||||
next if $line =~ /^\s*(global|local):/;
|
||||
if ($line =~ /^\s*LIBVIRT_LXC_(\d+\.\d+\.\d+)\s*{\s*$/) {
|
||||
if (defined $vers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$vers = $1;
|
||||
} elsif ($line =~ /\s*}\s*;\s*$/) {
|
||||
if (defined $prevvers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
} elsif ($line =~ /\s*}\s*LIBVIRT_LXC_(\d+\.\d+\.\d+)\s*;\s*$/) {
|
||||
if ($1 ne $prevvers) {
|
||||
die "malformed syms file $1 != $vers";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
|
||||
$apis{$1} = $vers;
|
||||
} else {
|
||||
die "unexpected data $line\n";
|
||||
die "unexpected data $line\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +114,7 @@ close FILE;
|
||||
|
||||
# Some special things which aren't public APIs,
|
||||
# but we want to report
|
||||
$apis{virConnectSupportsFeature} = "0.3.2";
|
||||
$apis{virConnectDrvSupportsFeature} = "0.3.2";
|
||||
$apis{virDomainMigratePrepare} = "0.3.2";
|
||||
$apis{virDomainMigratePerform} = "0.3.2";
|
||||
$apis{virDomainMigrateFinish} = "0.3.2";
|
||||
@@ -182,30 +142,32 @@ open FILE, "<$drivertable"
|
||||
my %groups;
|
||||
my $ingrp;
|
||||
while (defined($line = <FILE>)) {
|
||||
if ($line =~ /struct _(vir\w*Driver)/) {
|
||||
my $grp = $1;
|
||||
if ($grp ne "virStateDriver" &&
|
||||
$grp ne "virStreamDriver") {
|
||||
$ingrp = $grp;
|
||||
$groups{$ingrp} = { apis => {}, drivers => {} };
|
||||
}
|
||||
if ($line =~ /struct _(vir\w*(?:Driver|Monitor))/) {
|
||||
my $grp = $1;
|
||||
if ($grp ne "virStateDriver" &&
|
||||
$grp ne "virStreamDriver") {
|
||||
$ingrp = $grp;
|
||||
$groups{$ingrp} = { apis => {}, drivers => {} };
|
||||
}
|
||||
} elsif ($ingrp) {
|
||||
if ($line =~ /^\s*vir(?:Drv)(\w+)\s+(\w+);\s*$/) {
|
||||
my $field = $2;
|
||||
my $name = $1;
|
||||
if ($line =~ /^\s*vir(?:Drv|DevMon)(\w+)\s+(\w+);\s*$/) {
|
||||
my $field = $2;
|
||||
my $name = $1;
|
||||
|
||||
my $api;
|
||||
if (exists $apis{"vir$name"}) {
|
||||
$api = "vir$name";
|
||||
} elsif ($name =~ /\w+(Open|Close)/) {
|
||||
next;
|
||||
} else {
|
||||
die "driver $name does not have a public API";
|
||||
}
|
||||
$groups{$ingrp}->{apis}->{$field} = $api;
|
||||
} elsif ($line =~ /};/) {
|
||||
$ingrp = undef;
|
||||
}
|
||||
my $api;
|
||||
if (exists $apis{"vir$name"}) {
|
||||
$api = "vir$name";
|
||||
} elsif (exists $apis{"virConnect$name"}) {
|
||||
$api = "virConnect$name";
|
||||
} elsif (exists $apis{"virNode$name"}) {
|
||||
$api = "virNode$name";
|
||||
} else {
|
||||
die "driver $name does not have a public API";
|
||||
}
|
||||
$groups{$ingrp}->{apis}->{$field} = $api;
|
||||
} elsif ($line =~ /};/) {
|
||||
$ingrp = undef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,62 +179,60 @@ close FILE;
|
||||
|
||||
foreach my $src (@srcs) {
|
||||
open FILE, "<$src" or
|
||||
die "cannot read $src: $!";
|
||||
die "cannot read $src: $!";
|
||||
|
||||
$ingrp = undef;
|
||||
my $impl;
|
||||
while (defined($line = <FILE>)) {
|
||||
if (!$ingrp) {
|
||||
foreach my $grp (keys %groups) {
|
||||
if ($line =~ /^\s*(?:static\s+)?$grp\s+(\w+)\s*=\s*{/ ||
|
||||
$line =~ /^\s*(?:static\s+)?$grp\s+NAME\(\w+\)\s*=\s*{/) {
|
||||
$ingrp = $grp;
|
||||
$impl = $src;
|
||||
if (!$ingrp) {
|
||||
foreach my $grp (keys %groups) {
|
||||
if ($line =~ /^\s*(?:static\s+)?$grp\s+(\w+)\s*=\s*{/ ||
|
||||
$line =~ /^\s*(?:static\s+)?$grp\s+NAME\(\w+\)\s*=\s*{/) {
|
||||
$ingrp = $grp;
|
||||
$impl = $src;
|
||||
|
||||
if ($impl =~ m,.*/node_device_(\w+)\.c,) {
|
||||
$impl = $1;
|
||||
} else {
|
||||
$impl =~ s,.*/(\w+?)_((\w+)_)?(\w+)\.c,$1,;
|
||||
}
|
||||
if ($impl =~ m,.*/node_device_(\w+)\.c,) {
|
||||
$impl = $1;
|
||||
} else {
|
||||
$impl =~ s,.*/(\w+?)_((\w+)_)?(\w+)\.c,$1,;
|
||||
}
|
||||
|
||||
if ($groups{$ingrp}->{drivers}->{$impl}) {
|
||||
die "Group $ingrp already contains $impl";
|
||||
}
|
||||
if ($groups{$ingrp}->{drivers}->{$impl}) {
|
||||
die "Group $ingrp already contains $impl";
|
||||
}
|
||||
|
||||
$groups{$ingrp}->{drivers}->{$impl} = {};
|
||||
}
|
||||
}
|
||||
$groups{$ingrp}->{drivers}->{$impl} = {};
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if ($line =~ m!\s*\.(\w+)\s*=\s*(\w+)\s*,?\s*(?:/\*\s*(\d+\.\d+\.\d+)\s*\*/\s*)?$!) {
|
||||
my $api = $1;
|
||||
my $meth = $2;
|
||||
my $vers = $3;
|
||||
} else {
|
||||
if ($line =~ m!\s*\.(\w+)\s*=\s*(\w+)\s*,?\s*(?:/\*\s*(\d+\.\d+\.\d+)\s*\*/\s*)?$!) {
|
||||
my $api = $1;
|
||||
my $meth = $2;
|
||||
my $vers = $3;
|
||||
|
||||
next if $api eq "no" || $api eq "name";
|
||||
next if $api eq "no" || $api eq "name";
|
||||
|
||||
die "Method $meth in $src is missing version" unless defined $vers;
|
||||
die "Method $meth in $src is missing version" unless defined $vers;
|
||||
|
||||
die "Driver method for $api is NULL in $src" if $meth eq "NULL";
|
||||
die "Driver method for $api is NULL in $src" if $meth eq "NULL";
|
||||
|
||||
if (!exists($groups{$ingrp}->{apis}->{$api})) {
|
||||
next if $api =~ /\w(Open|Close)/;
|
||||
if (!exists($groups{$ingrp}->{apis}->{$api})) {
|
||||
die "Found unexpected method $api in $ingrp\n";
|
||||
}
|
||||
|
||||
die "Found unexpected method $api in $ingrp\n";
|
||||
}
|
||||
$groups{$ingrp}->{drivers}->{$impl}->{$api} = $vers;
|
||||
if ($api eq "domainMigratePrepare" ||
|
||||
$api eq "domainMigratePrepare2" ||
|
||||
$api eq "domainMigratePrepare3") {
|
||||
$groups{$ingrp}->{drivers}->{$impl}->{"domainMigrate"} = $vers
|
||||
unless $groups{$ingrp}->{drivers}->{$impl}->{"domainMigrate"};
|
||||
}
|
||||
|
||||
$groups{$ingrp}->{drivers}->{$impl}->{$api} = $vers;
|
||||
if ($api eq "domainMigratePrepare" ||
|
||||
$api eq "domainMigratePrepare2" ||
|
||||
$api eq "domainMigratePrepare3") {
|
||||
$groups{$ingrp}->{drivers}->{$impl}->{"domainMigrate"} = $vers
|
||||
unless $groups{$ingrp}->{drivers}->{$impl}->{"domainMigrate"};
|
||||
}
|
||||
|
||||
} elsif ($line =~ /}/) {
|
||||
$ingrp = undef;
|
||||
}
|
||||
}
|
||||
} elsif ($line =~ /}/) {
|
||||
$ingrp = undef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
close FILE;
|
||||
@@ -290,24 +250,24 @@ $groups{virDriver}->{apis}->{"domainMigrate"} = "virDomainMigrate";
|
||||
my $openAuthVers = (0 * 1000 * 1000) + (4 * 1000) + 0;
|
||||
|
||||
foreach my $drv (keys %{$groups{"virDriver"}->{drivers}}) {
|
||||
my $openVersStr = $groups{"virDriver"}->{drivers}->{$drv}->{"connectOpen"};
|
||||
my $openVersStr = $groups{"virDriver"}->{drivers}->{$drv}->{"open"};
|
||||
my $openVers;
|
||||
if ($openVersStr =~ /(\d+)\.(\d+)\.(\d+)/) {
|
||||
$openVers = ($1 * 1000 * 1000) + ($2 * 1000) + $3;
|
||||
$openVers = ($1 * 1000 * 1000) + ($2 * 1000) + $3;
|
||||
}
|
||||
|
||||
# virConnectOpenReadOnly always matches virConnectOpen version
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpenReadOnly"} =
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpen"};
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"openReadOnly"} =
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"open"};
|
||||
|
||||
# virConnectOpenAuth is always 0.4.0 if the driver existed
|
||||
# before this time, otherwise it matches the version of
|
||||
# the driver's virConnectOpen entry
|
||||
if ($openVersStr eq "Y" ||
|
||||
$openVers >= $openAuthVers) {
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpenAuth"} = $openVersStr;
|
||||
$openVers >= $openAuthVers) {
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"openAuth"} = $openVersStr;
|
||||
} else {
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpenAuth"} = "0.4.0";
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"openAuth"} = "0.4.0";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,17 +283,17 @@ foreach my $drv (keys %{$groups{"virDriver"}->{drivers}}) {
|
||||
next unless defined $createVersStr;
|
||||
my $createVers;
|
||||
if ($createVersStr =~ /(\d+)\.(\d+)\.(\d+)/) {
|
||||
$createVers = ($1 * 1000 * 1000) + ($2 * 1000) + $3;
|
||||
$createVers = ($1 * 1000 * 1000) + ($2 * 1000) + $3;
|
||||
}
|
||||
|
||||
# virCreateLinux is always 0.0.3 if the driver existed
|
||||
# before this time, otherwise it matches the version of
|
||||
# the driver's virCreateXML entry
|
||||
if ($createVersStr eq "Y" ||
|
||||
$createVers >= $createAPIVers) {
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = $createVersStr;
|
||||
$createVers >= $createAPIVers) {
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = $createVersStr;
|
||||
} else {
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = "0.0.3";
|
||||
$groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = "0.0.3";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,7 +329,7 @@ foreach my $grp (sort { $a cmp $b } keys %groups) {
|
||||
EOF
|
||||
|
||||
foreach my $drv (sort { $a cmp $b } keys %{$groups{$grp}->{drivers}}) {
|
||||
print " <th>$drv</th>\n";
|
||||
print " <th>$drv</th>\n";
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
@@ -380,27 +340,27 @@ EOF
|
||||
|
||||
my $row = 0;
|
||||
foreach my $field (sort {
|
||||
$groups{$grp}->{apis}->{$a}
|
||||
cmp
|
||||
$groups{$grp}->{apis}->{$b}
|
||||
} keys %{$groups{$grp}->{apis}}) {
|
||||
my $api = $groups{$grp}->{apis}->{$field};
|
||||
my $vers = $apis{$api};
|
||||
print <<EOF;
|
||||
$groups{$grp}->{apis}->{$a}
|
||||
cmp
|
||||
$groups{$grp}->{apis}->{$b}
|
||||
} keys %{$groups{$grp}->{apis}}) {
|
||||
my $api = $groups{$grp}->{apis}->{$field};
|
||||
my $vers = $apis{$api};
|
||||
print <<EOF;
|
||||
<tr>
|
||||
<td><a href=\"html/libvirt-libvirt.html#$api\">$api</a></td>
|
||||
<td>$vers</td>
|
||||
EOF
|
||||
|
||||
foreach my $drv (sort {$a cmp $b } keys %{$groups{$grp}->{drivers}}) {
|
||||
if (exists $groups{$grp}->{drivers}->{$drv}->{$field}) {
|
||||
print "<td>", $groups{$grp}->{drivers}->{$drv}->{$field}, "</td>\n";
|
||||
} else {
|
||||
print "<td></td>\n";
|
||||
}
|
||||
if (exists $groups{$grp}->{drivers}->{$drv}->{$field}) {
|
||||
print "<td>", $groups{$grp}->{drivers}->{$drv}->{$field}, "</td>\n";
|
||||
} else {
|
||||
print "<td></td>\n";
|
||||
}
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
print <<EOF;
|
||||
</tr>
|
||||
EOF
|
||||
|
||||
@@ -413,13 +373,13 @@ EOF
|
||||
EOF
|
||||
|
||||
foreach my $drv (sort { $a cmp $b } keys %{$groups{$grp}->{drivers}}) {
|
||||
print " <th>$drv</th>\n";
|
||||
print " <th>$drv</th>\n";
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
</tr>
|
||||
EOF
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -62,12 +62,6 @@
|
||||
<li>
|
||||
The <a href="http://libvirt.org/drvhyperv.html">Microsoft Hyper-V</a> hypervisor
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://libvirt.org/drvphyp.html">IBM PowerVM</a> hypervisor
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://libvirt.org/drvparallels.html">Parallels</a> hypervisor
|
||||
</li>
|
||||
<li>
|
||||
Virtual networks using bridging, NAT, VEPA and VN-LINK.
|
||||
</li>
|
||||
|
@@ -166,15 +166,15 @@ def checkTables(db, verbose = 1):
|
||||
print "table %s missing" % (table)
|
||||
createTable(db, table)
|
||||
try:
|
||||
ret = c.execute("SELECT count(*) from %s" % table)
|
||||
ret = c.execute("SELECT count(*) from %s" % table);
|
||||
row = c.fetchone()
|
||||
if verbose:
|
||||
print "Table %s contains %d records" % (table, row[0])
|
||||
except:
|
||||
print "Troubles with table %s : repairing" % (table)
|
||||
ret = c.execute("repair table %s" % table)
|
||||
ret = c.execute("repair table %s" % table);
|
||||
print "repairing returned %d" % (ret)
|
||||
ret = c.execute("SELECT count(*) from %s" % table)
|
||||
ret = c.execute("SELECT count(*) from %s" % table);
|
||||
row = c.fetchone()
|
||||
print "Table %s contains %d records" % (table, row[0])
|
||||
if verbose:
|
||||
@@ -600,7 +600,7 @@ def addWordHTML(word, resource, id, section, relevance):
|
||||
pass
|
||||
else:
|
||||
wordsDictHTML[word] = {}
|
||||
d = wordsDictHTML[word]
|
||||
d = wordsDictHTML[word];
|
||||
d[resource] = (relevance, id, section)
|
||||
return relevance
|
||||
|
||||
@@ -647,7 +647,7 @@ def addWordArchive(word, id, relevance):
|
||||
pass
|
||||
else:
|
||||
wordsDictArchive[word] = {}
|
||||
d = wordsDictArchive[word]
|
||||
d = wordsDictArchive[word];
|
||||
d[id] = relevance
|
||||
return relevance
|
||||
|
||||
@@ -989,7 +989,7 @@ def analyzeHTML(doc, resource, p, section, id):
|
||||
return words
|
||||
|
||||
def analyzeHTML(doc, resource):
|
||||
para = 0
|
||||
para = 0;
|
||||
ctxt = doc.xpathNewContext()
|
||||
try:
|
||||
res = ctxt.xpathEval("//head/title")
|
||||
@@ -1079,7 +1079,7 @@ def scanXMLMsgArchive(url, title, force = 0):
|
||||
|
||||
try:
|
||||
print "Loading %s" % (url)
|
||||
doc = libxml2.htmlParseFile(url, None)
|
||||
doc = libxml2.htmlParseFile(url, None);
|
||||
except:
|
||||
doc = None
|
||||
if doc == None:
|
||||
@@ -1102,7 +1102,7 @@ def scanXMLDateArchive(t = None, force = 0):
|
||||
url = getXMLDateArchive(t)
|
||||
print "loading %s" % (url)
|
||||
try:
|
||||
doc = libxml2.htmlParseFile(url, None)
|
||||
doc = libxml2.htmlParseFile(url, None);
|
||||
except:
|
||||
doc = None
|
||||
if doc == None:
|
||||
@@ -1150,7 +1150,7 @@ def analyzeArchives(t = None, force = 0):
|
||||
refs = wordsDictArchive[word]
|
||||
if refs == None:
|
||||
skipped = skipped + 1
|
||||
continue
|
||||
continue;
|
||||
for id in refs.keys():
|
||||
relevance = refs[id]
|
||||
updateWordArchive(word, id, relevance)
|
||||
@@ -1170,7 +1170,7 @@ def analyzeHTMLTop():
|
||||
refs = wordsDictHTML[word]
|
||||
if refs == None:
|
||||
skipped = skipped + 1
|
||||
continue
|
||||
continue;
|
||||
for resource in refs.keys():
|
||||
(relevance, id, section) = refs[resource]
|
||||
updateWordHTML(word, resource, section, id, relevance)
|
||||
@@ -1199,7 +1199,7 @@ def analyzeAPITop():
|
||||
refs = wordsDict[word]
|
||||
if refs == None:
|
||||
skipped = skipped + 1
|
||||
continue
|
||||
continue;
|
||||
for (module, symbol) in refs.keys():
|
||||
updateWord(word, symbol, refs[(module, symbol)])
|
||||
i = i + 1
|
||||
@@ -1228,26 +1228,26 @@ def main():
|
||||
elif args[i] == '--archive':
|
||||
analyzeArchives(None, force)
|
||||
elif args[i] == '--archive-year':
|
||||
i = i + 1
|
||||
i = i + 1;
|
||||
year = args[i]
|
||||
months = ["January" , "February", "March", "April", "May",
|
||||
"June", "July", "August", "September", "October",
|
||||
"November", "December"]
|
||||
"November", "December"];
|
||||
for month in months:
|
||||
try:
|
||||
str = "%s-%s" % (year, month)
|
||||
T = time.strptime(str, "%Y-%B")
|
||||
t = time.mktime(T) + 3600 * 24 * 10
|
||||
t = time.mktime(T) + 3600 * 24 * 10;
|
||||
analyzeArchives(t, force)
|
||||
except:
|
||||
print "Failed to index month archive:"
|
||||
print sys.exc_type, sys.exc_value
|
||||
elif args[i] == '--archive-month':
|
||||
i = i + 1
|
||||
i = i + 1;
|
||||
month = args[i]
|
||||
try:
|
||||
T = time.strptime(month, "%Y-%B")
|
||||
t = time.mktime(T) + 3600 * 24 * 10
|
||||
t = time.mktime(T) + 3600 * 24 * 10;
|
||||
analyzeArchives(t, force)
|
||||
except:
|
||||
print "Failed to index month archive:"
|
||||
|
@@ -9,106 +9,12 @@
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Introduction to basic rules and guidelines for
|
||||
<a href="hacking.html">hacking</a> on libvirt code</li>
|
||||
<li>Introduction to basic rules and guidelines for <a href="hacking.html">hacking</a>
|
||||
on libvirt code</li>
|
||||
<li>Guide to adding <a href="api_extension.html">public APIs</a></li>
|
||||
<li>Approach for <a href="internals/command.html">spawning commands</a>
|
||||
from libvirt driver code</li>
|
||||
<li>The libvirt <a href="internals/rpc.html">RPC infrastructure</a></li>
|
||||
<li>The <a href="internals/locking.html">Resource Lock Manager</a></li>
|
||||
<li>Approach for <a href="internals/command.html">spawning commands</a> from
|
||||
libvirt driver code</li>
|
||||
</ul>
|
||||
|
||||
<p>Before adding new code it will be important to get a basic understanding
|
||||
of the many elements involved with making any call or change to the libvirt
|
||||
code. The architecture <a href="goals.html">goals</a> must be adhered to
|
||||
when submitting new code. Understanding the many places that need to be
|
||||
touched and the interactions between various subsystems within libvirt
|
||||
will directly correlate to the ability to be successful in getting new
|
||||
code accepted.</p>
|
||||
<p>The following diagram depicts code flow from a client application, in
|
||||
this case the libvirt provided <code>virsh</code> command through the
|
||||
various layers to elicit a response from some chosen hypervisor.
|
||||
</p>
|
||||
|
||||
<p class="image">
|
||||
<img alt="virConnectOpen calling sequence"
|
||||
src="libvirt-virConnect-example.png"/>
|
||||
</p>
|
||||
<ul>
|
||||
<li>"virsh -c qemu:///system list --all"
|
||||
<p>After the virsh code processes the input arguments, it eventually
|
||||
will make a call to open the connection using a default set of
|
||||
authentication credentials (virConnectAuthDefault). </p></li>
|
||||
<li>virConnectOpenAuth()
|
||||
<p>Each of the virConnectOpen APIs will first call virInitialize() and
|
||||
then revector through the local "do_open():" call.</p>
|
||||
<ul>
|
||||
<li>virInitialize()
|
||||
<p>Calls the registration API for each of the drivers with
|
||||
client-side only capabilities and then call the remoteRegister()
|
||||
API last. This ensures the virDriverTab[] tries local drivers
|
||||
first before using the remote driver.</p></li>
|
||||
<li>Loop through virDriverTab[] entries trying to call their
|
||||
respective "open" entry point (in our case remoteOpen())</li>
|
||||
<li>After successful return from the virDriverTab[] open()
|
||||
API, attempt to find and open other drivers (network, interface,
|
||||
storage, etc.)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>remoteOpen()
|
||||
<p>After a couple of URI checks, a call to doRemoteOpen() is made</p>
|
||||
<ul>
|
||||
<li>Determine network transport and host/port to use from URI
|
||||
<p>The transport will be either tls, unix, ssh, libssh2, ext,
|
||||
or tcp with the default of tls. Decode the host/port if provided
|
||||
or default to "localhost".</p></li>
|
||||
<li>virNetClientRegisterAsyncIO()
|
||||
<p>Register an I/O callback mechanism to get returned data via
|
||||
virNetClientIncomingEvent()</p></li>
|
||||
<li>"call(...REMOTE_PROC_OPEN...)"
|
||||
<p>Eventually routes into virNetClientProgramCall() which will
|
||||
call virNetClientSendWithReply() and eventually uses
|
||||
virNetClientIO()to send the message to libvirtd and
|
||||
then waits for a response using virNetClientIOEventLoop()</p></li>
|
||||
<li>virNetClientIncomingEvent()
|
||||
<p>Receives the returned packet and processes through
|
||||
virNetClientIOUpdateCallback()</p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>libvirtd Daemon
|
||||
<p></p>
|
||||
<ul>
|
||||
<li>Daemon Startup
|
||||
<p>The daemon initialization processing will declare itself
|
||||
as a server via a virNetServerNew() call, then use
|
||||
virDriverLoadModule() to find/load all known drivers,
|
||||
set up an RPC server program using the <code>remoteProcs[]</code>
|
||||
table via a virNetServerProgramNew() call. The table is the
|
||||
corollary to the <code>remote_procedure</code> enum list in
|
||||
the client. It lists all the functions to be called in
|
||||
the same order. Once RPC is set up, networking server sockets
|
||||
are opened, the various driver state initialization routines
|
||||
are run from the <code>virStateDriverTab[]</code>, the network
|
||||
links are enabled, and the daemon waits for work.</p></li>
|
||||
<li>RPC
|
||||
<p>When a message is received, the <code>remoteProcs[]</code>
|
||||
table is referenced for the 'REMOTE_PROC_OPEN' call entry.
|
||||
This results in remoteDispatchOpen() being called via the
|
||||
virNetServerProgramDispatchCall().</p></li>
|
||||
<li>remoteDispatchOpen()
|
||||
<p>The API will read the argument passed picking out the
|
||||
<code>name</code> of the driver to be opened. The code
|
||||
will then call virConnectOpen() or virConnectOpenReadOnly()
|
||||
depending on the argument <code>flags</code>.</p></li>
|
||||
<li>virConnectOpen() or virConnectOpenReadOnly()
|
||||
<p>Just like the client except that upon entry the URI
|
||||
is what was passed from the client and will be found
|
||||
and opened to process the data.</p>
|
||||
<p>The returned structure data is returned via the
|
||||
virNetServer interfaces to the remote driver which then
|
||||
returns it to the client application.</p></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -150,7 +150,7 @@
|
||||
<h2><a name="usagePatterns">Lock usage patterns</a></h2>
|
||||
|
||||
<p>
|
||||
The following pseudo code illustrates the common
|
||||
The following psuedo code illustrates the common
|
||||
patterns of operations invoked on the lock
|
||||
manager plugin callbacks.
|
||||
</p>
|
||||
@@ -183,10 +183,6 @@
|
||||
.key = "pid",
|
||||
.value = { .i = dom->pid },
|
||||
},
|
||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
|
||||
.key = "uri",
|
||||
.value = { .cstr = driver->uri },
|
||||
},
|
||||
};
|
||||
mgr = virLockManagerNew(lockPlugin,
|
||||
VIR_LOCK_MANAGER_TYPE_DOMAIN,
|
||||
@@ -229,10 +225,6 @@
|
||||
.key = "pid",
|
||||
.value = { .i = dom->pid },
|
||||
},
|
||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
|
||||
.key = "uri",
|
||||
.value = { .cstr = driver->uri },
|
||||
},
|
||||
};
|
||||
mgr = virLockManagerNew(lockPlugin,
|
||||
VIR_LOCK_MANAGER_TYPE_DOMAIN,
|
||||
|
@@ -418,7 +418,7 @@
|
||||
After a complete packet has been read, the header must be decoded
|
||||
and all 6 fields fully validated, before attempting to dispatch
|
||||
the payload. Once dispatched, the payload can be decoded and passed
|
||||
on to the appropriate API for execution. The RPC code must not take
|
||||
onto the appropriate API for execution. The RPC code must not take
|
||||
any action based on the payload, since it has no way to validate
|
||||
the semantics of the payload data. It must delegate this to the
|
||||
execution API (e.g. corresponding libvirt public API).
|
||||
@@ -785,7 +785,7 @@
|
||||
return value and output parameters, or error object and encode
|
||||
them into a reply packet. Again it does not attempt to do any
|
||||
semantic validation of output data, aside from variable length
|
||||
field limit checks. The worker thread puts the reply packet on
|
||||
field limit checks. The worker thread puts the reply packet onto
|
||||
the transmission queue for the client. The worker is now finished
|
||||
and goes back to wait for another incoming method call.
|
||||
</p>
|
||||
@@ -811,10 +811,10 @@
|
||||
for the worker threads, it is sidetracked into a per-stream
|
||||
processing queue. When the stream becomes writable, queued
|
||||
incoming stream packets will be processed, passing their data
|
||||
payload on the stream. Conversely when the stream becomes
|
||||
payload onto the stream. Conversely when the stream becomes
|
||||
readable, chunks of data will be read from it, encoded into
|
||||
new outgoing packets, and placed on the client's transmit
|
||||
queue.
|
||||
queue
|
||||
</p>
|
||||
|
||||
<h4><a name="apiserverdispatchex1">Example with overlapping methods</a></h4>
|
||||
|
@@ -157,15 +157,5 @@ from the C API, the only points to notice are:</p>
|
||||
various <span style="color: #E50073; background-color: #FFFFFF">methods</span>
|
||||
associated to the Domain class.</li>
|
||||
</ul>
|
||||
<h2>Maven</h2>
|
||||
<p>Up until version 0.4.7 the Java bindings were available from the central maven repository.</p>
|
||||
<p>If you want to use 0.4.8 or higher, please add the following repository to your pom.xml</p>
|
||||
<pre><repositories>
|
||||
<repository>
|
||||
<id>libvirt-org</id>
|
||||
<url>http://libvirt.org/maven2</url>
|
||||
</repository>
|
||||
</repositories></pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 14 KiB |
@@ -1,58 +0,0 @@
|
||||
#FIG 3.2 Produced by xfig version 3.2.5b
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
450 375 4575 375 4575 1725 450 1725 450 375
|
||||
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
1125 2475 4950 2475 4950 3600 1125 3600 1125 2475
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 0 1.00 60.00 120.00
|
||||
1725 1725 2175 2475
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
3150 5700 6525 5700 6525 6900 3150 6900 3150 5700
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
7875 6825 10125 6825 10125 7725 7875 7725 7875 6825
|
||||
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
2550 4725 10350 4725 10350 7800 2550 7800 2550 4725
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
|
||||
8850 1950 11550 1950 11550 3360 8850 3360 8850 1950
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 0 1.00 60.00 120.00
|
||||
3975 3600 5025 4425
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 0 1.00 60.00 120.00
|
||||
8925 3225 5400 4425
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 0 1.00 60.00 120.00
|
||||
5625 6900 7875 7425
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3
|
||||
1 0 1.00 60.00 120.00
|
||||
11400 3375 11400 7575 10125 7575
|
||||
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
8400 975 12450 975 12450 4125 8400 4125 8400 975
|
||||
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 6
|
||||
1 0 1.00 60.00 120.00
|
||||
10125 7125 10725 7125 10725 4425 7725 4425 7725 2700 8850 2700
|
||||
4 0 0 50 -1 16 12 0.0000 4 180 2430 1350 2895 virConnectOpenReadOnly(uri)\001
|
||||
4 0 0 50 -1 16 12 0.0000 4 180 3240 1350 3090 virConnectOpenAuth(uri, auth, flags)\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 165 1350 3300 5850 virConnectOpen:\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 165 2070 3300 6045 virConnectOpenReadOnly:\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 165 1710 3300 6240 virConnectOpenAuth:\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 180 900 3975 6600 do_open():\001
|
||||
4 0 0 50 -1 0 14 0.0000 4 135 1260 8025 7125 Rremote driver\001
|
||||
4 0 0 50 -1 16 24 0.0000 4 135 630 5025 4650 libvirt\001
|
||||
4 0 0 50 -1 0 14 0.0000 4 180 1890 9000 2175 remoteDispatchOpen():\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 45 270 9300 2475 ...\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 180 1440 9300 2670 virConnectOpen()\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 180 2160 9300 2865 virConnectOpenReadOnly()\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 45 270 9300 3060 ...\001
|
||||
4 0 0 50 -1 0 12 0.0000 4 180 1080 8250 7350 remoteOpen()\001
|
||||
4 0 0 50 -1 16 16 0.0000 4 165 3240 600 1050 "virsh -c qemu:///system list --all"\001
|
||||
4 0 0 50 -1 16 12 0.0000 4 180 1710 1350 2700 virConnectOpen(uri)\001
|
||||
4 0 0 50 -1 16 24 0.0000 4 135 720 9750 825 libvirtd\001
|
Before Width: | Height: | Size: 10 KiB |
@@ -184,25 +184,23 @@ div.api {
|
||||
border: 1px solid #999999;
|
||||
background: #eeeeee;
|
||||
color: black;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
div.api pre {
|
||||
margin: 0px;
|
||||
border: 0px;
|
||||
background: inherit;
|
||||
padding: inherit;
|
||||
}
|
||||
|
||||
div.api table {
|
||||
margin: 0px;
|
||||
padding-left: 2em;
|
||||
border-spacing: 0px;
|
||||
font-family: fixed;
|
||||
whitespace: pre;
|
||||
}
|
||||
|
||||
div.api table td, div.variablelist table td {
|
||||
vertical-align: top;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
|
||||
@@ -414,66 +412,3 @@ table.data tbody td.n {
|
||||
background: rgb(255,220,220);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.api {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.api .type {
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
color: darkslateblue;
|
||||
}
|
||||
|
||||
.api .keyword {
|
||||
font-weight: bold;
|
||||
color: #A2F;
|
||||
}
|
||||
|
||||
.api .comment {
|
||||
color: #080;
|
||||
margin-left: 2em;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.api .comment:before {
|
||||
content: ": ";
|
||||
position: absolute;
|
||||
left: -1.3em;
|
||||
}
|
||||
|
||||
.api .undisclosed {
|
||||
font-style: italic;
|
||||
letter-spacing: .3ex;
|
||||
font-weight: bolder;
|
||||
text-transform: uppercase;
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.api .directive {
|
||||
color: teal;
|
||||
}
|
||||
|
||||
.api :link:hover, .api :link:focus {
|
||||
color: blue;
|
||||
border-color: blue;
|
||||
}
|
||||
|
||||
.api :link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
dl.variablelist > dt {
|
||||
display: block;
|
||||
float: left;
|
||||
font-style: italic;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.variablelist dd {
|
||||
padding-left: 10em;
|
||||
}
|
||||
|
||||
dl.variablelist > dt:after {
|
||||
content: ": ";
|
||||
}
|
||||
|
Before Width: | Height: | Size: 32 KiB |
@@ -120,28 +120,6 @@
|
||||
# mount /var/lib/libvirt/sanlock
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If your sanlock daemon happen to run under non-root
|
||||
privileges, you need to tell this to libvirt so it
|
||||
chowns created files correctly. This can be done by
|
||||
setting <code>user</code> and/or <code>group</code>
|
||||
variables in the configuration file. Accepted values
|
||||
range is specified in description to the same
|
||||
variables in <code>/etc/libvirt/qemu.conf</code>. For
|
||||
example:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
augtool -s set /files/etc/libvirt/qemu-sanlock.conf/user sanlock
|
||||
augtool -s set /files/etc/libvirt/qemu-sanlock.conf/group sanlock
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
But remember, that if this is NFS share, you need a
|
||||
no_root_squash-ed one for chown (and chmod possibly)
|
||||
to succeed.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In terms of storage requirements, if the filesystem
|
||||
uses 512 byte sectors, you need to allow for <code>1MB</code>
|
||||
@@ -187,7 +165,7 @@
|
||||
<p>
|
||||
If all went well, libvirtd will have talked to sanlock
|
||||
and created the basic lockspace. This can be checked
|
||||
by looking for existence of the following file
|
||||
by looking for existance of the following file
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -230,29 +208,5 @@
|
||||
</pool>
|
||||
</pre>
|
||||
|
||||
<h2><a name="domainconfig">Domain configuration</a></h2>
|
||||
|
||||
<p>
|
||||
In case sanlock loses access to disk locks for some reason, it will
|
||||
kill all domains that lost their locks. This default behavior may
|
||||
be changed using
|
||||
<a href="formatdomain.html#elementsEvents">on_lockfailure
|
||||
element</a> in domain XML. When this element is present, sanlock
|
||||
will call <code>sanlock_helper</code> (provided by libvirt) with
|
||||
the specified action. This helper binary will connect to libvirtd
|
||||
and thus it may need to authenticate if libvirtd was configured to
|
||||
require that on the read-write UNIX socket. To provide the
|
||||
appropriate credentials to sanlock_helper, a
|
||||
<a href="auth.html#Auth_client_config">client authentication
|
||||
file</a> needs to contain something like the following:
|
||||
</p>
|
||||
<pre>
|
||||
[auth-libvirt-localhost]
|
||||
credentials=sanlock
|
||||
|
||||
[credentials-sanlock]
|
||||
authname=login
|
||||
password=password
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -118,12 +118,9 @@
|
||||
<pre>
|
||||
x:name (log message only)
|
||||
x:+name (log message + stack trace)</pre>
|
||||
<p>where <code>name</code> is a string which is matched against source
|
||||
file name, e.g., <code>remote</code>, <code>qemu</code>, or
|
||||
<code>util/json</code>, the optional <code>+</code> prefix tells libvirt
|
||||
to log stack trace for each message matching <code>name</code>, and
|
||||
<code>x</code> is the minimal level where matching messages should
|
||||
be logged:</p>
|
||||
<p>where <code>name</code> is a match string e.g. <code>remote</code> or
|
||||
<code>qemu</code> and the x is the minimal level where matching messages
|
||||
should be logged:</p>
|
||||
<ul>
|
||||
<li>1: DEBUG</li>
|
||||
<li>2: INFO</li>
|
||||
|
@@ -11,7 +11,7 @@
|
||||
libvirt implements several options for migration.
|
||||
</p>
|
||||
|
||||
<h2><a name="transport">Network data transports</a></h2>
|
||||
<h2><a id="transport">Network data transports</a></h2>
|
||||
|
||||
<p>
|
||||
There are two options for the data transport used during migration, either
|
||||
@@ -19,7 +19,7 @@
|
||||
over a libvirtd connection.
|
||||
</p>
|
||||
|
||||
<h3><a name="transportnative">Hypervisor native transport</a></h3>
|
||||
<h3><a id="transportnative">Hypervisor native transport</a></h3>
|
||||
<p>
|
||||
<em>Native</em> data transports may or may not support encryption, depending
|
||||
on the hypervisor in question, but will typically have the lowest computational costs
|
||||
@@ -33,7 +33,7 @@
|
||||
<img class="diagram" src="migration-native.png" alt="Migration native path">
|
||||
</p>
|
||||
|
||||
<h3><a name="transporttunnel">libvirt tunnelled transport</a></h3>
|
||||
<h3><a id="transporttunnel">libvirt tunnelled transport</a></h3>
|
||||
<p>
|
||||
<em>Tunnelled</em> data transports will always be capable of strong encryption
|
||||
since they are able to leverage the capabilities built in to the libvirt RPC protocol.
|
||||
@@ -51,7 +51,7 @@
|
||||
<img class="diagram" src="migration-tunnel.png" alt="Migration tunnel path">
|
||||
</p>
|
||||
|
||||
<h2><a name="flow">Communication control paths/flows</a></h2>
|
||||
<h2><a id="flow">Communication control paths/flows</a></h2>
|
||||
|
||||
<p>
|
||||
Migration of virtual machines requires close co-ordination of the two
|
||||
@@ -59,7 +59,7 @@
|
||||
which may be on the source, the destination, or a third host.
|
||||
</p>
|
||||
|
||||
<h3><a name="flowmanageddirect">Managed direct migration</a></h3>
|
||||
<h3><a id="flowmanageddirect">Managed direct migration</a></h3>
|
||||
|
||||
<p>
|
||||
With <em>managed direct</em> migration, the libvirt client process
|
||||
@@ -79,7 +79,7 @@
|
||||
</p>
|
||||
|
||||
|
||||
<h3><a name="flowpeer2peer">Managed peer to peer migration</a></h3>
|
||||
<h3><a id="flowpeer2peer">Managed peer to peer migration</a></h3>
|
||||
|
||||
<p>
|
||||
With <em>peer to peer</em> migration, the libvirt client process only
|
||||
@@ -101,7 +101,7 @@
|
||||
</p>
|
||||
|
||||
|
||||
<h3><a name="flowunmanageddirect">Unmanaged direct migration</a></h3>
|
||||
<h3><a id="flowunmanageddirect">Unmanaged direct migration</a></h3>
|
||||
|
||||
<p>
|
||||
With <em>unmanaged direct</em> migration, neither the libvirt client
|
||||
@@ -117,7 +117,7 @@
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="security">Data security</a></h2>
|
||||
<h2><a id="security">Data security</a></h2>
|
||||
|
||||
<p>
|
||||
Since the migration data stream includes a complete copy of the guest
|
||||
@@ -136,21 +136,7 @@
|
||||
facility should be used.
|
||||
</p>
|
||||
|
||||
<h2><a name="offline">Offline migration</a></h2>
|
||||
|
||||
<p>
|
||||
Offline migration transfers inactive the definition of a domain
|
||||
(which may or may not be active). After successful completion, the
|
||||
domain remains in its current state on the source host and is defined
|
||||
but inactive on the destination host. It's a bit more clever than
|
||||
<code>virsh dumpxml</code> on source host followed by
|
||||
<code>virsh define</code> on destination host, as offline migration
|
||||
will run the pre-migration hook to update the domain XML on
|
||||
destination host. Currently, copying non-shared storage is not
|
||||
supported during offline migration.
|
||||
</p>
|
||||
|
||||
<h2><a name="uris">Migration URIs</a></h2>
|
||||
<h2><a id="uris">Migration URIs</a></h2>
|
||||
|
||||
<p>
|
||||
Initiating a guest migration requires the client application to
|
||||
@@ -192,15 +178,15 @@
|
||||
should specify the hypervisor specific URI, using an IP address
|
||||
associated with the network to be used.</li>
|
||||
<li>The firewall restricts what ports are available. When libvirt
|
||||
generates a migration URI it will pick a port number using hypervisor
|
||||
generates a migration URI will pick a port number using hypervisor
|
||||
specific rules. Some hypervisors only require a single port to be
|
||||
open in the firewalls, while others require a whole range of port
|
||||
numbers. In the latter case the management application may wish
|
||||
to choose a specific port number outside the default range in order
|
||||
to comply with local firewall policies.</li>
|
||||
to comply with local firewall policies</li>
|
||||
</ol>
|
||||
|
||||
<h2><a name="config">Configuration file handling</a></h2>
|
||||
<h2><a id="config">Configuration file handling</a></h2>
|
||||
|
||||
<p>
|
||||
There are two types of virtual machine known to libvirt. A <em>transient</em>
|
||||
@@ -443,10 +429,10 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2><a name="scenarios">Migration scenarios</a></h2>
|
||||
<h2><a id="scenarios">Migration scenarios</a></h2>
|
||||
|
||||
|
||||
<h3><a name="scenarionativedirect">Native migration, client to two libvirtd servers</a></h3>
|
||||
<h3><a id="scenarionativedirect">Native migration, client to two libvirtd servers</a></h3>
|
||||
|
||||
<p>
|
||||
At an API level this requires use of virDomainMigrate, without the
|
||||
@@ -476,7 +462,7 @@
|
||||
Supported by Xen, QEMU, VMWare and VirtualBox drivers
|
||||
</p>
|
||||
|
||||
<h3><a name="scenarionativepeer2peer">Native migration, client to and peer2peer between, two libvirtd servers</a></h3>
|
||||
<h3><a id="scenarionativepeer2peer">Native migration, client to and peer2peer between, two libvirtd servers</a></h3>
|
||||
|
||||
<p>
|
||||
virDomainMigrate, with the VIR_MIGRATE_PEER2PEER flag set,
|
||||
@@ -500,7 +486,7 @@
|
||||
Supported by QEMU driver
|
||||
</p>
|
||||
|
||||
<h3><a name="scenariotunnelpeer2peer1">Tunnelled migration, client and peer2peer between two libvirtd servers</a></h3>
|
||||
<h3><a id="scenariotunnelpeer2peer1">Tunnelled migration, client and peer2peer between two libvirtd servers</a></h3>
|
||||
|
||||
<p>
|
||||
virDomainMigrate, with the VIR_MIGRATE_PEER2PEER & VIR_MIGRATE_TUNNELLED
|
||||
@@ -523,7 +509,7 @@
|
||||
Supported by QEMU driver
|
||||
</p>
|
||||
|
||||
<h3><a name="nativedirectunmanaged">Native migration, client to one libvirtd server</a></h3>
|
||||
<h3><a id="nativedirectunmanaged">Native migration, client to one libvirtd server</a></h3>
|
||||
|
||||
<p>
|
||||
virDomainMigrateToURI, without the VIR_MIGRATE_PEER2PEER flag set,
|
||||
@@ -547,7 +533,7 @@
|
||||
Supported by Xen driver
|
||||
</p>
|
||||
|
||||
<h3><a name="nativepeer2peer">Native migration, peer2peer between two libvirtd servers</a></h3>
|
||||
<h3><a id="nativepeer2peer">Native migration, peer2peer between two libvirtd servers</a></h3>
|
||||
|
||||
<p>
|
||||
virDomainMigrateToURI, with the VIR_MIGRATE_PEER2PEER flag set,
|
||||
@@ -584,7 +570,7 @@
|
||||
Supported by the QEMU driver
|
||||
</p>
|
||||
|
||||
<h3><a name="scenariotunnelpeer2peer2">Tunnelled migration, peer2peer between two libvirtd servers</a></h3>
|
||||
<h3><a id="scenariotunnelpeer2peer2">Tunnelled migration, peer2peer between two libvirtd servers</a></h3>
|
||||
|
||||
<p>
|
||||
virDomainMigrateToURI, with the VIR_MIGRATE_PEER2PEER & VIR_MIGRATE_TUNNELLED
|
||||
|
371
docs/newapi.xsl
@@ -83,51 +83,17 @@
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="formattext">
|
||||
<xsl:param name="text" />
|
||||
|
||||
<xsl:if test="$text">
|
||||
<xsl:variable name="head" select="substring-before($text, '

')"/>
|
||||
<xsl:variable name="rest" select="substring-after($text, '

')"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$head">
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="$head"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
</xsl:when>
|
||||
<xsl:when test="not($rest)">
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:if test="$rest">
|
||||
<xsl:call-template name="formattext">
|
||||
<xsl:with-param name="text" select="$rest"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="macro" mode="toc">
|
||||
<span class="directive">#define</span><xsl:text> </xsl:text>
|
||||
<xsl:text>#define </xsl:text>
|
||||
<a href="#{@name}"><xsl:value-of select="@name"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="variable" mode="toc">
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="string(@type)"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="string(@type)"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<a name="{@name}"></a>
|
||||
<xsl:value-of select="@name"/>
|
||||
@@ -136,21 +102,18 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="typedef" mode="toc">
|
||||
<span class="keyword">typedef</span>
|
||||
<xsl:text> </xsl:text><xsl:variable name="name" select="string(@name)"/>
|
||||
<xsl:text>typedef </xsl:text><xsl:variable name="name" select="string(@name)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'enum'">
|
||||
<span class="keyword">enum</span><xsl:text> </xsl:text>
|
||||
<xsl:text>enum </xsl:text>
|
||||
<a href="#{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<a name="{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>
|
||||
@@ -164,7 +127,7 @@
|
||||
<h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3>
|
||||
<div class="api">
|
||||
<pre>
|
||||
<span class="keyword">enum</span><xsl:text> </xsl:text>
|
||||
<xsl:text>enum </xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text> {
|
||||
</xsl:text>
|
||||
@@ -178,11 +141,10 @@
|
||||
<td><xsl:value-of select="@value"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
@@ -196,8 +158,8 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="struct" mode="toc">
|
||||
<span class="keyword">typedef</span><xsl:text> </xsl:text>
|
||||
<span class="type"><xsl:value-of select="@type"/></span>
|
||||
<xsl:text>typedef </xsl:text>
|
||||
<xsl:value-of select="@type"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<a href="#{@name}"><xsl:value-of select="@name"/></a>
|
||||
<xsl:text>
|
||||
@@ -208,83 +170,78 @@
|
||||
<h3><a name="{@name}"><code><xsl:value-of select="@name"/></code></a></h3>
|
||||
<div class="api">
|
||||
<pre>
|
||||
<span class="keyword">struct </span>
|
||||
<xsl:text>struct </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> {
|
||||
<xsl:text>{
|
||||
</xsl:text>
|
||||
</pre>
|
||||
<xsl:if test="field">
|
||||
<table>
|
||||
<xsl:for-each select="field">
|
||||
<xsl:choose>
|
||||
<xsl:when test='@type = "union"'>
|
||||
<tr><td><span class="keyword">union</span> {</td></tr>
|
||||
<tr>
|
||||
<td><table>
|
||||
<xsl:for-each select="union/field">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table></td>
|
||||
<td></td></tr>
|
||||
<tr><td>}</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
<td></td></tr>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<table>
|
||||
<xsl:for-each select="field">
|
||||
<xsl:choose>
|
||||
<xsl:when test='@type = "union"'>
|
||||
<tr><td>union {</td></tr>
|
||||
<tr>
|
||||
<td><table>
|
||||
<xsl:for-each select="union/field">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(field)">
|
||||
<div class="undisclosed">The content of this structure is not made public by the API</div>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</table></td>
|
||||
<td></td></tr>
|
||||
<tr><td>}</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</xsl:if>
|
||||
<td></td></tr>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="not(field)">
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<xsl:text>The content of this structure is not made public by the API</xsl:text>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</table>
|
||||
<pre>
|
||||
<xsl:text>
|
||||
}
|
||||
@@ -296,12 +253,12 @@
|
||||
<xsl:template match="macro">
|
||||
<xsl:variable name="name" select="string(@name)"/>
|
||||
<h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3>
|
||||
<pre class="api"><span class="directive">#define</span><xsl:text> </xsl:text><xsl:value-of select="$name"/></pre>
|
||||
<div>
|
||||
<xsl:call-template name="formattext">
|
||||
<pre><xsl:text>#define </xsl:text><xsl:value-of select="$name"/></pre>
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="info"/>
|
||||
</xsl:call-template>
|
||||
</div><xsl:text>
|
||||
</p><xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
@@ -310,11 +267,9 @@
|
||||
<xsl:variable name="nlen" select="string-length($name)"/>
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>	</xsl:text>
|
||||
<a href="#{@name}"><xsl:value-of select="@name"/></a>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
@@ -325,14 +280,12 @@
|
||||
</xsl:if>
|
||||
<xsl:text>	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<span class="type">void</span>
|
||||
<xsl:text>void</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
@@ -355,15 +308,13 @@
|
||||
<xsl:variable name="nlen" select="string-length($name)"/>
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<span class="keyword">typedef</span><xsl:text> </xsl:text>
|
||||
<xsl:text>typedef </xsl:text>
|
||||
<a href="#{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>	</xsl:text>
|
||||
<a href="#{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
@@ -374,14 +325,12 @@
|
||||
</xsl:if>
|
||||
<xsl:text>	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<span class="type">void</span>
|
||||
<xsl:text>void</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
@@ -407,13 +356,11 @@
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3>
|
||||
<pre class="api">
|
||||
<span class="keyword">typedef</span><xsl:text> </xsl:text>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<pre class="programlisting">
|
||||
<xsl:text>typedef </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>	(*</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
@@ -424,19 +371,16 @@
|
||||
</xsl:if>
|
||||
<xsl:text>)	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<span class="type">void</span>
|
||||
<xsl:text>void</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>,
|
||||
</xsl:text>
|
||||
<xsl:text>, </xsl:text><br/>
|
||||
<xsl:if test="$blen - 40 > 8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
@@ -449,30 +393,34 @@
|
||||
<xsl:text>)
|
||||
</xsl:text>
|
||||
</pre>
|
||||
<div>
|
||||
<xsl:call-template name="formattext">
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</p>
|
||||
<xsl:if test="arg | return">
|
||||
<dl class="variablelist">
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody>
|
||||
<xsl:for-each select="arg">
|
||||
<dt><xsl:value-of select="@name"/></dt>
|
||||
<dd>
|
||||
<xsl:call-template name="dumptext">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</dd>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="return/@info">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@info"/>
|
||||
</xsl:call-template>
|
||||
</dd>
|
||||
<tr>
|
||||
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</dl>
|
||||
</tbody></table></div>
|
||||
</xsl:if>
|
||||
<br/>
|
||||
<xsl:text>
|
||||
@@ -485,12 +433,10 @@
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3>
|
||||
<pre class="api">
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<pre class="programlisting">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>	</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
@@ -501,19 +447,16 @@
|
||||
</xsl:if>
|
||||
<xsl:text>	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<span class="type">void</span>
|
||||
<xsl:text>void</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>,
|
||||
</xsl:text>
|
||||
<xsl:text>, </xsl:text><br/>
|
||||
<xsl:if test="$blen - 40 > 8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
@@ -523,33 +466,39 @@
|
||||
<xsl:text>					 </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)</xsl:text>
|
||||
<xsl:text>)</xsl:text><br/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</pre>
|
||||
<div>
|
||||
<xsl:call-template name="formattext">
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="info"/>
|
||||
</xsl:call-template>
|
||||
</div><xsl:text>
|
||||
</p><xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:if test="arg | return/@info">
|
||||
<dl class="variablelist">
|
||||
<xsl:for-each select="arg">
|
||||
<dt><xsl:value-of select="@name"/></dt>
|
||||
<dd>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</dd>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="return/@info">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody>
|
||||
<xsl:for-each select="arg">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="return/@info">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@info"/>
|
||||
</xsl:call-template>
|
||||
</dd>
|
||||
</xsl:if>
|
||||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</tbody></table></div>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
@@ -598,20 +547,20 @@
|
||||
<h2>Table of Contents</h2>
|
||||
<xsl:if test="count(exports[@type='macro']) > 0">
|
||||
<h3><a href="#macros">Macros</a></h3>
|
||||
<pre class="api">
|
||||
<pre>
|
||||
<xsl:apply-templates select="exports[@type='macro']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
</pre>
|
||||
</xsl:if>
|
||||
<h3><a href="#types">Types</a></h3>
|
||||
<pre class="api">
|
||||
<pre>
|
||||
<xsl:apply-templates select="exports[@type='typedef']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
</pre>
|
||||
<h3><a href="#functions">Functions</a></h3>
|
||||
<pre class="api">
|
||||
<pre>
|
||||
<xsl:apply-templates select="exports[@type='function']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
|
3604
docs/news.html.in
@@ -54,7 +54,7 @@
|
||||
<xsl:when test="$pagename = a/@href">
|
||||
<span class="{$class}"><xsl:value-of select="a"/></span>
|
||||
</xsl:when>
|
||||
<xsl:when test="starts-with(a/@href, 'http://wiki.libvirt.org')">
|
||||
<xsl:when test="a/@href = 'http://wiki.libvirt.org'">
|
||||
<a title="{./span}" class="{$class}" href="{a/@href}"><xsl:value-of select="a"/></a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
@@ -1,8 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>Pending patches needing review</h1>
|
||||
<p> A list of pending patches needing review upstream is available
|
||||
on <a href="http://libvirt.org/pending.html">the project pending
|
||||
patches page</a>.</p>
|
||||
</body>
|
||||
</html>
|
@@ -59,9 +59,6 @@
|
||||
<li>
|
||||
<a href="http://en.wikipedia.org/wiki/Virtualization">Wikipedia Virtualization</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.ibm.com/developerworks/linux/library/l-kvm-libvirt-audit/index.html">IBM developerworks article about libvirt and audit.</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Blogs and Podcasts</h2>
|
||||
|
@@ -136,14 +136,8 @@ Remote libvirt supports a range of transports:
|
||||
<dd> Unencrypted TCP/IP socket. Not recommended for production
|
||||
use, this is normally disabled, but an administrator can enable
|
||||
it for testing or use over a trusted network.
|
||||
The standard port is 16509. </dd>
|
||||
<dt> libssh2 </dt>
|
||||
<dd> Transport over the SSH protocol using
|
||||
<a href="http://libssh2.org/" title="libssh2 homepage">libssh2</a> instead
|
||||
of the OpenSSH binary. This transport uses the libvirt authentication callback for
|
||||
all ssh authentication calls and therefore supports keyboard-interactive authentication
|
||||
even with graphical management applications. As with the classic ssh transport
|
||||
netcat is required on the remote side.</dd>
|
||||
The standard port is 16509.
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
The default transport, if no other is specified, is <code>tls</code>.
|
||||
@@ -188,9 +182,6 @@ Connect to a libvirtd daemon offering unencrypted TCP/IP connections
|
||||
on localhost port 5000 and use the test driver with default
|
||||
settings.
|
||||
</li>
|
||||
<li><code>qemu+libssh2://user@host/system?known_hosts=/home/user/.ssh/known_hosts</code><br/> —
|
||||
Connect to a remote host using a ssh connection with the libssh2 driver
|
||||
and use a different known_hosts file.</li>
|
||||
</ul>
|
||||
<h4>
|
||||
<a name="Remote_URI_parameters">Extra parameters</a>
|
||||
@@ -246,7 +237,7 @@ Note that parameter values must be
|
||||
<td>
|
||||
<code>socket</code>
|
||||
</td>
|
||||
<td> unix, ssh, libssh2 </td>
|
||||
<td> unix, ssh </td>
|
||||
<td>
|
||||
The path to the Unix domain socket, which overrides the
|
||||
compiled-in default. For ssh transport, this is passed to
|
||||
@@ -261,7 +252,7 @@ Note that parameter values must be
|
||||
<td>
|
||||
<code>netcat</code>
|
||||
</td>
|
||||
<td> ssh, libssh2 </td>
|
||||
<td> ssh </td>
|
||||
<td>
|
||||
The name of the netcat command on the remote machine.
|
||||
The default is <code>nc</code>. For ssh transport, libvirt
|
||||
@@ -286,7 +277,7 @@ Note that parameter values must be
|
||||
<td>
|
||||
<code>keyfile</code>
|
||||
</td>
|
||||
<td> ssh, libssh2 </td>
|
||||
<td> ssh </td>
|
||||
<td>
|
||||
The name of the private key file to use to authentication to the remote
|
||||
machine. If this option is not used the default keys are used.
|
||||
@@ -350,39 +341,6 @@ Note that parameter values must be
|
||||
<td colspan="2"/>
|
||||
<td> Example: <code>pkipath=/tmp/pki/client</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>known_hosts</code>
|
||||
</td>
|
||||
<td> libssh2 </td>
|
||||
<td>
|
||||
Path to the known_hosts file to verify the host key against. LibSSH2
|
||||
supports OpenSSH-style known_hosts files, although it does not support
|
||||
all key types, so using files created by the OpenSSH binary may result
|
||||
into truncating the known_hosts file. It's recommended to use the default
|
||||
known_hosts file is located in libvirt's client local configuration
|
||||
directory e.g.: ~/.config/libvirt/known_hosts. Note: Use absolute paths.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"/>
|
||||
<td> Example: <code>known_hosts=/root/.ssh/known_hosts</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>sshauth</code>
|
||||
</td>
|
||||
<td> libssh2 </td>
|
||||
<td>
|
||||
A comma separated list of authentication methods to use. Default (is
|
||||
"agent,privkey,keyboard-interactive". The order of the methods is perserved.
|
||||
Some methods may require additional parameters.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"/>
|
||||
<td> Example: <code>sshauth=privkey,agent</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>
|
||||
<a name="Remote_certificates">Generating TLS certificates</a>
|
||||
|
@@ -20,12 +20,6 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='octalMode'>
|
||||
<data type="unsignedInt">
|
||||
<param name='pattern'>[0-7]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="uint8range">
|
||||
<choice>
|
||||
<data type="string">
|
||||
@@ -60,31 +54,6 @@
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="pciaddress">
|
||||
<optional>
|
||||
<attribute name="domain">
|
||||
<ref name="pciDomain"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name="bus">
|
||||
<ref name="pciBus"/>
|
||||
</attribute>
|
||||
<attribute name="slot">
|
||||
<ref name="pciSlot"/>
|
||||
</attribute>
|
||||
<attribute name="function">
|
||||
<ref name="pciFunc"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="multifunction">
|
||||
<choice>
|
||||
<value>on</value>
|
||||
<value>off</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<!-- a 6 byte MAC address in ASCII-hex format, eg "12:34:56:78:9A:BC" -->
|
||||
<!-- The lowest bit of the 1st byte is the "multicast" bit. a -->
|
||||
<!-- uniMacAddr requires that bit to be 0, and a multiMacAddr -->
|
||||
@@ -107,65 +76,6 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<!--====================================================================-->
|
||||
<!--The duid is a unique identifier used in DHCPv6 to identity an -->
|
||||
<!--interface on a device (system). The duid is often used by servers -->
|
||||
<!--such as dnsmasq to assign a specific IP address (and optionally a -->
|
||||
<!--name to an interface. The applicable standards are RFC3315 and -->
|
||||
<!--RFC6355. These standards actualy require the duid to be fixed for -->
|
||||
<!--the hardward device and applicable to all network interfaces on -->
|
||||
<!--that device. It is not clear that any software currently enforces -->
|
||||
<!--this requirement although it could be implemented manually. -->
|
||||
<!--====================================================================-->
|
||||
<!--There are currently four types of duids defined: -->
|
||||
<!-- type 1, duid-LLT, link-layer (MAC) plus 32 bit time when the -->
|
||||
<!-- duid-LLT was created in seconds from January 1, 2000 -->
|
||||
<!-- type 2, duid-EN, 32 bit "enterprise number" followed by a -->
|
||||
<!-- variable length unique identifier. -->
|
||||
<!-- type 3, duid-LL, link-layer (MAC) -->
|
||||
<!-- type 4, duid-UUID, a 128 bit UUID (16 bytes) -->
|
||||
<!--RFC3315 states that the maximum length of a duid is 128 bytes plus -->
|
||||
<!--the 16 bit type field. Often, the machine type is "1" which is the -->
|
||||
<!--number assigned to ethernet. -->
|
||||
|
||||
<define name="duidLLT">
|
||||
<data type="string">
|
||||
<!-- 0======| type======| 0======| machine type======| time================| link-layer============| -->
|
||||
<param name="pattern">[0]{1,2}:[0]{0,1}[1]:[0]{1,2}:[0]{0,1}[a-fA-F1-9](:[a-fA-F0-9]{1,2}){4}(:[a-fA-F0-9]{1,2}){6,8}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="duidEN">
|
||||
<data type="string">
|
||||
<!-- 0======| type======| Enterprise number===| unique id ==============| -->
|
||||
<param name="pattern">[0]{1,2}:[0]{0,1}[2](:[a-fA-F0-9]{1,2}){4}(:[a-fA-F0-9]{1,2}){1,124}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="duidLL">
|
||||
<data type="string">
|
||||
<!-- 0======| type======| 0======| machine type======| link-layer============| -->
|
||||
<param name="pattern">[0]{1,2}:[0]{0,1}[3]:[0]{1,2}:[0]{0,1}[a-fA-F1-9](:[a-fA-F0-9]{1,2}){6,8}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="duidUUID">
|
||||
<data type="string">
|
||||
<!-- 0======| type======| UUID=================| -->
|
||||
<param name="pattern">[0]{1,2}:[0]{0,1}[4](:[a-fA-F0-9]{1,2}){16}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="DUID">
|
||||
<choice>
|
||||
<ref name="duidLLT"/>
|
||||
<ref name="duidEN"/>
|
||||
<ref name="duidLL"/>
|
||||
<ref name="duidUUID"/>
|
||||
</choice>
|
||||
</define>
|
||||
<!--======================================================================-->
|
||||
|
||||
<!-- An ipv4 "dotted quad" address -->
|
||||
<define name="ipv4Addr">
|
||||
<data type="string">
|
||||
@@ -257,119 +167,4 @@
|
||||
<ref name='unsignedLong'/>
|
||||
</define>
|
||||
|
||||
<define name="pciDomain">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="pciBus">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-9a-fA-F]{1,2}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="pciSlot">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-1]?[0-9a-fA-F]</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="pciFunc">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-7]</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='wwn'>
|
||||
<data type='string'>
|
||||
<param name='pattern'>(0x)?[0-9a-fA-F]{16}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="cpuset">
|
||||
<data type="string">
|
||||
<param name="pattern">([0-9]+(-[0-9]+)?|\^[0-9]+)(,([0-9]+(-[0-9]+)?|\^[0-9]+))*</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='volName'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[a-zA-Z0-9_\+\-\.]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='archnames'>
|
||||
<choice>
|
||||
<value>alpha</value>
|
||||
<value>armv7l</value>
|
||||
<value>cris</value>
|
||||
<value>i686</value>
|
||||
<value>ia64</value>
|
||||
<value>lm32</value>
|
||||
<value>m68k</value>
|
||||
<value>microblaze</value>
|
||||
<value>microblazeel</value>
|
||||
<value>mips</value>
|
||||
<value>mipsel</value>
|
||||
<value>mips64</value>
|
||||
<value>mips64el</value>
|
||||
<value>openrisc</value>
|
||||
<value>parisc</value>
|
||||
<value>parisc64</value>
|
||||
<value>ppc</value>
|
||||
<value>ppc64</value>
|
||||
<value>ppcemb</value>
|
||||
<value>s390</value>
|
||||
<value>s390x</value>
|
||||
<value>sh4</value>
|
||||
<value>sh4eb</value>
|
||||
<value>sparc</value>
|
||||
<value>sparc64</value>
|
||||
<value>unicore32</value>
|
||||
<value>x86_64</value>
|
||||
<value>xtensa</value>
|
||||
<value>xtensaeb</value>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="PortNumber">
|
||||
<data type="short">
|
||||
<param name="minInclusive">-1</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfoadapter'>
|
||||
<element name='adapter'>
|
||||
<choice>
|
||||
<group>
|
||||
<!-- To keep back-compat, 'type' is not mandatory for
|
||||
scsi_host adapter -->
|
||||
<optional>
|
||||
<attribute name='type'>
|
||||
<value>scsi_host</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name='name'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name='type'>
|
||||
<value>fc_host</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name='parent'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name='wwnn'>
|
||||
<ref name='wwn'/>
|
||||
</attribute>
|
||||
<attribute name='wwpn'>
|
||||
<ref name='wwn'/>
|
||||
</attribute>
|
||||
</group>
|
||||
</choice>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
</grammar>
|
||||
|
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- A Relax NG schema for the libvirt capabilities XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
@@ -45,22 +44,20 @@
|
||||
<optional>
|
||||
<ref name='topology'/>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<optional>
|
||||
<ref name='secmodel'/>
|
||||
</zeroOrMore>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='secmodel'>
|
||||
<element name='secmodel'>
|
||||
<interleave>
|
||||
<element name='model'>
|
||||
<text/>
|
||||
</element>
|
||||
<element name='doi'>
|
||||
<text/>
|
||||
</element>
|
||||
</interleave>
|
||||
<element name='model'>
|
||||
<text/>
|
||||
</element>
|
||||
<element name='doi'>
|
||||
<text/>
|
||||
</element>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@@ -176,10 +173,6 @@
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
|
||||
<optional>
|
||||
<ref name='memory'/>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<element name='cpus'>
|
||||
<attribute name='num'>
|
||||
@@ -193,28 +186,11 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='memory'>
|
||||
<element name='memory'>
|
||||
<ref name='scaledInteger'/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='cpu'>
|
||||
<element name='cpu'>
|
||||
<attribute name='id'>
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name='socket_id'>
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
<attribute name='core_id'>
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
<attribute name='siblings'>
|
||||
<ref name='cpuset'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@@ -320,45 +296,43 @@
|
||||
|
||||
<define name='features'>
|
||||
<element name='features'>
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name='pae'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='nonpae'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='ia64_be'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='acpi'>
|
||||
<ref name='featuretoggle'/>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='apic'>
|
||||
<ref name='featuretoggle'/>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='cpuselection'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='deviceboot'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
<optional>
|
||||
<element name='pae'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='nonpae'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='ia64_be'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='acpi'>
|
||||
<ref name='featuretoggle'/>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='apic'>
|
||||
<ref name='featuretoggle'/>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='cpuselection'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='deviceboot'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@@ -377,6 +351,23 @@
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<define name='archnames'>
|
||||
<choice>
|
||||
<value>arm</value>
|
||||
<value>i686</value>
|
||||
<value>ia64</value>
|
||||
<value>microblaze</value>
|
||||
<value>microblazeel</value>
|
||||
<value>mips</value>
|
||||
<value>mipsel</value>
|
||||
<value>ppc64</value>
|
||||
<value>ppc</value>
|
||||
<value>s390</value>
|
||||
<value>sparc</value>
|
||||
<value>x86_64</value>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name='featureName'>
|
||||
<data type='string'>
|
||||
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
|
||||
|
@@ -30,29 +30,6 @@
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='memory'>
|
||||
<choice>
|
||||
<attribute name='snapshot'>
|
||||
<choice>
|
||||
<value>no</value>
|
||||
<value>internal</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<group>
|
||||
<optional>
|
||||
<attribute name='snapshot'>
|
||||
<value>external</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name='file'>
|
||||
<ref name='absFilePath'/>
|
||||
</attribute>
|
||||
</group>
|
||||
</choice>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='disks'>
|
||||
<zeroOrMore>
|
||||
@@ -128,7 +105,7 @@
|
||||
<element name='driver'>
|
||||
<optional>
|
||||
<attribute name='type'>
|
||||
<ref name='diskFormat'/>
|
||||
<ref name='genericName'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<empty/>
|
||||
|
@@ -12,21 +12,6 @@
|
||||
<define name="network">
|
||||
|
||||
<element name="network">
|
||||
<optional>
|
||||
<attribute name="connections">
|
||||
<data type="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<!-- Enables IPv6 guest-to-guest communications on a network
|
||||
with no gateways addresses specified -->
|
||||
<optional>
|
||||
<attribute name="ipv6">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
|
||||
<!-- The name of the network, used to refer to it through the API
|
||||
@@ -97,51 +82,17 @@
|
||||
<value>passthrough</value>
|
||||
<value>private</value>
|
||||
<value>vepa</value>
|
||||
<value>hostdev</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<attribute name="managed">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
<choice>
|
||||
<group>
|
||||
<zeroOrMore>
|
||||
<element name='interface'>
|
||||
<attribute name='dev'>
|
||||
<ref name='deviceName'/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="connections">
|
||||
<data type="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</group>
|
||||
<group>
|
||||
<zeroOrMore>
|
||||
<element name='address'>
|
||||
<attribute name='type'>
|
||||
<value>pci</value>
|
||||
</attribute>
|
||||
<ref name="pciaddress"/>
|
||||
<optional>
|
||||
<attribute name="connections">
|
||||
<data type="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</group>
|
||||
</choice>
|
||||
<zeroOrMore>
|
||||
<element name='interface'>
|
||||
<attribute name='dev'>
|
||||
<ref name='deviceName'/>
|
||||
</attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
<element name='pf'>
|
||||
<attribute name='dev'>
|
||||
@@ -149,17 +100,6 @@
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="driver">
|
||||
<attribute name="name">
|
||||
<choice>
|
||||
<value>kvm</value>
|
||||
<value>vfio</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</optional>
|
||||
@@ -183,17 +123,9 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
<optional>
|
||||
<ref name="virtualPortProfile"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="bandwidth"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="vlan"/>
|
||||
<ref name="virtualPortProfile"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
|
||||
@@ -229,7 +161,7 @@
|
||||
</zeroOrMore>
|
||||
<zeroOrMore>
|
||||
<element name="host">
|
||||
<attribute name="ip"><ref name="ipAddr"/></attribute>
|
||||
<attribute name="ip"><ref name="ipv4Addr"/></attribute>
|
||||
<oneOrMore>
|
||||
<element name="hostname"><ref name="dnsName"/></element>
|
||||
</oneOrMore>
|
||||
@@ -240,9 +172,6 @@
|
||||
<optional>
|
||||
<ref name="bandwidth"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="vlan"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="link">
|
||||
<attribute name="state">
|
||||
@@ -283,25 +212,15 @@
|
||||
<element name="dhcp">
|
||||
<zeroOrMore>
|
||||
<element name="range">
|
||||
<attribute name="start"><ref name="ipAddr"/></attribute>
|
||||
<attribute name="end"><ref name="ipAddr"/></attribute>
|
||||
<attribute name="start"><ref name="ipv4Addr"/></attribute>
|
||||
<attribute name="end"><ref name="ipv4Addr"/></attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<zeroOrMore>
|
||||
<element name="host">
|
||||
<choice>
|
||||
<group>
|
||||
<choice>
|
||||
<attribute name="mac"><ref name="uniMacAddr"/></attribute>
|
||||
<attribute name="id"><ref name="DUID"/></attribute>
|
||||
</choice>
|
||||
<optional>
|
||||
<attribute name="name"><text/></attribute>
|
||||
</optional>
|
||||
</group>
|
||||
<attribute name="name"><text/></attribute>
|
||||
</choice>
|
||||
<attribute name="ip"><ref name="ipAddr"/></attribute>
|
||||
<attribute name="mac"><ref name="uniMacAddr"/></attribute>
|
||||
<attribute name="name"><text/></attribute>
|
||||
<attribute name="ip"><ref name="ipv4Addr"/></attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
|
@@ -15,30 +15,22 @@
|
||||
<attribute name="type">
|
||||
<value>802.1Qbg</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<element name="parameters">
|
||||
<optional>
|
||||
<attribute name="managerid">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="typeid">
|
||||
<ref name="uint24range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="typeidversion">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="instanceid">
|
||||
<ref name="UUID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
<element name="parameters">
|
||||
<attribute name="managerid">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
<attribute name="typeid">
|
||||
<ref name="uint24range"/>
|
||||
</attribute>
|
||||
<attribute name="typeidversion">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="instanceid">
|
||||
<ref name="UUID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</element>
|
||||
</group>
|
||||
<group>
|
||||
@@ -46,75 +38,11 @@
|
||||
<attribute name="type">
|
||||
<value>802.1Qbh</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<element name="parameters">
|
||||
<optional>
|
||||
<attribute name="profileid">
|
||||
<ref name="virtualPortProfileID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</group>
|
||||
<group>
|
||||
<element name="virtualport">
|
||||
<attribute name="type">
|
||||
<value>openvswitch</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<element name="parameters">
|
||||
<optional>
|
||||
<attribute name="profileid">
|
||||
<ref name="virtualPortProfileID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="interfaceid">
|
||||
<ref name="UUID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</group>
|
||||
<group>
|
||||
<!-- use this when no type attribute is present -->
|
||||
<element name="virtualport">
|
||||
<optional>
|
||||
<element name="parameters">
|
||||
<optional>
|
||||
<attribute name="managerid">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="typeid">
|
||||
<ref name="uint24range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="typeidversion">
|
||||
<ref name="uint8range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="instanceid">
|
||||
<ref name="UUID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="profileid">
|
||||
<ref name="virtualPortProfileID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="interfaceid">
|
||||
<ref name="UUID"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
<element name="parameters">
|
||||
<attribute name="profileid">
|
||||
<ref name="virtualPortProfileID"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</element>
|
||||
</group>
|
||||
</choice>
|
||||
@@ -148,11 +76,6 @@
|
||||
<ref name="speed"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="floor">
|
||||
<ref name="speed"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name='burst'>
|
||||
<ref name="BurstSize"/>
|
||||
@@ -189,24 +112,4 @@
|
||||
<param name="pattern">(ipv4)|(ipv6)</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="vlan">
|
||||
<element name="vlan">
|
||||
<optional>
|
||||
<attribute name="trunk">
|
||||
<value>yes</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<oneOrMore>
|
||||
<element name="tag">
|
||||
<attribute name="id">
|
||||
<data type="unsignedInt">
|
||||
<param name="maxInclusive">4095</param>
|
||||
</data>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
</define>
|
||||
</grammar>
|
||||
|
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- A Relax NG schema for the libvirt node device XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
@@ -16,12 +15,6 @@
|
||||
<element name="parent"><text/></element>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<element name="driver">
|
||||
<element name="name"><text/></element>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<zeroOrMore>
|
||||
<ref name="capability"/>
|
||||
</zeroOrMore>
|
||||
@@ -122,28 +115,6 @@
|
||||
</choice>
|
||||
</element>
|
||||
|
||||
<optional>
|
||||
<element name='capability'>
|
||||
<attribute name='type'>
|
||||
<value>phys_function</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name='address'/>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<element name='capability'>
|
||||
<attribute name='type'>
|
||||
<value>virt_functions</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name='address'/>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
</define>
|
||||
|
||||
<define name='capusbdev'>
|
||||
@@ -246,6 +217,12 @@
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<define name='wwn'>
|
||||
<data type='string'>
|
||||
<param name='pattern'>(0-9a-fA-F){16}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='capsfchost'>
|
||||
<attribute name='type'>
|
||||
<value>fc_host</value>
|
||||
@@ -268,12 +245,6 @@
|
||||
<attribute name='type'>
|
||||
<value>vports_ops</value>
|
||||
</attribute>
|
||||
<element name='max_vports'>
|
||||
<ref name='unsignedInt'/>
|
||||
</element>
|
||||
<element name='vports'>
|
||||
<ref name='unsignedInt'/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='capscsihost'>
|
||||
@@ -398,15 +369,6 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='address'>
|
||||
<element name='address'>
|
||||
<attribute name='domain'><ref name='hexuint'/></attribute>
|
||||
<attribute name='bus'><ref name='hexuint'/></attribute>
|
||||
<attribute name='slot'><ref name='hexuint'/></attribute>
|
||||
<attribute name='function'><ref name='hexuint'/></attribute>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='hexuint'>
|
||||
<data type='string'>
|
||||
<param name="pattern">(0x)?[0-9a-f]+</param>
|
||||
|
@@ -308,25 +308,25 @@
|
||||
<choice>
|
||||
<value>root</value>
|
||||
<data type="string">
|
||||
<param name="pattern">mac[a-zA-Z0-9_\.:\-]{0,9}</param>
|
||||
<param name="pattern">mac[a-zA-Z0-9_\.:-]{0,9}</param>
|
||||
</data>
|
||||
<data type="string">
|
||||
<param name="pattern">stp[a-zA-Z0-9_\.:\-]{0,9}</param>
|
||||
<param name="pattern">stp[a-zA-Z0-9_\.:-]{0,9}</param>
|
||||
</data>
|
||||
<data type="string">
|
||||
<param name="pattern">vlan[a-zA-Z0-9_\.:\-]{0,8}</param>
|
||||
<param name="pattern">vlan[a-zA-Z0-9_\.:-]{0,8}</param>
|
||||
</data>
|
||||
<data type="string">
|
||||
<param name="pattern">arp[a-zA-Z0-9_\.:\-]{0,9}</param>
|
||||
<param name="pattern">arp[a-zA-Z0-9_\.:-]{0,9}</param>
|
||||
</data>
|
||||
<data type="string">
|
||||
<param name="pattern">rarp[a-zA-Z0-9_\.:\-]{0,8}</param>
|
||||
<param name="pattern">rarp[a-zA-Z0-9_\.:-]{0,8}</param>
|
||||
</data>
|
||||
<data type="string">
|
||||
<param name="pattern">ipv4[a-zA-Z0-9_\.:\-]{0,8}</param>
|
||||
<param name="pattern">ipv4[a-zA-Z0-9_\.:-]{0,8}</param>
|
||||
</data>
|
||||
<data type="string">
|
||||
<param name="pattern">ipv6[a-zA-Z0-9_\.:\-]{0,8}</param>
|
||||
<param name="pattern">ipv6[a-zA-Z0-9_\.:-]{0,8}</param>
|
||||
</data>
|
||||
</choice>
|
||||
</attribute>
|
||||
@@ -485,14 +485,6 @@
|
||||
<ref name="stateflags-type"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="ipset">
|
||||
<ref name="ipset-name-type"/>
|
||||
</attribute>
|
||||
<attribute name="ipsetflags">
|
||||
<ref name="ipset-flags-type"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
@@ -950,7 +942,10 @@
|
||||
<param name="pattern">0x[0-9a-fA-F]{1,8}</param>
|
||||
</data>
|
||||
|
||||
<data type="unsignedInt"/>
|
||||
<data type="int">
|
||||
<param name="minInclusive">0</param>
|
||||
<param name="maxInclusive">4294967295</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
@@ -1065,19 +1060,4 @@
|
||||
<param name="pattern">((SYN|ACK|URG|PSH|FIN|RST)(,(SYN|ACK|URG|PSH|FIN|RST))*|ALL|NONE)/((SYN|ACK|URG|PSH|FIN|RST)(,(SYN|ACK|URG|PSH|FIN|RST))*|ALL|NONE)</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='ipset-name-type'>
|
||||
<choice>
|
||||
<ref name="variable-name-type"/>
|
||||
<data type="string">
|
||||
<param name="pattern">[a-zA-Z0-9_\.:\-\+ ]{1,31}</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name='ipset-flags-type'>
|
||||
<data type="string">
|
||||
<param name="pattern">(src|dst)(,(src|dst)){0,5}</param>
|
||||
</data>
|
||||
</define>
|
||||
</grammar>
|
||||
|
@@ -41,7 +41,6 @@
|
||||
<choice>
|
||||
<ref name='usagevolume'/>
|
||||
<ref name='usageceph'/>
|
||||
<ref name='usageiscsi'/>
|
||||
<!-- More choices later -->
|
||||
</choice>
|
||||
</element>
|
||||
@@ -68,13 +67,4 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='usageiscsi'>
|
||||
<attribute name='type'>
|
||||
<value>iscsi</value>
|
||||
</attribute>
|
||||
<element name='target'>
|
||||
<ref name='genericName'/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
</grammar>
|
||||
|
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- A Relax NG schema for the libvirt volume encryption XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
|
@@ -19,8 +19,6 @@
|
||||
<ref name='pooliscsi'/>
|
||||
<ref name='poolscsi'/>
|
||||
<ref name='poolmpath'/>
|
||||
<ref name='poolrbd'/>
|
||||
<ref name='poolsheepdog'/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@@ -107,24 +105,6 @@
|
||||
<ref name='target'/>
|
||||
</define>
|
||||
|
||||
<define name='poolrbd'>
|
||||
<attribute name='type'>
|
||||
<value>rbd</value>
|
||||
</attribute>
|
||||
<ref name='commonmetadata'/>
|
||||
<ref name='sizing'/>
|
||||
<ref name='sourcerbd'/>
|
||||
</define>
|
||||
|
||||
<define name='poolsheepdog'>
|
||||
<attribute name='type'>
|
||||
<value>sheepdog</value>
|
||||
</attribute>
|
||||
<ref name='commonmetadata'/>
|
||||
<ref name='sizing'/>
|
||||
<ref name='sourcesheepdog'/>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfovendor'>
|
||||
<optional>
|
||||
<element name='vendor'>
|
||||
@@ -144,7 +124,7 @@
|
||||
|
||||
<define name='commonmetadata'>
|
||||
<element name='name'>
|
||||
<ref name='genericName'/>
|
||||
<ref name='name'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='uuid'>
|
||||
@@ -175,19 +155,13 @@
|
||||
<optional>
|
||||
<element name='permissions'>
|
||||
<element name='mode'>
|
||||
<ref name='octalMode'/>
|
||||
<ref name='unsignedInt'/>
|
||||
</element>
|
||||
<element name='owner'>
|
||||
<choice>
|
||||
<ref name='unsignedInt'/>
|
||||
<value>-1</value>
|
||||
</choice>
|
||||
<ref name='unsignedInt'/>
|
||||
</element>
|
||||
<element name='group'>
|
||||
<choice>
|
||||
<ref name='unsignedInt'/>
|
||||
<value>-1</value>
|
||||
</choice>
|
||||
<ref name='unsignedInt'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='label'>
|
||||
@@ -210,19 +184,17 @@
|
||||
</define>
|
||||
|
||||
<define name='sourceinfohost'>
|
||||
<oneOrMore>
|
||||
<element name='host'>
|
||||
<attribute name='name'>
|
||||
<text/>
|
||||
<element name='host'>
|
||||
<attribute name='name'>
|
||||
<text/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name='port'>
|
||||
<ref name="PortNumber"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name='port'>
|
||||
<ref name="PortNumber"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</optional>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfodev'>
|
||||
@@ -230,8 +202,7 @@
|
||||
<attribute name='path'>
|
||||
<choice>
|
||||
<ref name='absFilePath'/>
|
||||
<ref name='genericName'/>
|
||||
<ref name='IscsiQualifiedName'/>
|
||||
<ref name='name'/>
|
||||
</choice>
|
||||
</attribute>
|
||||
<choice>
|
||||
@@ -274,6 +245,15 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfoadapter'>
|
||||
<element name='adapter'>
|
||||
<attribute name='name'>
|
||||
<text/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfoname'>
|
||||
<element name='name'>
|
||||
<text/>
|
||||
@@ -285,38 +265,14 @@
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>chap</value>
|
||||
<value>ceph</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<choice>
|
||||
<attribute name='login'>
|
||||
<text/>
|
||||
</attribute>
|
||||
<attribute name='username'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</choice>
|
||||
<optional>
|
||||
<attribute name='passwd'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='sourceinfoauthsecret'/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfoauthsecret'>
|
||||
<element name='secret'>
|
||||
<choice>
|
||||
<attribute name='uuid'>
|
||||
<text/>
|
||||
</attribute>
|
||||
<attribute name='usage'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</choice>
|
||||
<attribute name='login'>
|
||||
<text/>
|
||||
</attribute>
|
||||
<attribute name='passwd'>
|
||||
<text/>
|
||||
</attribute>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@@ -484,6 +440,7 @@
|
||||
<optional>
|
||||
<ref name='sourceinfovendor'/>
|
||||
</optional>
|
||||
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@@ -493,26 +450,15 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourcerbd'>
|
||||
<element name='source'>
|
||||
<ref name='sourceinfoname'/>
|
||||
<ref name='sourceinfohost'/>
|
||||
<optional>
|
||||
<ref name='sourceinfoauth'/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourcesheepdog'>
|
||||
<element name='source'>
|
||||
<ref name='sourceinfohost'/>
|
||||
<ref name='sourceinfoname'/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='IscsiQualifiedName'>
|
||||
<define name='name'>
|
||||
<data type='string'>
|
||||
<param name="pattern">iqn\.[0-9]{4}-(0[1-9]|1[0-2])\.[a-zA-Z0-9\.\-]+(:.+)?</param>
|
||||
<param name="pattern">[a-zA-Z0-9_\+\-]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="PortNumber">
|
||||
<data type="short">
|
||||
<param name="minInclusive">-1</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
|