mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-23 23:34:16 +03:00
Compare commits
45 Commits
v4.6.0-rc2
...
v1.2.1-mai
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4ecee35ae | ||
|
|
02d365dae5 | ||
|
|
614c8d4c6b | ||
|
|
73174ca1c6 | ||
|
|
871da17484 | ||
|
|
bc52fd9d0e | ||
|
|
7f6b096085 | ||
|
|
c735ddf560 | ||
|
|
1f348188e0 | ||
|
|
f7c70c2053 | ||
|
|
75dfd58284 | ||
|
|
e902cd4773 | ||
|
|
6d7ce691b3 | ||
|
|
44ee474abc | ||
|
|
fe4fc3fd03 | ||
|
|
3adae530f5 | ||
|
|
c639118634 | ||
|
|
fdde9d6a1b | ||
|
|
a73122a4ab | ||
|
|
b814222d5b | ||
|
|
60e54a5021 | ||
|
|
877388678a | ||
|
|
ce8262ff65 | ||
|
|
7adf48077f | ||
|
|
6a5de7d7a4 | ||
|
|
0a7cc10671 | ||
|
|
93394f56c4 | ||
|
|
d5a14a1a68 | ||
|
|
8b546028f9 | ||
|
|
b0ed2d94ac | ||
|
|
ee1269eecd | ||
|
|
b999782823 | ||
|
|
51a897a22e | ||
|
|
ad52184399 | ||
|
|
158b5373be | ||
|
|
7289743c01 | ||
|
|
d8074fbf29 | ||
|
|
ea16d496ac | ||
|
|
d613d44ff0 | ||
|
|
b1db6c7fe4 | ||
|
|
dac036ac95 | ||
|
|
2d92daa94d | ||
|
|
e48e414e43 | ||
|
|
c5d10b7a3d | ||
|
|
822d25b262 |
@@ -1,40 +0,0 @@
|
|||||||
-I@abs_top_builddir@
|
|
||||||
-I@abs_top_srcdir@
|
|
||||||
-I@abs_top_builddir@/gnulib/lib
|
|
||||||
-I@abs_top_srcdir@/gnulib/lib
|
|
||||||
-I@abs_top_builddir@/include
|
|
||||||
-I@abs_top_srcdir@/include
|
|
||||||
-I@abs_top_builddir@/src
|
|
||||||
-I@abs_top_srcdir@/src
|
|
||||||
-I@abs_top_builddir@/src/access
|
|
||||||
-I@abs_top_srcdir@/src/access
|
|
||||||
-I@abs_top_builddir@/src/admin
|
|
||||||
-I@abs_top_srcdir@/src/admin
|
|
||||||
-I@abs_top_builddir@/src/bhyve
|
|
||||||
-I@abs_top_srcdir@/src/bhyve
|
|
||||||
-I@abs_top_builddir@/src/conf
|
|
||||||
-I@abs_top_srcdir@/src/conf
|
|
||||||
-I@abs_top_builddir@/src/libxl
|
|
||||||
-I@abs_top_srcdir@/src/libxl
|
|
||||||
-I@abs_top_builddir@/src/locking
|
|
||||||
-I@abs_top_srcdir@/src/locking
|
|
||||||
-I@abs_top_builddir@/src/logging
|
|
||||||
-I@abs_top_srcdir@/src/logging
|
|
||||||
-I@abs_top_builddir@/src/lxc
|
|
||||||
-I@abs_top_srcdir@/src/lxc
|
|
||||||
-I@abs_top_builddir@/src/qemu
|
|
||||||
-I@abs_top_srcdir@/src/qemu
|
|
||||||
-I@abs_top_builddir@/src/remote
|
|
||||||
-I@abs_top_srcdir@/src/remote
|
|
||||||
-I@abs_top_builddir@/src/rpc
|
|
||||||
-I@abs_top_srcdir@/src/rpc
|
|
||||||
-I@abs_top_builddir@/src/secret
|
|
||||||
-I@abs_top_srcdir@/src/secret
|
|
||||||
-I@abs_top_builddir@/src/security
|
|
||||||
-I@abs_top_srcdir@/src/security
|
|
||||||
-I@abs_top_builddir@/src/util
|
|
||||||
-I@abs_top_srcdir@/src/util
|
|
||||||
-I@abs_top_builddir@/src/vmx
|
|
||||||
-I@abs_top_srcdir@/src/vmx
|
|
||||||
-I@abs_top_builddir@/src/xenconfig
|
|
||||||
-I@abs_top_srcdir@/src/xenconfig
|
|
||||||
158
.gitignore
vendored
158
.gitignore
vendored
@@ -1,17 +1,13 @@
|
|||||||
*#*#
|
*#*#
|
||||||
*.#*#
|
*.#*#
|
||||||
*.[187]
|
|
||||||
*.[187].in
|
|
||||||
*.a
|
*.a
|
||||||
*.cov
|
*.cov
|
||||||
*.exe
|
*.exe
|
||||||
*.exe.manifest
|
|
||||||
*.gcda
|
*.gcda
|
||||||
*.gcno
|
*.gcno
|
||||||
*.gcov
|
*.gcov
|
||||||
*.html
|
*.html
|
||||||
*.i
|
*.i
|
||||||
*.init
|
|
||||||
*.la
|
*.la
|
||||||
*.lo
|
*.lo
|
||||||
*.loT
|
*.loT
|
||||||
@@ -21,12 +17,8 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
*.rej
|
*.rej
|
||||||
*.s
|
*.s
|
||||||
*.service
|
|
||||||
*.socket
|
|
||||||
*.swp
|
|
||||||
*~
|
*~
|
||||||
.#*
|
.#*
|
||||||
.color_coded
|
|
||||||
.deps
|
.deps
|
||||||
.dirstamp
|
.dirstamp
|
||||||
.gdb_history
|
.gdb_history
|
||||||
@@ -36,7 +28,7 @@
|
|||||||
.lvimrc
|
.lvimrc
|
||||||
.memdump
|
.memdump
|
||||||
.sc-start-sc_*
|
.sc-start-sc_*
|
||||||
.ycm_extra_conf.py
|
/ABOUT-NLS
|
||||||
/AUTHORS
|
/AUTHORS
|
||||||
/ChangeLog
|
/ChangeLog
|
||||||
/GNUmakefile
|
/GNUmakefile
|
||||||
@@ -44,9 +36,9 @@
|
|||||||
/NEWS
|
/NEWS
|
||||||
/aclocal.m4
|
/aclocal.m4
|
||||||
/autom4te.cache
|
/autom4te.cache
|
||||||
/build-aux/*
|
/build-aux
|
||||||
|
/build-aux/
|
||||||
/build/
|
/build/
|
||||||
/confdefs.h
|
|
||||||
/config.cache
|
/config.cache
|
||||||
/config.guess
|
/config.guess
|
||||||
/config.h
|
/config.h
|
||||||
@@ -57,42 +49,40 @@
|
|||||||
/config.sub
|
/config.sub
|
||||||
/configure
|
/configure
|
||||||
/configure.lineno
|
/configure.lineno
|
||||||
/conftest.*
|
/daemon/*_dispatch.h
|
||||||
|
/daemon/libvirt_qemud
|
||||||
|
/daemon/libvirtd
|
||||||
|
/daemon/libvirtd*.logrotate
|
||||||
|
/daemon/libvirtd.8
|
||||||
|
/daemon/libvirtd.8.in
|
||||||
|
/daemon/libvirtd.init
|
||||||
|
/daemon/libvirtd.pod
|
||||||
|
/daemon/libvirtd.policy
|
||||||
|
/daemon/libvirtd.service
|
||||||
|
/daemon/test_libvirtd.aug
|
||||||
/docs/aclperms.htmlinc
|
/docs/aclperms.htmlinc
|
||||||
/docs/apibuild.py.stamp
|
/docs/apibuild.py.stamp
|
||||||
/docs/devhelp/libvirt.devhelp
|
/docs/devhelp/libvirt.devhelp
|
||||||
/docs/hvsupport.html.in
|
/docs/hvsupport.html.in
|
||||||
/docs/libvirt-admin-*.xml
|
|
||||||
/docs/libvirt-api.xml
|
/docs/libvirt-api.xml
|
||||||
/docs/libvirt-lxc-*.xml
|
/docs/libvirt-lxc-*.xml
|
||||||
/docs/libvirt-qemu-*.xml
|
/docs/libvirt-qemu-*.xml
|
||||||
/docs/libvirt-refs.xml
|
/docs/libvirt-refs.xml
|
||||||
/docs/news.html.in
|
|
||||||
/docs/search.php
|
/docs/search.php
|
||||||
/docs/todo.html.in
|
/docs/todo.html.in
|
||||||
/examples/admin/client_close
|
|
||||||
/examples/admin/client_info
|
|
||||||
/examples/admin/client_limits
|
|
||||||
/examples/admin/list_clients
|
|
||||||
/examples/admin/list_servers
|
|
||||||
/examples/admin/logging
|
|
||||||
/examples/admin/threadpool_params
|
|
||||||
/examples/object-events/event-test
|
/examples/object-events/event-test
|
||||||
/examples/dominfo/info1
|
/examples/dominfo/info1
|
||||||
/examples/domsuspend/suspend
|
/examples/domsuspend/suspend
|
||||||
/examples/dommigrate/dommigrate
|
|
||||||
/examples/domtop/domtop
|
|
||||||
/examples/hellolibvirt/hellolibvirt
|
/examples/hellolibvirt/hellolibvirt
|
||||||
/examples/openauth/openauth
|
/examples/openauth/openauth
|
||||||
/examples/rename/rename
|
|
||||||
/gnulib/lib/*
|
/gnulib/lib/*
|
||||||
/gnulib/m4/*
|
/gnulib/m4/*
|
||||||
/gnulib/tests/*
|
/gnulib/tests/*
|
||||||
/include/libvirt/libvirt-common.h
|
/include/libvirt/libvirt.h
|
||||||
/libtool
|
/libtool
|
||||||
/libvirt-*.tar.xz
|
/libvirt-*.tar.gz
|
||||||
/libvirt-[0-9]*
|
/libvirt-[0-9]*
|
||||||
/libvirt*.pc
|
/libvirt.pc
|
||||||
/libvirt.spec
|
/libvirt.spec
|
||||||
/ltconfig
|
/ltconfig
|
||||||
/ltmain.sh
|
/ltmain.sh
|
||||||
@@ -100,16 +90,12 @@
|
|||||||
/maint.mk
|
/maint.mk
|
||||||
/mingw-libvirt.spec
|
/mingw-libvirt.spec
|
||||||
/mkinstalldirs
|
/mkinstalldirs
|
||||||
/po/*gmo
|
/po/*
|
||||||
/po/*po
|
|
||||||
!/po/*.mini.po
|
|
||||||
/po/*pot
|
|
||||||
/proxy/
|
/proxy/
|
||||||
/python/
|
/python/
|
||||||
/run
|
/run
|
||||||
/sc_*
|
/sc_*
|
||||||
/src/.*.stamp
|
/src/.*.stamp
|
||||||
/src/*.pc
|
|
||||||
/src/access/org.libvirt.api.policy
|
/src/access/org.libvirt.api.policy
|
||||||
/src/access/viraccessapicheck.c
|
/src/access/viraccessapicheck.c
|
||||||
/src/access/viraccessapicheck.h
|
/src/access/viraccessapicheck.h
|
||||||
@@ -117,9 +103,6 @@
|
|||||||
/src/access/viraccessapichecklxc.h
|
/src/access/viraccessapichecklxc.h
|
||||||
/src/access/viraccessapicheckqemu.c
|
/src/access/viraccessapicheckqemu.c
|
||||||
/src/access/viraccessapicheckqemu.h
|
/src/access/viraccessapicheckqemu.h
|
||||||
/src/admin/admin_client.h
|
|
||||||
/src/admin/admin_protocol.[ch]
|
|
||||||
/src/admin/admin_server_dispatch_stubs.h
|
|
||||||
/src/esx/*.generated.*
|
/src/esx/*.generated.*
|
||||||
/src/hyperv/*.generated.*
|
/src/hyperv/*.generated.*
|
||||||
/src/libvirt*.def
|
/src/libvirt*.def
|
||||||
@@ -130,22 +113,15 @@
|
|||||||
/src/libvirt_access_lxc.xml
|
/src/libvirt_access_lxc.xml
|
||||||
/src/libvirt_access_qemu.syms
|
/src/libvirt_access_qemu.syms
|
||||||
/src/libvirt_access_qemu.xml
|
/src/libvirt_access_qemu.xml
|
||||||
/src/libvirt_admin.syms
|
|
||||||
/src/libvirt_*.stp
|
/src/libvirt_*.stp
|
||||||
/src/libvirt_*helper
|
/src/libvirt_*helper
|
||||||
/src/libvirt_*probes.h
|
/src/libvirt_*probes.h
|
||||||
/src/libvirt_lxc
|
/src/libvirt_lxc
|
||||||
/src/libvirtd
|
|
||||||
/src/libvirtd*.logrotate
|
|
||||||
/src/locking/libxl-lockd.conf
|
|
||||||
/src/locking/libxl-sanlock.conf
|
|
||||||
/src/locking/lock_daemon_dispatch_stubs.h
|
/src/locking/lock_daemon_dispatch_stubs.h
|
||||||
/src/locking/lock_protocol.[ch]
|
/src/locking/lock_protocol.[ch]
|
||||||
/src/locking/qemu-lockd.conf
|
/src/locking/qemu-lockd.conf
|
||||||
/src/locking/qemu-sanlock.conf
|
/src/locking/qemu-sanlock.conf
|
||||||
/src/locking/test_libvirt_sanlock.aug
|
/src/locking/test_libvirt_sanlock.aug
|
||||||
/src/logging/log_daemon_dispatch_stubs.h
|
|
||||||
/src/logging/log_protocol.[ch]
|
|
||||||
/src/lxc/lxc_controller_dispatch.h
|
/src/lxc/lxc_controller_dispatch.h
|
||||||
/src/lxc/lxc_monitor_dispatch.h
|
/src/lxc/lxc_monitor_dispatch.h
|
||||||
/src/lxc/lxc_monitor_protocol.c
|
/src/lxc/lxc_monitor_protocol.c
|
||||||
@@ -155,43 +131,101 @@
|
|||||||
/src/qemu/test_libvirtd_qemu.aug
|
/src/qemu/test_libvirtd_qemu.aug
|
||||||
/src/remote/*_client_bodies.h
|
/src/remote/*_client_bodies.h
|
||||||
/src/remote/*_protocol.[ch]
|
/src/remote/*_protocol.[ch]
|
||||||
/src/remote/*_stubs.h
|
|
||||||
/src/rpc/virkeepaliveprotocol.[ch]
|
/src/rpc/virkeepaliveprotocol.[ch]
|
||||||
/src/rpc/virnetprotocol.[ch]
|
/src/rpc/virnetprotocol.[ch]
|
||||||
/src/test_libvirt*.aug
|
/src/test_libvirt*.aug
|
||||||
/src/test_virtlockd.aug
|
/src/test_virtlockd.aug
|
||||||
/src/test_virtlogd.aug
|
/src/util/virkeymaps.h
|
||||||
/src/util/virkeycodetable*.h
|
|
||||||
/src/util/virkeynametable*.h
|
|
||||||
/src/virt-aa-helper
|
/src/virt-aa-helper
|
||||||
/src/virtlockd
|
/src/virtlockd
|
||||||
/src/virtlogd
|
/src/virtlockd.8
|
||||||
/src/virt-guest-shutdown.target
|
/src/virtlockd.8.in
|
||||||
|
/src/virtlockd.init
|
||||||
/tests/*.log
|
/tests/*.log
|
||||||
/tests/*.pid
|
/tests/*.pid
|
||||||
/tests/*.trs
|
/tests/*.trs
|
||||||
/tests/*test
|
/tests/*xml2*test
|
||||||
/tests/commandhelper
|
/tests/commandhelper
|
||||||
/tests/qemucapsprobe
|
/tests/commandtest
|
||||||
!/tests/virsh-self-test
|
/tests/conftest
|
||||||
!/tests/virt-aa-helper-test
|
/tests/cputest
|
||||||
!/tests/virt-admin-self-test
|
/tests/domainsnapshotxml2xmltest
|
||||||
/tests/objectlocking
|
/tests/esxutilstest
|
||||||
/tests/objectlocking-files.txt
|
/tests/eventtest
|
||||||
/tests/objectlocking.cm[ix]
|
/tests/fchosttest
|
||||||
|
/tests/fdstreamtest
|
||||||
|
/tests/hashtest
|
||||||
|
/tests/jsontest
|
||||||
|
/tests/libvirtdconftest
|
||||||
|
/tests/metadatatest
|
||||||
|
/tests/networkxml2argvtest
|
||||||
|
/tests/nodeinfotest
|
||||||
|
/tests/nwfilterxml2xmltest
|
||||||
|
/tests/objecteventtest
|
||||||
|
/tests/object-locking
|
||||||
|
/tests/object-locking-files.txt
|
||||||
|
/tests/object-locking.cm[ix]
|
||||||
|
/tests/openvzutilstest
|
||||||
|
/tests/qemuagenttest
|
||||||
|
/tests/qemuargv2xmltest
|
||||||
|
/tests/qemucapabilitiestest
|
||||||
|
/tests/qemuhelptest
|
||||||
|
/tests/qemuhotplugtest
|
||||||
|
/tests/qemumonitorjsontest
|
||||||
|
/tests/qemumonitortest
|
||||||
|
/tests/qemuxmlnstest
|
||||||
|
/tests/qparamtest
|
||||||
/tests/reconnect
|
/tests/reconnect
|
||||||
|
/tests/secaatest
|
||||||
|
/tests/seclabeltest
|
||||||
|
/tests/securityselinuxlabeltest
|
||||||
|
/tests/securityselinuxtest
|
||||||
|
/tests/sexpr2xmltest
|
||||||
|
/tests/shunloadtest
|
||||||
|
/tests/sockettest
|
||||||
/tests/ssh
|
/tests/ssh
|
||||||
/tests/test_file_access.txt
|
/tests/statstest
|
||||||
|
/tests/storagebackendsheepdogtest
|
||||||
|
/tests/sysinfotest
|
||||||
/tests/test_conf
|
/tests/test_conf
|
||||||
|
/tests/utiltest
|
||||||
|
/tests/viratomictest
|
||||||
|
/tests/virauthconfigtest
|
||||||
|
/tests/virbitmaptest
|
||||||
|
/tests/virbuftest
|
||||||
|
/tests/vircgrouptest
|
||||||
|
/tests/virdbustest
|
||||||
|
/tests/virdrivermoduletest
|
||||||
|
/tests/virendiantest
|
||||||
|
/tests/virfiletest
|
||||||
|
/tests/virhashtest
|
||||||
|
/tests/viridentitytest
|
||||||
|
/tests/virkeycodetest
|
||||||
|
/tests/virkeyfiletest
|
||||||
|
/tests/virlockspacetest
|
||||||
|
/tests/virlogtest
|
||||||
|
/tests/virnet*test
|
||||||
|
/tests/virpcitest
|
||||||
|
/tests/virportallocatortest
|
||||||
|
/tests/virshtest
|
||||||
|
/tests/virstoragetest
|
||||||
|
/tests/virstringtest
|
||||||
|
/tests/virsystemdtest
|
||||||
|
/tests/virtimetest
|
||||||
|
/tests/viruritest
|
||||||
|
/tests/vmwarevertest
|
||||||
|
/tests/vmx2xmltest
|
||||||
|
/tests/xencapstest
|
||||||
|
/tests/xmconfigtest
|
||||||
|
/tools/*.[18]
|
||||||
|
/tools/libvirt-guests.init
|
||||||
|
/tools/libvirt-guests.service
|
||||||
/tools/libvirt-guests.sh
|
/tools/libvirt-guests.sh
|
||||||
/tools/virt-login-shell
|
/tools/virt-login-shell
|
||||||
/tools/virsh
|
/tools/virsh
|
||||||
/tools/virsh-*-edit.c
|
/tools/virsh-*-edit.c
|
||||||
/tools/virt-admin
|
|
||||||
/tools/virt-*-validate
|
/tools/virt-*-validate
|
||||||
/tools/virt-sanlock-cleanup
|
/tools/virt-sanlock-cleanup
|
||||||
/tools/wireshark/src/plugin.c
|
|
||||||
/tools/wireshark/src/libvirt
|
|
||||||
/update.log
|
/update.log
|
||||||
GPATH
|
GPATH
|
||||||
GRTAGS
|
GRTAGS
|
||||||
@@ -209,7 +243,9 @@ stamp-h
|
|||||||
stamp-h.in
|
stamp-h.in
|
||||||
stamp-h1
|
stamp-h1
|
||||||
tags
|
tags
|
||||||
!/build-aux/*.pl
|
|
||||||
!/gnulib/lib/Makefile.am
|
!/gnulib/lib/Makefile.am
|
||||||
!/gnulib/tests/Makefile.am
|
!/gnulib/tests/Makefile.am
|
||||||
!/m4/virt-*.m4
|
!/m4/virt-*.m4
|
||||||
|
!/po/*.po
|
||||||
|
!/po/POTFILES.in
|
||||||
|
!/po/libvirt.pot
|
||||||
|
|||||||
5
.gitmodules
vendored
5
.gitmodules
vendored
@@ -1,6 +1,3 @@
|
|||||||
[submodule "gnulib"]
|
[submodule "gnulib"]
|
||||||
path = .gnulib
|
path = .gnulib
|
||||||
url = https://git.savannah.gnu.org/git/gnulib.git/
|
url = git://git.sv.gnu.org/gnulib.git
|
||||||
[submodule "keycodemapdb"]
|
|
||||||
path = src/keycodemapdb
|
|
||||||
url = https://gitlab.com/keycodemap/keycodemapdb.git
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
[gitpublishprofile "default"]
|
|
||||||
base = master
|
|
||||||
to = libvir-list@redhat.com
|
|
||||||
2
.gnulib
2
.gnulib
Submodule .gnulib updated: 68df637b5f...d18d1b8023
23
.mailmap
23
.mailmap
@@ -5,10 +5,7 @@
|
|||||||
|
|
||||||
<bozzolan@gmail.com> <redshift@gmx.com>
|
<bozzolan@gmail.com> <redshift@gmx.com>
|
||||||
<charles_duffy@messageone.com> <charles@dyfis.net>
|
<charles_duffy@messageone.com> <charles@dyfis.net>
|
||||||
<claudio.bley@gmail.com> <cbley@av-test.de>
|
|
||||||
<dfj@redhat.com> <dfj@dfj.bne.redhat.com>
|
<dfj@redhat.com> <dfj@dfj.bne.redhat.com>
|
||||||
<dpkshetty@gmail.com> <deepakcs@linux.vnet.ibm.com>
|
|
||||||
<dpkshetty@gmail.com> <deepakcs@redhat.com>
|
|
||||||
<eblake@redhat.com> <ebb9@byu.net>
|
<eblake@redhat.com> <ebb9@byu.net>
|
||||||
<gdolley@arpnetworks.com> <gdolley@ucla.edu>
|
<gdolley@arpnetworks.com> <gdolley@ucla.edu>
|
||||||
<gerhard.stenzel@de.ibm.com> <gstenzel@linux.vnet.ibm.com>
|
<gerhard.stenzel@de.ibm.com> <gstenzel@linux.vnet.ibm.com>
|
||||||
@@ -20,6 +17,7 @@
|
|||||||
<jfehlig@suse.com> <jfehlig@novell.com>
|
<jfehlig@suse.com> <jfehlig@novell.com>
|
||||||
<jfehlig@suse.com> <jfehlig@linux-ypgk.site>
|
<jfehlig@suse.com> <jfehlig@linux-ypgk.site>
|
||||||
<jclift@redhat.com> <justin@salasaga.org>
|
<jclift@redhat.com> <justin@salasaga.org>
|
||||||
|
<berrange@redhat.com> <dan@berrange.com>
|
||||||
<soren@linux2go.dk> <soren@canonical.com>
|
<soren@linux2go.dk> <soren@canonical.com>
|
||||||
<cfergeau@redhat.com> <teuf@gnome.org>
|
<cfergeau@redhat.com> <teuf@gnome.org>
|
||||||
<wency@cn.fujitsu.com> <wency cn fujitsu com>
|
<wency@cn.fujitsu.com> <wency cn fujitsu com>
|
||||||
@@ -38,11 +36,6 @@
|
|||||||
<zhlcindy@linux.vnet.ibm.com> <zhlcindy@gmail.com>
|
<zhlcindy@linux.vnet.ibm.com> <zhlcindy@gmail.com>
|
||||||
<serge.hallyn@canonical.com> <serue@us.ibm.com>
|
<serge.hallyn@canonical.com> <serue@us.ibm.com>
|
||||||
<pritesh.kothari@sun.com> <Pritesh.Kothari@Sun.COM>
|
<pritesh.kothari@sun.com> <Pritesh.Kothari@Sun.COM>
|
||||||
<cbosdonnat@suse.com> <cedric.bosdonnat@free.fr>
|
|
||||||
<mnestratov@virtuozzo.com> <mnestratov@parallels.com>
|
|
||||||
<nshirokovskiy@virtuozzo.com> <nshirokovskiy@parallels.com>
|
|
||||||
<jyang@redhat.com> <osier@yunify.com>
|
|
||||||
<kkoukiou@redhat.com> <k.koukiou@googlemail.com>
|
|
||||||
|
|
||||||
# Name consolidation:
|
# Name consolidation:
|
||||||
# Preferred author spelling <preferred email>
|
# Preferred author spelling <preferred email>
|
||||||
@@ -60,16 +53,6 @@ Aurelien Rougemont <beorn@binaries.fr>
|
|||||||
Serge E. Hallyn <serge.hallyn@canonical.com>
|
Serge E. Hallyn <serge.hallyn@canonical.com>
|
||||||
Henrik Persson E <henrik.e.persson@ericsson.com>
|
Henrik Persson E <henrik.e.persson@ericsson.com>
|
||||||
Philipp Hahn <hahn@univention.de>
|
Philipp Hahn <hahn@univention.de>
|
||||||
|
Marco Bozzolan <bozzolan@gmail.com>
|
||||||
|
Marco Bozzolan <redshift@gmx.com>
|
||||||
Pritesh Kothari <pritesh.kothari@sun.com>
|
Pritesh Kothari <pritesh.kothari@sun.com>
|
||||||
Wang Yufei (James) <james.wangyufei@huawei.com>
|
|
||||||
Deepak C Shetty <dpkshetty@gmail.com>
|
|
||||||
Dave Allan <dallan@redhat.com>
|
|
||||||
Richard W.M. Jones <rjones@redhat.com>
|
|
||||||
|
|
||||||
# Non-trivial consolidation:
|
|
||||||
# see git documentation for information about the format
|
|
||||||
Daniel P. Berrangé <berrange@redhat.com>
|
|
||||||
Daniel P. Berrangé <berrange@redhat.com> <dan@berrange.com>
|
|
||||||
Michal Prívozník <mprivozn@redhat.com>
|
|
||||||
Michal Prívozník <mprivozn@redhat.com> <miso.privoznik@gmail.com>
|
|
||||||
Marco Bozzolan <bozzolan@gmail.com> <redshift@gmx.com>
|
|
||||||
|
|||||||
111
.travis.yml
111
.travis.yml
@@ -1,111 +0,0 @@
|
|||||||
sudo: required
|
|
||||||
language: generic
|
|
||||||
|
|
||||||
branches:
|
|
||||||
except:
|
|
||||||
- /^.*-maint$/
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- services:
|
|
||||||
- docker
|
|
||||||
env:
|
|
||||||
- IMAGE="ubuntu-18"
|
|
||||||
- DISTCHECK_CONFIGURE_FLAGS="--with-init-script=systemd"
|
|
||||||
- DOCKER_CMD="$LINUX_CMD"
|
|
||||||
- services:
|
|
||||||
- docker
|
|
||||||
env:
|
|
||||||
- IMAGE="centos-7"
|
|
||||||
- DISTCHECK_CONFIGURE_FLAGS="--with-init-script=upstart"
|
|
||||||
- DOCKER_CMD="$LINUX_CMD"
|
|
||||||
- services:
|
|
||||||
- docker
|
|
||||||
env:
|
|
||||||
- IMAGE="fedora-rawhide"
|
|
||||||
- MINGW="mingw32"
|
|
||||||
- DOCKER_CMD="$MINGW_CMD"
|
|
||||||
- services:
|
|
||||||
- docker
|
|
||||||
env:
|
|
||||||
- IMAGE="fedora-rawhide"
|
|
||||||
- MINGW="mingw64"
|
|
||||||
- DOCKER_CMD="$MINGW_CMD"
|
|
||||||
- compiler: clang
|
|
||||||
language: c
|
|
||||||
os: osx
|
|
||||||
env:
|
|
||||||
- PATH="/usr/local/opt/gettext/bin:/usr/local/opt/ccache/libexec:/usr/local/opt/rpcgen/bin:$PATH"
|
|
||||||
script:
|
|
||||||
/bin/sh -xc "$MACOS_CMD"
|
|
||||||
|
|
||||||
script:
|
|
||||||
- docker run
|
|
||||||
-v $(pwd):/build
|
|
||||||
-w /build
|
|
||||||
-e VIR_TEST_DEBUG="$VIR_TEST_DEBUG"
|
|
||||||
-e MINGW="$MINGW"
|
|
||||||
-e DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS"
|
|
||||||
"libvirt/buildenv-$IMAGE"
|
|
||||||
/bin/sh -xc "$DOCKER_CMD"
|
|
||||||
|
|
||||||
git:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- VIR_TEST_DEBUG=1
|
|
||||||
- LINUX_CMD="
|
|
||||||
./autogen.sh &&
|
|
||||||
make -j3 syntax-check &&
|
|
||||||
make -j3 distcheck DISTCHECK_CONFIGURE_FLAGS=\"\$DISTCHECK_CONFIGURE_FLAGS\" ||
|
|
||||||
(
|
|
||||||
echo '=== LOG FILE(S) START ===';
|
|
||||||
find -name test-suite.log | xargs cat;
|
|
||||||
echo '=== LOG FILE(S) END ===';
|
|
||||||
exit 1
|
|
||||||
)
|
|
||||||
"
|
|
||||||
- MINGW_CMD="
|
|
||||||
NOCONFIGURE=1 ./autogen.sh &&
|
|
||||||
\$MINGW-configure &&
|
|
||||||
make -j3 ||
|
|
||||||
(
|
|
||||||
echo '=== LOG FILE(S) START ===';
|
|
||||||
find -name test-suite.log | xargs cat;
|
|
||||||
echo '=== LOG FILE(S) END ===';
|
|
||||||
exit 1
|
|
||||||
)
|
|
||||||
"
|
|
||||||
# We can't run 'distcheck' or 'syntax-check' because they fail on
|
|
||||||
# macOS, but doing 'install' and 'dist' gives us some useful coverage
|
|
||||||
- MACOS_CMD="
|
|
||||||
brew update &&
|
|
||||||
brew install ccache rpcgen xz yajl &&
|
|
||||||
./autogen.sh --prefix=\$(pwd)/install-root &&
|
|
||||||
make -j3 &&
|
|
||||||
make -j3 install &&
|
|
||||||
make -j3 dist ||
|
|
||||||
(
|
|
||||||
echo '=== LOG FILE(S) START ===';
|
|
||||||
find -name test-suite.log | xargs cat;
|
|
||||||
echo '=== LOG FILE(S) END ===';
|
|
||||||
exit 1
|
|
||||||
)
|
|
||||||
"
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
irc:
|
|
||||||
# The channel name "irc.oftc.net#virt" is encrypted against libvirt/libvirt
|
|
||||||
# to prevent IRC notifications from github forks. This was created using:
|
|
||||||
# $ travis encrypt -r "libvirt/libvirt" "irc.oftc.net#virt"
|
|
||||||
channels:
|
|
||||||
- secure: "hUPdkLxX7nh75+clpnk4U0XLExLfV9DFKSvQSAUtf5JtDNMslj7AeOCf2wcbkNsEhkiF557odTAnov1s5m1w/yaa56zbjFAh5agzqRKya3QjqsrvlBKw/WuN+l82iMNLLeebTgCPAXrbAbGWH8YmYssp/7+eMsnKaVh84EQQNbMCHlLg6ovE26Fs18mZ6J5RC3OPa1vbv+xkdCHvGg/Oyp4K8bpU7RYyimA56jdxI/OfdTH9HxntHYSzykR7hDbyzZhdIlAUyRKReQVjcV5+R8fdDL/1imyGA/88KTztMeKXpZ5Rf+Ss3vYLZb6qsLLegCZ4AU/q0vvbWxjpZGJZoeyrVpfBTZdYGIzmLTMl9GYXXa/gDwFlbvRDiPDG4TIy6GlMUROinj7KRKEHu1fWRYu012ife5OjidxcwrTnz21vYaCv3AKWPpMPxwIzQPkY1hex9uLLX6z+TrAxxDLF+7UzRT9w2RLFBkLYlj2aDVrLAVb/ynRsxDz5CGzC61FSQVft2e308SkGjdn8YxvguCuXv+N70Fu1cvFyh5XYeHb4fbBRo0Ctzaec78leHlQvRGWKJxXDXRkE2lvvBc7YbBNSAYh7Fs8Y+zY7l7rMxvXdrt3nuaNQhe74V3yhxPDAld66qmAn9TYMmaZW2f5/KKKILLbCa0t2MxiAc6L2OI8="
|
|
||||||
on_success: change
|
|
||||||
on_failure: always
|
|
||||||
email:
|
|
||||||
# The list name 'libvirt-ci@redhat.com" is encrypted against libvirt/libvirt
|
|
||||||
# to prevent IRC notifications from github forks. This was created using:
|
|
||||||
# $ travis encrypt -r "libvirt/libvirt" "libvirt-ci@redhat.com"
|
|
||||||
recipients:
|
|
||||||
- secure: "QcU9eP96P0RlDNzVRZl/4sxyydPStGzECrpgJhr2IPB/7pHk23yaBrmUsq9S830tB+jwLGma1IscNB8uf7Sf7WY+cYIpfR8v030OffWnaipo/Gcs0dpnlfURWHjOFQI3RJzGEihsqvbwUFOwsM+3IDyO3qdWaiT6cN2Tj9ROlwYCySSX5YWzLyX7arBZ4lp8ESs7ohQaEwp2cegnMP2oGPJJe4SebvlCDjHZbjkU5aEradwUWnRQDJZWTKknpNLArVFxN2/ixp6f/MGY4DmkHoDweio6mHIPN5zTs5Jt32aiX6wDBa+bBa4v8TCRqzhYkQ63ZZhNV8bY5Uf9ufTdyvt96yIANyakd85b1QpMdAX76IyJi1l0/Uub6DTQZAcq3vK7iPjGeTVSpyoXrqTfGy4JxMjqDoocpWvv8ALX1wrYI/HfN2R2Aepw9jModTimOsebYhJ1yMhSt8qnh5AQNftGKL2JBKoA1LWdU2YJ5fO1bGjKNiVEkGFQTPYFWrYCUY5JcT+s5WCzNeMNm8s9na8liYhGl3WtS3rPr5M8bof+BMsBhG2hQ0loduc94x2GkvyhQZUgRbqrwNR+y4hn+rWFC3hBzzyiAULs43vY/PJ+eBdKEf3VAc0MkhQ8GgXGSA61fR6aXYonroI/WnBVItwDmUnnMfSziZXxk09GLl4="
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
flags = [
|
|
||||||
'-I@abs_top_builddir@',
|
|
||||||
'-I@abs_top_srcdir@',
|
|
||||||
'-I@abs_top_builddir@/gnulib/lib',
|
|
||||||
'-I@abs_top_srcdir@/gnulib/lib',
|
|
||||||
'-I@abs_top_builddir@/include',
|
|
||||||
'-I@abs_top_srcdir@/include',
|
|
||||||
'-I@abs_top_builddir@/src',
|
|
||||||
'-I@abs_top_srcdir@/src',
|
|
||||||
'-I@abs_top_builddir@/src/access',
|
|
||||||
'-I@abs_top_srcdir@/src/access',
|
|
||||||
'-I@abs_top_builddir@/src/admin',
|
|
||||||
'-I@abs_top_srcdir@/src/admin',
|
|
||||||
'-I@abs_top_builddir@/src/bhyve',
|
|
||||||
'-I@abs_top_srcdir@/src/bhyve',
|
|
||||||
'-I@abs_top_builddir@/src/conf',
|
|
||||||
'-I@abs_top_srcdir@/src/conf',
|
|
||||||
'-I@abs_top_builddir@/src/libxl',
|
|
||||||
'-I@abs_top_srcdir@/src/libxl',
|
|
||||||
'-I@abs_top_builddir@/src/locking',
|
|
||||||
'-I@abs_top_srcdir@/src/locking',
|
|
||||||
'-I@abs_top_builddir@/src/logging',
|
|
||||||
'-I@abs_top_srcdir@/src/logging',
|
|
||||||
'-I@abs_top_builddir@/src/lxc',
|
|
||||||
'-I@abs_top_srcdir@/src/lxc',
|
|
||||||
'-I@abs_top_builddir@/src/qemu',
|
|
||||||
'-I@abs_top_srcdir@/src/qemu',
|
|
||||||
'-I@abs_top_builddir@/src/remote',
|
|
||||||
'-I@abs_top_srcdir@/src/remote',
|
|
||||||
'-I@abs_top_builddir@/src/rpc',
|
|
||||||
'-I@abs_top_srcdir@/src/rpc',
|
|
||||||
'-I@abs_top_builddir@/src/secret',
|
|
||||||
'-I@abs_top_srcdir@/src/secret',
|
|
||||||
'-I@abs_top_builddir@/src/security',
|
|
||||||
'-I@abs_top_srcdir@/src/security',
|
|
||||||
'-I@abs_top_builddir@/src/util',
|
|
||||||
'-I@abs_top_srcdir@/src/util',
|
|
||||||
'-I@abs_top_builddir@/src/vmx',
|
|
||||||
'-I@abs_top_srcdir@/src/vmx',
|
|
||||||
'-I@abs_top_builddir@/src/xenconfig',
|
|
||||||
'-I@abs_top_srcdir@/src/xenconfig',
|
|
||||||
]
|
|
||||||
|
|
||||||
def FlagsForFile(filename, **kwargs):
|
|
||||||
return { 'flags': flags, 'do_cache': True }
|
|
||||||
35
AUTHORS.in
35
AUTHORS.in
@@ -8,53 +8,43 @@ Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
|
|||||||
The primary maintainers and people with commit access rights:
|
The primary maintainers and people with commit access rights:
|
||||||
|
|
||||||
Alex Jia <ajia@redhat.com>
|
Alex Jia <ajia@redhat.com>
|
||||||
Andrea Bolognani <abologna@redhat.com>
|
Anthony Liguori <aliguori@us.ibm.com>
|
||||||
Cédric Bosdonnat <cbosdonnat@suse.com>
|
Chris Lalancette <clalance@redhat.com>
|
||||||
Christian Ehrhardt <christian.ehrhardt@canonical.com>
|
|
||||||
Christophe Fergeau <cfergeau@redhat.com>
|
Christophe Fergeau <cfergeau@redhat.com>
|
||||||
Claudio Bley <claudio.bley@gmail.com>
|
Claudio Bley <cbley@av-test.de>
|
||||||
Cole Robinson <crobinso@redhat.com>
|
Cole Robinson <crobinso@redhat.com>
|
||||||
Daniel P. Berrangé <berrange@redhat.com>
|
Daniel Berrange <berrange@redhat.com>
|
||||||
Daniel Veillard <veillard@redhat.com>
|
Daniel Veillard <veillard@redhat.com>
|
||||||
|
Dave Allan <dallan@redhat.com>
|
||||||
Doug Goldstein <cardoe@gentoo.org>
|
Doug Goldstein <cardoe@gentoo.org>
|
||||||
Eric Blake <eblake@redhat.com>
|
Eric Blake <eblake@redhat.com>
|
||||||
Erik Skultety <eskultet@redhat.com>
|
|
||||||
Gao Feng <gaofeng@cn.fujitsu.com>
|
Gao Feng <gaofeng@cn.fujitsu.com>
|
||||||
|
Guannan Ren <gren@redhat.com>
|
||||||
Guido Günther <agx@sigxcpu.org>
|
Guido Günther <agx@sigxcpu.org>
|
||||||
Ján Tomko <jtomko@redhat.com>
|
Ján Tomko <jtomko@redhat.com>
|
||||||
Jim Fehlig <jfehlig@suse.com>
|
Jim Fehlig <jfehlig@suse.com>
|
||||||
|
Jim Meyering <meyering@redhat.com>
|
||||||
Jiří Denemark <jdenemar@redhat.com>
|
Jiří Denemark <jdenemar@redhat.com>
|
||||||
John Ferlan <jferlan@redhat.com>
|
John Ferlan <jferlan@redhat.com>
|
||||||
Katerina Koukiou <kkoukiou@redhat.com>
|
John Levon <john.levon@sun.com>
|
||||||
|
Justin Clift <jclift@redhat.com>
|
||||||
Laine Stump <laine@redhat.com>
|
Laine Stump <laine@redhat.com>
|
||||||
Mark McLoughlin <markmc@redhat.com>
|
Mark McLoughlin <markmc@redhat.com>
|
||||||
Martin Kletzander <mkletzan@redhat.com>
|
Martin Kletzander <mkletzan@redhat.com>
|
||||||
Matthias Bolte <matthias.bolte@googlemail.com>
|
Matthias Bolte <matthias.bolte@googlemail.com>
|
||||||
Maxim Nestratov <mnestratov@virtuozzo.com>
|
|
||||||
Michal Prívozník <mprivozn@redhat.com>
|
Michal Prívozník <mprivozn@redhat.com>
|
||||||
Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
|
Osier Yang <jyang@redhat.com>
|
||||||
Pavel Hrdina <phrdina@redhat.com>
|
|
||||||
Peter Krempa <pkrempa@redhat.com>
|
Peter Krempa <pkrempa@redhat.com>
|
||||||
Richard W.M. Jones <rjones@redhat.com>
|
Richard W.M. Jones <rjones@redhat.com>
|
||||||
Roman Bogorodskiy <bogorodskiy@gmail.com>
|
|
||||||
Stefan Berger <stefanb@us.ibm.com>
|
Stefan Berger <stefanb@us.ibm.com>
|
||||||
Wen Congyang <wency@cn.fujitsu.com>
|
Wen Congyang <wency@cn.fujitsu.com>
|
||||||
|
|
||||||
Previous maintainers:
|
Previous maintainers:
|
||||||
|
|
||||||
Anthony Liguori <aliguori@us.ibm.com>
|
|
||||||
Atsushi SAKAI <sakaia@jp.fujitsu.com>
|
Atsushi SAKAI <sakaia@jp.fujitsu.com>
|
||||||
Chris Lalancette <clalance@redhat.com>
|
|
||||||
Dan Smith <danms@us.ibm.com>
|
Dan Smith <danms@us.ibm.com>
|
||||||
Dave Allan <dallan@redhat.com>
|
|
||||||
Dave Leskovec <dlesko@linux.vnet.ibm.com>
|
Dave Leskovec <dlesko@linux.vnet.ibm.com>
|
||||||
Dmitry Guryanov <dguryanov@parallels.com>
|
|
||||||
Guannan Ren <gren@redhat.com>
|
|
||||||
Jim Meyering <meyering@redhat.com>
|
|
||||||
John Levon <john.levon@sun.com>
|
|
||||||
Justin Clift <jclift@redhat.com>
|
|
||||||
Karel Zak <kzak@redhat.com>
|
Karel Zak <kzak@redhat.com>
|
||||||
Osier Yang <jyang@redhat.com>
|
|
||||||
|
|
||||||
Patches have also been contributed by:
|
Patches have also been contributed by:
|
||||||
|
|
||||||
@@ -63,6 +53,7 @@ Amit Shah <amit.shah@redhat.com>
|
|||||||
Andrew Puch <apuch@redhat.com>
|
Andrew Puch <apuch@redhat.com>
|
||||||
Anton Protopopov <aspsk2@gmail.com>
|
Anton Protopopov <aspsk2@gmail.com>
|
||||||
Ben Guthro <ben.guthro@gmail.com>
|
Ben Guthro <ben.guthro@gmail.com>
|
||||||
|
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
|
||||||
Daniel Hokka Zakrisson <daniel@hozac.com>
|
Daniel Hokka Zakrisson <daniel@hozac.com>
|
||||||
Dan Wendlandt <dan@nicira.com>
|
Dan Wendlandt <dan@nicira.com>
|
||||||
David Lively <dlively@virtualiron.com>
|
David Lively <dlively@virtualiron.com>
|
||||||
@@ -91,7 +82,9 @@ Stefan de Konink <dekonink@kinkrsoftware.nl>
|
|||||||
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||||
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
|
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
|
||||||
|
|
||||||
#contributorslist#
|
#authorslist#
|
||||||
|
|
||||||
|
[....send patches to get your name here....]
|
||||||
|
|
||||||
The libvirt logo was designed by Diana Fong
|
The libvirt logo was designed by Diana Fong
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,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
|
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
|
author's reputation will not be affected by problems that might be
|
||||||
introduced by others.
|
introduced by others.
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
Finally, software patents pose a constant threat to the existence of
|
||||||
any free program. We wish to make sure that a company cannot
|
any free program. We wish to make sure that a company cannot
|
||||||
effectively restrict the users of a free program by obtaining a
|
effectively restrict the users of a free program by obtaining a
|
||||||
@@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
|
|||||||
"work based on the library" and a "work that uses the library". The
|
"work based on the library" and a "work that uses the library". The
|
||||||
former contains code derived from the library, whereas the latter must
|
former contains code derived from the library, whereas the latter must
|
||||||
be combined with the library in order to run.
|
be combined with the library in order to run.
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ Library.
|
|||||||
You may charge a fee for the physical act of transferring a copy,
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
and you may at your option offer warranty protection in exchange for a
|
and you may at your option offer warranty protection in exchange for a
|
||||||
fee.
|
fee.
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
of it, thus forming a work based on the Library, and copy and
|
of it, thus forming a work based on the Library, and copy and
|
||||||
distribute such modifications or work under the terms of Section 1
|
distribute such modifications or work under the terms of Section 1
|
||||||
@@ -216,7 +216,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
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
that version instead if you wish.) Do not make any other change in
|
that version instead if you wish.) Do not make any other change in
|
||||||
these notices.
|
these notices.
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
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
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
subsequent copies and derivative works made from that copy.
|
subsequent copies and derivative works made from that copy.
|
||||||
@@ -267,7 +267,7 @@ Library will still fall under Section 6.)
|
|||||||
distribute the object code for the work under the terms of 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,
|
Any executables containing that work also fall under Section 6,
|
||||||
whether or not they are linked directly with the Library itself.
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
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
|
link a "work that uses the Library" with the Library to produce a
|
||||||
work containing portions of the Library, and distribute that work
|
work containing portions of the Library, and distribute that work
|
||||||
@@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
|
|||||||
accompany the operating system. Such a contradiction means you cannot
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
use both them and the Library together in an executable that you
|
use both them and the Library together in an executable that you
|
||||||
distribute.
|
distribute.
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
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
|
Library side-by-side in a single library together with other library
|
||||||
facilities not covered by this License, and distribute such a combined
|
facilities not covered by this License, and distribute such a combined
|
||||||
@@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
|
|||||||
restrictions on the recipients' exercise of the rights granted herein.
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
You are not responsible for enforcing compliance by third parties with
|
You are not responsible for enforcing compliance by third parties with
|
||||||
this License.
|
this License.
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
infringement or for any other reason (not limited to patent issues),
|
infringement or for any other reason (not limited to patent issues),
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
@@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
|
|||||||
the Free Software Foundation. If the Library does not specify a
|
the Free Software Foundation. If the Library does not specify a
|
||||||
license version number, you may choose any version ever published by
|
license version number, you may choose any version ever published by
|
||||||
the Free Software Foundation.
|
the Free Software Foundation.
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
programs whose distribution conditions are incompatible with these,
|
programs whose distribution conditions are incompatible with these,
|
||||||
write to the author to ask for permission. For software which is
|
write to the author to ask for permission. For software which is
|
||||||
@@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|||||||
DAMAGES.
|
DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
|||||||
@@ -4286,7 +4286,7 @@ Wed Dec 17 21:45:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
|||||||
|
|
||||||
Wed Dec 17 21:41:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
Wed Dec 17 21:41:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* src/libvirt_sym.version.in: Remove non-existent symbols
|
* src/libvirt_sym.version.in: Remove non-existant symbols
|
||||||
(John Levon)
|
(John Levon)
|
||||||
|
|
||||||
Wed Dec 17 21:35:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
Wed Dec 17 21:35:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||||
@@ -12415,7 +12415,7 @@ Thu Jul 12 11:02:17 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
|||||||
|
|
||||||
Thu Jul 12 11:00:17 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
Thu Jul 12 11:00:17 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* qemud/qemud.c: Add explicit checks for existence of x509
|
* qemud/qemud.c: Add explicit checks for existance of x509
|
||||||
certificate & key files to get better error reporting than
|
certificate & key files to get better error reporting than
|
||||||
GNU TLS offers when it can't load a file
|
GNU TLS offers when it can't load a file
|
||||||
|
|
||||||
@@ -13276,7 +13276,7 @@ Tue Apr 17 11:30:46 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
|||||||
|
|
||||||
Mon Apr 16 09:11:04 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
Mon Apr 16 09:11:04 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* qemud/conf.c: Check for existence of QEMU binary path. Fix check
|
* qemud/conf.c: Check for existance of QEMU binary path. Fix check
|
||||||
for -no-kqemu flag to work with x86_64 on i386
|
for -no-kqemu flag to work with x86_64 on i386
|
||||||
|
|
||||||
Mon Apr 16 09:09:04 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
Mon Apr 16 09:09:04 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
@@ -15020,7 +15020,7 @@ Tue Nov 7 16:33:43 CET 2006 Daniel Veillard <veillard@redhat.com>
|
|||||||
Tue Oct 31 10:31:34 CET 2006 Daniel Veillard <veillard@redhat.com>
|
Tue Oct 31 10:31:34 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
* src/xend_internal.c: when getting informations about a non
|
* src/xend_internal.c: when getting informations about a non
|
||||||
existent domain, it is not a good idea to raise the HTTP
|
existant domain, it is not a good idea to raise the HTTP
|
||||||
404 GET error, the handling is better done somewhere up in
|
404 GET error, the handling is better done somewhere up in
|
||||||
the stack.
|
the stack.
|
||||||
|
|
||||||
|
|||||||
964
HACKING
Normal file
964
HACKING
Normal file
@@ -0,0 +1,964 @@
|
|||||||
|
-*- buffer-read-only: t -*- vi: set ro:
|
||||||
|
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY
|
||||||
|
from docs/hacking.html.in!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Contributor guidelines
|
||||||
|
======================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
|
||||||
|
|
||||||
|
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 installation 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
|
||||||
|
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).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(5) 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:
|
||||||
|
|
||||||
|
./configure --enable-werror
|
||||||
|
|
||||||
|
and run the tests:
|
||||||
|
|
||||||
|
make check
|
||||||
|
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.
|
||||||
|
|
||||||
|
Some tests are skipped by default in a development environment, based on the
|
||||||
|
time they take in comparison to the likelihood that those tests will turn up
|
||||||
|
problems during incremental builds. These tests default to being run when when
|
||||||
|
building from a tarball or with the configure option --enable-expensive-tests;
|
||||||
|
you can also force a one-time toggle of these tests by setting
|
||||||
|
VIR_TEST_EXPENSIVE to 0 or 1 at make time, as in:
|
||||||
|
|
||||||
|
make check VIR_TEST_EXPENSIVE=1
|
||||||
|
|
||||||
|
If you encounter any failing tests, the VIR_TEST_DEBUG environment variable
|
||||||
|
may provide extra information to debug the failures. Larger values of
|
||||||
|
VIR_TEST_DEBUG may provide larger amounts of information:
|
||||||
|
|
||||||
|
VIR_TEST_DEBUG=1 make check (or)
|
||||||
|
VIR_TEST_DEBUG=2 make check
|
||||||
|
|
||||||
|
When debugging failures during development, it is possible to focus in on just
|
||||||
|
the failing subtests by using TESTS and VIR_TEST_RANGE:
|
||||||
|
|
||||||
|
make check VIR_TEST_DEBUG=1 VIR_TEST_RANGE=3-5 TESTS=qemuxml2argvtest
|
||||||
|
|
||||||
|
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 acceptable 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
|
||||||
|
feature or changing the output of a program.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
There is more on this subject, including lots of links to background reading
|
||||||
|
on the subject, on Richard Jones' guide to working with open source projects
|
||||||
|
<http://et.redhat.com/~rjones/how-to-supply-code-to-open-source-projects/>.
|
||||||
|
|
||||||
|
|
||||||
|
Code indentation
|
||||||
|
================
|
||||||
|
Libvirt's C source code generally adheres to some basic code-formatting
|
||||||
|
conventions. The existing code base is not totally consistent on this front,
|
||||||
|
but we do prefer that contributed code be formatted similarly. In short, use
|
||||||
|
spaces-not-TABs for indentation, use 4 spaces for each indentation level, and
|
||||||
|
other than that, follow the K&R style.
|
||||||
|
|
||||||
|
If you use Emacs, add the following to one of one of your start-up files
|
||||||
|
(e.g., ~/.emacs), to help ensure that you get indentation right:
|
||||||
|
|
||||||
|
;;; When editing C sources in libvirt, use this style.
|
||||||
|
(defun libvirt-c-mode ()
|
||||||
|
"C mode with adjusted defaults for use with libvirt."
|
||||||
|
(interactive)
|
||||||
|
(c-set-style "K&R")
|
||||||
|
(setq indent-tabs-mode nil) ; indent using spaces, not TABs
|
||||||
|
(setq c-indent-level 4)
|
||||||
|
(setq c-basic-offset 4))
|
||||||
|
(add-hook 'c-mode-hook
|
||||||
|
'(lambda () (if (string-match "/libvirt" (buffer-file-name))
|
||||||
|
(libvirt-c-mode))))
|
||||||
|
|
||||||
|
If you use vim, append the following to your ~/.vimrc file:
|
||||||
|
|
||||||
|
set nocompatible
|
||||||
|
filetype on
|
||||||
|
set autoindent
|
||||||
|
set smartindent
|
||||||
|
set cindent
|
||||||
|
set tabstop=8
|
||||||
|
set shiftwidth=4
|
||||||
|
set expandtab
|
||||||
|
set cinoptions=(0,:0,l1,t0
|
||||||
|
filetype plugin indent on
|
||||||
|
au FileType make setlocal noexpandtab
|
||||||
|
au BufRead,BufNewFile *.am setlocal noexpandtab
|
||||||
|
match ErrorMsg /\s\+$\| \+\ze\t/
|
||||||
|
|
||||||
|
Or if you don't want to mess your ~/.vimrc up, you can save the above into a
|
||||||
|
file called .lvimrc (not .vimrc) located at the root of libvirt source, then
|
||||||
|
install a vim script from
|
||||||
|
http://www.vim.org/scripts/script.php?script_id=1408, which will load the
|
||||||
|
.lvimrc only when you edit libvirt code.
|
||||||
|
|
||||||
|
|
||||||
|
Code formatting (especially for new code)
|
||||||
|
=========================================
|
||||||
|
With new code, we can be even more strict. Please apply the following function
|
||||||
|
(using GNU indent) to any new code. Note that this also gives you an idea of
|
||||||
|
the type of spacing we prefer around operators and keywords:
|
||||||
|
|
||||||
|
indent-libvirt()
|
||||||
|
{
|
||||||
|
indent -bad -bap -bbb -bli4 -br -ce -brs -cs -i4 -l75 -lc75 \
|
||||||
|
-sbi4 -psl -saf -sai -saw -sbi4 -ss -sc -cdw -cli4 -npcs -nbc \
|
||||||
|
--no-tabs "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
Note that sometimes you'll have to post-process that output further, by piping
|
||||||
|
it through "expand -i", since some leading TABs can get through. Usually
|
||||||
|
they're in macro definitions or strings, and should be converted anyhow.
|
||||||
|
|
||||||
|
Libvirt requires a C99 compiler for various reasons. However, most of the code
|
||||||
|
base prefers to stick to C89 syntax unless there is a compelling reason
|
||||||
|
otherwise. For example, it is preferable to use "/* */" comments rather than
|
||||||
|
"//". Also, when declaring local variables, the prevailing style has been to
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
Commas
|
||||||
|
======
|
||||||
|
Commas should always be followed by a space or end of line, and never have
|
||||||
|
leading space; this is enforced during 'make syntax-check'.
|
||||||
|
|
||||||
|
call(a,b ,c);// Bad
|
||||||
|
call(a, b, c); // Good
|
||||||
|
|
||||||
|
When declaring an enum or using a struct initializer that occupies more than
|
||||||
|
one line, use a trailing comma. That way, future edits to extend the list only
|
||||||
|
have to add a line, rather than modify an existing line to add the
|
||||||
|
intermediate comma. Any sentinel enumerator value with a name ending in _LAST
|
||||||
|
is exempt, since you would extend such an enum before the _LAST element.
|
||||||
|
Another reason to favor trailing commas is that it requires less effort to
|
||||||
|
produce via code generators. Note that the syntax checker is unable to enforce
|
||||||
|
a style of trailing commas, so there are counterexamples in existing code
|
||||||
|
which do not use it; also, while C99 allows trailing commas, remember that
|
||||||
|
JSON and XDR do not.
|
||||||
|
|
||||||
|
enum {
|
||||||
|
VALUE_ONE,
|
||||||
|
VALUE_TWO // Bad
|
||||||
|
};
|
||||||
|
enum {
|
||||||
|
VALUE_THREE,
|
||||||
|
VALUE_FOUR, // Good
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Semicolons
|
||||||
|
==========
|
||||||
|
Semicolons should never have a space beforehand. Inside the condition of a
|
||||||
|
"for" loop, there should always be a space or line break after each semicolon,
|
||||||
|
except for the special case of an infinite loop (although more infinite loops
|
||||||
|
use "while"). While not enforced, loop counters generally use post-increment.
|
||||||
|
|
||||||
|
for (i = 0 ;i < limit ; ++i) { // Bad
|
||||||
|
for (i = 0; i < limit; i++) { // Good
|
||||||
|
for (;;) { // ok
|
||||||
|
while (1) { // Better
|
||||||
|
|
||||||
|
Empty loop bodies are better represented with curly braces and a comment,
|
||||||
|
although use of a semicolon is not currently rejected.
|
||||||
|
|
||||||
|
while ((rc = waitpid(pid, &st, 0) == -1) &&
|
||||||
|
errno == EINTR); // ok
|
||||||
|
while ((rc = waitpid(pid, &st, 0) == -1) &&
|
||||||
|
errno == EINTR) { // Better
|
||||||
|
/* nothing */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Curly braces
|
||||||
|
============
|
||||||
|
Omit the curly braces around an "if", "while", "for" etc. body only when that
|
||||||
|
body occupies a single line. In every other case we require the braces. This
|
||||||
|
ensures that it is trivially easy to identify a single-'statement' loop: each
|
||||||
|
has only one 'line' in its body.
|
||||||
|
|
||||||
|
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
|
||||||
|
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:
|
||||||
|
|
||||||
|
while (true) // BAD! multi-line body with no braces
|
||||||
|
/* comment... */
|
||||||
|
single_line_stmt();
|
||||||
|
|
||||||
|
Do this instead:
|
||||||
|
|
||||||
|
while (true) { // Always put braces around a multi-line body.
|
||||||
|
/* comment... */
|
||||||
|
single_line_stmt();
|
||||||
|
}
|
||||||
|
|
||||||
|
There is one exception: when the second body line is not at the same
|
||||||
|
indentation level as the first body line:
|
||||||
|
|
||||||
|
if (expr)
|
||||||
|
die("a diagnostic that would make this line"
|
||||||
|
" extend past the 80-column limit"));
|
||||||
|
|
||||||
|
It is safe to omit the braces in the code above, since the further-indented
|
||||||
|
second body line makes it obvious that this is still a single-statement body.
|
||||||
|
|
||||||
|
To reiterate, don't do this:
|
||||||
|
|
||||||
|
if (expr) // BAD: no braces around...
|
||||||
|
while (expr_2) { // ... a multi-line body
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
Do this, instead:
|
||||||
|
|
||||||
|
if (expr) {
|
||||||
|
while (expr_2) {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
However, there is one exception in the other direction, when even a one-line
|
||||||
|
block should have braces. That occurs when that one-line, brace-less block is
|
||||||
|
an "if" or "else" block, and the counterpart block *does* use braces. In that
|
||||||
|
case, put braces around both blocks. Also, if the "else" block is much shorter
|
||||||
|
than the "if" block, consider negating the "if"-condition and swapping the
|
||||||
|
bodies, putting the short block first and making the longer, multi-line block
|
||||||
|
be the "else" block.
|
||||||
|
|
||||||
|
if (expr) {
|
||||||
|
...
|
||||||
|
...
|
||||||
|
}
|
||||||
|
else
|
||||||
|
x = y; // BAD: braceless "else" with braced "then",
|
||||||
|
// and short block last
|
||||||
|
|
||||||
|
if (expr)
|
||||||
|
x = y; // BAD: braceless "if" with braced "else"
|
||||||
|
else {
|
||||||
|
...
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
Keeping braces consistent and putting the short block first is preferred,
|
||||||
|
especially when the multi-line body is more than a few lines long, because it
|
||||||
|
is easier to read and grasp the semantics of an if-then-else block when the
|
||||||
|
simpler block occurs first, rather than after the more involved block:
|
||||||
|
|
||||||
|
if (!expr) {
|
||||||
|
x = y; // putting the smaller block first is more readable
|
||||||
|
} else {
|
||||||
|
...
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
But if negating a complex condition is too ugly, then at least add braces:
|
||||||
|
|
||||||
|
if (complex expr not worth negating) {
|
||||||
|
...
|
||||||
|
...
|
||||||
|
} else {
|
||||||
|
x = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Preprocessor
|
||||||
|
============
|
||||||
|
Macros defined with an ALL_CAPS name should generally be assumed to be unsafe
|
||||||
|
with regards to arguments with side-effects (that is, MAX(a++, b--) might
|
||||||
|
increment a or decrement b too many or too few times). Exceptions to this rule
|
||||||
|
are explicitly documented for macros in viralloc.h and virstring.h.
|
||||||
|
|
||||||
|
For variadic macros, stick with C99 syntax:
|
||||||
|
|
||||||
|
#define vshPrint(_ctl, ...) fprintf(stdout, __VA_ARGS__)
|
||||||
|
|
||||||
|
Use parenthesis when checking if a macro is defined, and use indentation to
|
||||||
|
track nesting:
|
||||||
|
|
||||||
|
#if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_FALLOCATE)
|
||||||
|
# define fallocate(a,ignored,b,c) posix_fallocate(a,b,c)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
C types
|
||||||
|
=======
|
||||||
|
Use the right type.
|
||||||
|
|
||||||
|
Scalars
|
||||||
|
-------
|
||||||
|
- If you're using "int" or "long", odds are good that there's a better type.
|
||||||
|
|
||||||
|
- If a variable is counting something, be sure to declare it with an unsigned
|
||||||
|
type.
|
||||||
|
|
||||||
|
- If it's memory-size-related, use "size_t" (use "ssize_t" only if required).
|
||||||
|
|
||||||
|
- If it's file-size related, use uintmax_t, or maybe "off_t".
|
||||||
|
|
||||||
|
- If it's file-offset related (i.e., signed), use "off_t".
|
||||||
|
|
||||||
|
- If it's just counting small numbers use "unsigned int"; (on all but oddball
|
||||||
|
embedded systems, you can assume that that type is at least four bytes wide).
|
||||||
|
|
||||||
|
- If a variable has boolean semantics, give it the "bool" type and use the
|
||||||
|
corresponding "true" and "false" macros. It's ok to include <stdbool.h>, since
|
||||||
|
libvirt's use of gnulib ensures that it exists and is usable.
|
||||||
|
|
||||||
|
- In the unusual event that you require a specific width, use a standard type
|
||||||
|
like "int32_t", "uint32_t", "uint64_t", etc.
|
||||||
|
|
||||||
|
- While using "bool" is good for readability, it comes with minor caveats:
|
||||||
|
|
||||||
|
-- Don't use "bool" in places where the type size must be constant across all
|
||||||
|
systems, like public interfaces and on-the-wire protocols. Note that it would
|
||||||
|
be possible (albeit wasteful) to use "bool" in libvirt's logical wire
|
||||||
|
protocol, since XDR maps that to its lower-level "bool_t" type, which *is*
|
||||||
|
fixed-size.
|
||||||
|
|
||||||
|
-- Don't compare a bool variable against the literal, "true", since a value with
|
||||||
|
a logical non-false value need not be "1". I.e., don't write "if (seen ==
|
||||||
|
true) ...". Rather, write "if (seen)...".
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Of course, take all of the above with a grain of salt. If you're about to use
|
||||||
|
some system interface that requires a type like "size_t", "pid_t" or "off_t",
|
||||||
|
use matching types for any corresponding variables.
|
||||||
|
|
||||||
|
Also, if you try to use e.g., "unsigned int" as a type, and that conflicts
|
||||||
|
with the signedness of a related variable, sometimes it's best just to use the
|
||||||
|
*wrong* type, if 'pulling the thread' and fixing all related variables would
|
||||||
|
be too invasive.
|
||||||
|
|
||||||
|
Finally, while using descriptive types is important, be careful not to go
|
||||||
|
overboard. If whatever you're doing causes warnings, or requires casts, then
|
||||||
|
reconsider or ask for help.
|
||||||
|
|
||||||
|
Pointers
|
||||||
|
--------
|
||||||
|
Ensure that all of your pointers are 'const-correct'. Unless a pointer is used
|
||||||
|
to modify the pointed-to storage, give it the "const" attribute. That way, the
|
||||||
|
reader knows up-front that this is a read-only pointer. Perhaps more
|
||||||
|
importantly, if we're diligent about this, when you see a non-const pointer,
|
||||||
|
you're guaranteed that it is used to modify the storage it points to, or it is
|
||||||
|
aliased to another pointer that is.
|
||||||
|
|
||||||
|
|
||||||
|
Low level memory management
|
||||||
|
===========================
|
||||||
|
Use of the malloc/free/realloc/calloc APIs is deprecated in the libvirt
|
||||||
|
codebase, because they encourage a number of serious coding bugs and do not
|
||||||
|
enable compile time verification of checks for NULL. Instead of these
|
||||||
|
routines, use the macros from viralloc.h.
|
||||||
|
|
||||||
|
- To allocate a single object:
|
||||||
|
|
||||||
|
virDomainPtr domain;
|
||||||
|
|
||||||
|
if (VIR_ALLOC(domain) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- To allocate an array of objects:
|
||||||
|
|
||||||
|
virDomainPtr domains;
|
||||||
|
size_t ndomains = 10;
|
||||||
|
|
||||||
|
if (VIR_ALLOC_N(domains, ndomains) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- To allocate an array of object pointers:
|
||||||
|
|
||||||
|
virDomainPtr *domains;
|
||||||
|
size_t ndomains = 10;
|
||||||
|
|
||||||
|
if (VIR_ALLOC_N(domains, ndomains) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- To re-allocate the array of domains to be 1 element longer (however, note that
|
||||||
|
repeatedly expanding an array by 1 scales quadratically, so this is
|
||||||
|
recommended only for smaller arrays):
|
||||||
|
|
||||||
|
virDomainPtr domains;
|
||||||
|
size_t ndomains = 0;
|
||||||
|
|
||||||
|
if (VIR_EXPAND_N(domains, ndomains, 1) < 0)
|
||||||
|
return NULL;
|
||||||
|
domains[ndomains - 1] = domain;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- To ensure an array has room to hold at least one more element (this approach
|
||||||
|
scales better, but requires tracking allocation separately from usage)
|
||||||
|
|
||||||
|
virDomainPtr domains;
|
||||||
|
size_t ndomains = 0;
|
||||||
|
size_t ndomains_max = 0;
|
||||||
|
|
||||||
|
if (VIR_RESIZE_N(domains, ndomains_max, ndomains, 1) < 0)
|
||||||
|
return NULL;
|
||||||
|
domains[ndomains++] = domain;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- To trim an array of domains from its allocated size down to the actual used
|
||||||
|
size:
|
||||||
|
|
||||||
|
virDomainPtr domains;
|
||||||
|
size_t ndomains = x;
|
||||||
|
size_t ndomains_max = y;
|
||||||
|
|
||||||
|
VIR_SHRINK_N(domains, ndomains_max, ndomains_max - ndomains);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- To free an array of domains:
|
||||||
|
|
||||||
|
virDomainPtr domains;
|
||||||
|
size_t ndomains = x;
|
||||||
|
size_t ndomains_max = y;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < ndomains; i++)
|
||||||
|
VIR_FREE(domains[i]);
|
||||||
|
VIR_FREE(domains);
|
||||||
|
ndomains_max = ndomains = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
APIs, use the macros from virfile.h
|
||||||
|
|
||||||
|
- Open a file from a file descriptor:
|
||||||
|
|
||||||
|
if ((file = VIR_FDOPEN(fd, "r")) == NULL) {
|
||||||
|
virReportSystemError(errno, "%s",
|
||||||
|
_("failed to open file from file descriptor"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
/* fd is now invalid; only access the file using file variable */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- Close a file descriptor:
|
||||||
|
|
||||||
|
if (VIR_CLOSE(fd) < 0) {
|
||||||
|
virReportSystemError(errno, "%s", _("failed to close file"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- Close a file:
|
||||||
|
|
||||||
|
if (VIR_FCLOSE(file) < 0) {
|
||||||
|
virReportSystemError(errno, "%s", _("failed to close file"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- Close a file or file descriptor in an error path, without losing the previous
|
||||||
|
"errno" value:
|
||||||
|
|
||||||
|
VIR_FORCE_CLOSE(fd);
|
||||||
|
VIR_FORCE_FCLOSE(file);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
String comparisons
|
||||||
|
==================
|
||||||
|
Do not use the strcmp, strncmp, etc functions directly. Instead use one of the
|
||||||
|
following semantically named macros
|
||||||
|
|
||||||
|
- For strict equality:
|
||||||
|
|
||||||
|
STREQ(a,b)
|
||||||
|
STRNEQ(a,b)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- For case insensitive equality:
|
||||||
|
|
||||||
|
STRCASEEQ(a,b)
|
||||||
|
STRCASENEQ(a,b)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- For strict equality of a substring:
|
||||||
|
|
||||||
|
STREQLEN(a,b,n)
|
||||||
|
STRNEQLEN(a,b,n)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- For case insensitive equality of a substring:
|
||||||
|
|
||||||
|
STRCASEEQLEN(a,b,n)
|
||||||
|
STRCASENEQLEN(a,b,n)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- For strict equality of a prefix:
|
||||||
|
|
||||||
|
STRPREFIX(a,b)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- To avoid having to check if a or b are NULL:
|
||||||
|
|
||||||
|
STREQ_NULLABLE(a, b)
|
||||||
|
STRNEQ_NULLABLE(a, b)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
String copying
|
||||||
|
==============
|
||||||
|
Do not use the strncpy function. According to the man page, it does *not*
|
||||||
|
guarantee a NULL-terminated buffer, which makes it extremely dangerous to use.
|
||||||
|
Instead, use one of the functionally equivalent functions:
|
||||||
|
|
||||||
|
virStrncpy(char *dest, const char *src, size_t n, size_t destbytes)
|
||||||
|
|
||||||
|
The first three arguments have the same meaning as for strncpy; namely the
|
||||||
|
destination, source, and number of bytes to copy, respectively. The last
|
||||||
|
argument is the number of bytes available in the destination string; if a copy
|
||||||
|
of the source string (including a \0) will not fit into the destination, no
|
||||||
|
bytes are copied and the routine returns NULL. Otherwise, n bytes from the
|
||||||
|
source are copied into the destination and a trailing \0 is appended.
|
||||||
|
|
||||||
|
virStrcpy(char *dest, const char *src, size_t destbytes)
|
||||||
|
|
||||||
|
Use this variant if you know you want to copy the entire src string into dest.
|
||||||
|
Note that this is a macro, so arguments could be evaluated more than once.
|
||||||
|
This is equivalent to virStrncpy(dest, src, strlen(src), destbytes)
|
||||||
|
|
||||||
|
virStrcpyStatic(char *dest, const char *src)
|
||||||
|
|
||||||
|
Use this variant if you know you want to copy the entire src string into dest
|
||||||
|
*and* you know that your destination string is a static string (i.e. that
|
||||||
|
sizeof(dest) returns something meaningful). Note that this is a macro, so
|
||||||
|
arguments could be evaluated more than once. This is equivalent to
|
||||||
|
virStrncpy(dest, src, strlen(src), sizeof(dest)).
|
||||||
|
|
||||||
|
VIR_STRDUP(char *dst, const char *src);
|
||||||
|
VIR_STRNDUP(char *dst, const char *src, size_t n);
|
||||||
|
|
||||||
|
You should avoid using strdup or strndup directly as they do not report
|
||||||
|
out-of-memory error, and do not allow a NULL source. Use VIR_STRDUP or
|
||||||
|
VIR_STRNDUP macros instead, which return 0 for NULL source, 1 for successful
|
||||||
|
copy, and -1 for allocation failure with the error already reported. In very
|
||||||
|
specific cases, when you don't want to report the out-of-memory error, you can
|
||||||
|
use VIR_STRDUP_QUIET or VIR_STRNDUP_QUIET, but such usage is very rare and
|
||||||
|
usually considered a flaw.
|
||||||
|
|
||||||
|
|
||||||
|
Variable length string buffer
|
||||||
|
=============================
|
||||||
|
If there is a need for complex string concatenations, avoid using the usual
|
||||||
|
sequence of malloc/strcpy/strcat/snprintf functions and make use of the
|
||||||
|
virBuffer API described in buf.h
|
||||||
|
|
||||||
|
Typical usage is as follows:
|
||||||
|
|
||||||
|
char *
|
||||||
|
somefunction(...)
|
||||||
|
{
|
||||||
|
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
virBufferAddLit(&buf, "<domain>\n");
|
||||||
|
virBufferAsprintf(&buf, " <memory>%d</memory>\n", memory);
|
||||||
|
...
|
||||||
|
virBufferAddLit(&buf, "</domain>\n");
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
if (virBufferError(&buf)) {
|
||||||
|
virBufferFreeAndReset(&buf);
|
||||||
|
virReportOOMError();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return virBufferContentAndReset(&buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Include files
|
||||||
|
=============
|
||||||
|
There are now quite a large number of include files, both libvirt internal and
|
||||||
|
external, and system includes. To manage all this complexity it's best to
|
||||||
|
stick to the following general plan for all *.c source files:
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright notice
|
||||||
|
* ....
|
||||||
|
* ....
|
||||||
|
* ....
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <config.h> Must come first in every file.
|
||||||
|
|
||||||
|
#include <stdio.h> Any system includes you need.
|
||||||
|
#include <string.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
|
#if WITH_NUMACTL Some system includes aren't supported
|
||||||
|
# include <numa.h> everywhere so need these #if guards.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "internal.h" Include this first, after system includes.
|
||||||
|
|
||||||
|
#include "util.h" Any libvirt internal header files.
|
||||||
|
#include "buf.h"
|
||||||
|
|
||||||
|
static int
|
||||||
|
myInternalFunc() The actual code.
|
||||||
|
{
|
||||||
|
...
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
Printf-style functions
|
||||||
|
======================
|
||||||
|
Whenever you add a new printf-style function, i.e., one with a format string
|
||||||
|
argument and following "..." in its prototype, be sure to use gcc's printf
|
||||||
|
attribute directive in the prototype. For example, here's the one for
|
||||||
|
virAsprintf, in util.h:
|
||||||
|
|
||||||
|
int virAsprintf(char **strp, const char *fmt, ...)
|
||||||
|
ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||||
|
|
||||||
|
This makes it so gcc's -Wformat and -Wformat-security options can do their
|
||||||
|
jobs and cross-check format strings with the number and types of arguments.
|
||||||
|
|
||||||
|
When printing to a string, consider using virBuffer for incremental
|
||||||
|
allocations, virAsprintf for a one-shot allocation, and snprintf for
|
||||||
|
fixed-width buffers. Do not use sprintf, even if you can prove the buffer
|
||||||
|
won't overflow, since gnulib does not provide the same portability guarantees
|
||||||
|
for sprintf as it does for snprintf.
|
||||||
|
|
||||||
|
|
||||||
|
Use of goto
|
||||||
|
===========
|
||||||
|
The use of goto is not forbidden, and goto is widely used throughout libvirt.
|
||||||
|
While the uncontrolled use of goto will quickly lead to unmaintainable code,
|
||||||
|
there is a place for it in well structured code where its use increases
|
||||||
|
readability and maintainability. In general, if goto is used for error
|
||||||
|
recovery, it's likely to be ok, otherwise, be cautious or avoid it all
|
||||||
|
together.
|
||||||
|
|
||||||
|
The typical use of goto is to jump to cleanup code in the case of a long list
|
||||||
|
of actions, any of which may fail and cause the entire operation to fail. In
|
||||||
|
this case, a function will have a single label at the end of the function.
|
||||||
|
It's almost always ok to use this style. In particular, if the cleanup code
|
||||||
|
only involves free'ing memory, then having multiple labels is overkill.
|
||||||
|
VIR_FREE() and every function named XXXFree() in libvirt is required to handle
|
||||||
|
NULL as its arg. Thus you can safely call free on all the variables even if
|
||||||
|
they were not yet allocated (yes they have to have been initialized to NULL).
|
||||||
|
This is much simpler and clearer than having multiple labels.
|
||||||
|
|
||||||
|
There are a couple of signs that a particular use of goto is not ok:
|
||||||
|
|
||||||
|
- You're using multiple labels. If you find yourself using multiple labels,
|
||||||
|
you're strongly encouraged to rework your code to eliminate all but one of
|
||||||
|
them.
|
||||||
|
|
||||||
|
- The goto jumps back up to a point above the current line of code being
|
||||||
|
executed. Please use some combination of looping constructs to re-execute code
|
||||||
|
instead; it's almost certainly going to be more understandable by others. One
|
||||||
|
well-known exception to this rule is restarting an i/o operation following
|
||||||
|
EINTR.
|
||||||
|
|
||||||
|
- The goto jumps down to an arbitrary place in the middle of a function followed
|
||||||
|
by further potentially failing calls. You should almost certainly be using a
|
||||||
|
conditional and a block instead of a goto. Perhaps some of your function's
|
||||||
|
logic would be better pulled out into a helper function.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Although libvirt does not encourage the Linux kernel wind/unwind style of
|
||||||
|
multiple labels, there's a good general discussion of the issue archived at
|
||||||
|
KernelTrap <http://kerneltrap.org/node/553/2131>
|
||||||
|
|
||||||
|
When using goto, please use one of these standard labels if it makes sense:
|
||||||
|
|
||||||
|
error: A path only taken upon return with an error code
|
||||||
|
cleanup: A path taken upon return with success code + optional error
|
||||||
|
no_memory: A path only taken upon return with an OOM error code
|
||||||
|
retry: If needing to jump upwards (e.g., retry on EINTR)
|
||||||
|
|
||||||
|
|
||||||
|
Libvirt committer guidelines
|
||||||
|
============================
|
||||||
|
The AUTHORS files indicates the list of people with commit access right who
|
||||||
|
can actually merge the patches.
|
||||||
|
|
||||||
|
The general rule for committing a patch is to make sure it has been reviewed
|
||||||
|
properly in the mailing-list first, usually if a couple of people gave an ACK
|
||||||
|
or +1 to a patch and nobody raised an objection on the list it should be good
|
||||||
|
to go. If the patch touches a part of the code where you're not the main
|
||||||
|
maintainer, or where you do not have a very clear idea of how things work,
|
||||||
|
it's better to wait for a more authoritative feedback though. Before
|
||||||
|
committing, please also rebuild locally, run 'make check syntax-check', and
|
||||||
|
make sure you don't raise errors. Try to look for warnings too; for example,
|
||||||
|
configure with
|
||||||
|
|
||||||
|
--enable-compile-warnings=error
|
||||||
|
|
||||||
|
which adds -Werror to compile flags, so no warnings get missed
|
||||||
|
|
||||||
|
An exception to 'review and approval on the list first' is fixing failures to
|
||||||
|
build:
|
||||||
|
|
||||||
|
- if a recently committed patch breaks compilation on a platform or for a given
|
||||||
|
driver, then it's fine to commit a minimal fix directly without getting the
|
||||||
|
review feedback first
|
||||||
|
|
||||||
|
- if make check or make syntax-check breaks, if there is an obvious fix, it's
|
||||||
|
fine to commit immediately. The patch should still be sent to the list (or
|
||||||
|
tell what the fix was if trivial), and 'make check syntax-check' should pass
|
||||||
|
too, before committing anything
|
||||||
|
|
||||||
|
- fixes for documentation and code comments can be managed in the same way, but
|
||||||
|
still make sure they get reviewed if non-trivial.
|
||||||
91
Makefile.am
91
Makefile.am
@@ -19,68 +19,62 @@
|
|||||||
LCOV = lcov
|
LCOV = lcov
|
||||||
GENHTML = genhtml
|
GENHTML = genhtml
|
||||||
|
|
||||||
SUBDIRS = . gnulib/lib include/libvirt src tools docs gnulib/tests \
|
SUBDIRS = . gnulib/lib include src daemon tools docs gnulib/tests \
|
||||||
tests po examples
|
tests po examples/object-events examples/hellolibvirt \
|
||||||
|
examples/dominfo examples/domsuspend examples/apparmor \
|
||||||
XZ_OPT ?= -v -T0
|
examples/xml/nwfilter examples/openauth examples/systemtap
|
||||||
export XZ_OPT
|
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
|
XML_EXAMPLES = \
|
||||||
|
$(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/examples/xml/, \
|
||||||
|
test/*.xml storage/*.xml)))
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
config-post.h \
|
config-post.h \
|
||||||
ChangeLog-old \
|
ChangeLog-old \
|
||||||
libvirt.spec libvirt.spec.in \
|
libvirt.spec libvirt.spec.in \
|
||||||
mingw-libvirt.spec.in \
|
mingw-libvirt.spec.in \
|
||||||
libvirt.pc.in \
|
libvirt.pc.in \
|
||||||
libvirt-qemu.pc.in \
|
autobuild.sh \
|
||||||
libvirt-lxc.pc.in \
|
|
||||||
libvirt-admin.pc.in \
|
|
||||||
Makefile.nonreentrant \
|
Makefile.nonreentrant \
|
||||||
autogen.sh \
|
autogen.sh \
|
||||||
cfg.mk \
|
cfg.mk \
|
||||||
run.in \
|
run.in \
|
||||||
README.md \
|
AUTHORS.in \
|
||||||
AUTHORS.in
|
$(XML_EXAMPLES)
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = libvirt.pc libvirt-qemu.pc libvirt-lxc.pc libvirt-admin.pc
|
pkgconfig_DATA = libvirt.pc
|
||||||
|
|
||||||
NEWS: \
|
NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html.in
|
||||||
$(srcdir)/docs/news.xml \
|
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||||
$(srcdir)/docs/news-ascii.xsl \
|
$(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl \
|
||||||
$(srcdir)/docs/reformat-news.py
|
$(top_srcdir)/docs/news.html.in \
|
||||||
$(AM_V_GEN) \
|
| perl -0777 -pe 's/\n\n+$$/\n/' \
|
||||||
if [ -x $(XSLTPROC) ]; then \
|
| perl -pe 's/[ \t]+$$//' \
|
||||||
$(XSLTPROC) --nonet \
|
> $@-t && mv $@-t $@ ; fi
|
||||||
$(srcdir)/docs/news-ascii.xsl \
|
|
||||||
$(srcdir)/docs/news.xml \
|
$(top_srcdir)/HACKING: $(top_srcdir)/docs/hacking1.xsl \
|
||||||
>$@-tmp \
|
$(top_srcdir)/docs/hacking2.xsl \
|
||||||
|| { rm -f $@-tmp; exit 1; }; \
|
$(top_srcdir)/docs/wrapstring.xsl \
|
||||||
$(PYTHON) $(srcdir)/docs/reformat-news.py $@-tmp >$@ \
|
$(top_srcdir)/docs/hacking.html.in
|
||||||
|| { rm -f $@-tmp; exit 1; }; \
|
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||||
rm -f $@-tmp; \
|
$(XSLTPROC) --nonet $(top_srcdir)/docs/hacking1.xsl \
|
||||||
fi
|
$(top_srcdir)/docs/hacking.html.in | \
|
||||||
EXTRA_DIST += \
|
$(XSLTPROC) --nonet $(top_srcdir)/docs/hacking2.xsl - \
|
||||||
$(srcdir)/docs/news.xml \
|
| perl -0777 -pe 's/\n\n+$$/\n/' \
|
||||||
$(srcdir)/docs/news-ascii.xsl \
|
> $@-t && mv $@-t $@ ; fi;
|
||||||
$(srcdir)/docs/reformat-news.py
|
|
||||||
|
|
||||||
rpm: clean
|
rpm: clean
|
||||||
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)
|
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
|
||||||
|
|
||||||
srpm: clean
|
|
||||||
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ts $(distdir).tar.xz)
|
|
||||||
|
|
||||||
check-local: all tests
|
check-local: all tests
|
||||||
|
|
||||||
check-access:
|
|
||||||
@($(MAKE) $(AM_MAKEFLAGS) -C tests check-access)
|
|
||||||
|
|
||||||
cov: clean-cov
|
cov: clean-cov
|
||||||
$(MKDIR_P) $(top_builddir)/coverage
|
mkdir $(top_builddir)/coverage
|
||||||
$(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp \
|
$(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp \
|
||||||
-d $(top_builddir)/src \
|
-d $(top_builddir)/src -d $(top_builddir)/daemon \
|
||||||
-d $(top_builddir)/tests
|
-d $(top_builddir)/tests
|
||||||
$(LCOV) -r $(top_builddir)/coverage/libvirt.info.tmp \
|
$(LCOV) -r $(top_builddir)/coverage/libvirt.info.tmp \
|
||||||
-o $(top_builddir)/coverage/libvirt.info
|
-o $(top_builddir)/coverage/libvirt.info
|
||||||
@@ -93,6 +87,9 @@ clean-cov:
|
|||||||
|
|
||||||
MAINTAINERCLEANFILES = .git-module-status
|
MAINTAINERCLEANFILES = .git-module-status
|
||||||
|
|
||||||
|
# disable this check
|
||||||
|
distuninstallcheck:
|
||||||
|
|
||||||
dist-hook: gen-ChangeLog gen-AUTHORS
|
dist-hook: gen-ChangeLog gen-AUTHORS
|
||||||
|
|
||||||
# Generate the ChangeLog file (with all entries since the switch to git)
|
# Generate the ChangeLog file (with all entries since the switch to git)
|
||||||
@@ -109,17 +106,9 @@ gen-ChangeLog:
|
|||||||
|
|
||||||
.PHONY: gen-AUTHORS
|
.PHONY: gen-AUTHORS
|
||||||
gen-AUTHORS:
|
gen-AUTHORS:
|
||||||
$(AM_V_GEN)\
|
$(AM_V_GEN)if test -d $(srcdir)/.git; then \
|
||||||
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'" \
|
||||||
cd $(srcdir) && \
|
|
||||||
git log --pretty=format:'%aN <%aE>' | sort -u \
|
|
||||||
) > all.list && \
|
|
||||||
sort -u $(srcdir)/AUTHORS.in > maint.list && \
|
|
||||||
comm -23 all.list maint.list > contrib.list && \
|
|
||||||
contrib="`cat contrib.list`" && \
|
|
||||||
perl -p -e "s/#contributorslist#// and print '$$contrib'" \
|
|
||||||
< $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
|
< $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
|
||||||
mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS && \
|
mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
|
||||||
rm -f all.list maint.list contrib.list; \
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
## <http://www.gnu.org/licenses/>.
|
## <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#
|
#
|
||||||
# Generated by running the following on Fedora 26:
|
# Generated by running the following on Fedora 9:
|
||||||
#
|
#
|
||||||
# nm -D --defined-only /lib64/libc.so.6 \
|
# nm -D --defined-only /lib/libc.so.6 \
|
||||||
# | grep '_r$' \
|
# | grep '_r$' \
|
||||||
# | awk '{print $3}' \
|
# | awk '{print $3}' \
|
||||||
# | grep -v __ \
|
# | grep -v __ \
|
||||||
@@ -43,7 +43,6 @@ NON_REENTRANT += ether_ntoa
|
|||||||
NON_REENTRANT += fcvt
|
NON_REENTRANT += fcvt
|
||||||
NON_REENTRANT += fgetgrent
|
NON_REENTRANT += fgetgrent
|
||||||
NON_REENTRANT += fgetpwent
|
NON_REENTRANT += fgetpwent
|
||||||
NON_REENTRANT += fgetsgent
|
|
||||||
NON_REENTRANT += fgetspent
|
NON_REENTRANT += fgetspent
|
||||||
NON_REENTRANT += getaliasbyname
|
NON_REENTRANT += getaliasbyname
|
||||||
NON_REENTRANT += getaliasent
|
NON_REENTRANT += getaliasent
|
||||||
@@ -73,8 +72,6 @@ NON_REENTRANT += getrpcent
|
|||||||
NON_REENTRANT += getservbyname
|
NON_REENTRANT += getservbyname
|
||||||
NON_REENTRANT += getservbyport
|
NON_REENTRANT += getservbyport
|
||||||
NON_REENTRANT += getservent
|
NON_REENTRANT += getservent
|
||||||
NON_REENTRANT += getsgent
|
|
||||||
NON_REENTRANT += getsgnam
|
|
||||||
NON_REENTRANT += getspent
|
NON_REENTRANT += getspent
|
||||||
NON_REENTRANT += getspnam
|
NON_REENTRANT += getspnam
|
||||||
NON_REENTRANT += getutent
|
NON_REENTRANT += getutent
|
||||||
@@ -98,7 +95,6 @@ NON_REENTRANT += random
|
|||||||
NON_REENTRANT += rand
|
NON_REENTRANT += rand
|
||||||
NON_REENTRANT += seed48
|
NON_REENTRANT += seed48
|
||||||
NON_REENTRANT += setstate
|
NON_REENTRANT += setstate
|
||||||
NON_REENTRANT += sgetsgent
|
|
||||||
NON_REENTRANT += sgetspent
|
NON_REENTRANT += sgetspent
|
||||||
NON_REENTRANT += srand48
|
NON_REENTRANT += srand48
|
||||||
NON_REENTRANT += srandom
|
NON_REENTRANT += srandom
|
||||||
@@ -117,11 +113,3 @@ NON_REENTRANT += inet_nsap_ntoa
|
|||||||
NON_REENTRANT += inet_ntoa
|
NON_REENTRANT += inet_ntoa
|
||||||
NON_REENTRANT += inet_ntop
|
NON_REENTRANT += inet_ntop
|
||||||
NON_REENTRANT += inet_pton
|
NON_REENTRANT += inet_pton
|
||||||
|
|
||||||
# Separate two nothings by space to get one space in a variable
|
|
||||||
space =
|
|
||||||
space +=
|
|
||||||
# The space needs to be in a variable otherwise it would be ignored.
|
|
||||||
# And there must be no spaces around the commas because they would
|
|
||||||
# not be ignored, logically.
|
|
||||||
NON_REENTRANT_RE=$(subst $(space),|,$(NON_REENTRANT))
|
|
||||||
|
|||||||
13
README
Normal file
13
README
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
LibVirt : simple API for virtualization
|
||||||
|
|
||||||
|
Libvirt is a C toolkit to interact with the virtualization capabilities
|
||||||
|
of recent versions of Linux (and other OSes). It is free software
|
||||||
|
available under the GNU Lesser General Public License. Virtualization of
|
||||||
|
the Linux Operating System means the ability to run multiple instances of
|
||||||
|
Operating Systems concurrently on a single hardware system where the basic
|
||||||
|
resources are driven by a Linux instance. The library aim at providing
|
||||||
|
long term stable C API initially for the Xen paravirtualization but
|
||||||
|
should be able to integrate other virtualization mechanisms if needed.
|
||||||
|
|
||||||
|
Daniel Veillard <veillard@redhat.com>
|
||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
These notes intend to help people working on the checked-out sources.
|
These notes intend to help people working on the checked-out sources.
|
||||||
These requirements do not apply when building from a distribution tarball.
|
These requirements do not apply when building from a distribution tarball.
|
||||||
See also docs/hacking.html (after building libvirt using the information
|
See also HACKING for more detailed libvirt contribution guidelines.
|
||||||
included in this file) for more detailed contribution guidelines.
|
|
||||||
|
|
||||||
* Requirements
|
* Requirements
|
||||||
|
|
||||||
@@ -16,7 +15,7 @@ Specific development tools and versions will be checked for and listed by
|
|||||||
the bootstrap script.
|
the bootstrap script.
|
||||||
|
|
||||||
Valgrind <http://valgrind.org/> is also highly recommended, if
|
Valgrind <http://valgrind.org/> is also highly recommended, if
|
||||||
Valgrind supports your architecture.
|
Valgrind supports your architecture. See also README-valgrind.
|
||||||
|
|
||||||
While building from a just-cloned source tree may require installing a
|
While building from a just-cloned source tree may require installing a
|
||||||
few prerequisites, later, a plain `git pull && make' should be sufficient.
|
few prerequisites, later, a plain `git pull && make' should be sufficient.
|
||||||
@@ -25,7 +24,7 @@ few prerequisites, later, a plain `git pull && make' should be sufficient.
|
|||||||
|
|
||||||
You can get a copy of the source repository like this:
|
You can get a copy of the source repository like this:
|
||||||
|
|
||||||
$ git clone https://libvirt.org/git/libvirt.git
|
$ git clone git://libvirt.org/libvirt
|
||||||
$ cd libvirt
|
$ cd libvirt
|
||||||
|
|
||||||
As an optional step, if you already have a copy of the gnulib git
|
As an optional step, if you already have a copy of the gnulib git
|
||||||
|
|||||||
83
README.md
83
README.md
@@ -1,83 +0,0 @@
|
|||||||
[](https://travis-ci.org/libvirt/libvirt)
|
|
||||||
[](https://bestpractices.coreinfrastructure.org/projects/355)
|
|
||||||
|
|
||||||
Libvirt API for virtualization
|
|
||||||
==============================
|
|
||||||
|
|
||||||
Libvirt provides a portable, long term stable C API for managing the
|
|
||||||
virtualization technologies provided by many operating systems. It
|
|
||||||
includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware
|
|
||||||
vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER
|
|
||||||
Hypervisor.
|
|
||||||
|
|
||||||
For some of these hypervisors, it provides a stateful management
|
|
||||||
daemon which runs on the virtualization host allowing access to the
|
|
||||||
API both by non-privileged local users and remote users.
|
|
||||||
|
|
||||||
Layered packages provide bindings of the libvirt C API into other
|
|
||||||
languages including Python, Perl, PHP, Go, Java, OCaml, as well as
|
|
||||||
mappings into object systems such as GObject, CIM and SNMP.
|
|
||||||
|
|
||||||
Further information about the libvirt project can be found on the
|
|
||||||
website:
|
|
||||||
|
|
||||||
[https://libvirt.org](https://libvirt.org)
|
|
||||||
|
|
||||||
|
|
||||||
License
|
|
||||||
-------
|
|
||||||
|
|
||||||
The libvirt C API is distributed under the terms of GNU Lesser General
|
|
||||||
Public License, version 2.1 (or later). Some parts of the code that are
|
|
||||||
not part of the C library may have the more restrictive GNU General
|
|
||||||
Public License, version 2.1 (or later). See the files `COPYING.LESSER`
|
|
||||||
and `COPYING` for full license terms & conditions.
|
|
||||||
|
|
||||||
|
|
||||||
Installation
|
|
||||||
------------
|
|
||||||
|
|
||||||
Libvirt uses the GNU Autotools build system, so in general can be built
|
|
||||||
and installed with the usual commands. For example, to build in a manner
|
|
||||||
that is suitable for installing as root, use:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
|
|
||||||
$ make
|
|
||||||
$ sudo make install
|
|
||||||
```
|
|
||||||
|
|
||||||
While to build & install as an unprivileged user
|
|
||||||
|
|
||||||
```
|
|
||||||
$ ./configure --prefix=$HOME/usr
|
|
||||||
$ make
|
|
||||||
$ make install
|
|
||||||
```
|
|
||||||
|
|
||||||
The libvirt code relies on a large number of 3rd party libraries. These will
|
|
||||||
be detected during execution of the `configure` script and a summary printed
|
|
||||||
which lists any missing (optional) dependencies.
|
|
||||||
|
|
||||||
|
|
||||||
Contributing
|
|
||||||
------------
|
|
||||||
|
|
||||||
The libvirt project welcomes contributions in many ways. For most components
|
|
||||||
the best way to contribute is to send patches to the primary development
|
|
||||||
mailing list. Further guidance on this can be found on the website:
|
|
||||||
|
|
||||||
[https://libvirt.org/contribute.html](https://libvirt.org/contribute.html)
|
|
||||||
|
|
||||||
|
|
||||||
Contact
|
|
||||||
-------
|
|
||||||
|
|
||||||
The libvirt project has two primary mailing lists:
|
|
||||||
|
|
||||||
* libvirt-users@redhat.com (**for user discussions**)
|
|
||||||
* libvir-list@redhat.com (**for development only**)
|
|
||||||
|
|
||||||
Further details on contacting the project are available on the website:
|
|
||||||
|
|
||||||
[https://libvirt.org/contact.html](https://libvirt.org/contact.html)
|
|
||||||
22
TODO
Normal file
22
TODO
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
libvirt TODO list
|
||||||
|
=================
|
||||||
|
|
||||||
|
The TODO list changes frequently, so is maintained online
|
||||||
|
in the libvirt bugzilla
|
||||||
|
|
||||||
|
http://bugzilla.redhat.com/
|
||||||
|
|
||||||
|
Search against
|
||||||
|
|
||||||
|
Product: Virtualization Tools
|
||||||
|
Component: libvirt
|
||||||
|
Subject: RFE
|
||||||
|
|
||||||
|
Or browse dependent bugs under
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=libvirtTodo
|
||||||
|
|
||||||
|
Summarized reports automatically generated from bugzilla
|
||||||
|
and provided online at
|
||||||
|
|
||||||
|
http://libvirt.org/todo.html
|
||||||
124
autobuild.sh
Executable file
124
autobuild.sh
Executable file
@@ -0,0 +1,124 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -v
|
||||||
|
|
||||||
|
# Make things clean.
|
||||||
|
|
||||||
|
test -n "$1" && RESULTS=$1 || RESULTS=results.log
|
||||||
|
: ${AUTOBUILD_INSTALL_ROOT=$HOME/builder}
|
||||||
|
|
||||||
|
# If run under the autobuilder, we must use --nodeps with rpmbuild;
|
||||||
|
# but this can lead to odd error diagnosis for normal development.
|
||||||
|
nodeps=
|
||||||
|
if test "${AUTOBUILD_COUNTER+set}"; then
|
||||||
|
nodeps=--nodeps
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -f Makefile && make -k distclean || :
|
||||||
|
rm -rf coverage
|
||||||
|
|
||||||
|
rm -rf build
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
# Run with options not normally exercised by the rpm build, for
|
||||||
|
# more complete code coverage.
|
||||||
|
../autogen.sh --prefix="$AUTOBUILD_INSTALL_ROOT" \
|
||||||
|
--enable-expensive-tests \
|
||||||
|
--enable-test-coverage \
|
||||||
|
--disable-nls \
|
||||||
|
--enable-werror \
|
||||||
|
--enable-static
|
||||||
|
|
||||||
|
# If the MAKEFLAGS envvar does not yet include a -j option,
|
||||||
|
# add -jN where N depends on the number of processors.
|
||||||
|
case $MAKEFLAGS in
|
||||||
|
*-j*) ;;
|
||||||
|
*) n=$(getconf _NPROCESSORS_ONLN 2> /dev/null)
|
||||||
|
test "$n" -gt 0 || n=1
|
||||||
|
n=$(expr $n + 1)
|
||||||
|
MAKEFLAGS="$MAKEFLAGS -j$n"
|
||||||
|
export MAKEFLAGS
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
# set -o pipefail is a bashism; this use of exec is the POSIX alternative
|
||||||
|
exec 3>&1
|
||||||
|
st=$(
|
||||||
|
exec 4>&1 >&3
|
||||||
|
{ make check syntax-check 2>&1 3>&- 4>&-; echo $? >&4; } | tee "$RESULTS"
|
||||||
|
)
|
||||||
|
exec 3>&-
|
||||||
|
test "$st" = 0
|
||||||
|
test -x /usr/bin/lcov && make cov
|
||||||
|
|
||||||
|
rm -f *.tar.gz
|
||||||
|
make dist
|
||||||
|
|
||||||
|
if test -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
|
||||||
|
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
|
||||||
|
make distclean
|
||||||
|
|
||||||
|
PKG_CONFIG_LIBDIR="/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig" \
|
||||||
|
PKG_CONFIG_PATH="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" \
|
||||||
|
CC="i686-w64-mingw32-gcc" \
|
||||||
|
../configure \
|
||||||
|
--build=$(uname -m)-w64-linux \
|
||||||
|
--host=i686-w64-mingw32 \
|
||||||
|
--prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
|
||||||
|
--enable-expensive-tests \
|
||||||
|
--enable-werror \
|
||||||
|
--without-libvirtd
|
||||||
|
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Test mingw64 cross-compile
|
||||||
|
if test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
|
||||||
|
make distclean
|
||||||
|
|
||||||
|
PKG_CONFIG_LIBDIR="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/x86_64-w64-mingw32/sys-root/mingw/share/pkgconfig" \
|
||||||
|
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-expensive-tests \
|
||||||
|
--enable-werror \
|
||||||
|
--without-libvirtd
|
||||||
|
|
||||||
|
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
|
||||||
|
rpmbuild $nodeps \
|
||||||
|
--define "extra_release $EXTRA_RELEASE" \
|
||||||
|
--define "_sourcedir `pwd`" \
|
||||||
|
-ba --clean mingw-libvirt.spec
|
||||||
|
fi
|
||||||
|
fi
|
||||||
253
autogen.sh
253
autogen.sh
@@ -1,81 +1,44 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Run this to generate all the initial makefiles, etc.
|
# Run this to generate all the initial makefiles, etc.
|
||||||
|
|
||||||
die()
|
set -e
|
||||||
{
|
|
||||||
echo "error: $1" >&2
|
srcdir=`dirname "$0"`
|
||||||
|
test -z "$srcdir" && srcdir=.
|
||||||
|
|
||||||
|
THEDIR=`pwd`
|
||||||
|
cd "$srcdir"
|
||||||
|
|
||||||
|
test -f src/libvirt.c || {
|
||||||
|
echo "You must run this script in the top-level libvirt directory"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
starting_point=$(pwd)
|
|
||||||
|
|
||||||
srcdir=$(dirname "$0")
|
EXTRA_ARGS=
|
||||||
test "$srcdir" || srcdir=.
|
|
||||||
|
|
||||||
cd "$srcdir" || {
|
|
||||||
die "Failed to cd into $srcdir"
|
|
||||||
}
|
|
||||||
|
|
||||||
test -f src/libvirt.c || {
|
|
||||||
die "$0 must live in the top-level libvirt directory"
|
|
||||||
}
|
|
||||||
|
|
||||||
dry_run=
|
|
||||||
no_git=
|
no_git=
|
||||||
gnulib_srcdir=
|
if test "x$1" = "x--no-git"; then
|
||||||
extra_args=
|
|
||||||
while test "$#" -gt 0; do
|
|
||||||
case "$1" in
|
|
||||||
--dry-run)
|
|
||||||
# This variable will serve both as an indicator of the fact that
|
|
||||||
# a dry run has been requested, and to store the result of the
|
|
||||||
# dry run. It will be ultimately used as return code for the
|
|
||||||
# script: 0 means no action is necessary, 2 means that autogen.sh
|
|
||||||
# needs to be executed, and 1 is reserved for failures
|
|
||||||
dry_run=0
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--no-git)
|
|
||||||
no_git=" $1"
|
no_git=" $1"
|
||||||
shift
|
shift
|
||||||
;;
|
fi
|
||||||
--gnulib-srcdir=*)
|
if test -z "$NOCONFIGURE" ; then
|
||||||
gnulib_srcdir=" $1"
|
if test "x$1" = "x--system"; then
|
||||||
shift
|
shift
|
||||||
;;
|
|
||||||
--gnulib-srcdir)
|
|
||||||
gnulib_srcdir=" $1=$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--system)
|
|
||||||
prefix=/usr
|
prefix=/usr
|
||||||
|
libdir=$prefix/lib
|
||||||
sysconfdir=/etc
|
sysconfdir=/etc
|
||||||
localstatedir=/var
|
localstatedir=/var
|
||||||
if test -d $prefix/lib64; then
|
if [ -d /usr/lib64 ]; then
|
||||||
libdir=$prefix/lib64
|
libdir=$prefix/lib64
|
||||||
else
|
|
||||||
libdir=$prefix/lib
|
|
||||||
fi
|
fi
|
||||||
extra_args="--prefix=$prefix --localstatedir=$localstatedir"
|
EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir"
|
||||||
extra_args="$extra_args --sysconfdir=$sysconfdir --libdir=$libdir"
|
echo "Running ./configure with $EXTRA_ARGS $@"
|
||||||
shift
|
else
|
||||||
;;
|
if test -z "$*" && test ! -f "$THEDIR/config.status"; then
|
||||||
*)
|
echo "I am going to run ./configure with no arguments - if you wish "
|
||||||
# All remaining arguments will be passed to configure verbatim
|
echo "to pass any to it, please specify them on the $0 command line."
|
||||||
break
|
fi
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
done
|
|
||||||
no_git="$no_git$gnulib_srcdir"
|
|
||||||
|
|
||||||
gnulib_hash()
|
|
||||||
{
|
|
||||||
local no_git=$1
|
|
||||||
|
|
||||||
if test "$no_git"; then
|
|
||||||
echo "no-git"
|
|
||||||
return
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Compute the hash we'll use to determine whether rerunning bootstrap
|
# Compute the hash we'll use to determine whether rerunning bootstrap
|
||||||
@@ -84,125 +47,67 @@ gnulib_hash()
|
|||||||
# by this package, we rerun bootstrap to pull in the matching set of files.
|
# by this package, we rerun bootstrap to pull in the matching set of files.
|
||||||
# The third ensures that whenever we change the set of local gnulib diffs,
|
# The third ensures that whenever we change the set of local gnulib diffs,
|
||||||
# we rerun bootstrap to pull in those diffs.
|
# we rerun bootstrap to pull in those diffs.
|
||||||
git submodule status .gnulib | awk '{ print $1 }'
|
bootstrap_hash()
|
||||||
|
{
|
||||||
|
if test "$no_git"; then
|
||||||
|
echo no-git
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
git submodule status | sed 's/^[ +-]//;s/ .*//'
|
||||||
git hash-object bootstrap.conf
|
git hash-object bootstrap.conf
|
||||||
git ls-tree -d HEAD gnulib/local | awk '{print $3}'
|
git ls-tree -d HEAD gnulib/local | awk '{print $3}'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only look into git submodules if we're in a git checkout
|
# Ensure that whenever we pull in a gnulib update or otherwise change to a
|
||||||
|
# different version (i.e., when switching branches), we also rerun ./bootstrap.
|
||||||
|
# Also, running 'make rpm' tends to litter the po/ directory, and some people
|
||||||
|
# like to run 'git clean -x -f po' to fix it; but only ./bootstrap regenerates
|
||||||
|
# the required file po/Makevars.
|
||||||
|
# Only run bootstrap from a git checkout, never from a tarball.
|
||||||
if test -d .git || test -f .git; then
|
if test -d .git || test -f .git; then
|
||||||
|
curr_status=.git-module-status t=
|
||||||
# Check for dirty submodules
|
if test "$no_git"; then
|
||||||
if test -z "$CLEAN_SUBMODULE"; then
|
t=no-git
|
||||||
for path in $(git submodule status | awk '{ print $2 }'); do
|
elif test -d .gnulib; then
|
||||||
case "$(git diff "$path")" in
|
t=$(bootstrap_hash; git diff .gnulib)
|
||||||
|
fi
|
||||||
|
case $t:${CLEAN_SUBMODULE+set} in
|
||||||
|
*:set) ;;
|
||||||
*-dirty*)
|
*-dirty*)
|
||||||
echo "error: $path is dirty, please investigate" >&2
|
echo "error: gnulib submodule is dirty, please investigate" 2>&1
|
||||||
echo "set CLEAN_SUBMODULE to discard submodule changes" >&2
|
echo "set env-var CLEAN_SUBMODULE to discard gnulib changes" 2>&1
|
||||||
exit 1
|
exit 1 ;;
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
done
|
# Keep this test in sync with cfg.mk:_update_required
|
||||||
fi
|
if test "$t" = "$(cat $curr_status 2>/dev/null)" \
|
||||||
if test "$CLEAN_SUBMODULE" && test -z "$no_git"; then
|
&& test -f "po/Makevars" && test -f AUTHORS; then
|
||||||
if test -z "$dry_run"; then
|
# good, it's up to date, all we need is autoreconf
|
||||||
echo "Cleaning up submodules..."
|
autoreconf -if
|
||||||
git submodule foreach 'git clean -dfqx && git reset --hard' || {
|
|
||||||
die "Cleaning up submodules failed"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update all submodules. If any of the submodules has not been
|
|
||||||
# initialized yet, it will be initialized now; moreover, any submodule
|
|
||||||
# with uncommitted changes will be returned to the expected state
|
|
||||||
echo "Updating submodules..."
|
|
||||||
git submodule update --init || {
|
|
||||||
die "Updating submodules failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
# The expected hash, eg. the one computed after the last
|
|
||||||
# successful bootstrap run, is stored on disk
|
|
||||||
state_file=.git-module-status
|
|
||||||
expected_hash=$(cat "$state_file" 2>/dev/null)
|
|
||||||
actual_hash=$(gnulib_hash "$no_git")
|
|
||||||
|
|
||||||
if test "$actual_hash" = "$expected_hash" && test -f AUTHORS; then
|
|
||||||
# The gnulib hash matches our expectations, and all the files
|
|
||||||
# that can only be generated through bootstrap are present:
|
|
||||||
# we just need to run autoreconf. Unless we're performing a
|
|
||||||
# dry run, of course...
|
|
||||||
if test -z "$dry_run"; then
|
|
||||||
echo "Running autoreconf..."
|
|
||||||
autoreconf -if || {
|
|
||||||
die "autoreconf failed"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
# Whenever the gnulib submodule or any of the related bits
|
if test -z "$no_git" && test ${CLEAN_SUBMODULE+set}; then
|
||||||
# has been changed in some way (see gnulib_hash) we need to
|
echo cleaning up submodules...
|
||||||
# run bootstrap again. If we're performing a dry run, we
|
git submodule foreach 'git clean -dfqx && git reset --hard'
|
||||||
# change the return code instead to signal our caller
|
fi
|
||||||
if test "$dry_run"; then
|
echo running bootstrap$no_git...
|
||||||
dry_run=2
|
./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
|
||||||
|
mkdir -p "$OBJ_DIR"
|
||||||
|
cd "$OBJ_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$*" && test -z "$EXTRA_ARGS" && test -f config.status; then
|
||||||
|
./config.status --recheck
|
||||||
else
|
else
|
||||||
echo "Running bootstrap..."
|
$srcdir/configure $EXTRA_ARGS "$@"
|
||||||
./bootstrap$no_git --bootstrap-sync || {
|
fi && {
|
||||||
die "bootstrap failed"
|
|
||||||
}
|
|
||||||
gnulib_hash >"$state_file"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# When performing a dry run, we can stop here
|
|
||||||
test "$dry_run" && exit "$dry_run"
|
|
||||||
|
|
||||||
# If asked not to run configure, we can stop here
|
|
||||||
test "$NOCONFIGURE" && exit 0
|
|
||||||
|
|
||||||
cd "$starting_point" || {
|
|
||||||
die "Failed to cd into $starting_point"
|
|
||||||
}
|
|
||||||
|
|
||||||
if test "$OBJ_DIR"; then
|
|
||||||
mkdir -p "$OBJ_DIR" || {
|
|
||||||
die "Failed to create $OBJ_DIR"
|
|
||||||
}
|
|
||||||
cd "$OBJ_DIR" || {
|
|
||||||
die "Failed to cd into $OBJ_DIR"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make sure we can find GNU make and tell the user
|
|
||||||
# the right command to run
|
|
||||||
MAKE=
|
|
||||||
for cmd in make gmake; do
|
|
||||||
if $cmd -v 2>&1 | grep -q "GNU Make"; then
|
|
||||||
MAKE=$cmd
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
test "$MAKE" || {
|
|
||||||
die "GNU make is required to build libvirt"
|
|
||||||
}
|
|
||||||
|
|
||||||
if test -z "$*" && test -z "$extra_args" && test -f config.status; then
|
|
||||||
echo "Running config.status..."
|
|
||||||
./config.status --recheck || {
|
|
||||||
die "config.status failed"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if test -z "$*" && test -z "$extra_args"; 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."
|
|
||||||
else
|
|
||||||
echo "Running configure with $extra_args $@"
|
|
||||||
fi
|
|
||||||
"$srcdir/configure" $extra_args "$@" || {
|
|
||||||
die "configure failed"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Now type '$MAKE' to compile libvirt."
|
echo "Now type 'make' to compile libvirt."
|
||||||
|
}
|
||||||
|
|||||||
165
bootstrap
165
bootstrap
@@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Print a version string.
|
# Print a version string.
|
||||||
scriptversion=2018-07-01.02; # UTC
|
scriptversion=2013-12-05.23; # UTC
|
||||||
|
|
||||||
# Bootstrap this package from checked-out sources.
|
# Bootstrap this package from checked-out sources.
|
||||||
|
|
||||||
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
|
# Copyright (C) 2003-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,7 +17,7 @@ scriptversion=2018-07-01.02; # UTC
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Originally written by Paul Eggert. The canonical version of this
|
# Originally written by Paul Eggert. The canonical version of this
|
||||||
# script is maintained as build-aux/bootstrap in gnulib, however, to
|
# script is maintained as build-aux/bootstrap in gnulib, however, to
|
||||||
@@ -42,13 +42,8 @@ export LC_ALL
|
|||||||
|
|
||||||
local_gl_dir=gl
|
local_gl_dir=gl
|
||||||
|
|
||||||
# Honor $PERL, but work even if there is none.
|
|
||||||
PERL="${PERL-perl}"
|
|
||||||
|
|
||||||
me=$0
|
me=$0
|
||||||
|
|
||||||
default_gnulib_url=git://git.sv.gnu.org/gnulib
|
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: $me [OPTION]...
|
Usage: $me [OPTION]...
|
||||||
@@ -78,37 +73,6 @@ contents are read as shell variables to configure the bootstrap.
|
|||||||
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||||
are honored.
|
are honored.
|
||||||
|
|
||||||
Gnulib sources can be fetched in various ways:
|
|
||||||
|
|
||||||
* If this package is in a git repository with a 'gnulib' submodule
|
|
||||||
configured, then that submodule is initialized and updated and sources
|
|
||||||
are fetched from there. If \$GNULIB_SRCDIR is set (directly or via
|
|
||||||
--gnulib-srcdir) and is a git repository, then it is used as a reference.
|
|
||||||
|
|
||||||
* Otherwise, if \$GNULIB_SRCDIR is set (directly or via --gnulib-srcdir),
|
|
||||||
then sources are fetched from that local directory. If it is a git
|
|
||||||
repository and \$GNULIB_REVISION is set, then that revision is checked
|
|
||||||
out.
|
|
||||||
|
|
||||||
* Otherwise, if this package is in a git repository with a 'gnulib'
|
|
||||||
submodule configured, then that submodule is initialized and updated and
|
|
||||||
sources are fetched from there.
|
|
||||||
|
|
||||||
* Otherwise, if the 'gnulib' directory does not exist, Gnulib sources are
|
|
||||||
cloned into that directory using git from \$GNULIB_URL, defaulting to
|
|
||||||
$default_gnulib_url.
|
|
||||||
If \$GNULIB_REVISION is set, then that revision is checked out.
|
|
||||||
|
|
||||||
* Otherwise, the existing Gnulib sources in the 'gnulib' directory are
|
|
||||||
used. If it is a git repository and \$GNULIB_REVISION is set, then that
|
|
||||||
revision is checked out.
|
|
||||||
|
|
||||||
If you maintain a package and want to pin a particular revision of the
|
|
||||||
Gnulib sources that has been tested with your package, then there are two
|
|
||||||
possible approaches: either configure a 'gnulib' submodule with the
|
|
||||||
appropriate revision, or set \$GNULIB_REVISION (and if necessary
|
|
||||||
\$GNULIB_URL) in $me.conf.
|
|
||||||
|
|
||||||
Running without arguments will suffice in most cases.
|
Running without arguments will suffice in most cases.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@@ -142,6 +106,9 @@ die() { warn_ "$@"; exit 1; }
|
|||||||
|
|
||||||
# Configuration.
|
# Configuration.
|
||||||
|
|
||||||
|
# Name of the Makefile.am
|
||||||
|
gnulib_mk=gnulib.mk
|
||||||
|
|
||||||
# List of gnulib modules needed.
|
# List of gnulib modules needed.
|
||||||
gnulib_modules=
|
gnulib_modules=
|
||||||
|
|
||||||
@@ -171,7 +138,7 @@ po_download_command_format=\
|
|||||||
# Fallback for downloading .po files (if rsync fails).
|
# Fallback for downloading .po files (if rsync fails).
|
||||||
po_download_command_format2=\
|
po_download_command_format2=\
|
||||||
"wget --mirror -nd -q -np -A.po -P '%s' \
|
"wget --mirror -nd -q -np -A.po -P '%s' \
|
||||||
https://translationproject.org/latest/%s/"
|
http://translationproject.org/latest/%s/"
|
||||||
|
|
||||||
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
||||||
# fall back to the package name (1st argument with munging)
|
# fall back to the package name (1st argument with munging)
|
||||||
@@ -200,15 +167,7 @@ source_base=lib
|
|||||||
m4_base=m4
|
m4_base=m4
|
||||||
doc_base=doc
|
doc_base=doc
|
||||||
tests_base=tests
|
tests_base=tests
|
||||||
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
|
|
||||||
doc/INSTALL
|
|
||||||
"
|
|
||||||
|
|
||||||
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
||||||
gnulib_tool_option_extras=
|
gnulib_tool_option_extras=
|
||||||
@@ -251,17 +210,7 @@ bootstrap_sync=false
|
|||||||
use_git=true
|
use_git=true
|
||||||
|
|
||||||
check_exists() {
|
check_exists() {
|
||||||
if test "$1" = "--verbose"; then
|
|
||||||
($2 --version </dev/null) >/dev/null 2>&1
|
|
||||||
if test $? -ge 126; then
|
|
||||||
# If not found, run with diagnostics as one may be
|
|
||||||
# presented with env variables to set to find the right version
|
|
||||||
($2 --version </dev/null)
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
($1 --version </dev/null) >/dev/null 2>&1
|
($1 --version </dev/null) >/dev/null 2>&1
|
||||||
fi
|
|
||||||
|
|
||||||
test $? -lt 126
|
test $? -lt 126
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,18 +251,24 @@ case "$0" in
|
|||||||
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
||||||
esac
|
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
|
||||||
|
doc/INSTALL
|
||||||
|
"
|
||||||
|
|
||||||
if test "$vc_ignore" = auto; then
|
if test "$vc_ignore" = auto; then
|
||||||
vc_ignore=
|
vc_ignore=
|
||||||
test -d .git && vc_ignore=.gitignore
|
test -d .git && vc_ignore=.gitignore
|
||||||
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
|
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x"$gnulib_modules$gnulib_files$gnulib_extra_files" = x; then
|
|
||||||
use_gnulib=false
|
|
||||||
else
|
|
||||||
use_gnulib=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Translate configuration into internal form.
|
# Translate configuration into internal form.
|
||||||
|
|
||||||
# Parse options.
|
# Parse options.
|
||||||
@@ -450,8 +405,13 @@ sort_ver() { # sort -V is not generally available
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
get_version_sed='
|
get_version() {
|
||||||
# Move version to start of line.
|
app=$1
|
||||||
|
|
||||||
|
$app --version >/dev/null 2>&1 || return 1
|
||||||
|
|
||||||
|
$app --version 2>&1 |
|
||||||
|
sed -n '# Move version to start of line.
|
||||||
s/.*[v ]\([0-9]\)/\1/
|
s/.*[v ]\([0-9]\)/\1/
|
||||||
|
|
||||||
# Skip lines that do not start with version.
|
# Skip lines that do not start with version.
|
||||||
@@ -467,13 +427,6 @@ s/^\([0-9]*\)[a-z-].*/\1/
|
|||||||
s/\.0*\([1-9]\)/.\1/g
|
s/\.0*\([1-9]\)/.\1/g
|
||||||
p
|
p
|
||||||
q'
|
q'
|
||||||
|
|
||||||
get_version() {
|
|
||||||
app=$1
|
|
||||||
|
|
||||||
$app --version >/dev/null 2>&1 || { $app --version; return 1; }
|
|
||||||
|
|
||||||
$app --version 2>&1 | sed -n "$get_version_sed"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_versions() {
|
check_versions() {
|
||||||
@@ -493,7 +446,6 @@ check_versions() {
|
|||||||
test "$appvar" = TAR && appvar=AMTAR
|
test "$appvar" = TAR && appvar=AMTAR
|
||||||
case $appvar in
|
case $appvar in
|
||||||
GZIP) ;; # Do not use $GZIP: it contains gzip options.
|
GZIP) ;; # Do not use $GZIP: it contains gzip options.
|
||||||
PERL::*) ;; # Keep perl modules as-is
|
|
||||||
*) eval "app=\${$appvar-$app}" ;;
|
*) eval "app=\${$appvar-$app}" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -511,22 +463,11 @@ check_versions() {
|
|||||||
ret=1
|
ret=1
|
||||||
continue
|
continue
|
||||||
} ;;
|
} ;;
|
||||||
# Another check is for perl modules. These can be written as
|
|
||||||
# e.g. perl::XML::XPath in case of XML::XPath module, etc.
|
|
||||||
perl::*)
|
|
||||||
# Extract module name
|
|
||||||
app="${app#perl::}"
|
|
||||||
if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then
|
|
||||||
warn_ "Error: perl module '$app' not found"
|
|
||||||
ret=1
|
|
||||||
fi
|
|
||||||
continue
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
if [ "$req_ver" = "-" ]; then
|
if [ "$req_ver" = "-" ]; then
|
||||||
# Merely require app to exist; not all prereq apps are well-behaved
|
# Merely require app to exist; not all prereq apps are well-behaved
|
||||||
# so we have to rely on $? rather than get_version.
|
# so we have to rely on $? rather than get_version.
|
||||||
if ! check_exists --verbose $app; then
|
if ! check_exists $app; then
|
||||||
warn_ "Error: '$app' not found"
|
warn_ "Error: '$app' not found"
|
||||||
ret=1
|
ret=1
|
||||||
fi
|
fi
|
||||||
@@ -644,7 +585,6 @@ git_modules_config () {
|
|||||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
if $use_gnulib; then
|
|
||||||
if $use_git; then
|
if $use_git; then
|
||||||
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
||||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||||
@@ -658,8 +598,8 @@ if $use_gnulib; then
|
|||||||
# Note that $use_git is necessarily true in this case.
|
# Note that $use_git is necessarily true in this case.
|
||||||
if git_modules_config submodule.gnulib.url >/dev/null; then
|
if git_modules_config submodule.gnulib.url >/dev/null; then
|
||||||
echo "$0: getting gnulib files..."
|
echo "$0: getting gnulib files..."
|
||||||
git submodule init -- "$gnulib_path" || exit $?
|
git submodule init || exit $?
|
||||||
git submodule update -- "$gnulib_path" || exit $?
|
git submodule update || exit $?
|
||||||
|
|
||||||
elif [ ! -d "$gnulib_path" ]; then
|
elif [ ! -d "$gnulib_path" ]; then
|
||||||
echo "$0: getting gnulib files..."
|
echo "$0: getting gnulib files..."
|
||||||
@@ -667,11 +607,9 @@ if $use_gnulib; then
|
|||||||
trap cleanup_gnulib 1 2 13 15
|
trap cleanup_gnulib 1 2 13 15
|
||||||
|
|
||||||
shallow=
|
shallow=
|
||||||
if test -z "$GNULIB_REVISION"; then
|
|
||||||
git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
|
git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
|
||||||
fi
|
git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
|
||||||
git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \
|
cleanup_gnulib
|
||||||
|| cleanup_gnulib
|
|
||||||
|
|
||||||
trap - 1 2 13 15
|
trap - 1 2 13 15
|
||||||
fi
|
fi
|
||||||
@@ -690,14 +628,13 @@ if $use_gnulib; then
|
|||||||
# This fallback allows at least git 1.5.5.
|
# This fallback allows at least git 1.5.5.
|
||||||
if test -f "$gnulib_path"/gnulib-tool; then
|
if test -f "$gnulib_path"/gnulib-tool; then
|
||||||
# Since file already exists, assume submodule init already complete.
|
# Since file already exists, assume submodule init already complete.
|
||||||
git submodule update -- "$gnulib_path" || exit $?
|
git submodule update || exit $?
|
||||||
else
|
else
|
||||||
# Older git can't clone into an empty directory.
|
# Older git can't clone into an empty directory.
|
||||||
rmdir "$gnulib_path" 2>/dev/null
|
rmdir "$gnulib_path" 2>/dev/null
|
||||||
git clone --reference "$GNULIB_SRCDIR" \
|
git clone --reference "$GNULIB_SRCDIR" \
|
||||||
"$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
|
"$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
|
||||||
&& git submodule init -- "$gnulib_path" \
|
&& git submodule init && git submodule update \
|
||||||
&& git submodule update -- "$gnulib_path" \
|
|
||||||
|| exit $?
|
|| exit $?
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -706,11 +643,6 @@ if $use_gnulib; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test -d "$GNULIB_SRCDIR"/.git && test -n "$GNULIB_REVISION" \
|
|
||||||
&& ! git_modules_config submodule.gnulib.url >/dev/null; then
|
|
||||||
(cd "$GNULIB_SRCDIR" && git checkout "$GNULIB_REVISION") || cleanup_gnulib
|
|
||||||
fi
|
|
||||||
|
|
||||||
# $GNULIB_SRCDIR now points to the version of gnulib to use, and
|
# $GNULIB_SRCDIR now points to the version of gnulib to use, and
|
||||||
# we no longer need to use git or $gnulib_path below here.
|
# we no longer need to use git or $gnulib_path below here.
|
||||||
|
|
||||||
@@ -730,7 +662,6 @@ if $use_gnulib; then
|
|||||||
|
|
||||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||||
<$gnulib_tool || exit $?
|
<$gnulib_tool || exit $?
|
||||||
fi
|
|
||||||
|
|
||||||
# Get translations.
|
# Get translations.
|
||||||
|
|
||||||
@@ -740,7 +671,7 @@ download_po_files() {
|
|||||||
echo "$me: getting translations into $subdir for $domain..."
|
echo "$me: getting translations into $subdir for $domain..."
|
||||||
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
|
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
|
||||||
eval "$cmd" && return
|
eval "$cmd" && return
|
||||||
# Fallback to HTTPS.
|
# Fallback to HTTP.
|
||||||
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
|
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
|
||||||
eval "$cmd"
|
eval "$cmd"
|
||||||
}
|
}
|
||||||
@@ -833,7 +764,7 @@ symlink_to_dir()
|
|||||||
# aren't confused into doing unnecessary builds. Conversely, if the
|
# aren't confused into doing unnecessary builds. Conversely, if the
|
||||||
# existing symlink's time stamp is older than the source, make it afresh,
|
# existing symlink's time stamp is older than the source, make it afresh,
|
||||||
# so that broken tools aren't confused into skipping needed builds. See
|
# so that broken tools aren't confused into skipping needed builds. See
|
||||||
# <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
|
# <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
|
||||||
test -h "$dst" &&
|
test -h "$dst" &&
|
||||||
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
|
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
|
||||||
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
|
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
|
||||||
@@ -939,16 +870,16 @@ fi
|
|||||||
|
|
||||||
# Import from gnulib.
|
# Import from gnulib.
|
||||||
|
|
||||||
if $use_gnulib; then
|
|
||||||
gnulib_tool_options="\
|
gnulib_tool_options="\
|
||||||
|
--import\
|
||||||
--no-changelog\
|
--no-changelog\
|
||||||
--aux-dir=$build_aux\
|
--aux-dir $build_aux\
|
||||||
--doc-base=$doc_base\
|
--doc-base $doc_base\
|
||||||
--lib=$gnulib_name\
|
--lib $gnulib_name\
|
||||||
--m4-base=$m4_base/\
|
--m4-base $m4_base/\
|
||||||
--source-base=$source_base/\
|
--source-base $source_base/\
|
||||||
--tests-base=$tests_base\
|
--tests-base $tests_base\
|
||||||
--local-dir=$local_gl_dir\
|
--local-dir $local_gl_dir\
|
||||||
$gnulib_tool_option_extras\
|
$gnulib_tool_option_extras\
|
||||||
"
|
"
|
||||||
if test $use_libtool = 1; then
|
if test $use_libtool = 1; then
|
||||||
@@ -958,14 +889,12 @@ if $use_gnulib; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
||||||
$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
|
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
||||||
|| die "gnulib-tool failed"
|
|
||||||
|
|
||||||
for file in $gnulib_files; do
|
for file in $gnulib_files; do
|
||||||
symlink_to_dir "$GNULIB_SRCDIR" $file \
|
symlink_to_dir "$GNULIB_SRCDIR" $file \
|
||||||
|| die "failed to symlink $file"
|
|| die "failed to symlink $file"
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
bootstrap_post_import_hook \
|
bootstrap_post_import_hook \
|
||||||
|| die "bootstrap_post_import_hook failed"
|
|| die "bootstrap_post_import_hook failed"
|
||||||
@@ -1062,9 +991,9 @@ bootstrap_epilogue
|
|||||||
echo "$0: done. Now you can run './configure'."
|
echo "$0: done. Now you can run './configure'."
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-time-zone: "UTC0"
|
# time-stamp-time-zone: "UTC"
|
||||||
# time-stamp-end: "; # UTC"
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Bootstrap configuration.
|
# Bootstrap configuration.
|
||||||
|
|
||||||
# Copyright (C) 2010-2014 Red Hat, Inc.
|
# Copyright (C) 2010-2013 Red Hat, Inc.
|
||||||
|
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
@@ -35,8 +35,9 @@ clock-time
|
|||||||
close
|
close
|
||||||
connect
|
connect
|
||||||
configmake
|
configmake
|
||||||
count-leading-zeros
|
|
||||||
count-one-bits
|
count-one-bits
|
||||||
|
crypto/md5
|
||||||
|
crypto/sha256
|
||||||
dirname-lgpl
|
dirname-lgpl
|
||||||
environ
|
environ
|
||||||
execinfo
|
execinfo
|
||||||
@@ -52,10 +53,10 @@ func
|
|||||||
getaddrinfo
|
getaddrinfo
|
||||||
getcwd-lgpl
|
getcwd-lgpl
|
||||||
gethostname
|
gethostname
|
||||||
getopt-posix
|
|
||||||
getpass
|
getpass
|
||||||
getpeername
|
getpeername
|
||||||
getsockname
|
getsockname
|
||||||
|
gettext-h
|
||||||
gettimeofday
|
gettimeofday
|
||||||
gitlog-to-changelog
|
gitlog-to-changelog
|
||||||
gnumakefile
|
gnumakefile
|
||||||
@@ -90,6 +91,7 @@ pthread
|
|||||||
pthread_sigmask
|
pthread_sigmask
|
||||||
recv
|
recv
|
||||||
regex
|
regex
|
||||||
|
random_r
|
||||||
sched
|
sched
|
||||||
secure_getenv
|
secure_getenv
|
||||||
send
|
send
|
||||||
@@ -117,7 +119,6 @@ time_r
|
|||||||
timegm
|
timegm
|
||||||
ttyname_r
|
ttyname_r
|
||||||
uname
|
uname
|
||||||
unsetenv
|
|
||||||
useless-if-before-free
|
useless-if-before-free
|
||||||
usleep
|
usleep
|
||||||
vasprintf
|
vasprintf
|
||||||
@@ -128,6 +129,16 @@ waitpid
|
|||||||
warnings
|
warnings
|
||||||
'
|
'
|
||||||
|
|
||||||
|
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||||
|
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
||||||
|
--flag=virAsprintf:2:c-format\\\
|
||||||
|
--from-code=UTF-8\\\
|
||||||
|
'
|
||||||
|
|
||||||
|
# This is not a GNU package, so the default bug address is invalid,
|
||||||
|
# and the translation project is not in use.
|
||||||
|
MSGID_BUGS_ADDRESS=libvir-list@redhat.com
|
||||||
|
COPYRIGHT_HOLDER='Red Hat, Inc.'
|
||||||
SKIP_PO=true
|
SKIP_PO=true
|
||||||
|
|
||||||
# Enable copy-mode for MSYS/MinGW. MSYS' ln doesn't work well in the way
|
# Enable copy-mode for MSYS/MinGW. MSYS' ln doesn't work well in the way
|
||||||
@@ -136,6 +147,31 @@ if test -n "$MSYSTEM"; then
|
|||||||
copy=true
|
copy=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
|
||||||
|
# appears in configure.ac, exclude some unnecessary files.
|
||||||
|
# Without grep's -E option (not portable enough, pre-configure),
|
||||||
|
# the following test is ugly. Also, this depends on the existence
|
||||||
|
# of configure.ac, not the obsolescent-named configure.in. But if
|
||||||
|
# you're using this infrastructure, you should care about such things.
|
||||||
|
|
||||||
|
gettext_external=0
|
||||||
|
grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
|
||||||
|
gettext_external=1
|
||||||
|
grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
|
||||||
|
gettext_external=1
|
||||||
|
|
||||||
|
if test $gettext_external = 1; then
|
||||||
|
# Gettext supplies these files, but we don't need them since
|
||||||
|
# we don't have an intl subdirectory.
|
||||||
|
excluded_files='
|
||||||
|
m4/glibc2.m4
|
||||||
|
m4/intdiv0.m4
|
||||||
|
m4/lcmessage.m4
|
||||||
|
m4/uintmax_t.m4
|
||||||
|
m4/ulonglong.m4
|
||||||
|
m4/visibility.m4
|
||||||
|
'
|
||||||
|
fi
|
||||||
|
|
||||||
# Tell gnulib to:
|
# Tell gnulib to:
|
||||||
# require LGPLv2+
|
# require LGPLv2+
|
||||||
@@ -159,21 +195,34 @@ local_gl_dir=gnulib/local
|
|||||||
# Build prerequisites
|
# Build prerequisites
|
||||||
# Note that some of these programs are only required for 'make dist' to
|
# Note that some of these programs are only required for 'make dist' to
|
||||||
# succeed from a fresh git checkout; not all of these programs are
|
# succeed from a fresh git checkout; not all of these programs are
|
||||||
# required to run 'make dist' on a tarball.
|
# required to run 'make dist' on a tarball. As a special case, we want
|
||||||
|
# to require the equivalent of the Fedora python-devel package, but
|
||||||
|
# RHEL 5 lacks the witness python-config package; we hack around that
|
||||||
|
# old environment below.
|
||||||
buildreq="\
|
buildreq="\
|
||||||
autoconf 2.59
|
autoconf 2.59
|
||||||
automake 1.9.6
|
automake 1.9.6
|
||||||
|
autopoint -
|
||||||
|
gettext 0.17
|
||||||
git 1.5.5
|
git 1.5.5
|
||||||
gzip -
|
gzip -
|
||||||
libtool -
|
libtool -
|
||||||
patch -
|
patch -
|
||||||
perl 5.5
|
perl 5.5
|
||||||
pkg-config -
|
pkg-config -
|
||||||
|
python-config -
|
||||||
rpcgen -
|
rpcgen -
|
||||||
tar -
|
tar -
|
||||||
xmllint -
|
xmllint -
|
||||||
xsltproc -
|
xsltproc -
|
||||||
"
|
"
|
||||||
|
# Use rpm as a fallback to bypass the bootstrap probe for python-config,
|
||||||
|
# for the sake of RHEL 5; without requiring it on newer systems that
|
||||||
|
# have python-config to begin with.
|
||||||
|
if `(${PYTHON_CONFIG-python-config} --version;
|
||||||
|
test $? -lt 126 || rpm -q python-devel) >/dev/null 2>&1`; then
|
||||||
|
PYTHON_CONFIG=true
|
||||||
|
fi
|
||||||
|
|
||||||
# Automake requires that ChangeLog and AUTHORS exist.
|
# Automake requires that ChangeLog and AUTHORS exist.
|
||||||
touch AUTHORS ChangeLog || exit 1
|
touch AUTHORS ChangeLog || exit 1
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/perl
|
||||||
#
|
#
|
||||||
# augeas-gentest.pl: Generate an augeas test file, from an
|
# augeas-gentest.pl: Generate an augeas test file, from an
|
||||||
# example config file + test file template
|
# example config file + test file template
|
||||||
|
|||||||
151
build-aux/bracket-spacing.pl
Executable file
151
build-aux/bracket-spacing.pl
Executable file
@@ -0,0 +1,151 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# bracket-spacing.pl: Report any usage of 'function (..args..)'
|
||||||
|
# Also check for other syntax issues, such as correct use of ';'
|
||||||
|
#
|
||||||
|
# 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 , ; or "
|
||||||
|
$data =~ s/'[";,]'/'X'/g;
|
||||||
|
|
||||||
|
# Kill any quoted strings
|
||||||
|
$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 =~ /\b(if|for|while|switch|return)\(/ ||
|
||||||
|
$data =~ /\b(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;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Forbid whitespace before ";" or ",". Things like below are allowed:
|
||||||
|
#
|
||||||
|
# 1) The expression is empty for "for" loop. E.g.
|
||||||
|
# for (i = 0; ; i++)
|
||||||
|
#
|
||||||
|
# 2) An empty statement. E.g.
|
||||||
|
# while (write(statuswrite, &status, 1) == -1 &&
|
||||||
|
# errno == EINTR)
|
||||||
|
# ;
|
||||||
|
#
|
||||||
|
while ($data =~ /[^;\s]\s+[;,]/) {
|
||||||
|
print "$file:$.: $line";
|
||||||
|
$ret = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Require EOL, macro line continuation, or whitespace after ";".
|
||||||
|
# Allow "for (;;)" as an exception.
|
||||||
|
while ($data =~ /;[^ \\\n;)]/) {
|
||||||
|
print "$file:$.: $line";
|
||||||
|
$ret = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Require EOL, space, or enum/struct end after comma.
|
||||||
|
while ($data =~ /,[^ \\\n)}]/) {
|
||||||
|
print "$file:$.: $line";
|
||||||
|
$ret = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close FILE;
|
||||||
|
}
|
||||||
|
|
||||||
|
exit $ret;
|
||||||
@@ -1,204 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
#
|
|
||||||
# check-spacing.pl: Report any usage of 'function (..args..)'
|
|
||||||
# Also check for other syntax issues, such as correct use of ';'
|
|
||||||
#
|
|
||||||
# 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) {
|
|
||||||
# Per-file variables for multiline Curly Bracket (cb_) check
|
|
||||||
my $cb_linenum = 0;
|
|
||||||
my $cb_code = "";
|
|
||||||
my $cb_scolon = 0;
|
|
||||||
|
|
||||||
open FILE, $file;
|
|
||||||
|
|
||||||
while (defined (my $line = <FILE>)) {
|
|
||||||
my $data = $line;
|
|
||||||
# For temporary modifications
|
|
||||||
my $tmpdata;
|
|
||||||
|
|
||||||
# Kill any quoted , ; = or "
|
|
||||||
$data =~ s/'[";,=]'/'X'/g;
|
|
||||||
|
|
||||||
# Kill any quoted strings
|
|
||||||
$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);
|
|
||||||
#
|
|
||||||
# We also don't want to spoil the $data so it can be used
|
|
||||||
# later on.
|
|
||||||
$tmpdata = $data;
|
|
||||||
while ($tmpdata =~ /(\w+)\s\((?!\*)/) {
|
|
||||||
my $kw = $1;
|
|
||||||
|
|
||||||
# Allow space after keywords only
|
|
||||||
if ($kw =~ /^(?:if|for|while|switch|return)$/) {
|
|
||||||
$tmpdata =~ s/(?:$kw\s\()/XXX(/;
|
|
||||||
} else {
|
|
||||||
print "Whitespace after non-keyword:\n";
|
|
||||||
print "$file:$.: $line";
|
|
||||||
$ret = 1;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Require whitespace immediately after keywords
|
|
||||||
if ($data =~ /\b(?:if|for|while|switch|return)\(/) {
|
|
||||||
print "No whitespace after keyword:\n";
|
|
||||||
print "$file:$.: $line";
|
|
||||||
$ret = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Forbid whitespace between )( of a function typedef
|
|
||||||
if ($data =~ /\(\*\w+\)\s+\(/) {
|
|
||||||
print "Whitespace between ')' and '(':\n";
|
|
||||||
print "$file:$.: $line";
|
|
||||||
$ret = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Forbid whitespace following ( or prior to )
|
|
||||||
# but allow whitespace before ) on a single line
|
|
||||||
# (optionally followed by a semicolon)
|
|
||||||
if (($data =~ /\s\)/ && not $data =~ /^\s+\);?$/) ||
|
|
||||||
$data =~ /\((?!$)\s/) {
|
|
||||||
print "Whitespace after '(' or before ')':\n";
|
|
||||||
print "$file:$.: $line";
|
|
||||||
$ret = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Forbid whitespace before ";" or ",". Things like below are allowed:
|
|
||||||
#
|
|
||||||
# 1) The expression is empty for "for" loop. E.g.
|
|
||||||
# for (i = 0; ; i++)
|
|
||||||
#
|
|
||||||
# 2) An empty statement. E.g.
|
|
||||||
# while (write(statuswrite, &status, 1) == -1 &&
|
|
||||||
# errno == EINTR)
|
|
||||||
# ;
|
|
||||||
#
|
|
||||||
if ($data =~ /\s[;,]/) {
|
|
||||||
unless ($data =~ /\S; ; / ||
|
|
||||||
$data =~ /^\s+;/) {
|
|
||||||
print "Whitespace before semicolon or comma:\n";
|
|
||||||
print "$file:$.: $line";
|
|
||||||
$ret = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Require EOL, macro line continuation, or whitespace after ";".
|
|
||||||
# Allow "for (;;)" as an exception.
|
|
||||||
if ($data =~ /;[^ \\\n;)]/) {
|
|
||||||
print "Invalid character after semicolon:\n";
|
|
||||||
print "$file:$.: $line";
|
|
||||||
$ret = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Require EOL, space, or enum/struct end after comma.
|
|
||||||
if ($data =~ /,[^ \\\n)}]/) {
|
|
||||||
print "Invalid character after comma:\n";
|
|
||||||
print "$file:$.: $line";
|
|
||||||
$ret = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Require spaces around assignment '=', compounds and '=='
|
|
||||||
if ($data =~ /[^ ]\b[!<>&|\-+*\/%\^=]?=/ ||
|
|
||||||
$data =~ /=[^= \\\n]/) {
|
|
||||||
print "Spacing around '=' or '==':\n";
|
|
||||||
print "$file:$.: $line";
|
|
||||||
$ret = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# One line conditional statements with one line bodies should
|
|
||||||
# not use curly brackets.
|
|
||||||
if ($data =~ /^\s*(if|while|for)\b.*\{$/) {
|
|
||||||
$cb_linenum = $.;
|
|
||||||
$cb_code = $line;
|
|
||||||
$cb_scolon = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
# We need to check for exactly one semicolon inside the body,
|
|
||||||
# because empty statements (e.g. with comment only) are
|
|
||||||
# allowed
|
|
||||||
if ($cb_linenum == $. - 1 && $data =~ /^[^;]*;[^;]*$/) {
|
|
||||||
$cb_code .= $line;
|
|
||||||
$cb_scolon = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($data =~ /^\s*}\s*$/ &&
|
|
||||||
$cb_linenum == $. - 2 &&
|
|
||||||
$cb_scolon) {
|
|
||||||
|
|
||||||
print "Curly brackets around single-line body:\n";
|
|
||||||
print "$file:$cb_linenum-$.:\n$cb_code$line";
|
|
||||||
$ret = 1;
|
|
||||||
|
|
||||||
# There _should_ be no need to reset the values; but to
|
|
||||||
# keep my inner peace...
|
|
||||||
$cb_linenum = 0;
|
|
||||||
$cb_scolon = 0;
|
|
||||||
$cb_code = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close FILE;
|
|
||||||
}
|
|
||||||
|
|
||||||
exit $ret;
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
my @block;
|
|
||||||
my $msgstr = 0;
|
|
||||||
my $empty = 0;
|
|
||||||
my $unused = 0;
|
|
||||||
my $fuzzy = 0;
|
|
||||||
while (<>) {
|
|
||||||
if (/^$/) {
|
|
||||||
if (!$empty && !$unused && !$fuzzy) {
|
|
||||||
print @block;
|
|
||||||
}
|
|
||||||
@block = ();
|
|
||||||
$msgstr = 0;
|
|
||||||
$fuzzy = 0;
|
|
||||||
push @block, $_;
|
|
||||||
} else {
|
|
||||||
if (/^msgstr/) {
|
|
||||||
$msgstr = 1;
|
|
||||||
$empty = 1;
|
|
||||||
}
|
|
||||||
if (/^#.*fuzzy/) {
|
|
||||||
$fuzzy = 1;
|
|
||||||
}
|
|
||||||
if (/^#~ msgstr/) {
|
|
||||||
$unused = 1;
|
|
||||||
}
|
|
||||||
if ($msgstr && /".+"/) {
|
|
||||||
$empty = 0;
|
|
||||||
}
|
|
||||||
push @block, $_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (@block && !$empty && !$unused) {
|
|
||||||
print @block;
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
|
|
||||||
my %noninlined;
|
|
||||||
my %mocked;
|
|
||||||
|
|
||||||
# Functions in public header don't get the noinline annotation
|
|
||||||
# so whitelist them here
|
|
||||||
$noninlined{"virEventAddTimeout"} = 1;
|
|
||||||
|
|
||||||
foreach my $arg (@ARGV) {
|
|
||||||
if ($arg =~ /\.h$/) {
|
|
||||||
#print "Scan header $arg\n";
|
|
||||||
&scan_annotations($arg);
|
|
||||||
} elsif ($arg =~ /mock\.c$/) {
|
|
||||||
#print "Scan mock $arg\n";
|
|
||||||
&scan_overrides($arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
my $warned = 0;
|
|
||||||
foreach my $func (keys %mocked) {
|
|
||||||
next if exists $noninlined{$func};
|
|
||||||
|
|
||||||
$warned++;
|
|
||||||
print STDERR "$func is mocked at $mocked{$func} but missing noinline annotation\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
exit $warned ? 1 : 0;
|
|
||||||
|
|
||||||
|
|
||||||
sub scan_annotations {
|
|
||||||
my $file = shift;
|
|
||||||
|
|
||||||
open FH, $file or die "cannot read $file: $!";
|
|
||||||
|
|
||||||
my $func;
|
|
||||||
while (<FH>) {
|
|
||||||
if (/^\s*(\w+)\(/ || /^(?:\w+\*?\s+)+(?:\*\s*)?(\w+)\(/) {
|
|
||||||
my $name = $1;
|
|
||||||
if ($name !~ /ATTRIBUTE/) {
|
|
||||||
$func = $name;
|
|
||||||
}
|
|
||||||
} elsif (/^\s*$/) {
|
|
||||||
$func = undef;
|
|
||||||
}
|
|
||||||
if (/ATTRIBUTE_NOINLINE/) {
|
|
||||||
if (defined $func) {
|
|
||||||
$noninlined{$func} = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
close FH
|
|
||||||
}
|
|
||||||
|
|
||||||
sub scan_overrides {
|
|
||||||
my $file = shift;
|
|
||||||
|
|
||||||
open FH, $file or die "cannot read $file: $!";
|
|
||||||
|
|
||||||
my $func;
|
|
||||||
while (<FH>) {
|
|
||||||
if (/^(\w+)\(/ || /^\w+\s*(?:\*\s*)?(\w+)\(/) {
|
|
||||||
my $name = $1;
|
|
||||||
if ($name =~ /^vir/) {
|
|
||||||
$mocked{$name} = "$file:$.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
close FH
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
my $file = " ";
|
|
||||||
my $ret = 0;
|
|
||||||
my %includes = ( );
|
|
||||||
my $lineno = 0;
|
|
||||||
|
|
||||||
while (<>) {
|
|
||||||
if (not $file eq $ARGV) {
|
|
||||||
%includes = ( );
|
|
||||||
$file = $ARGV;
|
|
||||||
$lineno = 0;
|
|
||||||
}
|
|
||||||
$lineno++;
|
|
||||||
if (/^# *include *[<"]([^>"]*\.h)[">]/) {
|
|
||||||
$includes{$1}++;
|
|
||||||
if ($includes{$1} == 2) {
|
|
||||||
$ret = 1;
|
|
||||||
print STDERR "$ARGV:$lineno: $_";
|
|
||||||
print STDERR "Do not include a header more than once per file\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exit $ret;
|
|
||||||
599
cfg.mk
599
cfg.mk
@@ -1,5 +1,5 @@
|
|||||||
# Customize Makefile.maint. -*- makefile -*-
|
# Customize Makefile.maint. -*- makefile -*-
|
||||||
# Copyright (C) 2008-2015 Red Hat, Inc.
|
# Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
|
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
@@ -32,8 +32,8 @@ gnulib_dir = $(srcdir)/.gnulib
|
|||||||
# List of additional files that we want to pick up in our POTFILES.in
|
# List of additional files that we want to pick up in our POTFILES.in
|
||||||
# This is all gnulib files, as well as generated files for RPC code.
|
# This is all gnulib files, as well as generated files for RPC code.
|
||||||
generated_files = \
|
generated_files = \
|
||||||
$(srcdir)/src/*/{remote_daemon,admin_server,log_daemon,lock_daemon}_dispatch_*stubs.h \
|
$(srcdir)/daemon/*_dispatch.h \
|
||||||
$(srcdir)/src/lxc/{lxc_monitor,lxc_controller}_dispatch.h \
|
$(srcdir)/src/*/*_dispatch.h \
|
||||||
$(srcdir)/src/remote/*_client_bodies.h \
|
$(srcdir)/src/remote/*_client_bodies.h \
|
||||||
$(srcdir)/src/*/*_protocol.[ch] \
|
$(srcdir)/src/*/*_protocol.[ch] \
|
||||||
$(srcdir)/gnulib/lib/*.[ch]
|
$(srcdir)/gnulib/lib/*.[ch]
|
||||||
@@ -64,7 +64,6 @@ local-checks-to-skip = \
|
|||||||
sc_prohibit_quote_without_use \
|
sc_prohibit_quote_without_use \
|
||||||
sc_prohibit_quotearg_without_use \
|
sc_prohibit_quotearg_without_use \
|
||||||
sc_prohibit_stat_st_blocks \
|
sc_prohibit_stat_st_blocks \
|
||||||
sc_prohibit_undesirable_word_seq \
|
|
||||||
sc_root_tests \
|
sc_root_tests \
|
||||||
sc_space_tab \
|
sc_space_tab \
|
||||||
sc_sun_os_names \
|
sc_sun_os_names \
|
||||||
@@ -91,7 +90,7 @@ endif
|
|||||||
|
|
||||||
# Files that should never cause syntax check failures.
|
# Files that should never cause syntax check failures.
|
||||||
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
|
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
|
||||||
(^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$
|
(^(HACKING|docs/(news\.html\.in|.*\.patch))|\.po)$$
|
||||||
|
|
||||||
# Functions like free() that are no-ops on NULL arguments.
|
# Functions like free() that are no-ops on NULL arguments.
|
||||||
useless_free_options = \
|
useless_free_options = \
|
||||||
@@ -127,6 +126,7 @@ useless_free_options = \
|
|||||||
--name=virDomainDiskDefFree \
|
--name=virDomainDiskDefFree \
|
||||||
--name=virDomainEventCallbackListFree \
|
--name=virDomainEventCallbackListFree \
|
||||||
--name=virObjectEventQueueFree \
|
--name=virObjectEventQueueFree \
|
||||||
|
--name=virObjectEventStateFree \
|
||||||
--name=virDomainFSDefFree \
|
--name=virDomainFSDefFree \
|
||||||
--name=virDomainGraphicsDefFree \
|
--name=virDomainGraphicsDefFree \
|
||||||
--name=virDomainHostdevDefFree \
|
--name=virDomainHostdevDefFree \
|
||||||
@@ -160,6 +160,7 @@ useless_free_options = \
|
|||||||
--name=virNWFilterRuleDefFree \
|
--name=virNWFilterRuleDefFree \
|
||||||
--name=virNWFilterRuleInstFree \
|
--name=virNWFilterRuleInstFree \
|
||||||
--name=virNetworkDefFree \
|
--name=virNetworkDefFree \
|
||||||
|
--name=virNetworkObjFree \
|
||||||
--name=virNodeDeviceDefFree \
|
--name=virNodeDeviceDefFree \
|
||||||
--name=virNodeDeviceObjFree \
|
--name=virNodeDeviceObjFree \
|
||||||
--name=virObjectUnref \
|
--name=virObjectUnref \
|
||||||
@@ -248,6 +249,8 @@ useless_free_options = \
|
|||||||
# y virNetworkDefFree
|
# y virNetworkDefFree
|
||||||
# n virNetworkFree (returns int)
|
# n virNetworkFree (returns int)
|
||||||
# n virNetworkFreeName (returns int)
|
# n virNetworkFreeName (returns int)
|
||||||
|
# y virNetworkObjFree
|
||||||
|
# n virNetworkObjListFree FIXME
|
||||||
# n virNodeDevCapsDefFree FIXME
|
# n virNodeDevCapsDefFree FIXME
|
||||||
# y virNodeDeviceDefFree
|
# y virNodeDeviceDefFree
|
||||||
# n virNodeDeviceFree (returns int)
|
# n virNodeDeviceFree (returns int)
|
||||||
@@ -284,11 +287,11 @@ sc_avoid_write:
|
|||||||
|
|
||||||
# In debug statements, print flags as bitmask and mode_t as octal.
|
# In debug statements, print flags as bitmask and mode_t as octal.
|
||||||
sc_flags_debug:
|
sc_flags_debug:
|
||||||
@prohibit='\<mode=%[0-9.]*[diuxo]' \
|
@prohibit='\<mode=%[0-9.]*[diux]' \
|
||||||
halt='use \"0%o\" to debug mode_t values' \
|
halt='use %o to debug mode_t values' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
@prohibit='[Ff]lags=%[0-9.]*l*[dioux]' \
|
@prohibit='[Ff]lags=%[0-9.]*l*[diou]' \
|
||||||
halt='use \"0x%x\" to debug flag values' \
|
halt='use %x to debug flag values' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# Prefer 'unsigned int flags', along with checks for unknown flags.
|
# Prefer 'unsigned int flags', along with checks for unknown flags.
|
||||||
@@ -300,15 +303,14 @@ sc_flags_debug:
|
|||||||
# than d). The existence of long long, and of documentation about
|
# than d). The existence of long long, and of documentation about
|
||||||
# flags, makes the regex in the third test slightly harder.
|
# flags, makes the regex in the third test slightly harder.
|
||||||
sc_flags_usage:
|
sc_flags_usage:
|
||||||
@test "$$(cat $(srcdir)/include/libvirt/libvirt-domain.h \
|
@test "$$(cat $(srcdir)/include/libvirt/libvirt.h.in \
|
||||||
$(srcdir)/include/libvirt/virterror.h \
|
$(srcdir)/include/libvirt/virterror.h \
|
||||||
$(srcdir)/include/libvirt/libvirt-qemu.h \
|
$(srcdir)/include/libvirt/libvirt-qemu.h \
|
||||||
$(srcdir)/include/libvirt/libvirt-lxc.h \
|
$(srcdir)/include/libvirt/libvirt-lxc.h \
|
||||||
$(srcdir)/include/libvirt/libvirt-admin.h \
|
|
||||||
| grep -c '\(long\|unsigned\) flags')" != 4 && \
|
| grep -c '\(long\|unsigned\) flags')" != 4 && \
|
||||||
{ echo '$(ME): new API should use "unsigned int flags"' 1>&2; \
|
{ echo '$(ME): new API should use "unsigned int flags"' 1>&2; \
|
||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
@prohibit=' flags ATTRIBUTE_UNUSED' \
|
@prohibit=' flags ''ATTRIBUTE_UNUSED' \
|
||||||
halt='flags should be checked with virCheckFlags' \
|
halt='flags should be checked with virCheckFlags' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
@prohibit='^[^@]*([^d] (int|long long)|[^dg] long) flags[;,)]' \
|
@prohibit='^[^@]*([^d] (int|long long)|[^dg] long) flags[;,)]' \
|
||||||
@@ -321,11 +323,6 @@ sc_prohibit_internal_functions:
|
|||||||
halt='use VIR_ macros instead of internal functions' \
|
halt='use VIR_ macros instead of internal functions' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
sc_prohibit_raw_virclassnew:
|
|
||||||
@prohibit='virClassNew *\(' \
|
|
||||||
halt='use VIR_CLASS_NEW instead of virClassNew' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# Avoid raw malloc and free, except in documentation comments.
|
# Avoid raw malloc and free, except in documentation comments.
|
||||||
sc_prohibit_raw_allocation:
|
sc_prohibit_raw_allocation:
|
||||||
@prohibit='^.[^*].*\<((m|c|re)alloc|free) *\([^)]' \
|
@prohibit='^.[^*].*\<((m|c|re)alloc|free) *\([^)]' \
|
||||||
@@ -356,8 +353,8 @@ sc_prohibit_mkstemp:
|
|||||||
# access with X_OK accepts directories, but we can't exec() those.
|
# access with X_OK accepts directories, but we can't exec() those.
|
||||||
# access with F_OK or R_OK is okay, though.
|
# access with F_OK or R_OK is okay, though.
|
||||||
sc_prohibit_access_xok:
|
sc_prohibit_access_xok:
|
||||||
@prohibit='access(at)? *\(.*X_OK' \
|
@prohibit='access''(at)? *\(.*X_OK' \
|
||||||
halt='use virFileIsExecutable instead of access(,X_OK)' \
|
halt='use virFileIsExecutable instead of access''(,X_OK)' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
|
# Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
|
||||||
@@ -366,7 +363,7 @@ snp_ = strncmp *\(.+\)
|
|||||||
sc_prohibit_strncmp:
|
sc_prohibit_strncmp:
|
||||||
@prohibit='! *strncmp *\(|\<$(snp_) *[!=]=|[!=]= *$(snp_)' \
|
@prohibit='! *strncmp *\(|\<$(snp_) *[!=]=|[!=]= *$(snp_)' \
|
||||||
exclude=':# *define STR(N?EQLEN|PREFIX)\(' \
|
exclude=':# *define STR(N?EQLEN|PREFIX)\(' \
|
||||||
halt='use STREQLEN or STRPREFIX instead of strncmp' \
|
halt='use STREQLEN or STRPREFIX instead of str''ncmp' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# strtol and friends are too easy to misuse
|
# strtol and friends are too easy to misuse
|
||||||
@@ -384,7 +381,7 @@ sc_prohibit_strtol:
|
|||||||
# But for plain %s, virAsprintf is overkill compared to strdup.
|
# But for plain %s, virAsprintf is overkill compared to strdup.
|
||||||
sc_prohibit_asprintf:
|
sc_prohibit_asprintf:
|
||||||
@prohibit='\<v?a[s]printf\>' \
|
@prohibit='\<v?a[s]printf\>' \
|
||||||
halt='use virAsprintf, not asprintf' \
|
halt='use virAsprintf, not as'printf \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
@prohibit='virAsprintf.*, *"%s",' \
|
@prohibit='virAsprintf.*, *"%s",' \
|
||||||
halt='use VIR_STRDUP instead of virAsprintf with "%s"' \
|
halt='use VIR_STRDUP instead of virAsprintf with "%s"' \
|
||||||
@@ -411,7 +408,7 @@ sc_prohibit_risky_id_promotion:
|
|||||||
# since gnulib has more guarantees for snprintf portability
|
# since gnulib has more guarantees for snprintf portability
|
||||||
sc_prohibit_sprintf:
|
sc_prohibit_sprintf:
|
||||||
@prohibit='\<[s]printf\>' \
|
@prohibit='\<[s]printf\>' \
|
||||||
halt='use snprintf, not sprintf' \
|
halt='use snprintf, not s'printf \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
sc_prohibit_readlink:
|
sc_prohibit_readlink:
|
||||||
@@ -424,55 +421,49 @@ sc_prohibit_gethostname:
|
|||||||
halt='use virGetHostname, not gethostname' \
|
halt='use virGetHostname, not gethostname' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
sc_prohibit_readdir:
|
|
||||||
@prohibit='\b(read|close|open)dir *\(' \
|
|
||||||
exclude='exempt from syntax-check' \
|
|
||||||
halt='use virDirOpen, virDirRead and VIR_DIR_CLOSE' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_prohibit_gettext_noop:
|
sc_prohibit_gettext_noop:
|
||||||
@prohibit='gettext_noop *\(' \
|
@prohibit='gettext_noop *\(' \
|
||||||
halt='use N_, not gettext_noop' \
|
halt='use N_, not gettext_noop' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
sc_prohibit_VIR_ERR_NO_MEMORY:
|
sc_prohibit_VIR_ERR_NO_MEMORY:
|
||||||
@prohibit='\<VIR_ERR_NO_MEMORY\>' \
|
@prohibit='\<V''IR_ERR_NO_MEMORY\>' \
|
||||||
halt='use virReportOOMError, not VIR_ERR_NO_MEMORY' \
|
halt='use virReportOOMError, not V'IR_ERR_NO_MEMORY \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
sc_prohibit_PATH_MAX:
|
sc_prohibit_PATH_MAX:
|
||||||
@prohibit='\<PATH_MAX\>' \
|
@prohibit='\<P''ATH_MAX\>' \
|
||||||
halt='dynamically allocate paths, do not use PATH_MAX' \
|
halt='dynamically allocate paths, do not use P'ATH_MAX \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
|
# Use a subshell for each function, to give the optimal warning message.
|
||||||
include $(srcdir)/Makefile.nonreentrant
|
include $(srcdir)/Makefile.nonreentrant
|
||||||
sc_prohibit_nonreentrant:
|
sc_prohibit_nonreentrant:
|
||||||
@prohibit="\\<(${NON_REENTRANT_RE}) *\\(" \
|
@fail=0 ; \
|
||||||
halt="use re-entrant functions (usually ending with _r)" \
|
for i in $(NON_REENTRANT) ; \
|
||||||
$(_sc_search_regexp)
|
do \
|
||||||
|
(prohibit="\\<$$i *\\(" \
|
||||||
|
halt="use $${i}_r, not $$i" \
|
||||||
|
$(_sc_search_regexp) \
|
||||||
|
) || fail=1; \
|
||||||
|
done ; \
|
||||||
|
exit $$fail
|
||||||
|
|
||||||
sc_prohibit_select:
|
sc_prohibit_select:
|
||||||
@prohibit='\<select *\(' \
|
@prohibit="\\<select *\\(" \
|
||||||
halt='use poll(), not select()' \
|
halt="use poll(), not se""lect()" \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# Prohibit the inclusion of <ctype.h>.
|
# Prohibit the inclusion of <ctype.h>.
|
||||||
sc_prohibit_ctype_h:
|
sc_prohibit_ctype_h:
|
||||||
@prohibit='^# *include *<ctype\.h>' \
|
@prohibit='^# *include *<ctype\.h>' \
|
||||||
halt='use c-ctype.h instead of ctype.h' \
|
halt="don't use ctype.h; instead, use c-ctype.h" \
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# We have our own wrapper for mocking purposes
|
|
||||||
sc_prohibit_canonicalize_file_name:
|
|
||||||
@prohibit='\<canonicalize_file_name\(' \
|
|
||||||
exclude='exempt from syntax-check' \
|
|
||||||
halt='use virFileCanonicalizePath() instead of canonicalize_file_name()' \
|
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# Insist on correct types for [pug]id.
|
# Insist on correct types for [pug]id.
|
||||||
sc_correct_id_types:
|
sc_correct_id_types:
|
||||||
@prohibit='\<(int|long) *[pug]id\>' \
|
@prohibit='\<(int|long) *[pug]id\>' \
|
||||||
halt='use pid_t for pid, uid_t for uid, gid_t for gid' \
|
halt="use pid_t for pid, uid_t for uid, gid_t for gid" \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# "const fooPtr a" is the same as "foo * const a", even though it is
|
# "const fooPtr a" is the same as "foo * const a", even though it is
|
||||||
@@ -496,7 +487,7 @@ sc_size_of_brackets:
|
|||||||
# Ensure that no C source file, docs, or rng schema uses TABs for
|
# 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
|
# indentation. Also match *.h.in files, to get libvirt.h.in. Exclude
|
||||||
# files in gnulib, since they're imported.
|
# files in gnulib, since they're imported.
|
||||||
space_indent_files=(\.(aug(\.in)?|rng|s?[ch](\.in)?|html.in|py|pl|syms)|(daemon|tools)/.*\.in)
|
space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py|pl|syms)|(daemon|tools)/.*\.in)
|
||||||
sc_TAB_in_indentation:
|
sc_TAB_in_indentation:
|
||||||
@prohibit='^ * ' \
|
@prohibit='^ * ' \
|
||||||
in_vc_files='$(space_indent_files)$$' \
|
in_vc_files='$(space_indent_files)$$' \
|
||||||
@@ -508,13 +499,12 @@ ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
|
|||||||
|
|
||||||
sc_avoid_ctype_macros:
|
sc_avoid_ctype_macros:
|
||||||
@prohibit='\b($(ctype_re)) *\(' \
|
@prohibit='\b($(ctype_re)) *\(' \
|
||||||
in_vc_files='\.[ch]$$' \
|
halt="don't use ctype macros (use c-ctype.h)" \
|
||||||
halt='use c-ctype.h instead of ctype macros' \
|
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
sc_avoid_strcase:
|
sc_avoid_strcase:
|
||||||
@prohibit='\bstrn?case(cmp|str) *\(' \
|
@prohibit='\bstrn?case(cmp|str) *\(' \
|
||||||
halt='use c-strcase.h instead of raw strcase functions' \
|
halt="don't use raw strcase functions (use c-strcase instead)" \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
sc_prohibit_virBufferAdd_with_string_literal:
|
sc_prohibit_virBufferAdd_with_string_literal:
|
||||||
@@ -527,9 +517,11 @@ sc_prohibit_virBufferAsprintf_with_string_literal:
|
|||||||
halt='use virBufferAddLit, not virBufferAsprintf, with a string literal' \
|
halt='use virBufferAddLit, not virBufferAsprintf, with a string literal' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
sc_forbid_manual_xml_indent:
|
# Not only do they fail to deal well with ipv6, but the gethostby*
|
||||||
@prohibit='virBuffer.*" +<' \
|
# functions are also not thread-safe.
|
||||||
halt='use virBufferAdjustIndent instead of spaces when indenting xml' \
|
sc_prohibit_gethostby:
|
||||||
|
@prohibit='\<gethostby(addr|name2?) *\(' \
|
||||||
|
halt='use getaddrinfo, not gethostby*' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# dirname and basename from <libgen.h> are not required to be thread-safe
|
# dirname and basename from <libgen.h> are not required to be thread-safe
|
||||||
@@ -564,14 +556,8 @@ sc_avoid_attribute_unused_in_header:
|
|||||||
halt='use ATTRIBUTE_UNUSED in .c rather than .h files' \
|
halt='use ATTRIBUTE_UNUSED in .c rather than .h files' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
sc_prohibit_int_index:
|
|
||||||
@prohibit='\<(int|unsigned)\s*\*?index\>(\s|,|;)' \
|
|
||||||
halt='use different name than 'index' for declaration' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_prohibit_int_ijk:
|
sc_prohibit_int_ijk:
|
||||||
@prohibit='\<(int|unsigned) ([^(=]* )*(i|j|k)\>(\s|,|;)' \
|
@prohibit='\<(int|unsigned) ([^(]* )*(i|j|k)\>(\s|,|;)' \
|
||||||
exclude='exempt from syntax-check' \
|
|
||||||
halt='use size_t, not int/unsigned int for loop vars i, j, k' \
|
halt='use size_t, not int/unsigned int for loop vars i, j, k' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
@@ -587,17 +573,6 @@ sc_prohibit_loop_var_decl:
|
|||||||
halt='declare loop iterators outside the for statement' \
|
halt='declare loop iterators outside the for statement' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# Use 'bool', not 'int', when assigning true or false
|
|
||||||
sc_prohibit_int_assign_bool:
|
|
||||||
@prohibit='\<int\>.*= *(true|false)' \
|
|
||||||
halt='use bool type for boolean values' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_prohibit_unsigned_pid:
|
|
||||||
@prohibit='\<unsigned\> [^,=;(]+pid' \
|
|
||||||
halt='use signed type for pid values' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# Many of the function names below came from this filter:
|
# Many of the function names below came from this filter:
|
||||||
# git grep -B2 '\<_('|grep -E '\.c- *[[:alpha:]_][[:alnum:]_]* ?\(.*[,;]$' \
|
# git grep -B2 '\<_('|grep -E '\.c- *[[:alpha:]_][[:alnum:]_]* ?\(.*[,;]$' \
|
||||||
# |sed 's/.*\.c- *//'|perl -pe 's/ ?\(.*//'|sort -u \
|
# |sed 's/.*\.c- *//'|perl -pe 's/ ?\(.*//'|sort -u \
|
||||||
@@ -610,6 +585,16 @@ msg_gen_function += regerror
|
|||||||
msg_gen_function += vah_error
|
msg_gen_function += vah_error
|
||||||
msg_gen_function += vah_warning
|
msg_gen_function += vah_warning
|
||||||
msg_gen_function += virGenericReportError
|
msg_gen_function += virGenericReportError
|
||||||
|
msg_gen_function += virLibConnError
|
||||||
|
msg_gen_function += virLibDomainError
|
||||||
|
msg_gen_function += virLibDomainSnapshotError
|
||||||
|
msg_gen_function += virLibInterfaceError
|
||||||
|
msg_gen_function += virLibNetworkError
|
||||||
|
msg_gen_function += virLibNodeDeviceError
|
||||||
|
msg_gen_function += virLibNWFilterError
|
||||||
|
msg_gen_function += virLibSecretError
|
||||||
|
msg_gen_function += virLibStoragePoolError
|
||||||
|
msg_gen_function += virLibStorageVolError
|
||||||
msg_gen_function += virRaiseError
|
msg_gen_function += virRaiseError
|
||||||
msg_gen_function += virReportError
|
msg_gen_function += virReportError
|
||||||
msg_gen_function += virReportErrorHelper
|
msg_gen_function += virReportErrorHelper
|
||||||
@@ -624,9 +609,8 @@ msg_gen_function += xenapiSessionErrorHandler
|
|||||||
# msg_gen_function += vshPrint
|
# msg_gen_function += vshPrint
|
||||||
# msg_gen_function += vshError
|
# msg_gen_function += vshError
|
||||||
|
|
||||||
space =
|
func_or := $(shell echo $(msg_gen_function)|tr -s ' ' '|')
|
||||||
space +=
|
func_re := ($(func_or))
|
||||||
func_re= ($(subst $(space),|,$(msg_gen_function)))
|
|
||||||
|
|
||||||
# Look for diagnostics that aren't marked for translation.
|
# Look for diagnostics that aren't marked for translation.
|
||||||
# This won't find any for which error's format string is on a separate line.
|
# This won't find any for which error's format string is on a separate line.
|
||||||
@@ -640,7 +624,7 @@ sc_libvirt_unmarked_diagnostics:
|
|||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
||||||
grep -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
grep -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
||||||
| $(SED) 's/_("\([^\"]\|\\.\)\+"//;s/[ ]"%s"//' \
|
| sed 's/_("\([^\"]\|\\.\)\+"//;s/[ ]"%s"//' \
|
||||||
| grep '[ ]"' && \
|
| grep '[ ]"' && \
|
||||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
@@ -665,7 +649,7 @@ sc_prohibit_newline_at_end_of_diagnostic:
|
|||||||
sc_prohibit_diagnostic_without_format:
|
sc_prohibit_diagnostic_without_format:
|
||||||
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
||||||
grep -A2 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
grep -A2 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
||||||
| $(SED) -rn -e ':l; /[,"]$$/ {N;b l;}' \
|
| sed -rn -e ':l; /[,"]$$/ {N;b l;}' \
|
||||||
-e '/(xenapiSessionErrorHandler|vah_(error|warning))/d' \
|
-e '/(xenapiSessionErrorHandler|vah_(error|warning))/d' \
|
||||||
-e '/\<$(func_re) *\([^"]*"([^%"]|"\n[^"]*")*"[,)]/p' \
|
-e '/\<$(func_re) *\([^"]*"([^%"]|"\n[^"]*")*"[,)]/p' \
|
||||||
| grep -vE 'VIR_ERROR' && \
|
| grep -vE 'VIR_ERROR' && \
|
||||||
@@ -679,7 +663,7 @@ sc_prohibit_useless_translation:
|
|||||||
halt='found useless translation' \
|
halt='found useless translation' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
@prohibit='\<N?_ *\(' \
|
@prohibit='\<N?_ *\(' \
|
||||||
in_vc_files='(tests|examples)/' \
|
in_vc_files='^(tests|examples)/' \
|
||||||
halt='no translations in tests or examples' \
|
halt='no translations in tests or examples' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
@@ -687,7 +671,7 @@ sc_prohibit_useless_translation:
|
|||||||
# or \n on one side of the split.
|
# or \n on one side of the split.
|
||||||
sc_require_whitespace_in_translation:
|
sc_require_whitespace_in_translation:
|
||||||
@grep -n -A1 '"$$' $$($(VC_LIST_EXCEPT)) \
|
@grep -n -A1 '"$$' $$($(VC_LIST_EXCEPT)) \
|
||||||
| $(SED) -ne ':l; /"$$/ {N;b l;}; s/"\n[^"]*"/""/g; s/\\n/ /g' \
|
| sed -ne ':l; /"$$/ {N;b l;}; s/"\n[^"]*"/""/g; s/\\n/ /g' \
|
||||||
-e '/_(.*[^\ ]""[^\ ]/p' | grep . && \
|
-e '/_(.*[^\ ]""[^\ ]/p' | grep . && \
|
||||||
{ echo '$(ME): missing whitespace at line split' 1>&2; \
|
{ echo '$(ME): missing whitespace at line split' 1>&2; \
|
||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
@@ -695,7 +679,7 @@ sc_require_whitespace_in_translation:
|
|||||||
# Enforce recommended preprocessor indentation style.
|
# Enforce recommended preprocessor indentation style.
|
||||||
sc_preprocessor_indentation:
|
sc_preprocessor_indentation:
|
||||||
@if cppi --version >/dev/null 2>&1; then \
|
@if cppi --version >/dev/null 2>&1; then \
|
||||||
$(VC_LIST_EXCEPT) | grep -E '\.[ch](\.in)?$$' | xargs cppi -a -c \
|
$(VC_LIST_EXCEPT) | grep '\.[ch]$$' | xargs cppi -a -c \
|
||||||
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
||||||
exit 1; }; \
|
exit 1; }; \
|
||||||
else \
|
else \
|
||||||
@@ -707,11 +691,11 @@ sc_preprocessor_indentation:
|
|||||||
sc_spec_indentation:
|
sc_spec_indentation:
|
||||||
@if cppi --version >/dev/null 2>&1; then \
|
@if cppi --version >/dev/null 2>&1; then \
|
||||||
for f in $$($(VC_LIST_EXCEPT) | grep '\.spec\.in$$'); do \
|
for f in $$($(VC_LIST_EXCEPT) | grep '\.spec\.in$$'); do \
|
||||||
$(SED) -e 's|#|// #|; s|%ifn*\(arch\)* |#if a // |' \
|
sed -e 's|#|// #|; s|%ifn*\(arch\)* |#if a // |' \
|
||||||
-e 's/%\(else\|endif\|define\)/#\1/' \
|
-e 's/%\(else\|endif\|define\)/#\1/' \
|
||||||
-e 's/^\( *\)\1\1\1#/#\1/' \
|
-e 's/^\( *\)\1\1\1#/#\1/' \
|
||||||
-e 's|^\( *[^#/ ]\)|// \1|; s|^\( */[^/]\)|// \1|' $$f \
|
-e 's|^\( *[^#/ ]\)|// \1|; s|^\( */[^/]\)|// \1|' $$f \
|
||||||
| cppi -a -c 2>&1 | $(SED) "s|standard input|$$f|"; \
|
| cppi -a -c 2>&1 | sed "s|standard input|$$f|"; \
|
||||||
done | { if grep . >&2; then false; else :; fi; } \
|
done | { if grep . >&2; then false; else :; fi; } \
|
||||||
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
||||||
exit 1; }; \
|
exit 1; }; \
|
||||||
@@ -748,7 +732,7 @@ sc_copyright_format:
|
|||||||
@prohibit='Copyright [^(].*Red 'Hat \
|
@prohibit='Copyright [^(].*Red 'Hat \
|
||||||
halt='consistently use (C) in Red Hat copyright' \
|
halt='consistently use (C) in Red Hat copyright' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
@prohibit='\<RedHat\>' \
|
@prohibit='\<Red''Hat\>' \
|
||||||
halt='spell Red Hat as two words' \
|
halt='spell Red Hat as two words' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
@@ -781,16 +765,16 @@ sc_prohibit_gettext_markup:
|
|||||||
# lower-level code must not include higher-level headers.
|
# lower-level code must not include higher-level headers.
|
||||||
cross_dirs=$(patsubst $(srcdir)/src/%.,%,$(wildcard $(srcdir)/src/*/.))
|
cross_dirs=$(patsubst $(srcdir)/src/%.,%,$(wildcard $(srcdir)/src/*/.))
|
||||||
cross_dirs_re=($(subst / ,/|,$(cross_dirs)))
|
cross_dirs_re=($(subst / ,/|,$(cross_dirs)))
|
||||||
mid_dirs=access|admin|conf|cpu|locking|logging|rpc|security
|
|
||||||
sc_prohibit_cross_inclusion:
|
sc_prohibit_cross_inclusion:
|
||||||
@for dir in $(cross_dirs); do \
|
@for dir in $(cross_dirs); do \
|
||||||
case $$dir in \
|
case $$dir in \
|
||||||
util/) safe="util";; \
|
util/) safe="util";; \
|
||||||
access/ | conf/) safe="($$dir|conf|util)";; \
|
locking/) \
|
||||||
cpu/| network/| node_device/| rpc/| security/| storage/) \
|
safe="($$dir|util|conf|rpc)";; \
|
||||||
safe="($$dir|util|conf|storage)";; \
|
cpu/ | locking/ | network/ | rpc/ | security/) \
|
||||||
xenapi/ | xenconfig/ ) safe="($$dir|util|conf|xen|cpu)";; \
|
safe="($$dir|util|conf)";; \
|
||||||
*) safe="($$dir|$(mid_dirs)|util)";; \
|
xenapi/ | xenxs/ ) safe="($$dir|util|conf|xen)";; \
|
||||||
|
*) safe="($$dir|util|conf|cpu|network|locking|rpc|security)";; \
|
||||||
esac; \
|
esac; \
|
||||||
in_vc_files="^src/$$dir" \
|
in_vc_files="^src/$$dir" \
|
||||||
prohibit='^# *include .$(cross_dirs_re)' \
|
prohibit='^# *include .$(cross_dirs_re)' \
|
||||||
@@ -803,7 +787,7 @@ sc_prohibit_cross_inclusion:
|
|||||||
# elements added to the enum by using a _LAST marker.
|
# elements added to the enum by using a _LAST marker.
|
||||||
sc_require_enum_last_marker:
|
sc_require_enum_last_marker:
|
||||||
@grep -A1 -nE '^[^#]*VIR_ENUM_IMPL *\(' $$($(VC_LIST_EXCEPT)) \
|
@grep -A1 -nE '^[^#]*VIR_ENUM_IMPL *\(' $$($(VC_LIST_EXCEPT)) \
|
||||||
| $(SED) -ne '/VIR_ENUM_IMPL[^,]*,$$/N' \
|
| sed -ne '/VIR_ENUM_IMPL[^,]*,$$/N' \
|
||||||
-e '/VIR_ENUM_IMPL[^,]*,[^,]*[^_,][^L,][^A,][^S,][^T,],/p' \
|
-e '/VIR_ENUM_IMPL[^,]*,[^,]*[^_,][^L,][^A,][^S,][^T,],/p' \
|
||||||
-e '/VIR_ENUM_IMPL[^,]*,[^,]\{0,4\},/p' \
|
-e '/VIR_ENUM_IMPL[^,]*,[^,]\{0,4\},/p' \
|
||||||
| grep . && \
|
| grep . && \
|
||||||
@@ -814,16 +798,40 @@ sc_require_enum_last_marker:
|
|||||||
sc_prohibit_semicolon_at_eol_in_python:
|
sc_prohibit_semicolon_at_eol_in_python:
|
||||||
@prohibit='^[^#].*\;$$' \
|
@prohibit='^[^#].*\;$$' \
|
||||||
in_vc_files='\.py$$' \
|
in_vc_files='\.py$$' \
|
||||||
halt='python does not require to end lines with a semicolon' \
|
halt="Don't use semicolon at eol in python files" \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# mymain() in test files should use return, not exit, for nicer output
|
# mymain() in test files should use return, not exit, for nicer output
|
||||||
sc_prohibit_exit_in_tests:
|
sc_prohibit_exit_in_tests:
|
||||||
@prohibit='\<exit *\(' \
|
@prohibit='\<exit *\(' \
|
||||||
in_vc_files='tests/.*\.c$$' \
|
in_vc_files='^tests/' \
|
||||||
halt='use return, not exit(), in tests' \
|
halt='use return, not exit(), in tests' \
|
||||||
$(_sc_search_regexp)
|
$(_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' 1>&2; exit 1; } \
|
||||||
|
fi;
|
||||||
|
|
||||||
# Don't include "libvirt/*.h" in "" form.
|
# Don't include "libvirt/*.h" in "" form.
|
||||||
sc_prohibit_include_public_headers_quote:
|
sc_prohibit_include_public_headers_quote:
|
||||||
@prohibit='# *include *"libvirt/.*\.h"' \
|
@prohibit='# *include *"libvirt/.*\.h"' \
|
||||||
@@ -864,244 +872,42 @@ sc_prohibit_atoi:
|
|||||||
halt='Use virStrToLong* instead of atoi, atol, atof, atoq, atoll' \
|
halt='Use virStrToLong* instead of atoi, atol, atof, atoq, atoll' \
|
||||||
$(_sc_search_regexp)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
sc_prohibit_wrong_filename_in_comment:
|
|
||||||
@fail=0; \
|
|
||||||
awk 'BEGIN { \
|
|
||||||
fail=0; \
|
|
||||||
} FNR < 3 { \
|
|
||||||
n=match($$0, /[[:space:]][^[:space:]]*[.][ch][[:space:]:]/); \
|
|
||||||
if (n > 0) { \
|
|
||||||
A=substr($$0, RSTART+1, RLENGTH-2); \
|
|
||||||
n=split(FILENAME, arr, "/"); \
|
|
||||||
if (A != arr[n]) { \
|
|
||||||
print "in " FILENAME ": " A " mentioned in comments "; \
|
|
||||||
fail=1; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
} END { \
|
|
||||||
if (fail == 1) { \
|
|
||||||
exit 1; \
|
|
||||||
} \
|
|
||||||
}' $$($(VC_LIST_EXCEPT) | grep '\.[ch]$$') || fail=1; \
|
|
||||||
if test $$fail -eq 1; then \
|
|
||||||
{ echo '$(ME): The file name in comments must match the' \
|
|
||||||
'actual file name' 1>&2; exit 1; } \
|
|
||||||
fi;
|
|
||||||
|
|
||||||
sc_prohibit_virConnectOpen_in_virsh:
|
|
||||||
@prohibit='\bvirConnectOpen[a-zA-Z]* *\(' \
|
|
||||||
in_vc_files='tools/virsh-.*\.[ch]$$' \
|
|
||||||
halt='Use vshConnect() in virsh instead of virConnectOpen*' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_require_space_before_label:
|
|
||||||
@prohibit='^( ?)?[_a-zA-Z0-9]+:$$' \
|
|
||||||
in_vc_files='\.[ch]$$' \
|
|
||||||
halt='Top-level labels should be indented by one space' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# Allow for up to three spaces before the label: this is to avoid running
|
|
||||||
# into situations where neither this rule nor require_space_before_label
|
|
||||||
# would apply, eg. a line matching ^[a-zA-Z0-9]+ :$
|
|
||||||
sc_prohibit_space_in_label:
|
|
||||||
@prohibit='^ {0,3}[_a-zA-Z0-9]+ +:$$' \
|
|
||||||
in_vc_files='\.[ch]$$' \
|
|
||||||
halt='There should be no space between label name and colon' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# Doesn't catch all cases of mismatched braces across if-else, but it helps
|
|
||||||
sc_require_if_else_matching_braces:
|
|
||||||
@prohibit='( else( if .*\))? {|} else( if .*\))?$$)' \
|
|
||||||
in_vc_files='\.[chx]$$' \
|
|
||||||
halt='if one side of if-else uses {}, both sides must use it' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_curly_braces_style:
|
|
||||||
@files=$$($(VC_LIST_EXCEPT) | grep '\.[ch]$$'); \
|
|
||||||
if $(GREP) -nHP \
|
|
||||||
'^\s*(?!([a-zA-Z_]*for_?each[a-zA-Z_]*) ?\()([_a-zA-Z0-9]+( [_a-zA-Z0-9]+)* ?\()?(\*?[_a-zA-Z0-9]+(,? \*?[_a-zA-Z0-9\[\]]+)+|void)\) ?\{' \
|
|
||||||
$$files; then \
|
|
||||||
echo '$(ME): Non-K&R style used for curly braces around' \
|
|
||||||
'function body' 1>&2; exit 1; \
|
|
||||||
fi; \
|
|
||||||
if $(GREP) -A1 -En ' ((if|for|while|switch) \(|(else|do)\b)[^{]*$$'\
|
|
||||||
$$files | $(GREP) '^[^ ]*- *{'; then \
|
|
||||||
echo '$(ME): Use hanging braces for compound statements' 1>&2; exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
sc_prohibit_windows_special_chars_in_filename:
|
|
||||||
@files=$$($(VC_LIST_EXCEPT) | grep '[:*?"<>|]'); \
|
|
||||||
test -n "$$files" && { echo '$(ME): Windows special chars' \
|
|
||||||
'in filename not allowed:' 1>&2; echo $$files 1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
sc_prohibit_mixed_case_abbreviations:
|
|
||||||
@prohibit='Pci|Usb|Scsi' \
|
|
||||||
in_vc_files='\.[ch]$$' \
|
|
||||||
halt='Use PCI, USB, SCSI, not Pci, Usb, Scsi' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# Require #include <locale.h> in all files that call setlocale()
|
|
||||||
sc_require_locale_h:
|
|
||||||
@require='include.*locale\.h' \
|
|
||||||
containing='setlocale *(' \
|
|
||||||
halt='setlocale() requires <locale.h>' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_prohibit_empty_first_line:
|
|
||||||
@awk 'BEGIN { fail=0; } \
|
|
||||||
FNR == 1 { if ($$0 == "") { print FILENAME ":1:"; fail=1; } } \
|
|
||||||
END { if (fail == 1) { \
|
|
||||||
print "$(ME): Prohibited empty first line" > "/dev/stderr"; \
|
|
||||||
} exit fail; }' $$($(VC_LIST_EXCEPT));
|
|
||||||
|
|
||||||
sc_prohibit_paren_brace:
|
|
||||||
@prohibit='\)\{$$' \
|
|
||||||
in_vc_files='\.[chx]$$' \
|
|
||||||
halt='Put space between closing parenthesis and opening brace' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# C guarantees that static variables are zero initialized, and some compilers
|
|
||||||
# waste space by sticking explicit initializers in .data instead of .bss
|
|
||||||
sc_prohibit_static_zero_init:
|
|
||||||
@prohibit='\bstatic\b.*= *(0[^xX0-9]|NULL|false)' \
|
|
||||||
in_vc_files='\.[chx](\.in)?$$' \
|
|
||||||
halt='static variables do not need explicit zero initialization'\
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# FreeBSD exports the "devname" symbol which produces a warning.
|
|
||||||
sc_prohibit_devname:
|
|
||||||
@prohibit='\bdevname\b' \
|
|
||||||
exclude='sc_prohibit_devname' \
|
|
||||||
halt='avoid using devname as FreeBSD exports the symbol' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_prohibit_system_error_with_vir_err:
|
|
||||||
@prohibit='\bvirReportSystemError *\(VIR_ERR_' \
|
|
||||||
halt='do not use virReportSystemError with VIR_ERR_* error codes' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# Rule to prohibit usage of virXXXFree within library, daemon, remote, etc.
|
|
||||||
# functions. There's a corresponding exclude to allow usage within tests,
|
|
||||||
# docs, examples, tools, src/libvirt-*.c, and include/libvirt/libvirt-*.h
|
|
||||||
sc_prohibit_virXXXFree:
|
|
||||||
@prohibit='\bvir(Domain|Network|NodeDevice|StorageVol|StoragePool|Stream|Secret|NWFilter|Interface|DomainSnapshot)Free\b' \
|
|
||||||
exclude='sc_prohibit_virXXXFree' \
|
|
||||||
halt='avoid using virXXXFree, use virObjectUnref instead' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_prohibit_sysconf_pagesize:
|
|
||||||
@prohibit='sysconf\(_SC_PAGESIZE' \
|
|
||||||
halt='use virGetSystemPageSize[KB] instead of sysconf(_SC_PAGESIZE)' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_prohibit_virSecurity:
|
|
||||||
@grep -Pn 'virSecurityManager(?!Ptr)' $$($(VC_LIST_EXCEPT) | grep 'src/qemu/' | \
|
|
||||||
grep -v 'src/qemu/qemu_security') && \
|
|
||||||
{ echo '$(ME): prefer qemuSecurity wrappers' 1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
sc_prohibit_pthread_create:
|
|
||||||
@prohibit='\bpthread_create\b' \
|
|
||||||
exclude='sc_prohibit_pthread_create' \
|
|
||||||
halt='avoid using pthread_create, use virThreadCreate instead' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_prohibit_not_streq:
|
|
||||||
@prohibit='! *STRN?EQ *\(.*\)' \
|
|
||||||
halt='Use STRNEQ instead of !STREQ and STREQ instead of !STRNEQ' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_prohibit_verbose_strcat:
|
|
||||||
@prohibit='strncat\([^,]*,\s+([^,]*),\s+strlen\(\1\)\)' \
|
|
||||||
in_vc_files='\.[ch]$$' \
|
|
||||||
halt='Use strcat(a, b) instead of strncat(a, b, strlen(b))' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# Ensure that each .c file containing a "main" function also
|
|
||||||
# calls virGettextInitialize
|
|
||||||
sc_gettext_init:
|
|
||||||
@require='virGettextInitialize *\(' \
|
|
||||||
in_vc_files='\.c$$' \
|
|
||||||
containing='\<main *(' \
|
|
||||||
halt='the above files do not call virGettextInitialize' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
sc_prohibit_obj_free_apis_in_virsh:
|
|
||||||
@prohibit='\bvir(Domain|DomainSnapshot)Free\b' \
|
|
||||||
in_vc_files='virsh.*\.[ch]$$' \
|
|
||||||
exclude='sc_prohibit_obj_free_apis_in_virsh' \
|
|
||||||
halt='avoid using virDomain(Snapshot)Free in virsh, use virsh-prefixed wrappers instead' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
https_sites = www.libvirt.org
|
|
||||||
https_sites += libvirt.org
|
|
||||||
https_sites += security.libvirt.org
|
|
||||||
https_sites += qemu.org
|
|
||||||
https_sites += www.qemu.org
|
|
||||||
https_sites += wiki.qemu.org
|
|
||||||
https_sites += linux-kvm.org
|
|
||||||
https_sites += www.linux-kvm.org
|
|
||||||
|
|
||||||
https_re= ($(subst $(space),|,$(https_sites)))
|
|
||||||
|
|
||||||
sc_prohibit_http_urls:
|
|
||||||
@prohibit='http://$(https_re)' \
|
|
||||||
exclude="/schemas/" \
|
|
||||||
halt='Links must use https:// protocol' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# Alignment is usually achieved through spaces (at least two of them)
|
|
||||||
# or tabs (at least one of them) right before the trailing backslash
|
|
||||||
sc_prohibit_backslash_alignment:
|
|
||||||
@prohibit='( | )\\$$' \
|
|
||||||
in_vc_files='*\.([chx]|am|mk)$$' \
|
|
||||||
halt='Do not attempt to right-align backslashes' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# Some syntax rules pertaining to the usage of cleanup macros
|
|
||||||
# implementing GNU C's cleanup attribute
|
|
||||||
|
|
||||||
# Rule to ensure that varibales declared using a cleanup macro are
|
|
||||||
# always initialized.
|
|
||||||
sc_require_attribute_cleanup_initialization:
|
|
||||||
@prohibit='VIR_AUTO(FREE|PTR)\(.+\) *[^=]+;' \
|
|
||||||
in_vc_files='\.[chx]$$' \
|
|
||||||
halt='variable declared with a cleanup macro must be initialized' \
|
|
||||||
$(_sc_search_regexp)
|
|
||||||
|
|
||||||
# We don't use this feature of maint.mk.
|
# We don't use this feature of maint.mk.
|
||||||
prev_version_file = /dev/null
|
prev_version_file = /dev/null
|
||||||
|
|
||||||
ifneq ($(_gl-Makefile),)
|
|
||||||
ifeq (0,$(MAKELEVEL))
|
ifeq (0,$(MAKELEVEL))
|
||||||
_dry_run_result := $(shell \
|
_curr_status = .git-module-status
|
||||||
|
# The sed filter accommodates those who check out on a commit from which
|
||||||
|
# no tag is reachable. In that case, git submodule status prints a "-"
|
||||||
|
# in column 1 and does not print a "git describe"-style string after the
|
||||||
|
# submodule name. Contrast these:
|
||||||
|
# -b653eda3ac4864de205419d9f41eec267cb89eeb .gnulib
|
||||||
|
# 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)'; \
|
cd '$(srcdir)'; \
|
||||||
test -d .git || test -f .git || { echo 0; exit; }; \
|
test -d .git || { echo 0; exit; }; \
|
||||||
$(srcdir)/autogen.sh --dry-run >/dev/null 2>&1; \
|
test -f po/Makevars || { echo 1; exit; }; \
|
||||||
echo $$?; \
|
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}'; \
|
||||||
|
git diff .gnulib); \
|
||||||
|
stamp="$$($(_submodule_hash) $(_curr_status) 2>/dev/null)"; \
|
||||||
|
test "$$stamp" = "$$actual"; echo $$?)
|
||||||
_clean_requested = $(filter %clean,$(MAKECMDGOALS))
|
_clean_requested = $(filter %clean,$(MAKECMDGOALS))
|
||||||
|
ifeq (1,$(_update_required)$(_clean_requested))
|
||||||
# A return value of 0 means no action is required
|
$(info INFO: gnulib update required; running ./autogen.sh first)
|
||||||
|
|
||||||
# A return value of 1 means a genuine error has occurred while
|
|
||||||
# performing the dry run, and it should be reported so it can
|
|
||||||
# be investigated
|
|
||||||
ifeq (1,$(_dry_run_result))
|
|
||||||
$(info INFO: autogen.sh error, running again to show details)
|
|
||||||
maint.mk Makefile: _autogen_error
|
|
||||||
endif
|
|
||||||
|
|
||||||
# A return value of 2 means that autogen.sh needs to be executed
|
|
||||||
# in earnest before building, probably because of gnulib updates.
|
|
||||||
# We don't run autogen.sh if the clean target has been invoked,
|
|
||||||
# though, as it would be quite pointless
|
|
||||||
ifeq (2,$(_dry_run_result)$(_clean_requested))
|
|
||||||
$(info INFO: running autogen.sh is required, running it now...)
|
|
||||||
$(shell touch $(srcdir)/AUTHORS $(srcdir)/ChangeLog)
|
$(shell touch $(srcdir)/AUTHORS $(srcdir)/ChangeLog)
|
||||||
maint.mk Makefile: _autogen
|
maint.mk Makefile: _autogen
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
# It is necessary to call autogen any time gnulib changes. Autogen
|
# It is necessary to call autogen any time gnulib changes. Autogen
|
||||||
# reruns configure, then we regenerate all Makefiles at once.
|
# reruns configure, then we regenerate all Makefiles at once.
|
||||||
@@ -1110,74 +916,41 @@ _autogen:
|
|||||||
$(srcdir)/autogen.sh
|
$(srcdir)/autogen.sh
|
||||||
./config.status
|
./config.status
|
||||||
|
|
||||||
.PHONY: _autogen_error
|
# regenerate HACKING as part of the syntax-check
|
||||||
_autogen_error:
|
syntax-check: $(top_srcdir)/HACKING bracket-spacing-check
|
||||||
$(srcdir)/autogen.sh --dry-run
|
|
||||||
|
|
||||||
ifneq ($(_gl-Makefile),)
|
bracket-spacing-check:
|
||||||
syntax-check: spacing-check test-wrap-argv \
|
|
||||||
prohibit-duplicate-header mock-noinline group-qemu-caps
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Don't include duplicate header in the source (either *.c or *.h)
|
|
||||||
prohibit-duplicate-header:
|
|
||||||
$(AM_V_GEN)files=$$($(VC_LIST_EXCEPT) | grep '\.[chx]$$'); \
|
|
||||||
$(PERL) -W $(top_srcdir)/build-aux/prohibit-duplicate-header.pl $$files
|
|
||||||
|
|
||||||
spacing-check:
|
|
||||||
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.c$$'`; \
|
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.c$$'`; \
|
||||||
$(PERL) $(top_srcdir)/build-aux/check-spacing.pl $$files || \
|
$(PERL) $(top_srcdir)/build-aux/bracket-spacing.pl $$files || \
|
||||||
{ echo '$(ME): incorrect formatting' 1>&2; exit 1; }
|
{ echo '$(ME): incorrect whitespace, see HACKING for rules' 1>&2; \
|
||||||
|
exit 1; }
|
||||||
mock-noinline:
|
|
||||||
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.[ch]$$'`; \
|
|
||||||
$(PERL) $(top_srcdir)/build-aux/mock-noinline.pl $$files
|
|
||||||
|
|
||||||
test-wrap-argv:
|
|
||||||
$(AM_V_GEN)files=`$(VC_LIST) | grep -E '\.(ldargs|args)'`; \
|
|
||||||
$(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check $$files
|
|
||||||
|
|
||||||
group-qemu-caps:
|
|
||||||
$(PERL) $(top_srcdir)/tests/group-qemu-caps.pl --check $(top_srcdir)/
|
|
||||||
|
|
||||||
# sc_po_check can fail if generated files are not built first
|
# sc_po_check can fail if generated files are not built first
|
||||||
sc_po_check: \
|
sc_po_check: \
|
||||||
$(srcdir)/src/remote/remote_daemon_dispatch_stubs.h \
|
$(srcdir)/daemon/remote_dispatch.h \
|
||||||
$(srcdir)/src/remote/remote_daemon_dispatch_qemu_stubs.h \
|
$(srcdir)/daemon/qemu_dispatch.h \
|
||||||
$(srcdir)/src/remote/remote_client_bodies.h \
|
$(srcdir)/src/remote/remote_client_bodies.h
|
||||||
$(srcdir)/src/admin/admin_server_dispatch_stubs.h \
|
$(srcdir)/daemon/remote_dispatch.h: $(srcdir)/src/remote/remote_protocol.x
|
||||||
$(srcdir)/src/admin/admin_client.h
|
$(MAKE) -C daemon remote_dispatch.h
|
||||||
$(srcdir)/src/remote/remote_daemon_dispatch_stubs.h: $(srcdir)/src/remote/remote_protocol.x
|
$(srcdir)/daemon/qemu_dispatch.h: $(srcdir)/src/remote/qemu_protocol.x
|
||||||
$(MAKE) -C src remote/remote_daemon_dispatch_stubs.h
|
$(MAKE) -C daemon qemu_dispatch.h
|
||||||
$(srcdir)/src/remote/remote_daemon_dispatch_qemu_stubs.h: $(srcdir)/src/remote/qemu_protocol.x
|
|
||||||
$(MAKE) -C src remote/remote_daemon_dispatch_qemu_stubs.h
|
|
||||||
$(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protocol.x
|
$(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protocol.x
|
||||||
$(MAKE) -C src remote/remote_client_bodies.h
|
$(MAKE) -C src remote/remote_client_bodies.h
|
||||||
$(srcdir)/src/admin/admin_server_dispatch_stubs.h: $(srcdir)/src/admin/admin_protocol.x
|
|
||||||
$(MAKE) -C src admin/admin_server_dispatch_stubs.h
|
|
||||||
$(srcdir)/src/admin/admin_client.h: $(srcdir)/src/admin/admin_protocol.x
|
|
||||||
$(MAKE) -C src admin/admin_client.h
|
|
||||||
|
|
||||||
# List all syntax-check exemptions:
|
# List all syntax-check exemptions:
|
||||||
exclude_file_name_regexp--sc_avoid_strcase = ^tools/vsh\.h$$
|
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.h$$
|
||||||
|
|
||||||
_src1=libvirt-stream|qemu/qemu_monitor|util/vir(command|file|fdstream)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon|logging/log_daemon
|
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(vircommand|virfile)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon
|
||||||
_test1=shunloadtest|virnettlscontexttest|virnettlssessiontest|vircgroupmock|commandhelper
|
_test1=shunloadtest|virnettlscontexttest|virnettlssessiontest|vircgroupmock
|
||||||
exclude_file_name_regexp--sc_avoid_write = \
|
exclude_file_name_regexp--sc_avoid_write = \
|
||||||
^(src/($(_src1))|tools/virsh-console|tests/($(_test1)))\.c$$
|
^(src/($(_src1))|daemon/libvirtd|tools/virsh-console|tests/($(_test1)))\.c$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_bindtextdomain = .*
|
exclude_file_name_regexp--sc_bindtextdomain = ^(tests|examples)/
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_gettext_init = ^(tests|examples)/
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_copyright_format = \
|
|
||||||
^cfg\.mk$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_copyright_usage = \
|
exclude_file_name_regexp--sc_copyright_usage = \
|
||||||
^COPYING(|\.LESSER)$$
|
^COPYING(|\.LESSER)$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_flags_usage = \
|
exclude_file_name_regexp--sc_flags_usage = ^(docs/|src/util/virnetdevtap\.c$$|tests/vir(cgroup|pci)mock\.c$$)
|
||||||
^(cfg\.mk|docs/|src/util/virnetdevtap\.c$$|tests/((vir(cgroup|pci|test|usb)|nss|qemuxml2argv)mock|virfilewrapper)\.c$$)
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
|
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
|
||||||
^(src/rpc/gendispatch\.pl$$|tests/)
|
^(src/rpc/gendispatch\.pl$$|tests/)
|
||||||
@@ -1185,52 +958,39 @@ exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
|
|||||||
exclude_file_name_regexp--sc_po_check = ^(docs/|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 = \
|
exclude_file_name_regexp--sc_prohibit_VIR_ERR_NO_MEMORY = \
|
||||||
^(cfg\.mk|include/libvirt/virterror\.h|src/remote/remote_daemon_dispatch\.c|src/util/virerror\.c|docs/internals/oomtesting\.html\.in)$$
|
^(include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virerror\.c)$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_PATH_MAX = \
|
exclude_file_name_regexp--sc_prohibit_access_xok = ^src/util/virutil\.c$$
|
||||||
^cfg\.mk$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_access_xok = \
|
|
||||||
^(cfg\.mk|src/util/virutil\.c)$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_asprintf = \
|
exclude_file_name_regexp--sc_prohibit_asprintf = \
|
||||||
^(cfg\.mk|bootstrap.conf$$|examples/|src/util/virstring\.[ch]$$|tests/vircgroupmock\.c$$)
|
^(bootstrap.conf$$|src/util/virstring\.[ch]$$|tests/vircgroupmock\.c$$)
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_strdup = \
|
exclude_file_name_regexp--sc_prohibit_strdup = \
|
||||||
^(docs/|examples/|src/util/virstring\.c|tests/vir(netserverclient|cgroup)mock.c|tests/commandhelper\.c$$)
|
^(docs/|examples/|src/util/virstring\.c|tests/virnetserverclientmock.c$$)
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_close = \
|
exclude_file_name_regexp--sc_prohibit_close = \
|
||||||
(\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir.+mock\.c|tests/commandhelper\.c)$$)
|
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c|tests/vir(cgroup|pci)mock\.c)$$)
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
|
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
|
||||||
(^tests/(virhostcpu|virpcitest)data/|docs/js/.*\.js|docs/fonts/.*\.woff|\.diff|tests/virconfdata/no-newline\.conf$$)
|
(^tests/(qemuhelp|nodeinfo|virpcitest)data/|\.(gif|ico|png|diff)$$)
|
||||||
|
|
||||||
_src2=src/(util/vircommand|libvirt|lxc/lxc_controller|locking/lock_daemon|logging/log_daemon|remote/remote_daemon)
|
_src2=src/(util/vircommand|libvirt|lxc/lxc_controller|locking/lock_daemon)
|
||||||
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
|
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
|
||||||
(^($(_src2)|tests/testutils)\.c$$)
|
(^($(_src2)|tests/testutils|daemon/libvirtd)\.c$$)
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/vir(util|log)\.c$$
|
exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/virutil\.c$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_internal_functions = \
|
exclude_file_name_regexp--sc_prohibit_internal_functions = \
|
||||||
^src/(util/(viralloc|virutil|virfile)\.[hc]|esx/esx_vi\.c)$$
|
^src/(util/(viralloc|virutil|virfile)\.[hc]|esx/esx_vi\.c)$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_raw_virclassnew = \
|
|
||||||
^src/util/virobject\.[hc]$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_newline_at_end_of_diagnostic = \
|
exclude_file_name_regexp--sc_prohibit_newline_at_end_of_diagnostic = \
|
||||||
^src/rpc/gendispatch\.pl$$
|
^src/rpc/gendispatch\.pl$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
|
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
|
||||||
^((po|tests)/|docs/.*(py|js|html\.in)|run.in$$|tools/wireshark/util/genxdrstub\.pl$$)
|
^((po|tests)/|docs/.*(py|html\.in)|run.in$$)
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_select = \
|
|
||||||
^cfg\.mk$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_canonicalize_file_name = \
|
|
||||||
^cfg\.mk$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
|
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
|
||||||
^(docs/hacking\.html\.in|src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|(vircgroup|nss)mock|commandhelper)\.c|tools/wireshark/src/packet-libvirt\.c)$$
|
^(docs/hacking\.html\.in)|(src/util/viralloc\.[ch]|examples/.*|tests/securityselinuxhelper\.c|tests/vircgroupmock\.c)$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_readlink = \
|
exclude_file_name_regexp--sc_prohibit_readlink = \
|
||||||
^src/(util/virutil|lxc/lxc_container)\.c$$
|
^src/(util/virutil|lxc/lxc_container)\.c$$
|
||||||
@@ -1238,11 +998,12 @@ exclude_file_name_regexp--sc_prohibit_readlink = \
|
|||||||
exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/virutil\.c$$
|
exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/virutil\.c$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_sprintf = \
|
exclude_file_name_regexp--sc_prohibit_sprintf = \
|
||||||
^(cfg\.mk|docs/hacking\.html\.in|.*\.stp|.*\.pl)$$
|
^(docs/hacking\.html\.in)|(examples/systemtap/.*stp)|(src/dtrace2systemtap\.pl)|(src/rpc/gensystemtap\.pl)$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virstring\.c$$
|
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virstring\.c$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_strtol = ^examples/.*$$
|
exclude_file_name_regexp--sc_prohibit_strtol = \
|
||||||
|
^(src/(util/virsexpr|(vbox|xen|xenxs)/.*)\.c)|(examples/domsuspend/suspend.c)$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/virxml\.c$$
|
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/virxml\.c$$
|
||||||
|
|
||||||
@@ -1257,10 +1018,10 @@ exclude_file_name_regexp--sc_require_config_h_first = \
|
|||||||
^(examples/|tools/virsh-edit\.c$$)
|
^(examples/|tools/virsh-edit\.c$$)
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_trailing_blank = \
|
exclude_file_name_regexp--sc_trailing_blank = \
|
||||||
/sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo|^gnulib/local/.*/.*diff$$
|
(/qemuhelpdata/|/sysinfodata/.*\.data|\.(fig|gif|ico|png)$$)
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_unmarked_diagnostics = \
|
exclude_file_name_regexp--sc_unmarked_diagnostics = \
|
||||||
^(docs/apibuild.py|tests/virt-aa-helper-test|docs/js/.*\.js)$$
|
^(docs/apibuild.py|tests/virt-aa-helper-test)$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_size_of_brackets = cfg.mk
|
exclude_file_name_regexp--sc_size_of_brackets = cfg.mk
|
||||||
|
|
||||||
@@ -1270,49 +1031,13 @@ exclude_file_name_regexp--sc_correct_id_types = \
|
|||||||
exclude_file_name_regexp--sc_m4_quote_check = m4/virt-lib.m4
|
exclude_file_name_regexp--sc_m4_quote_check = m4/virt-lib.m4
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_include_public_headers_quote = \
|
exclude_file_name_regexp--sc_prohibit_include_public_headers_quote = \
|
||||||
^(src/internal\.h$$|tools/wireshark/src/packet-libvirt.h$$)
|
^src/internal\.h$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_include_public_headers_brackets = \
|
exclude_file_name_regexp--sc_prohibit_include_public_headers_brackets = \
|
||||||
^(tools/|examples/|include/libvirt/(virterror|libvirt(-(admin|qemu|lxc))?)\.h$$)
|
^(tools/|examples/|include/libvirt/(virterror|libvirt-(qemu|lxc))\.h$$)
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_int_ijk = \
|
exclude_file_name_regexp--sc_prohibit_int_ijk = \
|
||||||
^(src/remote_protocol-structs|src/remote/remote_protocol\.x|cfg\.mk|include/libvirt/libvirt.+|src/admin_protocol-structs|src/admin/admin_protocol\.x)$$
|
^(src/remote_protocol-structs|src/remote/remote_protocol.x|cfg.mk|include/)$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_unsigned_pid = \
|
|
||||||
^(include/libvirt/.*\.h|src/(qemu/qemu_driver\.c|driver-hypervisor\.h|libvirt(-[a-z]*)?\.c|.*\.x|util/vir(polkit|systemd)\.c)|tests/virpolkittest\.c|tools/virsh-domain\.c)$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_getenv = \
|
exclude_file_name_regexp--sc_prohibit_getenv = \
|
||||||
^tests/.*\.[ch]$$
|
^tests/.*\.[ch]$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_avoid_attribute_unused_in_header = \
|
|
||||||
^(src/util/virlog\.h|src/network/bridge_driver\.h)$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_mixed_case_abbreviations = \
|
|
||||||
^src/(vbox/vbox_CAPI.*.h|esx/esx_vi.(c|h)|esx/esx_storage_backend_iscsi.c)$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_empty_first_line = \
|
|
||||||
^(README|src/esx/README|tests/(vmwarever|virhostcpu)data/.*)$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_useless_translation = \
|
|
||||||
^tests/virpolkittest.c
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_devname = \
|
|
||||||
^(tools/virsh.pod|cfg.mk|docs/.*)$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_virXXXFree = \
|
|
||||||
^(docs/|tests/|examples/|tools/|cfg.mk|src/test/test_driver.c|src/libvirt_public.syms|include/libvirt/libvirt-(domain|network|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).h|src/libvirt-(domain|qemu|network|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).c$$)
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_sysconf_pagesize = \
|
|
||||||
^(cfg\.mk|src/util/virutil\.c)$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_pthread_create = \
|
|
||||||
^(cfg\.mk|src/util/virthread\.c|tests/.*)$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_always-defined_macros = \
|
|
||||||
^tests/virtestmock.c$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_readdir = \
|
|
||||||
^tests/(.*mock|virfilewrapper)\.c$$
|
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_cross_inclusion = \
|
|
||||||
^(src/util/virclosecallbacks\.h|src/util/virhostdev\.h)$$
|
|
||||||
|
|||||||
@@ -20,73 +20,26 @@
|
|||||||
* Since virt-login-shell will be setuid, we must do everything
|
* Since virt-login-shell will be setuid, we must do everything
|
||||||
* we can to avoid linking to other libraries. Many of them do
|
* we can to avoid linking to other libraries. Many of them do
|
||||||
* unsafe things in functions marked __atttribute__((constructor)).
|
* unsafe things in functions marked __atttribute__((constructor)).
|
||||||
* The only way to avoid such deps is to re-compile the
|
* The only way avoid to avoid such deps is to re-compile the
|
||||||
* functions with the code in question disabled, and for that we
|
* functions with the code in question disabled, and for that we
|
||||||
* must override the main config.h rules. Hence this file :-(
|
* must override the main config.h rules. Hence this file :-(
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef LIBVIRT_SETUID_RPC_CLIENT
|
#ifdef LIBVIRT_SETUID_RPC_CLIENT
|
||||||
|
# undef HAVE_LIBDEVMAPPER_H
|
||||||
# undef HAVE_LIBNL
|
# undef HAVE_LIBNL
|
||||||
# undef HAVE_LIBNL3
|
# undef HAVE_LIBNL3
|
||||||
# undef HAVE_LIBSASL2
|
# undef HAVE_LIBSASL2
|
||||||
# undef HAVE_SYS_ACL_H
|
|
||||||
# undef WITH_CAPNG
|
# undef WITH_CAPNG
|
||||||
# undef WITH_CURL
|
# undef WITH_CURL
|
||||||
# undef WITH_DBUS
|
|
||||||
# undef WITH_DEVMAPPER
|
|
||||||
# undef WITH_DTRACE_PROBES
|
# undef WITH_DTRACE_PROBES
|
||||||
# undef WITH_GNUTLS
|
# undef WITH_GNUTLS
|
||||||
# undef WITH_JANSSON
|
# undef WITH_GNUTLS_GCRYPT
|
||||||
# undef WITH_LIBSSH
|
|
||||||
# undef WITH_MACVTAP
|
|
||||||
# undef WITH_NUMACTL
|
|
||||||
# undef WITH_SASL
|
|
||||||
# undef WITH_SSH2
|
|
||||||
# undef WITH_SYSTEMD_DAEMON
|
|
||||||
# undef WITH_VIRTUALPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* With the NSS module it's the same story as virt-login-shell. See the
|
|
||||||
* explanation above.
|
|
||||||
*/
|
|
||||||
#ifdef LIBVIRT_NSS
|
|
||||||
# undef HAVE_LIBNL
|
|
||||||
# undef HAVE_LIBNL3
|
|
||||||
# undef HAVE_LIBSASL2
|
|
||||||
# undef HAVE_SYS_ACL_H
|
|
||||||
# undef WITH_CAPNG
|
|
||||||
# undef WITH_CURL
|
|
||||||
# undef WITH_DEVMAPPER
|
|
||||||
# undef WITH_DTRACE_PROBES
|
|
||||||
# undef WITH_GNUTLS
|
|
||||||
# undef WITH_LIBSSH
|
|
||||||
# undef WITH_MACVTAP
|
# undef WITH_MACVTAP
|
||||||
# undef WITH_NUMACTL
|
# undef WITH_NUMACTL
|
||||||
# undef WITH_SASL
|
# undef WITH_SASL
|
||||||
# undef WITH_SSH2
|
# undef WITH_SSH2
|
||||||
# undef WITH_VIRTUALPORT
|
# undef WITH_VIRTUALPORT
|
||||||
# undef WITH_SECDRIVER_SELINUX
|
# undef WITH_YAJL
|
||||||
# undef WITH_SECDRIVER_APPARMOR
|
# undef WITH_YAJL2
|
||||||
# undef WITH_CAPNG
|
|
||||||
#endif /* LIBVIRT_NSS */
|
|
||||||
|
|
||||||
#ifndef __GNUC__
|
|
||||||
# error "Libvirt requires GCC >= 4.4, or CLang"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Define __GNUC_PREREQ to a sane default if it isn't yet defined.
|
|
||||||
* This is done here so that it's included as early as possible; gnulib relies
|
|
||||||
* on this to be defined in features.h, which should be included from ctype.h.
|
|
||||||
* This doesn't happen on many non-glibc systems.
|
|
||||||
* When __GNUC_PREREQ is not defined, gnulib defines it to 0, which breaks things.
|
|
||||||
*/
|
|
||||||
#ifndef __GNUC_PREREQ
|
|
||||||
# define __GNUC_PREREQ(maj, min) \
|
|
||||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !(__GNUC_PREREQ(4, 4) || defined(__clang__))
|
|
||||||
# error "Libvirt requires GCC >= 4.4, or CLang"
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
2612
configure.ac
2612
configure.ac
File diff suppressed because it is too large
Load Diff
472
daemon/Makefile.am
Normal file
472
daemon/Makefile.am
Normal file
@@ -0,0 +1,472 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
|
## Copyright (C) 2005-2013 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
|
||||||
|
## 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/>.
|
||||||
|
|
||||||
|
INCLUDES = \
|
||||||
|
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
-I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||||
|
-I$(top_builddir)/src -I$(top_srcdir)/src \
|
||||||
|
-I$(top_srcdir)/src/util \
|
||||||
|
-I$(top_srcdir)/src/conf \
|
||||||
|
-I$(top_srcdir)/src/rpc \
|
||||||
|
-I$(top_srcdir)/src/remote \
|
||||||
|
-I$(top_srcdir)/src/access \
|
||||||
|
$(GETTEXT_CPPFLAGS)
|
||||||
|
|
||||||
|
CLEANFILES =
|
||||||
|
|
||||||
|
DAEMON_GENERATED = \
|
||||||
|
remote_dispatch.h \
|
||||||
|
lxc_dispatch.h \
|
||||||
|
qemu_dispatch.h \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
DAEMON_SOURCES = \
|
||||||
|
libvirtd.c libvirtd.h \
|
||||||
|
remote.c remote.h \
|
||||||
|
stream.c stream.h \
|
||||||
|
$(DAEMON_GENERATED)
|
||||||
|
|
||||||
|
LIBVIRTD_CONF_SOURCES = libvirtd-config.c libvirtd-config.h
|
||||||
|
|
||||||
|
DISTCLEANFILES =
|
||||||
|
EXTRA_DIST = \
|
||||||
|
remote_dispatch.h \
|
||||||
|
lxc_dispatch.h \
|
||||||
|
qemu_dispatch.h \
|
||||||
|
libvirtd.conf \
|
||||||
|
libvirtd.init.in \
|
||||||
|
libvirtd.upstart \
|
||||||
|
libvirtd.policy.in \
|
||||||
|
libvirtd.sasl \
|
||||||
|
libvirtd.service.in \
|
||||||
|
libvirtd.sysconf \
|
||||||
|
libvirtd.sysctl \
|
||||||
|
libvirtd.aug \
|
||||||
|
libvirtd.logrotate.in \
|
||||||
|
libvirtd.qemu.logrotate.in \
|
||||||
|
libvirtd.lxc.logrotate.in \
|
||||||
|
libvirtd.uml.logrotate.in \
|
||||||
|
test_libvirtd.aug.in \
|
||||||
|
THREADS.txt \
|
||||||
|
libvirtd.pod.in \
|
||||||
|
libvirtd.8.in \
|
||||||
|
$(DAEMON_SOURCES) \
|
||||||
|
$(LIBVIRTD_CONF_SOURCES) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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)/remote_dispatch.h
|
||||||
|
|
||||||
|
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) \
|
||||||
|
> $(srcdir)/lxc_dispatch.h
|
||||||
|
|
||||||
|
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) \
|
||||||
|
> $(srcdir)/qemu_dispatch.h
|
||||||
|
|
||||||
|
if WITH_LIBVIRTD
|
||||||
|
|
||||||
|
# Build a convenience library, for reuse in tests/libvirtdconftest
|
||||||
|
noinst_LTLIBRARIES = libvirtd_conf.la
|
||||||
|
libvirtd_conf_la_SOURCES = $(LIBVIRTD_CONF_SOURCES)
|
||||||
|
libvirtd_conf_la_CFLAGS = \
|
||||||
|
$(LIBXML_CFLAGS) \
|
||||||
|
$(XDR_CFLAGS) \
|
||||||
|
$(WARN_CFLAGS) $(PIE_CFLAGS) \
|
||||||
|
$(COVERAGE_CFLAGS) \
|
||||||
|
$(NULL)
|
||||||
|
libvirtd_conf_la_LDFLAGS = \
|
||||||
|
$(RELRO_LDFLAGS) \
|
||||||
|
$(PIE_LDFLAGS) \
|
||||||
|
$(COVERAGE_LDFLAGS) \
|
||||||
|
$(NO_INDIRECT_LDFLAGS) \
|
||||||
|
$(NULL)
|
||||||
|
libvirtd_conf_la_LIBADD = $(LIBXML_LIBS)
|
||||||
|
|
||||||
|
man8_MANS = libvirtd.8
|
||||||
|
|
||||||
|
sbin_PROGRAMS = libvirtd
|
||||||
|
|
||||||
|
confdir = $(sysconfdir)/libvirt/
|
||||||
|
conf_DATA = libvirtd.conf
|
||||||
|
|
||||||
|
augeasdir = $(datadir)/augeas/lenses
|
||||||
|
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 && \
|
||||||
|
mv $@-t $@
|
||||||
|
|
||||||
|
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) \
|
||||||
|
$(COVERAGE_CFLAGS) \
|
||||||
|
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
|
||||||
|
|
||||||
|
libvirtd_LDFLAGS = \
|
||||||
|
$(RELRO_LDFLAGS) \
|
||||||
|
$(PIE_LDFLAGS) \
|
||||||
|
$(COVERAGE_LDFLAGS) \
|
||||||
|
$(NO_INDIRECT_LDFLAGS) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
libvirtd_LDADD = \
|
||||||
|
$(LIBXML_LIBS) \
|
||||||
|
$(GNUTLS_LIBS) \
|
||||||
|
$(SASL_LIBS) \
|
||||||
|
$(DBUS_LIBS) \
|
||||||
|
$(POLKIT_LIBS) \
|
||||||
|
$(LIBNL_LIBS)
|
||||||
|
|
||||||
|
if WITH_DTRACE_PROBES
|
||||||
|
libvirtd_LDADD += ../src/libvirt_probes.lo
|
||||||
|
endif WITH_DTRACE_PROBES
|
||||||
|
|
||||||
|
libvirtd_LDADD += \
|
||||||
|
libvirtd_conf.la \
|
||||||
|
../src/libvirt-lxc.la \
|
||||||
|
../src/libvirt-qemu.la \
|
||||||
|
../src/libvirt_driver_remote.la \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
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 WITH_DTRACE_PROBES
|
||||||
|
endif WITH_QEMU
|
||||||
|
|
||||||
|
if WITH_LXC
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_lxc.la
|
||||||
|
endif WITH_LXC
|
||||||
|
|
||||||
|
if WITH_XEN
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_xen.la
|
||||||
|
endif WITH_XEN
|
||||||
|
|
||||||
|
if WITH_LIBXL
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_libxl.la
|
||||||
|
endif WITH_LIBXL
|
||||||
|
|
||||||
|
if WITH_UML
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_uml.la
|
||||||
|
endif WITH_UML
|
||||||
|
|
||||||
|
if WITH_VBOX
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_vbox.la
|
||||||
|
endif WITH_VBOX
|
||||||
|
|
||||||
|
if WITH_STORAGE
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_storage.la
|
||||||
|
endif WITH_STORAGE
|
||||||
|
|
||||||
|
if WITH_NETWORK
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_network.la
|
||||||
|
endif WITH_NETWORK
|
||||||
|
|
||||||
|
if WITH_INTERFACE
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_interface.la
|
||||||
|
endif WITH_INTERFACE
|
||||||
|
|
||||||
|
if WITH_NODE_DEVICES
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_nodedev.la
|
||||||
|
endif WITH_NODE_DEVICES
|
||||||
|
|
||||||
|
if WITH_SECRETS
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_secret.la
|
||||||
|
endif WITH_SECRETS
|
||||||
|
|
||||||
|
if WITH_NWFILTER
|
||||||
|
libvirtd_LDADD += ../src/libvirt_driver_nwfilter.la
|
||||||
|
endif WITH_NWFILTER
|
||||||
|
endif ! WITH_DRIVER_MODULES
|
||||||
|
|
||||||
|
libvirtd_LDADD += ../src/libvirt.la
|
||||||
|
|
||||||
|
if WITH_POLKIT
|
||||||
|
if WITH_POLKIT0
|
||||||
|
policydir = $(datadir)/PolicyKit/policy
|
||||||
|
policyauth = auth_admin_keep_session
|
||||||
|
else ! WITH_POLKIT0
|
||||||
|
policydir = $(datadir)/polkit-1/actions
|
||||||
|
policyauth = auth_admin_keep
|
||||||
|
endif ! WITH_POLKIT0
|
||||||
|
endif WITH_POLKIT
|
||||||
|
|
||||||
|
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
|
||||||
|
$(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt \
|
||||||
|
$(DESTDIR)$(localstatedir)/run/libvirt \
|
||||||
|
$(DESTDIR)$(localstatedir)/lib/libvirt
|
||||||
|
|
||||||
|
uninstall-local:: uninstall-init-redhat uninstall-init-systemd \
|
||||||
|
uninstall-init-upstart \
|
||||||
|
uninstall-data-sasl uninstall-data-polkit \
|
||||||
|
uninstall-logrotate uninstall-sysctl
|
||||||
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt || :
|
||||||
|
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
|
||||||
|
rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
|
||||||
|
|
||||||
|
if WITH_POLKIT
|
||||||
|
install-data-polkit::
|
||||||
|
$(MKDIR_P) $(DESTDIR)$(policydir)
|
||||||
|
$(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
||||||
|
uninstall-data-polkit::
|
||||||
|
rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
||||||
|
rmdir $(DESTDIR)$(policydir) || :
|
||||||
|
else ! WITH_POLKIT
|
||||||
|
install-data-polkit::
|
||||||
|
uninstall-data-polkit::
|
||||||
|
endif ! WITH_POLKIT
|
||||||
|
|
||||||
|
remote.c: $(DAEMON_GENERATED)
|
||||||
|
remote.h: $(DAEMON_GENERATED)
|
||||||
|
|
||||||
|
LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
|
||||||
|
libvirtd.uml.logrotate libvirtd.logrotate
|
||||||
|
|
||||||
|
BUILT_SOURCES += $(LOGROTATE_CONFS)
|
||||||
|
|
||||||
|
libvirtd.logrotate: libvirtd.logrotate.in
|
||||||
|
$(AM_V_GEN)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 && \
|
||||||
|
mv $@-t $@
|
||||||
|
|
||||||
|
libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
|
||||||
|
$(AM_V_GEN)sed \
|
||||||
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||||
|
< $< > $@-t && \
|
||||||
|
mv $@-t $@
|
||||||
|
|
||||||
|
libvirtd.uml.logrotate: libvirtd.uml.logrotate.in
|
||||||
|
$(AM_V_GEN)sed \
|
||||||
|
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||||
|
< $< > $@-t && \
|
||||||
|
mv $@-t $@
|
||||||
|
|
||||||
|
install-logrotate: $(LOGROTATE_CONFS)
|
||||||
|
$(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt/qemu/ \
|
||||||
|
$(DESTDIR)$(localstatedir)/log/libvirt/lxc/ \
|
||||||
|
$(DESTDIR)$(localstatedir)/log/libvirt/uml/ \
|
||||||
|
$(DESTDIR)$(sysconfdir)/logrotate.d/
|
||||||
|
$(INSTALL_DATA) libvirtd.logrotate \
|
||||||
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd
|
||||||
|
$(INSTALL_DATA) libvirtd.qemu.logrotate \
|
||||||
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu
|
||||||
|
$(INSTALL_DATA) libvirtd.lxc.logrotate \
|
||||||
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc
|
||||||
|
$(INSTALL_DATA) libvirtd.uml.logrotate \
|
||||||
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
|
||||||
|
|
||||||
|
uninstall-logrotate:
|
||||||
|
rm -f $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd \
|
||||||
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu \
|
||||||
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc \
|
||||||
|
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
|
||||||
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
|
||||||
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/lxc || :
|
||||||
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/uml || :
|
||||||
|
rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :
|
||||||
|
|
||||||
|
install-sysconfig:
|
||||||
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
|
||||||
|
$(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \
|
||||||
|
$(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
||||||
|
uninstall-sysconfig:
|
||||||
|
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
||||||
|
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
|
||||||
|
$(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
|
||||||
|
$(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
||||||
|
|
||||||
|
uninstall-sysctl:
|
||||||
|
rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
||||||
|
rmdir $(DESTDIR)$(prefix)/lib/sysctl.d || :
|
||||||
|
else ! WITH_SYSCTL
|
||||||
|
install-sysctl:
|
||||||
|
uninstall-sysctl:
|
||||||
|
endif ! WITH_SYSCTL
|
||||||
|
|
||||||
|
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||||
|
|
||||||
|
BUILT_SOURCES += libvirtd.init
|
||||||
|
|
||||||
|
install-init-redhat: install-sysconfig libvirtd.init
|
||||||
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
||||||
|
$(INSTALL_SCRIPT) libvirtd.init \
|
||||||
|
$(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
||||||
|
|
||||||
|
uninstall-init-redhat: uninstall-sysconfig
|
||||||
|
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
||||||
|
rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
|
||||||
|
else ! LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||||
|
install-init-redhat:
|
||||||
|
uninstall-init-redhat:
|
||||||
|
endif ! LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||||
|
|
||||||
|
|
||||||
|
if LIBVIRT_INIT_SCRIPT_UPSTART
|
||||||
|
|
||||||
|
install-init-upstart: install-sysconfig
|
||||||
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
|
||||||
|
$(INSTALL_SCRIPT) libvirtd.upstart \
|
||||||
|
$(DESTDIR)$(sysconfdir)/event.d/libvirtd
|
||||||
|
|
||||||
|
uninstall-init-upstart: uninstall-sysconfig
|
||||||
|
rm -f $(DESTDIR)$(sysconfdir)/event.d/libvirtd
|
||||||
|
rmdir $(DESTDIR)$(sysconfdir)/event.d || :
|
||||||
|
else ! LIBVIRT_INIT_SCRIPT_UPSTART
|
||||||
|
install-init-upstart:
|
||||||
|
uninstall-init-upstart:
|
||||||
|
endif ! LIBVIRT_INIT_SCRIPT_UPSTART
|
||||||
|
|
||||||
|
|
||||||
|
if LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||||
|
|
||||||
|
SYSTEMD_UNIT_DIR = /lib/systemd/system
|
||||||
|
BUILT_SOURCES += libvirtd.service
|
||||||
|
|
||||||
|
install-init-systemd: install-sysconfig libvirtd.service
|
||||||
|
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
||||||
|
$(INSTALL_DATA) libvirtd.service \
|
||||||
|
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
|
||||||
|
|
||||||
|
uninstall-init-systemd: uninstall-sysconfig
|
||||||
|
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
|
||||||
|
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
|
||||||
|
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||||
|
install-init-systemd:
|
||||||
|
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 && \
|
||||||
|
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 && \
|
||||||
|
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
|
||||||
|
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
|
||||||
|
'$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# This must be added last, since functions it provides/replaces
|
||||||
|
# are used by nearly every other library.
|
||||||
|
libvirtd_LDADD += ../gnulib/lib/libgnu.la $(LIBSOCKET)
|
||||||
|
|
||||||
|
else ! WITH_LIBVIRTD
|
||||||
|
install-data-local: install-data-sasl
|
||||||
|
uninstall-local:: uninstall-data-sasl
|
||||||
|
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
|
||||||
|
|
||||||
|
# This is needed for clients too, so can't wrap in
|
||||||
|
# the WITH_LIBVIRTD conditional
|
||||||
|
if WITH_SASL
|
||||||
|
install-data-sasl:
|
||||||
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sasl2/
|
||||||
|
$(INSTALL_DATA) $(srcdir)/libvirtd.sasl \
|
||||||
|
$(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
|
||||||
|
|
||||||
|
uninstall-data-sasl:
|
||||||
|
rm -f $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
|
||||||
|
rmdir $(DESTDIR)$(sysconfdir)/sasl2/ || :
|
||||||
|
else ! WITH_SASL
|
||||||
|
install-data-sasl:
|
||||||
|
uninstall-data-sasl:
|
||||||
|
endif ! WITH_SASL
|
||||||
|
|
||||||
|
|
||||||
|
CLEANFILES += $(BUILT_SOURCES) $(man8_MANS)
|
||||||
|
CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
|
||||||
|
MAINTAINERCLEANFILES = $(srcdir)/libvirtd.8.in $(DAEMON_GENERATED)
|
||||||
52
daemon/THREADS.txt
Normal file
52
daemon/THREADS.txt
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
|
||||||
|
Threading in the libvirtd daemon
|
||||||
|
================================
|
||||||
|
|
||||||
|
To allow efficient processing of RPC requests, the libvirtd daemon
|
||||||
|
makes use of threads.
|
||||||
|
|
||||||
|
- The process leader. This is the initial thread of control
|
||||||
|
when the daemon starts running. It is responsible for
|
||||||
|
initializing all the state, and starting the event loop.
|
||||||
|
Once that's all done, this thread does nothing except
|
||||||
|
wait for the event loop to quit, thus indicating an orderly
|
||||||
|
shutdown is required.
|
||||||
|
|
||||||
|
- The event loop. This thread runs the event loop, sitting
|
||||||
|
in poll() on all monitored file handles, and calculating
|
||||||
|
and dispatching any timers that may be registered. When
|
||||||
|
this thread quits, the entire daemon will shutdown.
|
||||||
|
|
||||||
|
- The workers. These 'n' threads all sit around waiting to
|
||||||
|
process incoming RPC requests. Since RPC requests may take
|
||||||
|
a long time to complete, with long idle periods, there will
|
||||||
|
be quite a few workers running.
|
||||||
|
|
||||||
|
The use of threads obviously requires locking to ensure safety when
|
||||||
|
accessing/changing data structures.
|
||||||
|
|
||||||
|
- the top level lock is on 'struct qemud_server'. This must be
|
||||||
|
held before acquiring any other lock
|
||||||
|
|
||||||
|
- Each 'struct qemud_client' object has a lock. The server lock
|
||||||
|
must be held before acquiring it. Once the client lock is acquired
|
||||||
|
the server lock can (optionally) be dropped.
|
||||||
|
|
||||||
|
- The event loop has its own self-contained lock. You can ignore
|
||||||
|
this as a caller of virEvent APIs.
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
associated client object. The job condition will be signalled and
|
||||||
|
a worker will wakup and process it.
|
||||||
|
|
||||||
|
The worker thread must quickly drop its locks on the server and
|
||||||
|
client to allow the main event loop thread to continue running
|
||||||
|
with its other work. Critically important, is that now libvirt
|
||||||
|
API call will ever be made with the server or client locks held.
|
||||||
|
|
||||||
|
-- End
|
||||||
484
daemon/libvirtd-config.c
Normal file
484
daemon/libvirtd-config.c
Normal file
@@ -0,0 +1,484 @@
|
|||||||
|
/*
|
||||||
|
* 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"
|
||||||
|
#include "virstring.h"
|
||||||
|
#include "virutil.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;
|
||||||
|
}
|
||||||
|
if (VIR_STRDUP(list[0], p->str) < 0) {
|
||||||
|
VIR_FREE(list);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
list[1] = NULL;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_CONF_LIST: {
|
||||||
|
int len = 0;
|
||||||
|
size_t i;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
if (VIR_STRDUP(list[i], pp->str) < 0) {
|
||||||
|
size_t j;
|
||||||
|
for (j = 0; j < i; j++)
|
||||||
|
VIR_FREE(list[j]);
|
||||||
|
VIR_FREE(list);
|
||||||
|
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 VIR_STRDUP succeeds,
|
||||||
|
store the result in var_name. Otherwise, (i.e. invalid type, or VIR_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 (VIR_STRDUP(data->var_name, p->str) < 0) \
|
||||||
|
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 (VIR_STRDUP(*configfile, SYSCONFDIR "/libvirt/libvirtd.conf") < 0)
|
||||||
|
goto error;
|
||||||
|
} else {
|
||||||
|
char *configdir = NULL;
|
||||||
|
|
||||||
|
if (!(configdir = virGetUserConfigDirectory()))
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
if (virAsprintf(configfile, "%s/libvirtd.conf", configdir) < 0) {
|
||||||
|
VIR_FREE(configdir);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
VIR_FREE(configdir);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
error:
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct daemonConfig*
|
||||||
|
daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
struct daemonConfig *data;
|
||||||
|
char *localhost;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (VIR_ALLOC(data) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
data->listen_tls = 1;
|
||||||
|
data->listen_tcp = 0;
|
||||||
|
|
||||||
|
if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 ||
|
||||||
|
VIR_STRDUP(data->tcp_port, LIBVIRTD_TCP_PORT) < 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
/* 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 (VIR_STRDUP(data->unix_sock_rw_perms,
|
||||||
|
data->auth_unix_rw == REMOTE_AUTH_POLKIT ? "0777" : "0700") < 0 ||
|
||||||
|
VIR_STRDUP(data->unix_sock_ro_perms, "0777") < 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
#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();
|
||||||
|
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 = VIR_STRDUP(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 error;
|
||||||
|
|
||||||
|
return data;
|
||||||
|
|
||||||
|
error:
|
||||||
|
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);
|
||||||
|
tmp = data->access_drivers;
|
||||||
|
while (tmp && *tmp) {
|
||||||
|
VIR_FREE(*tmp);
|
||||||
|
tmp++;
|
||||||
|
}
|
||||||
|
VIR_FREE(data->access_drivers);
|
||||||
|
|
||||||
|
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 (VIR_STRDUP(data->unix_sock_rw_perms, "0777") < 0)
|
||||||
|
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;
|
||||||
|
|
||||||
|
if (remoteConfigGetStringList(conf, "access_drivers",
|
||||||
|
&data->access_drivers, 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, max_queued_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;
|
||||||
|
}
|
||||||
97
daemon/libvirtd-config.h
Normal file
97
daemon/libvirtd-config.h
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
|
||||||
|
char **access_drivers;
|
||||||
|
|
||||||
|
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 max_queued_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__ */
|
||||||
@@ -13,7 +13,7 @@ module Libvirtd =
|
|||||||
|
|
||||||
let str_val = del /\"/ "\"" . store /[^\"]*/ . del /\"/ "\""
|
let str_val = del /\"/ "\"" . store /[^\"]*/ . del /\"/ "\""
|
||||||
let bool_val = store /0|1/
|
let bool_val = store /0|1/
|
||||||
let int_val = store /-?[0-9]+/
|
let int_val = store /[0-9]+/
|
||||||
let str_array_element = [ seq "el" . str_val ] . del /[ \t\n]*/ ""
|
let str_array_element = [ seq "el" . str_val ] . del /[ \t\n]*/ ""
|
||||||
let str_array_val = counter "el" . array_start . ( str_array_element . ( array_sep . str_array_element ) * ) ? . array_end
|
let str_array_val = counter "el" . array_start . ( str_array_element . ( array_sep . str_array_element ) * ) ? . array_end
|
||||||
|
|
||||||
@@ -35,7 +35,6 @@ module Libvirtd =
|
|||||||
let sock_acl_entry = str_entry "unix_sock_group"
|
let sock_acl_entry = str_entry "unix_sock_group"
|
||||||
| str_entry "unix_sock_ro_perms"
|
| str_entry "unix_sock_ro_perms"
|
||||||
| str_entry "unix_sock_rw_perms"
|
| str_entry "unix_sock_rw_perms"
|
||||||
| str_entry "unix_sock_admin_perms"
|
|
||||||
| str_entry "unix_sock_dir"
|
| str_entry "unix_sock_dir"
|
||||||
|
|
||||||
let authentication_entry = str_entry "auth_unix_ro"
|
let authentication_entry = str_entry "auth_unix_ro"
|
||||||
@@ -53,25 +52,19 @@ module Libvirtd =
|
|||||||
| str_array_entry "tls_allowed_dn_list"
|
| str_array_entry "tls_allowed_dn_list"
|
||||||
| str_array_entry "sasl_allowed_username_list"
|
| str_array_entry "sasl_allowed_username_list"
|
||||||
| str_array_entry "access_drivers"
|
| str_array_entry "access_drivers"
|
||||||
| str_entry "tls_priority"
|
|
||||||
|
|
||||||
let processing_entry = int_entry "min_workers"
|
let processing_entry = int_entry "min_workers"
|
||||||
| int_entry "max_workers"
|
| int_entry "max_workers"
|
||||||
| int_entry "max_clients"
|
| int_entry "max_clients"
|
||||||
| int_entry "max_queued_clients"
|
| int_entry "max_queued_clients"
|
||||||
| int_entry "max_anonymous_clients"
|
| int_entry "max_requests"
|
||||||
| int_entry "max_client_requests"
|
| int_entry "max_client_requests"
|
||||||
| int_entry "prio_workers"
|
| int_entry "prio_workers"
|
||||||
|
|
||||||
let admin_processing_entry = int_entry "admin_min_workers"
|
|
||||||
| int_entry "admin_max_workers"
|
|
||||||
| int_entry "admin_max_clients"
|
|
||||||
| int_entry "admin_max_queued_clients"
|
|
||||||
| int_entry "admin_max_client_requests"
|
|
||||||
|
|
||||||
let logging_entry = int_entry "log_level"
|
let logging_entry = int_entry "log_level"
|
||||||
| str_entry "log_filters"
|
| str_entry "log_filters"
|
||||||
| str_entry "log_outputs"
|
| str_entry "log_outputs"
|
||||||
|
| int_entry "log_buffer_size"
|
||||||
|
|
||||||
let auditing_entry = int_entry "audit_level"
|
let auditing_entry = int_entry "audit_level"
|
||||||
| bool_entry "audit_logging"
|
| bool_entry "audit_logging"
|
||||||
@@ -80,13 +73,7 @@ module Libvirtd =
|
|||||||
| int_entry "keepalive_count"
|
| int_entry "keepalive_count"
|
||||||
| bool_entry "keepalive_required"
|
| bool_entry "keepalive_required"
|
||||||
|
|
||||||
let admin_keepalive_entry = int_entry "admin_keepalive_interval"
|
|
||||||
| int_entry "admin_keepalive_count"
|
|
||||||
| bool_entry "admin_keepalive_required"
|
|
||||||
|
|
||||||
let misc_entry = str_entry "host_uuid"
|
let misc_entry = str_entry "host_uuid"
|
||||||
| str_entry "host_uuid_source"
|
|
||||||
| int_entry "ovs_timeout"
|
|
||||||
|
|
||||||
(* Each enty in the config is one of the following three ... *)
|
(* Each enty in the config is one of the following three ... *)
|
||||||
let entry = network_entry
|
let entry = network_entry
|
||||||
@@ -95,11 +82,9 @@ module Libvirtd =
|
|||||||
| certificate_entry
|
| certificate_entry
|
||||||
| authorization_entry
|
| authorization_entry
|
||||||
| processing_entry
|
| processing_entry
|
||||||
| admin_processing_entry
|
|
||||||
| logging_entry
|
| logging_entry
|
||||||
| auditing_entry
|
| auditing_entry
|
||||||
| keepalive_entry
|
| keepalive_entry
|
||||||
| admin_keepalive_entry
|
|
||||||
| misc_entry
|
| misc_entry
|
||||||
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
|
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
|
||||||
let empty = [ label "#empty" . eol ]
|
let empty = [ label "#empty" . eol ]
|
||||||
1557
daemon/libvirtd.c
Normal file
1557
daemon/libvirtd.c
Normal file
File diff suppressed because it is too large
Load Diff
410
daemon/libvirtd.conf
Normal file
410
daemon/libvirtd.conf
Normal file
@@ -0,0 +1,410 @@
|
|||||||
|
# Master libvirt daemon configuration file
|
||||||
|
#
|
||||||
|
# For further information consult http://libvirt.org/format.html
|
||||||
|
#
|
||||||
|
# NOTE: the tests/daemon-conf regression test script requires
|
||||||
|
# that each "PARAMETER = VALUE" line in this file have the parameter
|
||||||
|
# name just after a leading "#".
|
||||||
|
|
||||||
|
#################################################################
|
||||||
|
#
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
# Set the name of the directory in which sockets will be found/created.
|
||||||
|
#unix_sock_dir = "/var/run/libvirt"
|
||||||
|
|
||||||
|
#################################################################
|
||||||
|
#
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
|
||||||
|
# Change the API access control scheme
|
||||||
|
#
|
||||||
|
# By default an authenticated user is allowed access
|
||||||
|
# to all APIs. Access drivers can place restrictions
|
||||||
|
# on this. By default the 'nop' driver is enabled,
|
||||||
|
# meaning no access control checks are done once a
|
||||||
|
# client has authenticated with libvirtd
|
||||||
|
#
|
||||||
|
#access_drivers = [ "polkit" ]
|
||||||
|
|
||||||
|
#################################################################
|
||||||
|
#
|
||||||
|
# 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 our own server certificates
|
||||||
|
#
|
||||||
|
# When libvirtd starts it performs some sanity checks against
|
||||||
|
# its own certificates.
|
||||||
|
#
|
||||||
|
# Default is to always run sanity checks. Uncommenting this
|
||||||
|
# will disable sanity checks which is not a good idea
|
||||||
|
#tls_no_sanity_certificate = 1
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
# 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 maximum length of queue of connections waiting to be
|
||||||
|
# accepted by the daemon. Note, that some protocols supporting
|
||||||
|
# retransmission may obey this so that a later reattempt at
|
||||||
|
# connection succeeds.
|
||||||
|
#max_queued_clients = 1000
|
||||||
|
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
# Typically you'd want max_workers to equal maximum number
|
||||||
|
# of clients allowed
|
||||||
|
#min_workers = 5
|
||||||
|
#max_workers = 20
|
||||||
|
|
||||||
|
|
||||||
|
# The number of priority workers. If all workers from above
|
||||||
|
# pool will stuck, some calls marked as high priority
|
||||||
|
# (notably domainDestroy) can be executed in this pool.
|
||||||
|
#prio_workers = 5
|
||||||
|
|
||||||
|
# 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 up to 5 MB of memory is used
|
||||||
|
#
|
||||||
|
# XXX this isn't actually enforced yet, only the per-client
|
||||||
|
# limit is used so far
|
||||||
|
#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 controls
|
||||||
|
#
|
||||||
|
|
||||||
|
# Logging level: 4 errors, 3 warnings, 2 information, 1 debug
|
||||||
|
# basically 1 will log everything possible
|
||||||
|
#log_level = 3
|
||||||
|
|
||||||
|
# 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:
|
||||||
|
# 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:
|
||||||
|
# 1: DEBUG
|
||||||
|
# 2: INFO
|
||||||
|
# 3: WARNING
|
||||||
|
# 4: ERROR
|
||||||
|
#
|
||||||
|
# Multiple filter can be defined in a single @filters, they just need to be
|
||||||
|
# separated by spaces.
|
||||||
|
#
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
# Logging outputs:
|
||||||
|
# An output is one of the places to save logging information
|
||||||
|
# The format for an output can be:
|
||||||
|
# x:stderr
|
||||||
|
# output goes to stderr
|
||||||
|
# x:syslog:name
|
||||||
|
# use syslog for the output and use the given name as the ident
|
||||||
|
# x:file:file_path
|
||||||
|
# output to a file, with the given filepath
|
||||||
|
# In all case the x prefix is the minimal level, acting as a filter
|
||||||
|
# 1: DEBUG
|
||||||
|
# 2: INFO
|
||||||
|
# 3: WARNING
|
||||||
|
# 4: ERROR
|
||||||
|
#
|
||||||
|
# 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 debug buffer size: default 64
|
||||||
|
# The daemon keeps an internal debug log buffer which will be dumped in case
|
||||||
|
# of crash or upon receiving a SIGUSR2 signal. This setting allows to override
|
||||||
|
# the default buffer size in kilobytes.
|
||||||
|
# If value is 0 or less the debug log buffer is deactivated
|
||||||
|
#log_buffer_size = 64
|
||||||
|
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
#
|
||||||
|
# Auditing
|
||||||
|
#
|
||||||
|
# This setting allows usage of the auditing subsystem to be altered:
|
||||||
|
#
|
||||||
|
# audit_level == 0 -> disable all auditing
|
||||||
|
# audit_level == 1 -> enable auditing, only if enabled on host (default)
|
||||||
|
# audit_level == 2 -> enable auditing, and exit if disabled on host
|
||||||
|
#
|
||||||
|
#audit_level = 2
|
||||||
|
#
|
||||||
|
# If set to 1, then audit messages will also be sent
|
||||||
|
# via libvirt logging infrastructure. Defaults to 0
|
||||||
|
#
|
||||||
|
#audit_logging = 1
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# UUID of the host:
|
||||||
|
# Provide the UUID of the host here in case the command
|
||||||
|
# 'dmidecode -s system-uuid' does not provide a valid uuid. In case
|
||||||
|
# 'dmidecode' does not provide a valid UUID and none is provided here, a
|
||||||
|
# temporary UUID will be generated.
|
||||||
|
# Keep the format of the example UUID below. UUID must not have all digits
|
||||||
|
# be the same.
|
||||||
|
|
||||||
|
# NB This default all-zeros UUID will not work. Replace
|
||||||
|
# it with the output of the 'uuidgen' command and then
|
||||||
|
# uncomment this entry
|
||||||
|
#host_uuid = "00000000-0000-0000-0000-000000000000"
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
# Keepalive protocol:
|
||||||
|
# This allows libvirtd to detect broken client connections or even
|
||||||
|
# dead client. A keepalive message is sent to a client after
|
||||||
|
# keepalive_interval seconds of inactivity to check if the client is
|
||||||
|
# still responding; keepalive_count is a maximum number of keepalive
|
||||||
|
# messages that are allowed to be sent to the client without getting
|
||||||
|
# any response before the connection is considered broken. In other
|
||||||
|
# words, the connection is automatically closed approximately after
|
||||||
|
# keepalive_interval * (keepalive_count + 1) seconds since the last
|
||||||
|
# message received from the client. If keepalive_interval is set to
|
||||||
|
# -1, libvirtd will never send keepalive requests; however clients
|
||||||
|
# can still send them and the deamon will send responses. When
|
||||||
|
# keepalive_count is set to 0, connections will be automatically
|
||||||
|
# closed after keepalive_interval seconds of inactivity without
|
||||||
|
# sending any keepalive messages.
|
||||||
|
#
|
||||||
|
#keepalive_interval = 5
|
||||||
|
#keepalive_count = 5
|
||||||
|
#
|
||||||
|
# If set to 1, libvirtd will refuse to talk to clients that do not
|
||||||
|
# support keepalive protocol. Defaults to 0.
|
||||||
|
#
|
||||||
|
#keepalive_required = 1
|
||||||
78
daemon/libvirtd.h
Normal file
78
daemon/libvirtd.h
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
* libvirtd.h: daemon data structure definitions
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006-2014 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_H__
|
||||||
|
# define LIBVIRTD_H__
|
||||||
|
|
||||||
|
# define VIR_ENUM_SENTINELS
|
||||||
|
|
||||||
|
# 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 "virnetsaslcontext.h"
|
||||||
|
# endif
|
||||||
|
# include "virnetserverprogram.h"
|
||||||
|
|
||||||
|
typedef struct daemonClientStream daemonClientStream;
|
||||||
|
typedef daemonClientStream *daemonClientStreamPtr;
|
||||||
|
typedef struct daemonClientPrivate daemonClientPrivate;
|
||||||
|
typedef daemonClientPrivate *daemonClientPrivatePtr;
|
||||||
|
typedef struct daemonClientEventCallback daemonClientEventCallback;
|
||||||
|
typedef daemonClientEventCallback *daemonClientEventCallbackPtr;
|
||||||
|
|
||||||
|
/* Stores the per-client connection state */
|
||||||
|
struct daemonClientPrivate {
|
||||||
|
/* Hold while accessing any data except conn */
|
||||||
|
virMutex lock;
|
||||||
|
|
||||||
|
int domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LAST];
|
||||||
|
daemonClientEventCallbackPtr *networkEventCallbacks;
|
||||||
|
size_t nnetworkEventCallbacks;
|
||||||
|
|
||||||
|
# if WITH_SASL
|
||||||
|
virNetSASLSessionPtr sasl;
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* This is only valid if a remote open call has been made on this
|
||||||
|
* connection, otherwise it will be NULL. Also if remote close is
|
||||||
|
* called, it will be set back to NULL if that succeeds.
|
||||||
|
*/
|
||||||
|
virConnectPtr conn;
|
||||||
|
|
||||||
|
daemonClientStreamPtr streams;
|
||||||
|
bool keepalive_supported;
|
||||||
|
};
|
||||||
|
|
||||||
|
# if WITH_SASL
|
||||||
|
extern virNetSASLContextPtr saslCtxt;
|
||||||
|
# endif
|
||||||
|
extern virNetServerProgramPtr remoteProgram;
|
||||||
|
extern virNetServerProgramPtr qemuProgram;
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,20 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# the following is the LSB init header see
|
# the following is the LSB init header see
|
||||||
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
|
# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV
|
||||||
#
|
#
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: libvirtd
|
# Provides: libvirtd
|
||||||
|
# Required-Start: $network messagebus
|
||||||
|
# Should-Start: $named
|
||||||
|
# Should-Start: xend
|
||||||
|
# Should-Start: avahi-daemon
|
||||||
|
# Should-Start: virtlockd
|
||||||
|
# Required-Stop: $network messagebus
|
||||||
|
# Should-Stop: $named
|
||||||
# Default-Start: 3 4 5
|
# Default-Start: 3 4 5
|
||||||
# Default-Stop: 0 1 2 6
|
# Default-Stop: 0 1 2 6
|
||||||
# Required-Start: $network messagebus virtlogd
|
|
||||||
# Required-Stop: $network messagebus
|
|
||||||
# Should-Start: $named xend avahi-daemon virtlockd
|
|
||||||
# Should-Stop: $named
|
|
||||||
# Short-Description: daemon for libvirt virtualization API
|
# Short-Description: daemon for libvirt virtualization API
|
||||||
# Description: This is a daemon for managing guest instances
|
# Description: This is a daemon for managing guest instances
|
||||||
# and libvirt virtual networks
|
# and libvirt virtual networks
|
||||||
# See https://libvirt.org
|
# See http://libvirt.org
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# the following is chkconfig init header
|
# the following is chkconfig init header
|
||||||
@@ -24,7 +27,7 @@
|
|||||||
# chkconfig: 345 97 03
|
# chkconfig: 345 97 03
|
||||||
# description: This is a daemon for managing guest instances \
|
# description: This is a daemon for managing guest instances \
|
||||||
# and libvirt virtual networks \
|
# and libvirt virtual networks \
|
||||||
# See https://libvirt.org
|
# See http://libvirt.org
|
||||||
#
|
#
|
||||||
# processname: libvirtd
|
# processname: libvirtd
|
||||||
# pidfile: @localstatedir@/run/libvirtd.pid
|
# pidfile: @localstatedir@/run/libvirtd.pid
|
||||||
@@ -5,4 +5,5 @@
|
|||||||
compress
|
compress
|
||||||
delaycompress
|
delaycompress
|
||||||
copytruncate
|
copytruncate
|
||||||
|
minsize 100k
|
||||||
}
|
}
|
||||||
208
daemon/libvirtd.pod.in
Normal file
208
daemon/libvirtd.pod.in
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
libvirtd - libvirtd management daemon
|
||||||
|
|
||||||
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
B<libvirtd> [ -dlv ] [ -f config_file ] [ -p pid_file ] [ -t timeout_seconds ]
|
||||||
|
|
||||||
|
B<libvirtd> --version
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
The B<libvirtd> program is the server side daemon component of the libvirt
|
||||||
|
virtualization management system.
|
||||||
|
|
||||||
|
This daemon runs on host servers and performs required management tasks for
|
||||||
|
virtualized guests. This includes activities such as starting, stopping
|
||||||
|
and migrating guests between host servers, configuring and manipulating
|
||||||
|
networking, and managing storage for use by guests.
|
||||||
|
|
||||||
|
The libvirt client libraries and utilities connect to this daemon to issue
|
||||||
|
tasks and collect information about the configuration and resources of the host
|
||||||
|
system and guests.
|
||||||
|
|
||||||
|
By default, the libvirtd daemon listens for requests on a local Unix domain
|
||||||
|
socket. Using the B<-l>|B<--listen> command line option, the libvirtd daemon
|
||||||
|
can be instructed to additionally listen on a TCP/IP socket. The TCP/IP socket
|
||||||
|
to use is defined in the libvirtd configuration file.
|
||||||
|
|
||||||
|
Restarting libvirtd does not impact running guests. Guests continue to operate
|
||||||
|
and will be picked up automatically if their XML configuration has been
|
||||||
|
defined. Any guests whose XML configuration has not been defined will be lost
|
||||||
|
from the configuration.
|
||||||
|
|
||||||
|
=head1 OPTIONS
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item B<-h, --help>
|
||||||
|
|
||||||
|
Display command line help usage then exit.
|
||||||
|
|
||||||
|
=item B<-d, --daemon>
|
||||||
|
|
||||||
|
Run as a daemon & write PID file.
|
||||||
|
|
||||||
|
=item B<-f, --config> I<FILE>
|
||||||
|
|
||||||
|
Use this configuration file, overriding the default value.
|
||||||
|
|
||||||
|
=item B<-l, --listen>
|
||||||
|
|
||||||
|
Listen for TCP/IP connections.
|
||||||
|
|
||||||
|
=item B<-p, --pid-file> I<FILE>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
=item B<-v, --verbose>
|
||||||
|
|
||||||
|
Enable output of verbose messages.
|
||||||
|
|
||||||
|
=item B< --version>
|
||||||
|
|
||||||
|
Display version information then exit.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=head1 SIGNALS
|
||||||
|
|
||||||
|
On receipt of B<SIGHUP> libvirtd will reload its configuration.
|
||||||
|
|
||||||
|
=head1 FILES
|
||||||
|
|
||||||
|
=head2 When run as B<root>.
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=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-ro>
|
||||||
|
|
||||||
|
The sockets libvirtd will use.
|
||||||
|
|
||||||
|
=item F<SYSCONFDIR/pki/CA/cacert.pem>
|
||||||
|
|
||||||
|
The TLS B<Certificate Authority> certificate libvirtd will use.
|
||||||
|
|
||||||
|
=item F<SYSCONFDIR/pki/libvirt/servercert.pem>
|
||||||
|
|
||||||
|
The TLS B<Server> certificate libvirtd will use.
|
||||||
|
|
||||||
|
=item F<SYSCONFDIR/pki/libvirt/private/serverkey.pem>
|
||||||
|
|
||||||
|
The TLS B<Server> private key libvirtd will use.
|
||||||
|
|
||||||
|
=item F<LOCALSTATEDIR/run/libvirtd.pid>
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
# libvirtd --version
|
||||||
|
libvirtd (libvirt) 0.8.2
|
||||||
|
#
|
||||||
|
|
||||||
|
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
|
||||||
|
#
|
||||||
|
|
||||||
|
=head1 BUGS
|
||||||
|
|
||||||
|
Please report all bugs you discover. This should be done via either:
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item a) the mailing list
|
||||||
|
|
||||||
|
L<http://libvirt.org/contact.html>
|
||||||
|
|
||||||
|
=item or,
|
||||||
|
|
||||||
|
B<>
|
||||||
|
|
||||||
|
=item b) the bug tracker
|
||||||
|
|
||||||
|
L<http://libvirt.org/bugs.html>
|
||||||
|
|
||||||
|
=item Alternatively, you may report bugs to your software distributor / vendor.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=head1 AUTHORS
|
||||||
|
|
||||||
|
Please refer to the AUTHORS file distributed with libvirt.
|
||||||
|
|
||||||
|
=head1 COPYRIGHT
|
||||||
|
|
||||||
|
Copyright (C) 2006-2012 Red Hat, Inc., and the authors listed in the
|
||||||
|
libvirt AUTHORS file.
|
||||||
|
|
||||||
|
=head1 LICENSE
|
||||||
|
|
||||||
|
libvirtd is distributed under the terms of the GNU LGPL v2.1+.
|
||||||
|
This is free software; see the source for copying conditions. There
|
||||||
|
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE
|
||||||
|
|
||||||
|
=head1 SEE ALSO
|
||||||
|
|
||||||
|
L<virsh(1)>, L<virt-install(1)>, L<virt-xml-validate(1)>, L<virt-top(1)>,
|
||||||
|
L<virt-df(1)>, L<http://www.libvirt.org/>
|
||||||
|
|
||||||
|
=cut
|
||||||
51
daemon/libvirtd.policy.in
Normal file
51
daemon/libvirtd.policy.in
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?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>
|
||||||
@@ -5,4 +5,5 @@
|
|||||||
compress
|
compress
|
||||||
delaycompress
|
delaycompress
|
||||||
copytruncate
|
copytruncate
|
||||||
|
minsize 100k
|
||||||
}
|
}
|
||||||
31
daemon/libvirtd.sasl
Normal file
31
daemon/libvirtd.sasl
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# If you want to use the non-TLS socket, then you *must* include
|
||||||
|
# the GSSAPI or DIGEST-MD5 mechanisms, because they are the only
|
||||||
|
# ones that can offer session encryption as well as authentication.
|
||||||
|
#
|
||||||
|
# If you're only using TLS, then you can turn on any mechanisms
|
||||||
|
# you like for authentication, because TLS provides the encryption
|
||||||
|
#
|
||||||
|
# Default to a simple username+password mechanism
|
||||||
|
mech_list: digest-md5
|
||||||
|
|
||||||
|
# Before you can use GSSAPI, you need a service principle on the
|
||||||
|
# KDC server for libvirt, and that to be exported to the keytab
|
||||||
|
# file listed below
|
||||||
|
#mech_list: gssapi
|
||||||
|
#
|
||||||
|
# You can also list many mechanisms at once, then the user can choose
|
||||||
|
# by adding '?auth=sasl.gssapi' to their libvirt URI, eg
|
||||||
|
# qemu+tcp://hostname/system?auth=sasl.gssapi
|
||||||
|
#mech_list: digest-md5 gssapi
|
||||||
|
|
||||||
|
# Some older builds of MIT kerberos on Linux ignore this option &
|
||||||
|
# instead need KRB5_KTNAME env var.
|
||||||
|
# For modern Linux, and other OS, this should be sufficient
|
||||||
|
#
|
||||||
|
# There is no default value here, uncomment if you need this
|
||||||
|
#keytab: /etc/libvirt/krb5.tab
|
||||||
|
|
||||||
|
# If using digest-md5 for username/passwds, then this is the file
|
||||||
|
# containing the passwds. Use 'saslpasswd2 -a libvirt [username]'
|
||||||
|
# to add entries, and 'sasldblistusers2 -f [sasldb_path]' to browse it
|
||||||
|
sasldb_path: /etc/libvirt/passwd.db
|
||||||
25
daemon/libvirtd.service.in
Normal file
25
daemon/libvirtd.service.in
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# NB we don't use socket activation. When libvirtd starts it will
|
||||||
|
# spawn any virtual machines registered for autostart. We want this
|
||||||
|
# to occur on every boot, regardless of whether any client connects
|
||||||
|
# to a socket. Thus socket activation doesn't have any benefit
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Virtualization daemon
|
||||||
|
Before=libvirt-guests.service
|
||||||
|
After=network.target
|
||||||
|
After=dbus.service
|
||||||
|
After=iscsid.service
|
||||||
|
Documentation=man:libvirtd(8)
|
||||||
|
Documentation=http://libvirt.org
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
EnvironmentFile=-/etc/sysconfig/libvirtd
|
||||||
|
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
# Override the maximum number of opened files
|
||||||
|
#LimitNOFILE=2048
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
24
daemon/libvirtd.sysconf
Normal file
24
daemon/libvirtd.sysconf
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Override the default config file
|
||||||
|
# NOTE: This setting is no longer honoured if using
|
||||||
|
# systemd. Set '--config /etc/libvirt/libvirtd.conf'
|
||||||
|
# in LIBVIRTD_ARGS instead.
|
||||||
|
#LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
|
||||||
|
|
||||||
|
# Listen for TCP/IP connections
|
||||||
|
# NB. must setup TLS/SSL keys prior to using this
|
||||||
|
#LIBVIRTD_ARGS="--listen"
|
||||||
|
|
||||||
|
# Override Kerberos service keytab for SASL/GSSAPI
|
||||||
|
#KRB5_KTNAME=/etc/libvirt/krb5.tab
|
||||||
|
|
||||||
|
# Override the QEMU/SDL default audio driver probing when
|
||||||
|
# starting virtual machines using SDL graphics
|
||||||
|
#
|
||||||
|
# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio
|
||||||
|
# is enabled in /etc/libvirt/qemu.conf
|
||||||
|
#QEMU_AUDIO_DRV=sdl
|
||||||
|
#
|
||||||
|
#SDL_AUDIODRIVER=pulse
|
||||||
|
|
||||||
|
# Override the maximum number of opened files
|
||||||
|
#LIBVIRTD_NOFILES_LIMIT=2048
|
||||||
@@ -5,4 +5,5 @@
|
|||||||
compress
|
compress
|
||||||
delaycompress
|
delaycompress
|
||||||
copytruncate
|
copytruncate
|
||||||
|
minsize 100k
|
||||||
}
|
}
|
||||||
5648
daemon/remote.c
Normal file
5648
daemon/remote.c
Normal file
File diff suppressed because it is too large
Load Diff
45
daemon/remote.h
Normal file
45
daemon/remote.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* remote.h: handlers for RPC method calls
|
||||||
|
*
|
||||||
|
* Copyright (C) 2007, 2008, 2009 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
|
||||||
|
* 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: Richard W.M. Jones <rjones@redhat.com>
|
||||||
|
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __LIBVIRTD_REMOTE_H__
|
||||||
|
# define __LIBVIRTD_REMOTE_H__
|
||||||
|
|
||||||
|
# include "remote_protocol.h"
|
||||||
|
# include "rpc/virnetserverprogram.h"
|
||||||
|
# include "rpc/virnetserverclient.h"
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
#endif /* __LIBVIRTD_REMOTE_H__ */
|
||||||
775
daemon/stream.c
Normal file
775
daemon/stream.c
Normal file
@@ -0,0 +1,775 @@
|
|||||||
|
/*
|
||||||
|
* stream.c: APIs for managing client streams
|
||||||
|
*
|
||||||
|
* Copyright (C) 2009, 2011 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
|
||||||
|
* 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 "stream.h"
|
||||||
|
#include "remote.h"
|
||||||
|
#include "viralloc.h"
|
||||||
|
#include "virlog.h"
|
||||||
|
#include "virnetserverclient.h"
|
||||||
|
#include "virerror.h"
|
||||||
|
|
||||||
|
#define VIR_FROM_THIS VIR_FROM_STREAMS
|
||||||
|
|
||||||
|
struct daemonClientStream {
|
||||||
|
daemonClientPrivatePtr priv;
|
||||||
|
int refs;
|
||||||
|
|
||||||
|
virNetServerProgramPtr prog;
|
||||||
|
|
||||||
|
virStreamPtr st;
|
||||||
|
int procedure;
|
||||||
|
int serial;
|
||||||
|
|
||||||
|
unsigned int recvEOF : 1;
|
||||||
|
unsigned int closed : 1;
|
||||||
|
|
||||||
|
int filterID;
|
||||||
|
|
||||||
|
virNetMessagePtr rx;
|
||||||
|
int tx;
|
||||||
|
|
||||||
|
daemonClientStreamPtr next;
|
||||||
|
};
|
||||||
|
|
||||||
|
static int
|
||||||
|
daemonStreamHandleWrite(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream);
|
||||||
|
static int
|
||||||
|
daemonStreamHandleRead(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream);
|
||||||
|
static int
|
||||||
|
daemonStreamHandleFinish(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream,
|
||||||
|
virNetMessagePtr msg);
|
||||||
|
static int
|
||||||
|
daemonStreamHandleAbort(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream,
|
||||||
|
virNetMessagePtr msg);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
daemonStreamUpdateEvents(daemonClientStream *stream)
|
||||||
|
{
|
||||||
|
int newEvents = 0;
|
||||||
|
if (stream->rx)
|
||||||
|
newEvents |= VIR_STREAM_EVENT_WRITABLE;
|
||||||
|
if (stream->tx && !stream->recvEOF)
|
||||||
|
newEvents |= VIR_STREAM_EVENT_READABLE;
|
||||||
|
|
||||||
|
virStreamEventUpdateCallback(stream->st, newEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Invoked when an outgoing data packet message has been fully sent.
|
||||||
|
* This simply re-enables TX of further data.
|
||||||
|
*
|
||||||
|
* The idea is to stop the daemon growing without bound due to
|
||||||
|
* fast stream, but slow client
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
daemonStreamMessageFinished(virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||||
|
void *opaque)
|
||||||
|
{
|
||||||
|
daemonClientStream *stream = opaque;
|
||||||
|
VIR_DEBUG("stream=%p proc=%d serial=%d",
|
||||||
|
stream, msg->header.proc, msg->header.serial);
|
||||||
|
|
||||||
|
stream->tx = 1;
|
||||||
|
daemonStreamUpdateEvents(stream);
|
||||||
|
|
||||||
|
daemonFreeClientStream(NULL, stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Callback that gets invoked when a stream becomes writable/readable
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
daemonStreamEvent(virStreamPtr st, int events, void *opaque)
|
||||||
|
{
|
||||||
|
virNetServerClientPtr client = opaque;
|
||||||
|
daemonClientStream *stream;
|
||||||
|
daemonClientPrivatePtr priv = virNetServerClientGetPrivateData(client);
|
||||||
|
|
||||||
|
virMutexLock(&priv->lock);
|
||||||
|
|
||||||
|
stream = priv->streams;
|
||||||
|
while (stream) {
|
||||||
|
if (stream->st == st)
|
||||||
|
break;
|
||||||
|
stream = stream->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!stream) {
|
||||||
|
VIR_WARN("event for client=%p stream st=%p, but missing stream state", client, st);
|
||||||
|
virStreamEventRemoveCallback(st);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
VIR_DEBUG("st=%p events=%d EOF=%d closed=%d", st, events, stream->recvEOF, stream->closed);
|
||||||
|
|
||||||
|
if (!stream->closed &&
|
||||||
|
(events & VIR_STREAM_EVENT_WRITABLE)) {
|
||||||
|
if (daemonStreamHandleWrite(client, stream) < 0) {
|
||||||
|
daemonRemoveClientStream(client, stream);
|
||||||
|
virNetServerClientClose(client);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!stream->closed && !stream->recvEOF &&
|
||||||
|
(events & (VIR_STREAM_EVENT_READABLE))) {
|
||||||
|
events = events & ~(VIR_STREAM_EVENT_READABLE);
|
||||||
|
if (daemonStreamHandleRead(client, stream) < 0) {
|
||||||
|
daemonRemoveClientStream(client, stream);
|
||||||
|
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 */
|
||||||
|
if (stream->rx) {
|
||||||
|
virNetMessagePtr msg = stream->rx;
|
||||||
|
switch (msg->header.status) {
|
||||||
|
case VIR_NET_CONTINUE:
|
||||||
|
/* nada */
|
||||||
|
break;
|
||||||
|
case VIR_NET_OK:
|
||||||
|
virNetMessageQueueServe(&stream->rx);
|
||||||
|
if (daemonStreamHandleFinish(client, stream, msg) < 0) {
|
||||||
|
virNetMessageFree(msg);
|
||||||
|
daemonRemoveClientStream(client, stream);
|
||||||
|
virNetServerClientClose(client);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case VIR_NET_ERROR:
|
||||||
|
default:
|
||||||
|
virNetMessageQueueServe(&stream->rx);
|
||||||
|
if (daemonStreamHandleAbort(client, stream, msg) < 0) {
|
||||||
|
virNetMessageFree(msg);
|
||||||
|
daemonRemoveClientStream(client, stream);
|
||||||
|
virNetServerClientClose(client);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* If we got HANGUP, we need to only send an empty
|
||||||
|
* packet so the client sees an EOF and cleans up
|
||||||
|
*/
|
||||||
|
if (!stream->closed && !stream->recvEOF &&
|
||||||
|
(events & VIR_STREAM_EVENT_HANGUP)) {
|
||||||
|
virNetMessagePtr msg;
|
||||||
|
events &= ~(VIR_STREAM_EVENT_HANGUP);
|
||||||
|
stream->tx = 0;
|
||||||
|
stream->recvEOF = 1;
|
||||||
|
if (!(msg = virNetMessageNew(false))) {
|
||||||
|
daemonRemoveClientStream(client, stream);
|
||||||
|
virNetServerClientClose(client);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
msg->cb = daemonStreamMessageFinished;
|
||||||
|
msg->opaque = stream;
|
||||||
|
stream->refs++;
|
||||||
|
if (virNetServerProgramSendStreamData(remoteProgram,
|
||||||
|
client,
|
||||||
|
msg,
|
||||||
|
stream->procedure,
|
||||||
|
stream->serial,
|
||||||
|
"", 0) < 0) {
|
||||||
|
virNetMessageFree(msg);
|
||||||
|
daemonRemoveClientStream(client, stream);
|
||||||
|
virNetServerClientClose(client);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!stream->closed &&
|
||||||
|
(events & (VIR_STREAM_EVENT_ERROR | VIR_STREAM_EVENT_HANGUP))) {
|
||||||
|
int ret;
|
||||||
|
virNetMessagePtr msg;
|
||||||
|
virNetMessageError rerr;
|
||||||
|
|
||||||
|
memset(&rerr, 0, sizeof(rerr));
|
||||||
|
stream->closed = 1;
|
||||||
|
virStreamEventRemoveCallback(stream->st);
|
||||||
|
virStreamAbort(stream->st);
|
||||||
|
if (events & VIR_STREAM_EVENT_HANGUP)
|
||||||
|
virReportError(VIR_ERR_RPC,
|
||||||
|
"%s", _("stream had unexpected termination"));
|
||||||
|
else
|
||||||
|
virReportError(VIR_ERR_RPC,
|
||||||
|
"%s", _("stream had I/O failure"));
|
||||||
|
|
||||||
|
msg = virNetMessageNew(false);
|
||||||
|
if (!msg) {
|
||||||
|
ret = -1;
|
||||||
|
} else {
|
||||||
|
ret = virNetServerProgramSendStreamError(remoteProgram,
|
||||||
|
client,
|
||||||
|
msg,
|
||||||
|
&rerr,
|
||||||
|
stream->procedure,
|
||||||
|
stream->serial);
|
||||||
|
}
|
||||||
|
daemonRemoveClientStream(client, stream);
|
||||||
|
if (ret < 0)
|
||||||
|
virNetServerClientClose(client);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stream->closed) {
|
||||||
|
daemonRemoveClientStream(client, stream);
|
||||||
|
} else {
|
||||||
|
daemonStreamUpdateEvents(stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
virMutexUnlock(&priv->lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @client: a locked client object
|
||||||
|
*
|
||||||
|
* Invoked by the main loop when filtering incoming messages.
|
||||||
|
*
|
||||||
|
* Returns 1 if the message was processed, 0 if skipped,
|
||||||
|
* -1 on fatal client error
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
daemonStreamFilter(virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||||
|
virNetMessagePtr msg,
|
||||||
|
void *opaque)
|
||||||
|
{
|
||||||
|
daemonClientStream *stream = opaque;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
virMutexLock(&stream->priv->lock);
|
||||||
|
|
||||||
|
if (msg->header.type != VIR_NET_STREAM)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
if (!virNetServerProgramMatches(stream->prog, msg))
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
if (msg->header.proc != stream->procedure ||
|
||||||
|
msg->header.serial != stream->serial)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
VIR_DEBUG("Incoming client=%p, rx=%p, serial=%d, proc=%d, status=%d",
|
||||||
|
client, stream->rx, msg->header.proc,
|
||||||
|
msg->header.serial, msg->header.status);
|
||||||
|
|
||||||
|
virNetMessageQueuePush(&stream->rx, msg);
|
||||||
|
daemonStreamUpdateEvents(stream);
|
||||||
|
ret = 1;
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
virMutexUnlock(&stream->priv->lock);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @conn: a connection object to associate the stream with
|
||||||
|
* @header: the method call to associate with the stream
|
||||||
|
*
|
||||||
|
* Creates a new stream for this conn
|
||||||
|
*
|
||||||
|
* Returns a new stream object, or NULL upon OOM
|
||||||
|
*/
|
||||||
|
daemonClientStream *
|
||||||
|
daemonCreateClientStream(virNetServerClientPtr client,
|
||||||
|
virStreamPtr st,
|
||||||
|
virNetServerProgramPtr prog,
|
||||||
|
virNetMessageHeaderPtr header)
|
||||||
|
{
|
||||||
|
daemonClientStream *stream;
|
||||||
|
daemonClientPrivatePtr priv = virNetServerClientGetPrivateData(client);
|
||||||
|
|
||||||
|
VIR_DEBUG("client=%p, proc=%d, serial=%d, st=%p",
|
||||||
|
client, header->proc, header->serial, st);
|
||||||
|
|
||||||
|
if (VIR_ALLOC(stream) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
stream->refs = 1;
|
||||||
|
stream->priv = priv;
|
||||||
|
stream->prog = virObjectRef(prog);
|
||||||
|
stream->procedure = header->proc;
|
||||||
|
stream->serial = header->serial;
|
||||||
|
stream->filterID = -1;
|
||||||
|
stream->st = st;
|
||||||
|
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @stream: an unused client stream
|
||||||
|
*
|
||||||
|
* Frees the memory associated with this inactive client
|
||||||
|
* stream
|
||||||
|
*/
|
||||||
|
int daemonFreeClientStream(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream)
|
||||||
|
{
|
||||||
|
virNetMessagePtr msg;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
if (!stream)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
stream->refs--;
|
||||||
|
if (stream->refs)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
VIR_DEBUG("client=%p, proc=%d, serial=%d",
|
||||||
|
client, stream->procedure, stream->serial);
|
||||||
|
|
||||||
|
virObjectUnref(stream->prog);
|
||||||
|
|
||||||
|
msg = stream->rx;
|
||||||
|
while (msg) {
|
||||||
|
virNetMessagePtr tmp = msg->next;
|
||||||
|
if (client) {
|
||||||
|
/* Send a dummy reply to free up 'msg' & unblock client rx */
|
||||||
|
virNetMessageClear(msg);
|
||||||
|
msg->header.type = VIR_NET_REPLY;
|
||||||
|
if (virNetServerClientSendMessage(client, msg) < 0) {
|
||||||
|
virNetServerClientImmediateClose(client);
|
||||||
|
virNetMessageFree(msg);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
virNetMessageFree(msg);
|
||||||
|
}
|
||||||
|
msg = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
virStreamFree(stream->st);
|
||||||
|
VIR_FREE(stream);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @client: a locked client to add the stream to
|
||||||
|
* @stream: a stream to add
|
||||||
|
*/
|
||||||
|
int daemonAddClientStream(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream,
|
||||||
|
bool transmit)
|
||||||
|
{
|
||||||
|
VIR_DEBUG("client=%p, proc=%d, serial=%d, st=%p, transmit=%d",
|
||||||
|
client, stream->procedure, stream->serial, stream->st, transmit);
|
||||||
|
daemonClientPrivatePtr priv = virNetServerClientGetPrivateData(client);
|
||||||
|
|
||||||
|
if (stream->filterID != -1) {
|
||||||
|
VIR_WARN("Filter already added to client %p", client);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (virStreamEventAddCallback(stream->st, 0,
|
||||||
|
daemonStreamEvent, client,
|
||||||
|
virObjectFreeCallback) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
virObjectRef(client);
|
||||||
|
|
||||||
|
if ((stream->filterID = virNetServerClientAddFilter(client,
|
||||||
|
daemonStreamFilter,
|
||||||
|
stream)) < 0) {
|
||||||
|
virStreamEventRemoveCallback(stream->st);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (transmit)
|
||||||
|
stream->tx = 1;
|
||||||
|
|
||||||
|
virMutexLock(&priv->lock);
|
||||||
|
stream->next = priv->streams;
|
||||||
|
priv->streams = stream;
|
||||||
|
|
||||||
|
daemonStreamUpdateEvents(stream);
|
||||||
|
|
||||||
|
virMutexUnlock(&priv->lock);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @client: a locked client object
|
||||||
|
* @stream: an inactive, closed stream object
|
||||||
|
*
|
||||||
|
* Removes a stream from the list of active streams for the client
|
||||||
|
*
|
||||||
|
* Returns 0 if the stream was removd, -1 if it doesn't exist
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
daemonRemoveClientStream(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream)
|
||||||
|
{
|
||||||
|
VIR_DEBUG("client=%p, proc=%d, serial=%d, st=%p",
|
||||||
|
client, stream->procedure, stream->serial, stream->st);
|
||||||
|
daemonClientPrivatePtr priv = virNetServerClientGetPrivateData(client);
|
||||||
|
daemonClientStream *curr = priv->streams;
|
||||||
|
daemonClientStream *prev = NULL;
|
||||||
|
|
||||||
|
if (stream->filterID != -1) {
|
||||||
|
virNetServerClientRemoveFilter(client,
|
||||||
|
stream->filterID);
|
||||||
|
stream->filterID = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!stream->closed) {
|
||||||
|
virStreamEventRemoveCallback(stream->st);
|
||||||
|
virStreamAbort(stream->st);
|
||||||
|
}
|
||||||
|
|
||||||
|
while (curr) {
|
||||||
|
if (curr == stream) {
|
||||||
|
if (prev)
|
||||||
|
prev->next = curr->next;
|
||||||
|
else
|
||||||
|
priv->streams = curr->next;
|
||||||
|
return daemonFreeClientStream(client, stream);
|
||||||
|
}
|
||||||
|
prev = curr;
|
||||||
|
curr = curr->next;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
daemonRemoveAllClientStreams(daemonClientStream *stream)
|
||||||
|
{
|
||||||
|
daemonClientStream *tmp;
|
||||||
|
|
||||||
|
VIR_DEBUG("stream=%p", stream);
|
||||||
|
|
||||||
|
while (stream) {
|
||||||
|
tmp = stream->next;
|
||||||
|
|
||||||
|
if (!stream->closed) {
|
||||||
|
virStreamEventRemoveCallback(stream->st);
|
||||||
|
virStreamAbort(stream->st);
|
||||||
|
}
|
||||||
|
|
||||||
|
daemonFreeClientStream(NULL, stream);
|
||||||
|
|
||||||
|
VIR_DEBUG("next stream=%p", tmp);
|
||||||
|
stream = tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Returns:
|
||||||
|
* -1 if fatal error occurred
|
||||||
|
* 0 if message was fully processed
|
||||||
|
* 1 if message is still being processed
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
daemonStreamHandleWriteData(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream,
|
||||||
|
virNetMessagePtr msg)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
VIR_DEBUG("client=%p, stream=%p, proc=%d, serial=%d, len=%zu, offset=%zu",
|
||||||
|
client, stream, msg->header.proc, msg->header.serial,
|
||||||
|
msg->bufferLength, msg->bufferOffset);
|
||||||
|
|
||||||
|
ret = virStreamSend(stream->st,
|
||||||
|
msg->buffer + msg->bufferOffset,
|
||||||
|
msg->bufferLength - msg->bufferOffset);
|
||||||
|
|
||||||
|
if (ret > 0) {
|
||||||
|
msg->bufferOffset += ret;
|
||||||
|
|
||||||
|
/* Partial write, so indicate we have more todo later */
|
||||||
|
if (msg->bufferOffset < msg->bufferLength)
|
||||||
|
return 1;
|
||||||
|
} else if (ret == -2) {
|
||||||
|
/* Blocking, so indicate we have more todo later */
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
virNetMessageError rerr;
|
||||||
|
|
||||||
|
memset(&rerr, 0, sizeof(rerr));
|
||||||
|
|
||||||
|
VIR_INFO("Stream send failed");
|
||||||
|
stream->closed = 1;
|
||||||
|
return virNetServerProgramSendReplyError(stream->prog,
|
||||||
|
client,
|
||||||
|
msg,
|
||||||
|
&rerr,
|
||||||
|
&msg->header);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Process a finish handshake from the client.
|
||||||
|
*
|
||||||
|
* Returns a VIR_NET_OK confirmation if successful, or a VIR_NET_ERROR
|
||||||
|
* if there was a stream error
|
||||||
|
*
|
||||||
|
* Returns 0 if successfully sent RPC reply, -1 upon fatal error
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
daemonStreamHandleFinish(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream,
|
||||||
|
virNetMessagePtr msg)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
VIR_DEBUG("client=%p, stream=%p, proc=%d, serial=%d",
|
||||||
|
client, stream, msg->header.proc, msg->header.serial);
|
||||||
|
|
||||||
|
stream->closed = 1;
|
||||||
|
virStreamEventRemoveCallback(stream->st);
|
||||||
|
ret = virStreamFinish(stream->st);
|
||||||
|
|
||||||
|
if (ret < 0) {
|
||||||
|
virNetMessageError rerr;
|
||||||
|
memset(&rerr, 0, sizeof(rerr));
|
||||||
|
return virNetServerProgramSendReplyError(stream->prog,
|
||||||
|
client,
|
||||||
|
msg,
|
||||||
|
&rerr,
|
||||||
|
&msg->header);
|
||||||
|
} else {
|
||||||
|
/* Send zero-length confirm */
|
||||||
|
return virNetServerProgramSendStreamData(stream->prog,
|
||||||
|
client,
|
||||||
|
msg,
|
||||||
|
stream->procedure,
|
||||||
|
stream->serial,
|
||||||
|
NULL, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Process an abort request from the client.
|
||||||
|
*
|
||||||
|
* Returns 0 if successfully aborted, -1 upon error
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
daemonStreamHandleAbort(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream,
|
||||||
|
virNetMessagePtr msg)
|
||||||
|
{
|
||||||
|
VIR_DEBUG("client=%p, stream=%p, proc=%d, serial=%d",
|
||||||
|
client, stream, msg->header.proc, msg->header.serial);
|
||||||
|
virNetMessageError rerr;
|
||||||
|
|
||||||
|
memset(&rerr, 0, sizeof(rerr));
|
||||||
|
|
||||||
|
stream->closed = 1;
|
||||||
|
virStreamEventRemoveCallback(stream->st);
|
||||||
|
virStreamAbort(stream->st);
|
||||||
|
|
||||||
|
if (msg->header.status == VIR_NET_ERROR)
|
||||||
|
virReportError(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);
|
||||||
|
}
|
||||||
|
|
||||||
|
return virNetServerProgramSendReplyError(remoteProgram,
|
||||||
|
client,
|
||||||
|
msg,
|
||||||
|
&rerr,
|
||||||
|
&msg->header);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called when the stream is signalled has being able to accept
|
||||||
|
* data writes. Will process all pending incoming messages
|
||||||
|
* until they're all gone, or I/O blocks
|
||||||
|
*
|
||||||
|
* Returns 0 on success, or -1 upon fatal error
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
daemonStreamHandleWrite(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream)
|
||||||
|
{
|
||||||
|
VIR_DEBUG("client=%p, stream=%p", client, stream);
|
||||||
|
|
||||||
|
while (stream->rx && !stream->closed) {
|
||||||
|
virNetMessagePtr msg = stream->rx;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
switch (msg->header.status) {
|
||||||
|
case VIR_NET_OK:
|
||||||
|
ret = daemonStreamHandleFinish(client, stream, msg);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_NET_CONTINUE:
|
||||||
|
ret = daemonStreamHandleWriteData(client, stream, msg);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_NET_ERROR:
|
||||||
|
default:
|
||||||
|
ret = daemonStreamHandleAbort(client, stream, msg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret > 0)
|
||||||
|
break; /* still processing data from msg */
|
||||||
|
|
||||||
|
virNetMessageQueueServe(&stream->rx);
|
||||||
|
if (ret < 0) {
|
||||||
|
virNetMessageFree(msg);
|
||||||
|
virNetServerClientImmediateClose(client);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 'CONTINUE' messages don't send a reply (unless error
|
||||||
|
* occurred), so to release the 'msg' object we need to
|
||||||
|
* send a fake zero-length reply. Nothing actually gets
|
||||||
|
* onto the wire, but this causes the client to reset
|
||||||
|
* its active request count / throttling
|
||||||
|
*/
|
||||||
|
if (msg->header.status == VIR_NET_CONTINUE) {
|
||||||
|
virNetMessageClear(msg);
|
||||||
|
msg->header.type = VIR_NET_REPLY;
|
||||||
|
if (virNetServerClientSendMessage(client, msg) < 0) {
|
||||||
|
virNetMessageFree(msg);
|
||||||
|
virNetServerClientImmediateClose(client);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Invoked when a stream is signalled as having data
|
||||||
|
* available to read. This reads up to one message
|
||||||
|
* worth of data, and then queues that for transmission
|
||||||
|
* to the client.
|
||||||
|
*
|
||||||
|
* Returns 0 if data was queued for TX, or a error RPC
|
||||||
|
* was sent, or -1 on fatal error, indicating client should
|
||||||
|
* be killed
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
daemonStreamHandleRead(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream)
|
||||||
|
{
|
||||||
|
char *buffer;
|
||||||
|
size_t bufferLen = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
VIR_DEBUG("client=%p, stream=%p tx=%d closed=%d",
|
||||||
|
client, stream, stream->tx, stream->closed);
|
||||||
|
|
||||||
|
/* We might have had an event pending before we shut
|
||||||
|
* down the stream, so if we're marked as closed,
|
||||||
|
* then do nothing
|
||||||
|
*/
|
||||||
|
if (stream->closed)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Shouldn't ever be called unless we're marked able to
|
||||||
|
* transmit, but doesn't hurt to check */
|
||||||
|
if (!stream->tx)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (VIR_ALLOC_N(buffer, bufferLen) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
ret = virStreamRecv(stream->st, buffer, bufferLen);
|
||||||
|
if (ret == -2) {
|
||||||
|
/* Should never get this, since we're only called when we know
|
||||||
|
* we're readable, but hey things change... */
|
||||||
|
ret = 0;
|
||||||
|
} else if (ret < 0) {
|
||||||
|
virNetMessagePtr msg;
|
||||||
|
virNetMessageError rerr;
|
||||||
|
|
||||||
|
memset(&rerr, 0, sizeof(rerr));
|
||||||
|
|
||||||
|
if (!(msg = virNetMessageNew(false)))
|
||||||
|
ret = -1;
|
||||||
|
else
|
||||||
|
ret = virNetServerProgramSendStreamError(remoteProgram,
|
||||||
|
client,
|
||||||
|
msg,
|
||||||
|
&rerr,
|
||||||
|
stream->procedure,
|
||||||
|
stream->serial);
|
||||||
|
} else {
|
||||||
|
virNetMessagePtr msg;
|
||||||
|
stream->tx = 0;
|
||||||
|
if (ret == 0)
|
||||||
|
stream->recvEOF = 1;
|
||||||
|
if (!(msg = virNetMessageNew(false)))
|
||||||
|
ret = -1;
|
||||||
|
|
||||||
|
if (msg) {
|
||||||
|
msg->cb = daemonStreamMessageFinished;
|
||||||
|
msg->opaque = stream;
|
||||||
|
stream->refs++;
|
||||||
|
ret = virNetServerProgramSendStreamData(remoteProgram,
|
||||||
|
client,
|
||||||
|
msg,
|
||||||
|
stream->procedure,
|
||||||
|
stream->serial,
|
||||||
|
buffer, ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VIR_FREE(buffer);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
51
daemon/stream.h
Normal file
51
daemon/stream.h
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* stream.h: APIs for managing client streams
|
||||||
|
*
|
||||||
|
* Copyright (C) 2009 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
|
||||||
|
* 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_STREAM_H__
|
||||||
|
# define __LIBVIRTD_STREAM_H__
|
||||||
|
|
||||||
|
# include "libvirtd.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
daemonClientStream *
|
||||||
|
daemonCreateClientStream(virNetServerClientPtr client,
|
||||||
|
virStreamPtr st,
|
||||||
|
virNetServerProgramPtr prog,
|
||||||
|
virNetMessageHeaderPtr hdr);
|
||||||
|
|
||||||
|
int daemonFreeClientStream(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream);
|
||||||
|
|
||||||
|
int daemonAddClientStream(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream,
|
||||||
|
bool transmit);
|
||||||
|
|
||||||
|
int
|
||||||
|
daemonRemoveClientStream(virNetServerClientPtr client,
|
||||||
|
daemonClientStream *stream);
|
||||||
|
|
||||||
|
void
|
||||||
|
daemonRemoveAllClientStreams(daemonClientStream *stream);
|
||||||
|
|
||||||
|
#endif /* __LIBVIRTD_STREAM_H__ */
|
||||||
53
daemon/test_libvirtd.aug.in
Normal file
53
daemon/test_libvirtd.aug.in
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
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" }
|
||||||
|
{ "access_drivers"
|
||||||
|
{ "1" = "polkit" }
|
||||||
|
}
|
||||||
|
{ "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" }
|
||||||
|
{ "max_queued_clients" = "1000" }
|
||||||
|
{ "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,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>404 page not found</h1>
|
<h1>404 page not found</h1>
|
||||||
@@ -9,11 +9,16 @@
|
|||||||
page you were looking for. You might want to try
|
page you were looking for. You might want to try
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>going back to the <a href="https://libvirt.org/">home page</a> to find
|
<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>
|
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
|
<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>
|
locate the content on this site or mailing list archives</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<p class="image">
|
||||||
|
<img src="/libvirtLogo404.png" alt="libvirt Logo"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
338
docs/Makefile.am
338
docs/Makefile.am
@@ -1,6 +1,6 @@
|
|||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
## Copyright (C) 2005-2016 Red Hat, Inc.
|
## Copyright (C) 2005-2013 Red Hat, Inc.
|
||||||
##
|
##
|
||||||
## This library is free software; you can redistribute it and/or
|
## This library is free software; you can redistribute it and/or
|
||||||
## modify it under the terms of the GNU Lesser General Public
|
## modify it under the terms of the GNU Lesser General Public
|
||||||
@@ -16,25 +16,18 @@
|
|||||||
## License along with this library. If not, see
|
## License along with this library. If not, see
|
||||||
## <http://www.gnu.org/licenses/>.
|
## <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
SUBDIRS= schemas
|
||||||
|
|
||||||
|
PERL = perl
|
||||||
|
|
||||||
|
# The directory containing the source code (if it contains documentation).
|
||||||
|
DOC_SOURCE_DIR=../src
|
||||||
|
|
||||||
DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
|
DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
|
||||||
|
|
||||||
apihtml = \
|
apihtml = \
|
||||||
html/index.html \
|
html/index.html \
|
||||||
$(apihtml_generated)
|
html/libvirt-libvirt.html \
|
||||||
|
|
||||||
apihtml_generated = \
|
|
||||||
html/libvirt-libvirt-common.html \
|
|
||||||
html/libvirt-libvirt-domain.html \
|
|
||||||
html/libvirt-libvirt-domain-snapshot.html \
|
|
||||||
html/libvirt-libvirt-event.html \
|
|
||||||
html/libvirt-libvirt-host.html \
|
|
||||||
html/libvirt-libvirt-interface.html \
|
|
||||||
html/libvirt-libvirt-network.html \
|
|
||||||
html/libvirt-libvirt-nodedev.html \
|
|
||||||
html/libvirt-libvirt-nwfilter.html \
|
|
||||||
html/libvirt-libvirt-secret.html \
|
|
||||||
html/libvirt-libvirt-storage.html \
|
|
||||||
html/libvirt-libvirt-stream.html \
|
|
||||||
html/libvirt-virterror.html
|
html/libvirt-virterror.html
|
||||||
|
|
||||||
apipng = \
|
apipng = \
|
||||||
@@ -47,28 +40,14 @@ devhelphtml = \
|
|||||||
devhelp/libvirt.devhelp \
|
devhelp/libvirt.devhelp \
|
||||||
devhelp/index.html \
|
devhelp/index.html \
|
||||||
devhelp/general.html \
|
devhelp/general.html \
|
||||||
|
devhelp/libvirt-libvirt.html \
|
||||||
devhelp/libvirt-virterror.html
|
devhelp/libvirt-virterror.html
|
||||||
|
|
||||||
css = \
|
css = \
|
||||||
generic.css \
|
generic.css \
|
||||||
libvirt.css \
|
libvirt.css \
|
||||||
mobile.css \
|
|
||||||
main.css
|
main.css
|
||||||
|
|
||||||
fonts = \
|
|
||||||
fonts/LICENSE.md \
|
|
||||||
fonts/stylesheet.css \
|
|
||||||
fonts/overpass-bold-italic.woff \
|
|
||||||
fonts/overpass-bold.woff \
|
|
||||||
fonts/overpass-italic.woff \
|
|
||||||
fonts/overpass-light-italic.woff \
|
|
||||||
fonts/overpass-light.woff \
|
|
||||||
fonts/overpass-mono-bold.woff \
|
|
||||||
fonts/overpass-mono-light.woff \
|
|
||||||
fonts/overpass-mono-regular.woff \
|
|
||||||
fonts/overpass-mono-semibold.woff \
|
|
||||||
fonts/overpass-regular.woff
|
|
||||||
|
|
||||||
devhelppng = \
|
devhelppng = \
|
||||||
devhelp/home.png \
|
devhelp/home.png \
|
||||||
devhelp/left.png \
|
devhelp/left.png \
|
||||||
@@ -79,30 +58,20 @@ devhelpcss = devhelp/style.css
|
|||||||
|
|
||||||
devhelpxsl = devhelp/devhelp.xsl devhelp/html.xsl
|
devhelpxsl = devhelp/devhelp.xsl devhelp/html.xsl
|
||||||
|
|
||||||
logofiles = \
|
|
||||||
logos/logo-base.svg \
|
|
||||||
logos/logo-square.svg \
|
|
||||||
logos/logo-square-powered.svg \
|
|
||||||
logos/logo-banner-dark.svg \
|
|
||||||
logos/logo-banner-light.svg \
|
|
||||||
logos/logo-square-96.png \
|
|
||||||
logos/logo-square-128.png \
|
|
||||||
logos/logo-square-192.png \
|
|
||||||
logos/logo-square-256.png \
|
|
||||||
logos/logo-square-powered-96.png \
|
|
||||||
logos/logo-square-powered-128.png \
|
|
||||||
logos/logo-square-powered-192.png \
|
|
||||||
logos/logo-square-powered-256.png \
|
|
||||||
logos/logo-banner-dark-256.png \
|
|
||||||
logos/logo-banner-dark-800.png \
|
|
||||||
logos/logo-banner-light-256.png \
|
|
||||||
logos/logo-banner-light-800.png
|
|
||||||
|
|
||||||
png = \
|
png = \
|
||||||
32favicon.png \
|
32favicon.png \
|
||||||
|
footer_corner.png \
|
||||||
|
footer_pattern.png \
|
||||||
|
libvirt-header-bg.png \
|
||||||
|
libvirt-header-logo.png \
|
||||||
|
libvirtLogo.png \
|
||||||
|
libvirt-net-logical.png \
|
||||||
|
libvirt-net-physical.png \
|
||||||
libvirt-daemon-arch.png \
|
libvirt-daemon-arch.png \
|
||||||
libvirt-driver-arch.png \
|
libvirt-driver-arch.png \
|
||||||
libvirt-object-model.png \
|
libvirt-object-model.png \
|
||||||
|
madeWith.png \
|
||||||
|
et.png \
|
||||||
migration-managed-direct.png \
|
migration-managed-direct.png \
|
||||||
migration-managed-p2p.png \
|
migration-managed-p2p.png \
|
||||||
migration-native.png \
|
migration-native.png \
|
||||||
@@ -118,14 +87,15 @@ internals_html_in = \
|
|||||||
$(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/internals/*.html.in))
|
$(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/internals/*.html.in))
|
||||||
internals_html = $(internals_html_in:%.html.in=%.html)
|
internals_html = $(internals_html_in:%.html.in=%.html)
|
||||||
|
|
||||||
# Since we ship pre-built html in the tarball, we must also
|
# todo.html is special - it is shipped in the tarball, but we
|
||||||
# ship the sources, even when those sources are themselves
|
# have a dedicated 'todo' target to rebuild it from a proper
|
||||||
# generated.
|
# config file, all other users are able to build it locally.
|
||||||
# Generate hvsupport.html and news.html first, since they take one extra step.
|
# For all other files, since we ship pre-built html in the
|
||||||
dot_html_in = \
|
# tarball, we must also ship the sources, even when those
|
||||||
hvsupport.html.in \
|
# sources are themselves generated.
|
||||||
news.html.in \
|
dot_html_in = $(notdir $(wildcard $(srcdir)/*.html.in)) \
|
||||||
$(notdir $(wildcard $(srcdir)/*.html.in))
|
todo.html.in \
|
||||||
|
hvsupport.html.in
|
||||||
dot_html = $(dot_html_in:%.html.in=%.html)
|
dot_html = $(dot_html_in:%.html.in=%.html)
|
||||||
|
|
||||||
dot_php_in = $(notdir $(wildcard $(srcdir)/*.php.in))
|
dot_php_in = $(notdir $(wildcard $(srcdir)/*.php.in))
|
||||||
@@ -146,18 +116,12 @@ lxc_xml = \
|
|||||||
libvirt-lxc-api.xml \
|
libvirt-lxc-api.xml \
|
||||||
libvirt-lxc-refs.xml
|
libvirt-lxc-refs.xml
|
||||||
|
|
||||||
admin_xml = \
|
|
||||||
libvirt-admin-api.xml \
|
|
||||||
libvirt-admin-refs.xml
|
|
||||||
|
|
||||||
apidir = $(pkgdatadir)/api
|
apidir = $(pkgdatadir)/api
|
||||||
api_DATA = \
|
api_DATA = libvirt-api.xml libvirt-qemu-api.xml libvirt-lxc-api.xml
|
||||||
libvirt-api.xml \
|
|
||||||
libvirt-qemu-api.xml \
|
|
||||||
libvirt-lxc-api.xml \
|
|
||||||
libvirt-admin-api.xml
|
|
||||||
|
|
||||||
fig = \
|
fig = \
|
||||||
|
libvirt-net-logical.fig \
|
||||||
|
libvirt-net-physical.fig \
|
||||||
libvirt-daemon-arch.fig \
|
libvirt-daemon-arch.fig \
|
||||||
libvirt-driver-arch.fig \
|
libvirt-driver-arch.fig \
|
||||||
libvirt-object-model.fig \
|
libvirt-object-model.fig \
|
||||||
@@ -167,23 +131,19 @@ fig = \
|
|||||||
migration-tunnel.fig \
|
migration-tunnel.fig \
|
||||||
migration-unmanaged-direct.fig
|
migration-unmanaged-direct.fig
|
||||||
|
|
||||||
schemadir = $(pkgdatadir)/schemas
|
|
||||||
schema_DATA = $(wildcard $(srcdir)/schemas/*.rng)
|
|
||||||
|
|
||||||
EXTRA_DIST= \
|
EXTRA_DIST= \
|
||||||
apibuild.py genaclperms.pl \
|
apibuild.py genaclperms.pl \
|
||||||
site.xsl subsite.xsl newapi.xsl page.xsl \
|
site.xsl newapi.xsl news.xsl page.xsl \
|
||||||
wrapstring.xsl \
|
hacking1.xsl hacking2.xsl wrapstring.xsl \
|
||||||
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
|
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
|
||||||
$(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
|
$(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
|
||||||
$(xml) $(qemu_xml) $(lxc_xml) $(admin_xml) $(fig) $(png) $(css) \
|
$(xml) $(qemu_xml) $(lxc_xml) $(fig) $(png) $(css) \
|
||||||
$(logofiles) $(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\
|
$(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\
|
||||||
$(internals_html_in) $(internals_html) $(fonts) \
|
$(internals_html_in) $(internals_html) \
|
||||||
aclperms.htmlinc \
|
sitemap.html.in aclperms.htmlinc \
|
||||||
hvsupport.pl \
|
todo.pl hvsupport.pl todo.cfg-example
|
||||||
$(schema_DATA)
|
|
||||||
|
|
||||||
acl_generated = aclperms.htmlinc
|
acl.html:: $(srcdir)/aclperms.htmlinc
|
||||||
|
|
||||||
$(srcdir)/aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \
|
$(srcdir)/aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \
|
||||||
$(srcdir)/genaclperms.pl Makefile.am
|
$(srcdir)/genaclperms.pl Makefile.am
|
||||||
@@ -197,107 +157,110 @@ MAINTAINERCLEANFILES = \
|
|||||||
$(addprefix $(srcdir)/,$(dot_php)) \
|
$(addprefix $(srcdir)/,$(dot_php)) \
|
||||||
$(srcdir)/hvsupport.html.in $(srcdir)/aclperms.htmlinc
|
$(srcdir)/hvsupport.html.in $(srcdir)/aclperms.htmlinc
|
||||||
|
|
||||||
timestamp="$(shell if test -n "$$SOURCE_DATE_EPOCH"; \
|
|
||||||
then \
|
|
||||||
date -u --date="@$$SOURCE_DATE_EPOCH"; \
|
|
||||||
else \
|
|
||||||
date -u; \
|
|
||||||
fi)"
|
|
||||||
|
|
||||||
all-am: web
|
all-am: web
|
||||||
|
|
||||||
api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
|
api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
|
||||||
qemu_api: $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-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
|
lxc_api: $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
|
||||||
admin_api: $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
|
|
||||||
|
|
||||||
web: $(dot_html) $(internals_html) html/index.html devhelp/index.html \
|
web: $(dot_html) $(internals_html) html/index.html devhelp/index.html \
|
||||||
$(dot_php)
|
$(dot_php)
|
||||||
|
|
||||||
hvsupport.html: $(srcdir)/hvsupport.html.in
|
todo.html.in: todo.pl
|
||||||
|
if [ -f todo.cfg ]; then \
|
||||||
|
echo "Generating $@"; \
|
||||||
|
$(PERL) $< > $@ \
|
||||||
|
|| { rm $@ && exit 1; }; \
|
||||||
|
else \
|
||||||
|
echo "Stubbing $@"; \
|
||||||
|
printf "%s\n" \
|
||||||
|
"<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
|
||||||
|
"<body>" \
|
||||||
|
"<h1>Todo list unavailable: no config file</h1>" \
|
||||||
|
"</body></html>" > $@ ; \
|
||||||
|
fi
|
||||||
|
|
||||||
$(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
|
todo:
|
||||||
$(top_srcdir)/src/libvirt_public.syms \
|
rm -f todo.html.in
|
||||||
$(top_srcdir)/src/libvirt_qemu.syms $(top_srcdir)/src/libvirt_lxc.syms \
|
$(MAKE) todo.html
|
||||||
$(top_srcdir)/src/driver.h
|
|
||||||
$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(top_srcdir)/src > $@ \
|
hvsupport.html:: $(srcdir)/hvsupport.html.in
|
||||||
|
|
||||||
|
$(srcdir)/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
|
||||||
|
$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(srcdir)/../src > $@ \
|
||||||
|| { rm $@ && exit 1; }
|
|| { rm $@ && exit 1; }
|
||||||
|
|
||||||
# xsltproc seems to add the xmlns="" attribute to random output elements:
|
.PHONY: todo
|
||||||
# use sed to strip it out, as leaving it there triggers XML errors during
|
|
||||||
# further transformation steps
|
|
||||||
news.html.in: \
|
|
||||||
$(srcdir)/news.xml \
|
|
||||||
$(srcdir)/news-html.xsl
|
|
||||||
$(AM_V_GEN)$(XSLTPROC) --nonet \
|
|
||||||
$(srcdir)/news-html.xsl \
|
|
||||||
$(srcdir)/news.xml \
|
|
||||||
>$@-tmp \
|
|
||||||
|| { rm -f $@-tmp; exit 1; }; \
|
|
||||||
sed 's/ xmlns=""//g' $@-tmp >$@ \
|
|
||||||
|| { rm -f $@-tmp; exit 1; }; \
|
|
||||||
rm -f $@-tmp
|
|
||||||
EXTRA_DIST += \
|
|
||||||
$(srcdir)/news.xml \
|
|
||||||
$(srcdir)/news.rng \
|
|
||||||
$(srcdir)/news-html.xsl
|
|
||||||
MAINTAINERCLEANFILES += \
|
|
||||||
$(srcdir)/news.html.in
|
|
||||||
|
|
||||||
%.png: %.fig
|
%.png: %.fig
|
||||||
convert -rotate 90 $< $@
|
convert -rotate 90 $< $@
|
||||||
|
|
||||||
%.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
|
internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
|
||||||
$(acl_generated)
|
@if [ -x $(XSLTPROC) ] ; then \
|
||||||
$(AM_V_GEN)name=`echo $@ | sed -e 's/.tmp//'`; \
|
echo "Generating $@"; \
|
||||||
dir=`dirname $@` ; \
|
$(MKDIR_P) internals; \
|
||||||
if test "$$dir" = "."; \
|
name=`echo $@ | sed -e 's/.tmp//'`; \
|
||||||
then \
|
$(XSLTPROC) --stringparam pagename $$name --nonet \
|
||||||
style=site.xsl; \
|
$(top_srcdir)/docs/subsite.xsl $< > $@ \
|
||||||
else \
|
|| { rm $@ && exit 1; }; fi
|
||||||
$(MKDIR_P) $$dir; \
|
|
||||||
style=subsite.xsl; \
|
%.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in
|
||||||
fi; \
|
@if [ -x $(XSLTPROC) ] ; then \
|
||||||
$(XSLTPROC) --stringparam pagename $$name \
|
echo "Generating $@"; \
|
||||||
--stringparam timestamp $(timestamp) --nonet \
|
name=`echo $@ | sed -e 's/.tmp//'`; \
|
||||||
$(top_srcdir)/docs/$$style $< > $@ \
|
$(XSLTPROC) --stringparam pagename $$name --nonet \
|
||||||
|| { rm $@ && exit 1; }
|
$(top_srcdir)/docs/site.xsl $< > $@ \
|
||||||
|
|| { rm $@ && exit 1; }; fi
|
||||||
|
|
||||||
%.html: %.html.tmp
|
%.html: %.html.tmp
|
||||||
$(AM_V_GEN)$(XMLLINT) --nonet --format $< > $(srcdir)/$@ \
|
@if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
|
||||||
|| { rm $(srcdir)/$@ && exit 1; }
|
if $(XMLCATALOG) '$(XML_CATALOG_FILE)' \
|
||||||
|
"-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
|
||||||
|
echo "Validating $@" ; \
|
||||||
|
SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
|
||||||
|
$(XMLLINT) --catalogs --nonet --format --valid $< > $(srcdir)/$@ \
|
||||||
|
|| { rm $(srcdir)/$@ && exit 1; }; \
|
||||||
|
else echo "missing XHTML1 DTD" ; fi ; fi
|
||||||
|
|
||||||
%.php.tmp: %.php.in site.xsl page.xsl
|
%.php.tmp: %.php.in site.xsl page.xsl sitemap.html.in
|
||||||
$(AM_V_GEN)$(XSLTPROC) --stringparam pagename $(@:.tmp=) \
|
@if [ -x $(XSLTPROC) ] ; then \
|
||||||
--stringparam timestamp $(timestamp) --nonet \
|
echo "Generating $@"; \
|
||||||
|
$(XSLTPROC) --stringparam pagename $(@:.tmp=) --nonet \
|
||||||
$(top_srcdir)/docs/site.xsl $< > $@ \
|
$(top_srcdir)/docs/site.xsl $< > $@ \
|
||||||
|| { rm $@ && exit 1; }
|
|| { rm $@ && exit 1; }; fi
|
||||||
|
|
||||||
%.php: %.php.tmp %.php.code.in
|
%.php: %.php.tmp %.php.code.in
|
||||||
$(AM_V_GEN)sed \
|
@if [ -x $(XSLTPROC) ] ; then \
|
||||||
-e '/<span id="php_placeholder"><\/span>/r '"$(srcdir)/$@.code.in" \
|
echo "Scripting $@"; \
|
||||||
|
sed -e '/<span id="php_placeholder"><\/span>/r '"$(srcdir)/$@.code.in" \
|
||||||
-e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
|
-e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
|
||||||
|| { rm $(srcdir)/$@ && exit 1; }
|
|| { rm $(srcdir)/$@ && exit 1; }; fi
|
||||||
|
|
||||||
$(apihtml_generated): html/index.html
|
html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
|
||||||
|
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||||
html/index.html: libvirt-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
|
$(XSLTPROC) --nonet -o $(srcdir)/ \
|
||||||
$(AM_V_GEN)$(XSLTPROC) --nonet -o $(srcdir)/ \
|
|
||||||
--stringparam builddir '$(abs_top_builddir)' \
|
--stringparam builddir '$(abs_top_builddir)' \
|
||||||
--stringparam timestamp $(timestamp) \
|
$(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml ; fi && \
|
||||||
$(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml && \
|
if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
|
||||||
$(XMLLINT) --nonet --noout $(srcdir)/html/*.html
|
if $(XMLCATALOG) '$(XML_CATALOG_FILE)' "-//W3C//DTD XHTML 1.0 Strict//EN" \
|
||||||
|
> /dev/null ; then \
|
||||||
|
SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
|
||||||
|
$(XMLLINT) --catalogs --nonet --valid --noout $(srcdir)/html/*.html ; \
|
||||||
|
else echo "missing XHTML1 DTD" ; fi ; fi
|
||||||
|
|
||||||
$(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
|
$(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
|
||||||
$(AM_V_GEN)$(XSLTPROC) --stringparam timestamp $(timestamp) \
|
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||||
--nonet -o $(srcdir)/devhelp/ \
|
$(XSLTPROC) --nonet -o $(srcdir)/devhelp/ \
|
||||||
$(top_srcdir)/docs/devhelp/devhelp.xsl $(srcdir)/libvirt-api.xml
|
$(top_srcdir)/docs/devhelp/devhelp.xsl $(srcdir)/libvirt-api.xml ; fi
|
||||||
|
|
||||||
|
|
||||||
python_generated_files = \
|
python_generated_files = \
|
||||||
|
$(srcdir)/html/libvirt-libvirt.html \
|
||||||
$(srcdir)/html/libvirt-libvirt-lxc.html \
|
$(srcdir)/html/libvirt-libvirt-lxc.html \
|
||||||
$(srcdir)/html/libvirt-libvirt-qemu.html \
|
$(srcdir)/html/libvirt-libvirt-qemu.html \
|
||||||
$(srcdir)/html/libvirt-libvirt-admin.html \
|
|
||||||
$(srcdir)/html/libvirt-virterror.html \
|
$(srcdir)/html/libvirt-virterror.html \
|
||||||
$(srcdir)/libvirt-api.xml \
|
$(srcdir)/libvirt-api.xml \
|
||||||
$(srcdir)/libvirt-refs.xml \
|
$(srcdir)/libvirt-refs.xml \
|
||||||
@@ -305,8 +268,6 @@ python_generated_files = \
|
|||||||
$(srcdir)/libvirt-lxc-refs.xml \
|
$(srcdir)/libvirt-lxc-refs.xml \
|
||||||
$(srcdir)/libvirt-qemu-api.xml \
|
$(srcdir)/libvirt-qemu-api.xml \
|
||||||
$(srcdir)/libvirt-qemu-refs.xml \
|
$(srcdir)/libvirt-qemu-refs.xml \
|
||||||
$(srcdir)/libvirt-admin-api.xml \
|
|
||||||
$(srcdir)/libvirt-admin-refs.xml \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
APIBUILD=$(srcdir)/apibuild.py
|
APIBUILD=$(srcdir)/apibuild.py
|
||||||
@@ -316,41 +277,17 @@ EXTRA_DIST += $(APIBUILD_STAMP)
|
|||||||
$(python_generated_files): $(APIBUILD_STAMP)
|
$(python_generated_files): $(APIBUILD_STAMP)
|
||||||
|
|
||||||
$(APIBUILD_STAMP): $(srcdir)/apibuild.py \
|
$(APIBUILD_STAMP): $(srcdir)/apibuild.py \
|
||||||
$(top_srcdir)/include/libvirt/libvirt.h \
|
$(srcdir)/../include/libvirt/libvirt.h.in \
|
||||||
$(top_srcdir)/include/libvirt/libvirt-common.h.in \
|
$(srcdir)/../include/libvirt/libvirt-lxc.h \
|
||||||
$(top_srcdir)/include/libvirt/libvirt-domain-snapshot.h \
|
$(srcdir)/../include/libvirt/libvirt-qemu.h \
|
||||||
$(top_srcdir)/include/libvirt/libvirt-domain.h \
|
$(srcdir)/../include/libvirt/virterror.h \
|
||||||
$(top_srcdir)/include/libvirt/libvirt-event.h \
|
$(srcdir)/../src/libvirt.c \
|
||||||
$(top_srcdir)/include/libvirt/libvirt-host.h \
|
$(srcdir)/../src/libvirt-lxc.c \
|
||||||
$(top_srcdir)/include/libvirt/libvirt-interface.h \
|
$(srcdir)/../src/libvirt-qemu.c \
|
||||||
$(top_srcdir)/include/libvirt/libvirt-network.h \
|
$(srcdir)/../src/util/virerror.c \
|
||||||
$(top_srcdir)/include/libvirt/libvirt-nodedev.h \
|
$(srcdir)/../src/util/virevent.c \
|
||||||
$(top_srcdir)/include/libvirt/libvirt-nwfilter.h \
|
$(srcdir)/../src/util/virtypedparam.c
|
||||||
$(top_srcdir)/include/libvirt/libvirt-secret.h \
|
$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(APIBUILD)
|
||||||
$(top_srcdir)/include/libvirt/libvirt-storage.h \
|
|
||||||
$(top_srcdir)/include/libvirt/libvirt-stream.h \
|
|
||||||
$(top_srcdir)/include/libvirt/libvirt-lxc.h \
|
|
||||||
$(top_srcdir)/include/libvirt/libvirt-qemu.h \
|
|
||||||
$(top_srcdir)/include/libvirt/libvirt-admin.h \
|
|
||||||
$(top_srcdir)/include/libvirt/virterror.h \
|
|
||||||
$(top_srcdir)/src/libvirt.c \
|
|
||||||
$(top_srcdir)/src/libvirt-domain-snapshot.c \
|
|
||||||
$(top_srcdir)/src/libvirt-domain.c \
|
|
||||||
$(top_srcdir)/src/libvirt-host.c \
|
|
||||||
$(top_srcdir)/src/libvirt-interface.c \
|
|
||||||
$(top_srcdir)/src/libvirt-network.c \
|
|
||||||
$(top_srcdir)/src/libvirt-nodedev.c \
|
|
||||||
$(top_srcdir)/src/libvirt-nwfilter.c \
|
|
||||||
$(top_srcdir)/src/libvirt-secret.c \
|
|
||||||
$(top_srcdir)/src/libvirt-storage.c \
|
|
||||||
$(top_srcdir)/src/libvirt-stream.c \
|
|
||||||
$(top_srcdir)/src/libvirt-lxc.c \
|
|
||||||
$(top_srcdir)/src/libvirt-qemu.c \
|
|
||||||
$(top_srcdir)/src/libvirt-admin.c \
|
|
||||||
$(top_srcdir)/src/util/virerror.c \
|
|
||||||
$(top_srcdir)/src/util/virevent.c \
|
|
||||||
$(top_srcdir)/src/util/virtypedparam.c
|
|
||||||
$(AM_V_GEN)srcdir=$(srcdir) builddir=$(builddir) $(PYTHON) $(APIBUILD)
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
|
||||||
@@ -358,24 +295,21 @@ check-local: all
|
|||||||
dist-local: all
|
dist-local: all
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
rm -f *~ *.bak *.hierarchy *.signals *-unused.txt *.html html/*.html
|
rm -f *~ *.bak *.hierarchy *.signals *-unused.txt *.html
|
||||||
|
|
||||||
maintainer-clean-local: clean-local
|
maintainer-clean-local: clean-local
|
||||||
rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
|
rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml \
|
||||||
|
todo.html.in
|
||||||
rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
|
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 $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
|
||||||
rm -rf $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
|
|
||||||
rm -rf $(APIBUILD_STAMP)
|
rm -rf $(APIBUILD_STAMP)
|
||||||
|
|
||||||
rebuild: api qemu_api lxc_api admin_api all
|
rebuild: api qemu_api lxc_api all
|
||||||
|
|
||||||
install-data-local:
|
install-data-local:
|
||||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||||
for f in $(css) $(dot_html) $(gif) $(png); do \
|
for f in $(css) $(dot_html) $(gif) $(png); do \
|
||||||
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR); done
|
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR); done
|
||||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/logos
|
|
||||||
for f in $(logofiles); do \
|
|
||||||
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/logos; done
|
|
||||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
|
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
|
||||||
for h in $(apihtml); do \
|
for h in $(apihtml); do \
|
||||||
$(INSTALL) -m 0644 $(srcdir)/$$h $(DESTDIR)$(HTML_DIR)/html; done
|
$(INSTALL) -m 0644 $(srcdir)/$$h $(DESTDIR)$(HTML_DIR)/html; done
|
||||||
@@ -388,23 +322,11 @@ install-data-local:
|
|||||||
for file in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
for file in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
||||||
$(INSTALL) -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
|
$(INSTALL) -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
|
||||||
done
|
done
|
||||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/fonts
|
$(INSTALL_DATA) $(srcdir)/libvirtLogo.png $(DESTDIR)$(pkgdatadir)
|
||||||
for f in $(fonts); do \
|
|
||||||
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/fonts; \
|
|
||||||
done
|
|
||||||
|
|
||||||
uninstall-local:
|
uninstall-local:
|
||||||
for f in $(css) $(dot_html) $(gif) $(png) $(fonts); do \
|
for h in $(apihtml); do rm $(DESTDIR)$(HTML_DIR)/$$h; done
|
||||||
rm -f $(DESTDIR)$(HTML_DIR)/$$f; \
|
for p in $(apipng); do rm $(DESTDIR)$(HTML_DIR)/$$p; done
|
||||||
done
|
|
||||||
for f in $(logofiles); do \
|
|
||||||
rm -f $(DESTDIR)$(HTML_DIR)/$$f; \
|
|
||||||
done
|
|
||||||
for h in $(apihtml); do rm -f $(DESTDIR)$(HTML_DIR)/$$h; done
|
|
||||||
for p in $(apipng); do rm -f $(DESTDIR)$(HTML_DIR)/$$p; done
|
|
||||||
for f in $(internals_html); do \
|
|
||||||
rm -f $(DESTDIR)$(HTML_DIR)/$$f; \
|
|
||||||
done
|
|
||||||
for f in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
for f in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
||||||
rm -f $(DESTDIR)$(DEVHELP_DIR)/$$(basename $$f); \
|
rm $(DESTDIR)$(DEVHELP_DIR)/$$(basename $$f); \
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Client access control</h1>
|
<h1>Client access control</h1>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="intro">Access control introduction</a></h2>
|
<h2><a name="intro">Access control introduction</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In a default configuration, the libvirtd daemon has three levels
|
In a default configuration, the libvirtd daemon has three levels
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<code>getattr</code> permission.
|
<code>getattr</code> permission.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="drivers">Access control drivers</a></h2>
|
<h2><a name="drivers">Access control drivers</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The access control framework is designed as a pluggable
|
The access control framework is designed as a pluggable
|
||||||
@@ -83,14 +83,14 @@
|
|||||||
the libvirtd daemon be restarted.
|
the libvirtd daemon be restarted.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="perms">Objects and permissions</a></h2>
|
<h2><a name="perms">Objects and permissions</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Libvirt applies access control to all the main object
|
Libvirt applies access control to all the main object
|
||||||
types in its API. Each object type, in turn, has a set
|
types in its API. Each object type, in turn, has a set
|
||||||
of permissions defined. To determine what permissions
|
of permissions defined. To determine what permissions
|
||||||
are checked for specific API call, consult the
|
are checked for specific API call, consult the
|
||||||
<a href="html/index.html">API reference manual</a>
|
<a href="html/libvirt-libvirt.html">API reference manual</a>
|
||||||
documentation for the API in question.
|
documentation for the API in question.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Polkit access control</h1>
|
<h1>Polkit access control</h1>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="intro">Introduction</a></h2>
|
<h2><a name="intro">Introduction</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
A default install of libvirt will typically use
|
A default install of libvirt will typically use
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
object.
|
object.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="perms">Permission names</a></h2>
|
<h2><a name="perms">Permission names</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt <a href="acl.html#perms">object names and permission names</a>
|
The libvirt <a href="acl.html#perms">object names and permission names</a>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
permissions default to deny access.
|
permissions default to deny access.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="attrs">Object identity attributes</a></h2>
|
<h2><a name="attrs">Object identity attributes</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
To allow polkit authorization rules to be written to match
|
To allow polkit authorization rules to be written to match
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
of object being checked
|
of object being checked
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="object_connect">virConnectPtr</a></h3>
|
<h3><a name="object_connect">virConnectPtr</a></h3>
|
||||||
<table class="acl">
|
<table class="acl">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3><a id="object_domain">virDomainPtr</a></h3>
|
<h3><a name="object_domain">virDomainPtr</a></h3>
|
||||||
<table class="acl">
|
<table class="acl">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3><a id="object_interface">virInterfacePtr</a></h3>
|
<h3><a name="object_interface">virInterfacePtr</a></h3>
|
||||||
<table class="acl">
|
<table class="acl">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -121,13 +121,13 @@
|
|||||||
<td>Name of the network interface, unique to the local host</td>
|
<td>Name of the network interface, unique to the local host</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>interface_macaddr</td>
|
<td>interface_mac</td>
|
||||||
<td>MAC address of the network interface, not unique</td>
|
<td>MAC address of the network interface, not unique</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3><a id="object_network">virNetworkPtr</a></h3>
|
<h3><a name="object_network">virNetworkPtr</a></h3>
|
||||||
<table class="acl">
|
<table class="acl">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3><a id="object_node_device">virNodeDevicePtr</a></h3>
|
<h3><a name="object_node_device">virNodeDevicePtr</a></h3>
|
||||||
<table class="acl">
|
<table class="acl">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3><a id="object_nwfilter">virNWFilterPtr</a></h3>
|
<h3><a name="object_nwfilter">virNWFilterPtr</a></h3>
|
||||||
<table class="acl">
|
<table class="acl">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3><a id="object_secret">virSecretPtr</a></h3>
|
<h3><a name="object_secret">virSecretPtr</a></h3>
|
||||||
<table class="acl">
|
<table class="acl">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -224,14 +224,10 @@
|
|||||||
<td>secret_usage_target</td>
|
<td>secret_usage_target</td>
|
||||||
<td>Name of the associated iSCSI target, if any</td>
|
<td>Name of the associated iSCSI target, if any</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>secret_usage_name</td>
|
|
||||||
<td>Name of the associated TLS secret, if any</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3><a id="object_storage_pool">virStoragePoolPtr</a></h3>
|
<h3><a name="object_storage_pool">virStoragePoolPtr</a></h3>
|
||||||
<table class="acl">
|
<table class="acl">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -255,7 +251,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3><a id="object_storage_vol">virStorageVolPtr</a></h3>
|
<h3><a name="object_storage_vol">virStorageVolPtr</a></h3>
|
||||||
<table class="acl">
|
<table class="acl">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -288,7 +284,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="user">User identity attributes</a></h2>
|
<h2><a name="user">User identity attributes</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
At this point in time, the only attribute provided by
|
At this point in time, the only attribute provided by
|
||||||
@@ -307,7 +303,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="checks">Writing access control policies</a></h2>
|
<h2><a name="checks">Writing access control policies</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If using versions of polkit prior to 0.106 then it is only
|
If using versions of polkit prior to 0.106 then it is only
|
||||||
@@ -352,13 +348,7 @@ polkit.addRule(function(action, subject) {
|
|||||||
<code>lookup</code> method.
|
<code>lookup</code> method.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<h3><a name="exconnect">Example: restricting ability to connect to drivers</a></h3>
|
||||||
See
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt.git;a=tree;f=examples/polkit;hb=HEAD">source code</a>
|
|
||||||
for a more complex example.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3><a id="exconnect">Example: restricting ability to connect to drivers</a></h3>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Consider a local user <code>berrange</code>
|
Consider a local user <code>berrange</code>
|
||||||
@@ -386,7 +376,7 @@ polkit.addRule(function(action, subject) {
|
|||||||
});
|
});
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="exdomain">Example: restricting access to a single domain</a></h3>
|
<h3><a name="exdomain">Example: restricting access to a single domain</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Consider a local user <code>berrange</code>
|
Consider a local user <code>berrange</code>
|
||||||
@@ -396,7 +386,7 @@ polkit.addRule(function(action, subject) {
|
|||||||
To achieve this we need to write a rule which checks
|
To achieve this we need to write a rule which checks
|
||||||
whether the <code>connect_driver</code> attribute
|
whether the <code>connect_driver</code> attribute
|
||||||
is <code>LXC</code> and the <code>domain_name</code>
|
is <code>LXC</code> and the <code>domain_name</code>
|
||||||
attribute is <code>demo</code>, and match on an action
|
attribute is <code>demo</code>, and match on a action
|
||||||
name of <code>org.libvirt.api.domain.getattr</code>. Using
|
name of <code>org.libvirt.api.domain.getattr</code>. Using
|
||||||
the javascript rules format, this ends up written as
|
the javascript rules format, this ends up written as
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
242
docs/api.html.in
242
docs/api.html.in
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>The libvirt API concepts</h1>
|
<h1>The libvirt API concepts</h1>
|
||||||
@@ -9,14 +9,14 @@
|
|||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="Objects">Objects Exposed</a></h2>
|
<h2><a name="Objects">Objects Exposed</a></h2>
|
||||||
<p> As defined in the <a href="goals.html">goals section</a>, the libvirt
|
<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
|
API is designed to expose all the resources needed to manage the
|
||||||
virtualization support of recent operating systems. The first object
|
virtualization support of recent operating systems. The first object
|
||||||
manipulated through the API is the <code>virConnectPtr</code>, which
|
manipulated through the API is the <code>virConnectPtr</code>, which
|
||||||
represents the connection to a hypervisor. Any application using libvirt
|
represents the connection to a hypervisor. Any application using libvirt
|
||||||
is likely to start using the
|
is likely to start using the
|
||||||
API by calling one of <a href="html/libvirt-libvirt-host.html#virConnectOpen"
|
API by calling one of <a href="html/libvirt-libvirt.html#virConnectOpen"
|
||||||
>the virConnectOpen functions</a>. You will note that those functions take
|
>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>
|
a name argument which is actually a <a href="uri.html">connection URI</a>
|
||||||
to select the right hypervisor to open.
|
to select the right hypervisor to open.
|
||||||
@@ -26,10 +26,7 @@
|
|||||||
name will default to a preselected hypervisor, but it's probably not a
|
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
|
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>
|
URI</a> page for a full descriptions of the values allowed.</p>
|
||||||
<p> OnDevice the application obtains a
|
<p> Once the application obtains a <code class='docref'>virConnectPtr</code>
|
||||||
<a href="/html/libvirt-libvirt-host.html#virConnectPtr">
|
|
||||||
<code>virConnectPtr</code>
|
|
||||||
</a>
|
|
||||||
connection to the hypervisor it can then use it to manage the hypervisor's
|
connection to the hypervisor it can then use it to manage the hypervisor's
|
||||||
available domains and related virtualization
|
available domains and related virtualization
|
||||||
resources, such as storage and networking. All those are
|
resources, such as storage and networking. All those are
|
||||||
@@ -41,61 +38,33 @@
|
|||||||
</p>
|
</p>
|
||||||
<p> The figure above shows the five main objects exported by the API:</p>
|
<p> The figure above shows the five main objects exported by the API:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><code class='docref'>virConnectPtr</code>
|
||||||
<a href="html/libvirt-libvirt-host.html#virConnectPtr">
|
|
||||||
<code>virConnectPtr</code>
|
|
||||||
</a>
|
|
||||||
<p>Represents the connection to a hypervisor. Use one of the
|
<p>Represents the connection to a hypervisor. Use one of the
|
||||||
<a href="html/libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a>
|
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a>
|
||||||
functions to obtain connection to the hypervisor which is then used
|
functions to obtain connection to the hypervisor which is then used
|
||||||
as a parameter to other connection API's.</p></li>
|
as a parameter to other connection API's.</p></li>
|
||||||
<li>
|
<li><code class='docref'>virDomainPtr</code>
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainPtr">
|
|
||||||
<code>virDomainPtr</code>
|
|
||||||
</a>
|
|
||||||
<p>Represents one domain either active or defined (i.e. existing as
|
<p>Represents one domain either active or defined (i.e. existing as
|
||||||
permanent config file and storage but not currently running on that
|
permanent config file and storage but not currently running on that
|
||||||
node). The function
|
node). The function <code class='docref'>virConnectListAllDomains</code>
|
||||||
<a href="html/libvirt-libvirt-domain.html#virConnectListAllDomains">
|
|
||||||
<code>virConnectListAllDomains</code>
|
|
||||||
</a>
|
|
||||||
lists all the domains for the hypervisor.</p></li>
|
lists all the domains for the hypervisor.</p></li>
|
||||||
<li>
|
<li><code class='docref'>virNetworkPtr</code>
|
||||||
<a href="html/libvirt-libvirt-network.html#virNetworkPtr">
|
|
||||||
<code>virNetworkPtr</code>
|
|
||||||
</a>
|
|
||||||
<p>Represents one network either active or defined (i.e. existing
|
<p>Represents one network either active or defined (i.e. existing
|
||||||
as permanent config file and storage but not currently activated).
|
as permanent config file and storage but not currently activated).
|
||||||
The function
|
The function <code class='docref'>virConnectListAllNetworks</code>
|
||||||
<a href="html/libvirt-libvirt-network.html#virConnectListAllNetworks">
|
|
||||||
<code>virConnectListAllNetworks</code>
|
|
||||||
</a>
|
|
||||||
lists all the virtualization networks for the hypervisor.</p></li>
|
lists all the virtualization networks for the hypervisor.</p></li>
|
||||||
<li>
|
<li><code class='docref'>virStorageVolPtr</code>
|
||||||
<a href="html/libvirt-libvirt-storage.html#virStorageVolPtr">
|
|
||||||
<code>virStorageVolPtr</code>
|
|
||||||
</a>
|
|
||||||
<p>Represents one storage volume generally used
|
<p>Represents one storage volume generally used
|
||||||
as a block device available to one of the domains. The function
|
as a block device available to one of the domains. The function
|
||||||
<a href="html/libvirt-libvirt-storage.html#virStorageVolLookupByPath">
|
<code class="docref">virStorageVolLookupByPath</code> finds
|
||||||
<code>virStorageVolLookupByPath</code>
|
the storage volume object based on its path on the node.</p></li>
|
||||||
</a>
|
<li><code class='docref'>virStoragePoolPtr</code>
|
||||||
finds the storage volume object based on its path on the node.</p></li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-storage.html#virStoragePoolPtr">
|
|
||||||
<code>virStoragePoolPtr</code>
|
|
||||||
</a>
|
|
||||||
<p>Represents a storage pool, which is a logical area
|
<p>Represents a storage pool, which is a logical area
|
||||||
used to allocate and store storage volumes. The function
|
used to allocate and store storage volumes. The function
|
||||||
<a href="html/libvirt-libvirt-storage.html#virConnectListAllStoragePools">
|
<code class='docref'>virConnectListAllStoragePools</code> lists
|
||||||
<code>virConnectListAllStoragePools</code>
|
all of the virtualization storage pools on the hypervisor. The function
|
||||||
</a>
|
<code class="docref">virStoragePoolLookupByVolume</code> finds
|
||||||
lists all of the virtualization storage pools on the hypervisor.
|
the storage pool containing a given storage volume.</p></li>
|
||||||
The function
|
|
||||||
<a href="html/libvirt-libvirt-storage.html#virStoragePoolLookupByVolume">
|
|
||||||
<code>virStoragePoolLookupByVolume</code>
|
|
||||||
</a>
|
|
||||||
finds the storage pool containing a given storage volume.</p></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<p> Most objects manipulated by the library can also be represented using
|
<p> Most objects manipulated by the library can also be represented using
|
||||||
XML descriptions. This is used primarily to create those object, but is
|
XML descriptions. This is used primarily to create those object, but is
|
||||||
@@ -121,7 +90,7 @@
|
|||||||
set of nodes.</p></li>
|
set of nodes.</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a id="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
|
<p> The naming of the functions present in the library is usually
|
||||||
composed by a prefix describing the object associated to the function
|
composed by a prefix describing the object associated to the function
|
||||||
and a verb describing the action on that object.</p>
|
and a verb describing the action on that object.</p>
|
||||||
@@ -132,114 +101,42 @@
|
|||||||
<p>Used to perform lookups on objects by some type of identifier,
|
<p>Used to perform lookups on objects by some type of identifier,
|
||||||
such as:</p>
|
such as:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><code class='docref'>virDomainLookupByID</code></li>
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByID">
|
<li><code class='docref'>virDomainLookupByName</code></li>
|
||||||
<code>virDomainLookupByID</code>
|
<li><code class='docref'>virDomainLookupByUUID</code></li>
|
||||||
</a>
|
<li><code class='docref'>virDomainLookupByUUIDString</code></li>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByName">
|
|
||||||
<code>virDomainLookupByName</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByUUID">
|
|
||||||
<code>virDomainLookupByUUID</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByUUIDString">
|
|
||||||
<code>virDomainLookupByUUIDString</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><b>Enumeration</b> [virConnectList..., virConnectNumOf...]
|
<li><b>Enumeration</b> [virConnectList..., virConnectNumOf...]
|
||||||
<p>Used to enumerate a set of object available to a given
|
<p>Used to enumerate a set of object available to an given
|
||||||
hypervisor connection such as:</p>
|
hypervisor connection such as:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><code class='docref'>virConnectListDomains</code></li>
|
||||||
<a href="html/libvirt-libvirt-domain.html#virConnectListDomains">
|
<li><code class='docref'>virConnectNumOfDomains</code></li>
|
||||||
<code>virConnectListDomains</code>
|
<li><code class='docref'>virConnectListNetworks</code></li>
|
||||||
</a>
|
<li><code class='docref'>virConnectListStoragePools</code></li>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-domain.html#virConnectNumOfDomains">
|
|
||||||
<code>virConnectNumOfDomains</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-network.html#virConnectListNetworks">
|
|
||||||
<code>virConnectListNetworks</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-storage.html#virConnectListStoragePools">
|
|
||||||
<code>virConnectListStoragePools</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><b>Description</b> [...GetInfo]
|
<li><b>Description</b> [...GetInfo]
|
||||||
<p>Generic accessor providing a set of generic information about an
|
<p>Generic accessor providing a set of generic information about an
|
||||||
object, such as: </p>
|
object, such as: </p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><code class='docref'>virNodeGetInfo</code></li>
|
||||||
<a href="html/libvirt-libvirt-host.html#virNodeGetInfo">
|
<li><code class='docref'>virDomainGetInfo</code></li>
|
||||||
<code>virNodeGetInfo</code>
|
<li><code class='docref'>virStoragePoolGetInfo</code></li>
|
||||||
</a>
|
<li><code class='docref'>virStorageVolGetInfo</code></li>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainGetInfo">
|
|
||||||
<code>virDomainGetInfo</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-storage.html#virStoragePoolGetInfo">
|
|
||||||
<code>virStoragePoolGetInfo</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-storage.html#virStorageVolGetInfo">
|
|
||||||
<code>virStorageVolGetInfo</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><b>Accessors</b> [...Get..., ...Set...]
|
<li><b>Accessors</b> [...Get..., ...Set...]
|
||||||
<p>Specific accessors used to query or modify data for the given object,
|
<p>Specific accessors used to query or modify data for the given object,
|
||||||
such as: </p>
|
such as: </p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><code class='docref'>virConnectGetType</code></li>
|
||||||
<a href="html/libvirt-libvirt-host.html#virConnectGetType">
|
<li><code class='docref'>virDomainGetMaxMemory</code></li>
|
||||||
<code>virConnectGetType</code>
|
<li><code class='docref'>virDomainSetMemory</code></li>
|
||||||
</a>
|
<li><code class='docref'>virDomainGetVcpus</code></li>
|
||||||
</li>
|
<li><code class='docref'>virStoragePoolSetAutostart</code></li>
|
||||||
<li>
|
<li><code class='docref'>virNetworkGetBridgeName</code></li>
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainGetMaxMemory">
|
|
||||||
<code>virDomainGetMaxMemory</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainSetMemory">
|
|
||||||
<code>virDomainSetMemory</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainGetVcpus">
|
|
||||||
<code>virDomainGetVcpus</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-storage.html#virStoragePoolSetAutostart">
|
|
||||||
<code>virStoragePoolSetAutostart</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-network.html#virNetworkGetBridgeName">
|
|
||||||
<code>virNetworkGetBridgeName</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><b>Creation</b> [...Create, ...CreateXML]
|
<li><b>Creation</b> [...Create, ...CreateXML]
|
||||||
@@ -247,65 +144,29 @@
|
|||||||
the object based on an XML description, while the ...Create APIs will
|
the object based on an XML description, while the ...Create APIs will
|
||||||
create the object based on existing object pointer, such as: </p>
|
create the object based on existing object pointer, such as: </p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><code class='docref'>virDomainCreate</code></li>
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainCreate">
|
<li><code class='docref'>virDomainCreateXML</code></li>
|
||||||
<code>virDomainCreate</code>
|
<li><code class='docref'>virNetworkCreate</code></li>
|
||||||
</a>
|
<li><code class='docref'>virNetworkCreateXML</code></li>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainCreateXML">
|
|
||||||
<code>virDomainCreateXML</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-network.html#virNetworkCreate">
|
|
||||||
<code>virNetworkCreate</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-network.html#virNetworkCreateXML">
|
|
||||||
<code>virNetworkCreateXML</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><b>Destruction</b> [...Destroy]
|
<li><b>Destruction</b> [...Destroy]
|
||||||
<p>Used to shutdown or deactivate and destroy objects, such as: </p>
|
<p>Used to shutdown or deactivate and destroy objects, such as: </p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><code class='docref'>virDomainDestroy</code></li>
|
||||||
<a href="html/libvirt-libvirt-domain.html#virDomainDestroy">
|
<li><code class='docref'>virNetworkDestroy</code></li>
|
||||||
<code>virDomainDestroy</code>
|
<li><code class='docref'>virStoragePoolDestroy</code></li>
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-network.html#virNetworkDestroy">
|
|
||||||
<code>virNetworkDestroy</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="html/libvirt-libvirt-storage.html#virStoragePoolDestroy">
|
|
||||||
<code>virStoragePoolDestroy</code>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Note: functions returning vir*Ptr (like the virDomainLookup functions)
|
|
||||||
allocate memory which needs to be freed by the caller by the corresponding
|
|
||||||
vir*Free function (e.g. virDomainFree for a virDomainPtr object).
|
|
||||||
</p>
|
|
||||||
<p> For more in-depth details of the storage related APIs see
|
<p> For more in-depth details of the storage related APIs see
|
||||||
<a href="storage.html">the storage management page</a>.
|
<a href="storage.html">the storage management page</a>.
|
||||||
</p>
|
</p>
|
||||||
<h2><a id="Drivers">The libvirt Drivers</a></h2>
|
<h2><a name="Drivers">The libvirt Drivers</a></h2>
|
||||||
<p>Drivers are the basic building block for libvirt functionality
|
<p>Drivers are the basic building block for libvirt functionality
|
||||||
to support the capability to handle specific hypervisor driver calls.
|
to support the capability to handle specific hypervisor driver calls.
|
||||||
Drivers are discovered and registered during connection processing as
|
Drivers are discovered and registered during connection processing as
|
||||||
part of the
|
part of the <code class='docref'>virInitialize</code> API. Each driver
|
||||||
<a href="html/libvirt-libvirt-host.html#virInitialize">
|
|
||||||
<code>virInitialize</code>
|
|
||||||
</a>
|
|
||||||
API. Each driver
|
|
||||||
has a registration API which loads up the driver specific function
|
has a registration API which loads up the driver specific function
|
||||||
references for the libvirt APIs to call. The following is a simplistic
|
references for the libvirt APIs to call. The following is a simplistic
|
||||||
view of the hypervisor driver mechanism. Consider the stacked list of
|
view of the hypervisor driver mechanism. Consider the stacked list of
|
||||||
@@ -325,19 +186,16 @@
|
|||||||
the various functions and support found in each driver by the version
|
the various functions and support found in each driver by the version
|
||||||
support was added into libvirt.
|
support was added into libvirt.
|
||||||
</p>
|
</p>
|
||||||
<h2><a id="Remote">Daemon and Remote Access</a></h2>
|
<h2><a name="Remote">Daemon and Remote Access</a></h2>
|
||||||
<p>Access to libvirt drivers is primarily handled by the libvirtd
|
<p>Access to libvirt drivers is primarily handled by the libvirtd
|
||||||
daemon through the <a href="remote.html">remote</a> driver via an
|
daemon through the <a href="remote.html">remote</a> driver via an
|
||||||
<a href="internals/rpc.html">RPC</a>. Some hypervisors do support
|
<a href="internals/rpc.html">RPC</a>. Some hypervisors do support
|
||||||
client-side connections and responses, such as Test, OpenVZ, VMware,
|
client-side connections and responses, such as Test, OpenVZ, VMware,
|
||||||
Power VM (phyp), VirtualBox (vbox), ESX, Hyper-V, Xen, and Virtuozzo.
|
Power VM (phyp), VirtualBox (vbox), ESX, Hyper-V, Xen, and Parallels.
|
||||||
The libvirtd daemon service is started on the host at system boot
|
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
|
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
|
user, such as root. The libvirtd daemon uses the same libvirt API
|
||||||
<a href="html/libvirt-libvirt-host.html#virInitialize">
|
<code class='docref'>virInitialize</code> sequence as applications
|
||||||
<code>virInitialize</code>
|
|
||||||
</a>
|
|
||||||
sequence as applications
|
|
||||||
for client-side driver registrations, but then extends the registered
|
for client-side driver registrations, but then extends the registered
|
||||||
driver list to encompass all known drivers supported for all driver
|
driver list to encompass all known drivers supported for all driver
|
||||||
types supported on the host. </p>
|
types supported on the host. </p>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Implementing a new API in Libvirt</h1>
|
<h1>Implementing a new API in Libvirt</h1>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="https://libvirt.org/downloads.html">https://libvirt.org/downloads.html</a>
|
<a href="http://libvirt.org/downloads.html">http://libvirt.org/downloads.html</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -273,7 +273,7 @@
|
|||||||
<li>unlocks the remote driver.</li>
|
<li>unlocks the remote driver.</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<h3><a id="serverdispatch">Implement the server side dispatcher</a></h3>
|
<h3><a name="serverdispatch">Implement the server side dispatcher</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Implementing the server side of the remote function call is simply a
|
Implementing the server side of the remote function call is simply a
|
||||||
@@ -300,7 +300,7 @@
|
|||||||
|
|
||||||
<p class="example">See <a href="api_extension/0005-implement-the-remote-protocol.patch">0005-implement-the-remote-protocol.patch</a></p>
|
<p class="example">See <a href="api_extension/0005-implement-the-remote-protocol.patch">0005-implement-the-remote-protocol.patch</a></p>
|
||||||
|
|
||||||
<h2><a id="internaluseapi">Use the new API internally</a></h2>
|
<h2><a name="internaluseapi">Use the new API internally</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Sometimes, a new API serves as a superset of existing API, by
|
Sometimes, a new API serves as a superset of existing API, by
|
||||||
@@ -314,7 +314,7 @@
|
|||||||
|
|
||||||
<p class="example">See <a href="api_extension/0006-make-old-API-trivially-wrap-to-new-API.patch">0006-make-old-API-trivially-wrap-to-new-API.patch</a></p>
|
<p class="example">See <a href="api_extension/0006-make-old-API-trivially-wrap-to-new-API.patch">0006-make-old-API-trivially-wrap-to-new-API.patch</a></p>
|
||||||
|
|
||||||
<h2><a id="virshuseapi">Expose the new API in virsh</a></h2>
|
<h2><a name="virshuseapi">Expose the new API in virsh</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
All new API should be manageable from the virsh command line
|
All new API should be manageable from the virsh command line
|
||||||
@@ -345,7 +345,7 @@
|
|||||||
|
|
||||||
<p class="example">See <a href="api_extension/0007-add-virsh-support.patch">0007-add-virsh-support.patch</a></p>
|
<p class="example">See <a href="api_extension/0007-add-virsh-support.patch">0007-add-virsh-support.patch</a></p>
|
||||||
|
|
||||||
<h2><a id="driverimpl">Implement the driver methods</a></h2>
|
<h2><a name="driverimpl">Implement the driver methods</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
So, after all that, we get to the fun part. All functionality in
|
So, after all that, we get to the fun part. All functionality in
|
||||||
@@ -356,7 +356,7 @@
|
|||||||
adding.
|
adding.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="commonimpl">Implement common handling</a></h3>
|
<h3><a name="commonimpl">Implement common handling</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If the new API is applicable to more than one driver, it may
|
If the new API is applicable to more than one driver, it may
|
||||||
@@ -373,7 +373,7 @@
|
|||||||
|
|
||||||
<p class="example">See <a href="api_extension/0008-support-new-xml.patch">0008-support-new-xml.patch</a></p>
|
<p class="example">See <a href="api_extension/0008-support-new-xml.patch">0008-support-new-xml.patch</a></p>
|
||||||
|
|
||||||
<h3><a id="drivercode">Implement driver handling</a></h3>
|
<h3><a name="drivercode">Implement driver handling</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The remaining patches should only touch one driver at a time.
|
The remaining patches should only touch one driver at a time.
|
||||||
|
|||||||
808
docs/apibuild.py
808
docs/apibuild.py
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Applications using libvirt</h1>
|
<h1>Applications using <strong>libvirt</strong></h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
This page provides an illustration of the wide variety of
|
This page provides an illustration of the wide variety of
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="add">Add an application</a></h2>
|
<h2><a name="add">Add an application</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
To add an application not listed on this page, send a message
|
To add an application not listed on this page, send a message
|
||||||
@@ -19,18 +19,15 @@
|
|||||||
be added here, or simply send a patch against the documentation
|
be added here, or simply send a patch against the documentation
|
||||||
in the libvirt.git docs subdirectory.
|
in the libvirt.git docs subdirectory.
|
||||||
If your application uses libvirt as its API,
|
If your application uses libvirt as its API,
|
||||||
the following graphics are available for your website to advertise
|
the following graphic is available for your website to advertise
|
||||||
support for libvirt:
|
support for libvirt:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="image">
|
<p class="image">
|
||||||
<img src="logos/logo-square-powered-96.png" alt="libvirt powered"/>
|
<img src="madeWith.png" alt="Made with libvirt"/>
|
||||||
<img src="logos/logo-square-powered-128.png" alt="libvirt powered"/>
|
|
||||||
<img src="logos/logo-square-powered-192.png" alt="libvirt powered"/>
|
|
||||||
<img src="logos/logo-square-powered-256.png" alt="libvirt powered"/>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="clientserver">Client/Server applications</a></h2>
|
<h2><a name="clientserver">Client/Server applications</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="http://archipelproject.org">Archipel</a></dt>
|
<dt><a href="http://archipelproject.org">Archipel</a></dt>
|
||||||
@@ -50,7 +47,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="command">Command line tools</a></h2>
|
<h2><a name="command">Command line tools</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="http://libguestfs.org">guestfish</a></dt>
|
<dt><a href="http://libguestfs.org">guestfish</a></dt>
|
||||||
@@ -65,21 +62,21 @@
|
|||||||
management tasks on all libvirt managed domains, networks and
|
management tasks on all libvirt managed domains, networks and
|
||||||
storage. This is part of the libvirt core distribution.
|
storage. This is part of the libvirt core distribution.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://virt-manager.org/">virt-clone</a></dt>
|
<dt><a href="http://virt-manager.org/">virt-clone</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Allows the disk image(s) and configuration for an existing
|
Allows the disk image(s) and configuration for an existing
|
||||||
virtual machine to be cloned to form a new virtual machine.
|
virtual machine to be cloned to form a new virtual machine.
|
||||||
It automates copying of data across to new disk images, and
|
It automates copying of data across to new disk images, and
|
||||||
updates the UUID, MAC address, and name in the configuration.
|
updates the UUID, MAC address, and name in the configuration.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://people.redhat.com/rjones/virt-df/">virt-df</a></dt>
|
<dt><a href="http://et.redhat.com/~rjones/virt-df/">virt-df</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Examine the utilization of each filesystem in a virtual machine
|
Examine the utilization of each filesystem in a virtual machine
|
||||||
from the comfort of the host machine. This tool peeks into the
|
from the comfort of the host machine. This tool peeks into the
|
||||||
guest disks and determines how much space is used. It can cope
|
guest disks and determines how much space is used. It can cope
|
||||||
with common Linux filesystems and LVM volumes.
|
with common Linux filesystems and LVM volumes.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://virt-manager.org/">virt-image</a></dt>
|
<dt><a href="http://virt-manager.org/">virt-image</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Provides a way to deploy virtual appliances. It defines a
|
Provides a way to deploy virtual appliances. It defines a
|
||||||
simplified portable XML format describing the pre-requisites
|
simplified portable XML format describing the pre-requisites
|
||||||
@@ -87,41 +84,35 @@
|
|||||||
into the domain XML format for execution under any libvirt
|
into the domain XML format for execution under any libvirt
|
||||||
hypervisor meeting the pre-requisites.
|
hypervisor meeting the pre-requisites.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://virt-manager.org/">virt-install</a></dt>
|
<dt><a href="http://virt-manager.org/">virt-install</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Provides a way to provision new virtual machines from a
|
Provides a way to provision new virtual machines from a
|
||||||
OS distribution install tree. It supports provisioning from
|
OS distribution install tree. It supports provisioning from
|
||||||
local CD images, and the network over NFS, HTTP and FTP.
|
local CD images, and the network over NFS, HTTP and FTP.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://people.redhat.com/rjones/virt-top/">virt-top</a></dt>
|
<dt><a href="http://et.redhat.com/~rjones/virt-top/">virt-top</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Watch the CPU, memory, network and disk utilization of all
|
Watch the CPU, memory, network and disk utilization of all
|
||||||
virtual machines running on a host.
|
virtual machines running on a host.
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a href="https://people.redhat.com/~rjones/virt-what/">virt-what</a>
|
<a href="http://people.redhat.com/~rjones/virt-what/">virt-what</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
virt-what is a shell script for detecting if the program is running
|
virt-what is a shell script for detecting if the program is running
|
||||||
in a virtual machine. It prints out a list of facts about the
|
in a virtual machine. It prints out a list of facts about the
|
||||||
virtual machine, derived from heuristics.
|
virtual machine, derived from heuristics.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://sourceware.org/systemtap/">stap</a></dt>
|
<dt><a href="http://sourceware.org/systemtap/">stap</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
SystemTap is a tool used to gather rich information about a running
|
SystemTap is a tool used to gather rich information about a running
|
||||||
system through the use of scripts. Starting from v2.4, the front-end
|
system through the use of scripts. Starting from v2.4, the front-end
|
||||||
application stap can use libvirt to gather data within virtual
|
application stap can use libvirt to gather data within virtual
|
||||||
machines.
|
machines.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://github.com/pradels/vagrant-libvirt/">vagrant-libvirt</a></dt>
|
|
||||||
<dd>
|
|
||||||
Vagrant-Libvirt is a Vagrant plugin that uses libvirt to manage virtual
|
|
||||||
machines. It is a command line tool for developers that makes it very
|
|
||||||
fast and easy to deploy and re-deploy an environment of vm's.
|
|
||||||
</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="configmgmt">Configuration Management</a></h2>
|
<h2><a name="configmgmt">Configuration Management</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="https://wiki.lcfg.org/bin/view/LCFG/LcfgLibvirt">LCFG</a></dt>
|
<dt><a href="https://wiki.lcfg.org/bin/view/LCFG/LcfgLibvirt">LCFG</a></dt>
|
||||||
@@ -139,10 +130,10 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="continuousintegration">Continuous Integration</a></h2>
|
<h2><a name="continuousintegration">Continuous Integration</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="https://buildbot.net/buildbot/docs/current/Libvirt.html">BuildBot</a></dt>
|
<dt><a href="http://buildbot.net/buildbot/docs/current/Libvirt.html">BuildBot</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
BuildBot is a system to automate the compile/test cycle required
|
BuildBot is a system to automate the compile/test cycle required
|
||||||
by most software projects. CVS commits trigger new builds, run on
|
by most software projects. CVS commits trigger new builds, run on
|
||||||
@@ -152,7 +143,7 @@
|
|||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="https://wiki.jenkins-ci.org/display/JENKINS/Libvirt+Slaves+Plugin">Jenkins</a></dt>
|
<dt><a href="http://wiki.jenkins-ci.org/display/JENKINS/Libvirt+Slaves+Plugin">Jenkins</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
This plugin for Jenkins adds a way to control guest domains hosted
|
This plugin for Jenkins adds a way to control guest domains hosted
|
||||||
on Xen or QEMU/KVM. You configure a Jenkins Slave,
|
on Xen or QEMU/KVM. You configure a Jenkins Slave,
|
||||||
@@ -163,24 +154,28 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="conversion">Conversion</a></h2>
|
<h2><a name="conversion">Conversion</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="http://libguestfs.org/virt-p2v.1.html">virt-p2v</a></dt>
|
<dt><a href="https://rwmj.wordpress.com/2009/10/13/poor-mans-p2v/">Poor mans p2v</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Convert a physical machine to run on KVM. It is a LiveCD
|
A simple approach for converting a physical machine to a virtual
|
||||||
which is booted on the machine to be converted. It collects a
|
machine, using a rescue CD.
|
||||||
little information from the user, then copies the disks over
|
|
||||||
to a remote machine and defines the XML for a domain to run
|
|
||||||
the guest. (Note this tool is included with libguestfs)
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="http://libguestfs.org/virt-v2v.1.html">virt-v2v</a></dt>
|
<dt><a href="http://et.redhat.com/~rjones/virt-p2v/">virt-p2v</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
virt-v2v converts guests from a foreign hypervisor to run on
|
An older tool for converting a physical machine into a virtual
|
||||||
KVM, managed by libvirt. It can convert guests from VMware or
|
machine. It is a LiveCD which is booted on the machine to be
|
||||||
Xen to run on OpenStack, oVirt (RHEV-M), or local libvirt. It
|
converted. It collects a little information from the user, then
|
||||||
|
copies the disks over to a remote machine and defines the XML for a
|
||||||
|
domain to run the guest.
|
||||||
|
</dd>
|
||||||
|
<dt><a href="http://git.fedorahosted.org/git/?p=virt-v2v.git;a=summary">virt-v2v</a></dt>
|
||||||
|
<dd>
|
||||||
|
virt-v2v converts guests from a foreign hypervisor to run on KVM,
|
||||||
|
managed by libvirt. It can currently convert Red Hat Enterprise
|
||||||
|
Linux (RHEL) and Fedora guests running on Xen and VMware ESX. It
|
||||||
will enable VirtIO drivers in the converted guest if possible.
|
will enable VirtIO drivers in the converted guest if possible.
|
||||||
(Note this tool is included with libguestfs)
|
|
||||||
</dd>
|
</dd>
|
||||||
<dd>
|
<dd>
|
||||||
For RHEL customers of Red Hat, conversion of Windows guests is also
|
For RHEL customers of Red Hat, conversion of Windows guests is also
|
||||||
@@ -194,37 +189,26 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="desktop">Desktop applications</a></h2>
|
<h2><a name="desktop">Desktop applications</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="https://virt-manager.org/">virt-manager</a></dt>
|
<dt><a href="http://virt-manager.org/">virt-manager</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
A general purpose desktop management tool, able to manage
|
A general purpose desktop management tool, able to manage
|
||||||
virtual machines across both local and remotely accessed
|
virtual machines across both local and remotely accessed
|
||||||
hypervisors. It is targeted at home and small office usage
|
hypervisors. It is targeted at home and small office usage
|
||||||
up to managing 10-20 hosts and their VMs.
|
up to managing 10-20 hosts and their VMs.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://virt-manager.org/">virt-viewer</a></dt>
|
<dt><a href="http://virt-manager.org/">virt-viewer</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
A lightweight tool for accessing the graphical console
|
A lightweight tool for accessing the graphical console
|
||||||
associated with a virtual machine. It can securely connect
|
associated with a virtual machine. It can securely connect
|
||||||
to remote consoles supporting the VNC protocol. Also provides
|
to remote consoles supporting the VNC protocol. Also provides
|
||||||
an optional mozilla browser plugin.
|
an optional mozilla browser plugin.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://f1ash.github.io/qt-virt-manager">qt-virt-manager</a></dt>
|
|
||||||
<dd>
|
|
||||||
The Qt GUI for create and control VMs and another virtual entities
|
|
||||||
(aka networks, storages, interfaces, secrets, network filters).
|
|
||||||
Contains integrated LXC/SPICE/VNC viewer for accessing the graphical or
|
|
||||||
text console associated with a virtual machine or container.
|
|
||||||
</dd>
|
|
||||||
<dt><a href="https://f1ash.github.io/qt-virt-manager/#virtual-machines-viewer">qt-remote-viewer</a></dt>
|
|
||||||
<dd>
|
|
||||||
The Qt VNC/SPICE viewer for access to remote desktops or VMs.
|
|
||||||
</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="iaas">Infrastructure as a Service (IaaS)</a></h2>
|
<h2><a name="iaas">Infrastructure as a Service (IaaS)</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="http://cc1.ifj.edu.pl">Cracow Cloud One</a></dt>
|
<dt><a href="http://cc1.ifj.edu.pl">Cracow Cloud One</a></dt>
|
||||||
@@ -234,7 +218,17 @@
|
|||||||
it easy to benefit from private Cloud Computing technology.
|
it easy to benefit from private Cloud Computing technology.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt><a href="https://github.com/eucalyptus/eucalyptus">Eucalyptus</a></dt>
|
<dt><a href="http://www.emotivecloud.net">EMOTIVE Cloud</a></dt>
|
||||||
|
<dd>The EMOTIVE (Elastic Management Of Tasks In Virtualized
|
||||||
|
Environments) middleware allows executing tasks and providing
|
||||||
|
virtualized environments to the users with Xen, KVM or
|
||||||
|
VirtualBox hypervisor. EMOTIVE's main feature is VM management
|
||||||
|
with different scheduling policies. It can be also used as a
|
||||||
|
cloud provider and is very easy to extend thanks to its
|
||||||
|
modular Web Services architecture.
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt><a href="http://www.eucalyptus.com">Eucalyptus</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Eucalyptus is an on-premise Infrastructure as a Service cloud
|
Eucalyptus is an on-premise Infrastructure as a Service cloud
|
||||||
software platform that is open source and
|
software platform that is open source and
|
||||||
@@ -258,7 +252,7 @@
|
|||||||
management.
|
management.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt><a href="https://www.openstack.org">OpenStack</a></dt>
|
<dt><a href="http://www.openstack.org">OpenStack</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
OpenStack is a "cloud operating system" usable for both public
|
OpenStack is a "cloud operating system" usable for both public
|
||||||
and private clouds. Its various parts take care of compute,
|
and private clouds. Its various parts take care of compute,
|
||||||
@@ -266,29 +260,9 @@
|
|||||||
using a dashboard. Compute part uses libvirt to manage VM
|
using a dashboard. Compute part uses libvirt to manage VM
|
||||||
life-cycle, monitoring and so on.
|
life-cycle, monitoring and so on.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt><a href="https://github.com/gustavfranssonnyvell/cherrypop">Cherrypop</a></dt>
|
|
||||||
<dd>
|
|
||||||
A cloud software with no masters or central points. Nodes
|
|
||||||
autodetect other nodes and autodistribute virtual
|
|
||||||
machines and autodivide up the workload. Also there is no
|
|
||||||
minimum limit for hosts, well, one might be nice. It's
|
|
||||||
perfect for setting up low-end servers in a cloud or a
|
|
||||||
cloud where you want the most bang for the bucks.
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt><a href="http://en.zstack.io/">ZStack</a></dt>
|
|
||||||
<dd>
|
|
||||||
ZStack is an open source IaaS software that aims to automate the
|
|
||||||
management of all resources (compute, storage, networking, etc.) in a
|
|
||||||
datacenter by using APIs, thus conforming to the principles of a
|
|
||||||
software-defined datacenter. The key strengths of ZStack in terms of
|
|
||||||
management are scalability, performance, and a fast, user-friendly
|
|
||||||
deployment.
|
|
||||||
</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="libraries">Libraries</a></h2>
|
<h2><a name="libraries">Libraries</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="http://libguestfs.org">libguestfs</a></dt>
|
<dt><a href="http://libguestfs.org">libguestfs</a></dt>
|
||||||
@@ -304,7 +278,7 @@
|
|||||||
Windows Registry in Windows guests.
|
Windows Registry in Windows guests.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt><a href="https://sandbox.libvirt.org">libvirt-sandbox</a></dt>
|
<dt><a href="http://sandbox.libvirt.org">libvirt-sandbox</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
A library and command line tools for simplifying the creation of
|
A library and command line tools for simplifying the creation of
|
||||||
application sandboxes using virtualization technology. It currently
|
application sandboxes using virtualization technology. It currently
|
||||||
@@ -317,14 +291,14 @@
|
|||||||
Allows using simple ruby objects to manipulate
|
Allows using simple ruby objects to manipulate
|
||||||
hypervisors, guests, storage, network etc. It is
|
hypervisors, guests, storage, network etc. It is
|
||||||
based on top of
|
based on top of
|
||||||
the <a href="https://libvirt.org/ruby">native ruby bindings</a>.
|
the <a href="http://libvirt.org/ruby">native ruby bindings</a>.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="livecd">LiveCD / Appliances</a></h2>
|
<h2><a name="livecd">LiveCD / Appliances</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="http://libguestfs.org/virt-v2v/">virt-p2v</a></dt>
|
<dt><a href="http://et.redhat.com/~rjones/virt-p2v/">virt-p2v</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
An older tool for converting a physical machine into a virtual
|
An older tool for converting a physical machine into a virtual
|
||||||
machine. It is a LiveCD which is booted on the machine to be
|
machine. It is a LiveCD which is booted on the machine to be
|
||||||
@@ -334,9 +308,9 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="monitoring">Monitoring</a></h2>
|
<h2><a name="monitoring">Monitoring</a></h2>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="https://collectd.org/plugins/libvirt.shtml">collectd</a></dt>
|
<dt><a href="http://collectd.org/plugins/libvirt.shtml">collectd</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
The libvirt-plugin is part of <a href="http://collectd.org/">collectd</a>
|
The libvirt-plugin is part of <a href="http://collectd.org/">collectd</a>
|
||||||
and gathers statistics about virtualized guests on a system. This
|
and gathers statistics about virtualized guests on a system. This
|
||||||
@@ -345,19 +319,13 @@
|
|||||||
For a full description, please refer to the libvirt section in the
|
For a full description, please refer to the libvirt section in the
|
||||||
collectd.conf(5) manual page.
|
collectd.conf(5) manual page.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="http://www.sflow.net/">Host sFlow</a></dt>
|
<dt><a href="http://honk.sigxcpu.org/projects/libvirt/#munin">Munin</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Host sFlow is a lightweight agent running on KVM hypervisors that
|
The plugins provided by Guido Günther allow to monitor various things
|
||||||
links to libvirt library and exports standardized cpu, memory, network
|
|
||||||
and disk metrics for all virtual machines.
|
|
||||||
</dd>
|
|
||||||
<dt><a href="https://honk.sigxcpu.org/projects/libvirt/#munin">Munin</a></dt>
|
|
||||||
<dd>
|
|
||||||
The plugins provided by Guido Günther allow to monitor various things
|
|
||||||
like network and block I/O with
|
like network and block I/O with
|
||||||
<a href="http://munin.projects.linpro.no/">Munin</a>.
|
<a href="http://munin.projects.linpro.no/">Munin</a>.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="http://people.redhat.com/rjones/nagios-virt/">Nagios-virt</a></dt>
|
<dt><a href="http://et.redhat.com/~rjones/nagios-virt/">Nagios-virt</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Nagios-virt is a configuration tool to add monitoring of your
|
Nagios-virt is a configuration tool to add monitoring of your
|
||||||
virtualised domains to <a href="http://www.nagios.org/">Nagios</a>.
|
virtualised domains to <a href="http://www.nagios.org/">Nagios</a>.
|
||||||
@@ -365,15 +333,7 @@
|
|||||||
your Xen or QEMU/KVM guests, or to integrate with your existing Nagios
|
your Xen or QEMU/KVM guests, or to integrate with your existing Nagios
|
||||||
installation.
|
installation.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="http://www.pcp.io/man/man1/pmdalibvirt.1.html">PCP</a></dt>
|
<dt><a href="http://community.zenoss.org/docs/DOC-4687">Zenoss</a></dt>
|
||||||
<dd>
|
|
||||||
The PCP libvirt PMDA (plugin) is part of the
|
|
||||||
<a href="http://pcp.io/">PCP</a> toolkit and provides
|
|
||||||
hypervisor and guest information and complete set of guest performance
|
|
||||||
metrics. It supports pCPU, vCPU, memory, block device, network interface,
|
|
||||||
and performance event metrics for each virtual guest.
|
|
||||||
</dd>
|
|
||||||
<dt><a href="https://community.zenoss.org/docs/DOC-4687">Zenoss</a></dt>
|
|
||||||
<dd>
|
<dd>
|
||||||
The Zenoss libvirt Zenpack adds support for monitoring virtualization
|
The Zenoss libvirt Zenpack adds support for monitoring virtualization
|
||||||
servers. It has been tested with KVM, QEMU, VMware ESX, and VMware
|
servers. It has been tested with KVM, QEMU, VMware ESX, and VMware
|
||||||
@@ -381,10 +341,10 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="provisioning">Provisioning</a></h2>
|
<h2><a name="provisioning">Provisioning</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Tivoli+Provisioning+Manager">Tivoli Provisioning Manager</a></dt>
|
<dt><a href="http://www.ibm.com/software/tivoli/products/prov-mgr/">Tivoli Provisioning Manager</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Part of the IBM Tivoli family, Tivoli Provisioning Manager (TPM) is
|
Part of the IBM Tivoli family, Tivoli Provisioning Manager (TPM) is
|
||||||
an IT lifecycle automation product. It
|
an IT lifecycle automation product. It
|
||||||
@@ -394,7 +354,7 @@
|
|||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="https://theforeman.org">Foreman</a></dt>
|
<dt><a href="http://theforeman.org">Foreman</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Foreman is an open source web based application aimed to be a
|
Foreman is an open source web based application aimed to be a
|
||||||
Single Address For All Machines Life Cycle Management. Foreman:
|
Single Address For All Machines Life Cycle Management. Foreman:
|
||||||
@@ -415,10 +375,10 @@
|
|||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="web">Web applications</a></h2>
|
<h2><a name="web">Web applications</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="http://www.abiquo.com/">AbiCloud</a></dt>
|
<dt><a href="http://community.abiquo.com/display/AbiCloud">AbiCloud</a></dt>
|
||||||
<dd>
|
<dd>
|
||||||
AbiCloud is an open source cloud platform manager which allows to
|
AbiCloud is an open source cloud platform manager which allows to
|
||||||
easily deploy a private cloud in your datacenter. One of the key
|
easily deploy a private cloud in your datacenter. One of the key
|
||||||
@@ -426,64 +386,16 @@
|
|||||||
infrastructure. You can deploy a new service just dragging and
|
infrastructure. You can deploy a new service just dragging and
|
||||||
dropping a VM.
|
dropping a VM.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://kimchi-project.github.io/kimchi/">Kimchi</a></dt>
|
<dt><a href="http://ovirt.org/">oVirt</a></dt>
|
||||||
<dd>
|
|
||||||
Kimchi is an HTML5 based management tool for KVM. It is designed to
|
|
||||||
make it as easy as possible to get started with KVM and create your first guest.
|
|
||||||
|
|
||||||
Kimchi manages KVM guests through libvirt. The management interface is accessed
|
|
||||||
over the web using a browser that supports HTML5.
|
|
||||||
</dd>
|
|
||||||
<dt><a href="https://ovirt.org/">oVirt</a></dt>
|
|
||||||
<dd>
|
<dd>
|
||||||
oVirt provides the ability to manage large numbers of virtual
|
oVirt provides the ability to manage large numbers of virtual
|
||||||
machines across an entire data center of hosts. It integrates
|
machines across an entire data center of hosts. It integrates
|
||||||
with FreeIPA for Kerberos authentication, and in the future,
|
with FreeIPA for Kerberos authentication, and in the future,
|
||||||
certificate management.
|
certificate management.
|
||||||
</dd>
|
</dd>
|
||||||
<dt><a href="https://ispsystem.com/en/software/vmmanager">VMmanager</a></dt>
|
|
||||||
<dd>
|
|
||||||
VMmanager is a software solution for virtualization management
|
|
||||||
that can be used both for hosting virtual machines and
|
|
||||||
building a cloud. VMmanager can manage not only one server,
|
|
||||||
but a large cluster of hypervisors. It delivers a number of
|
|
||||||
functions, such as live migration that allows for load
|
|
||||||
balancing between cluster nodes, monitoring CPU, memory.
|
|
||||||
</dd>
|
|
||||||
<dt><a href="https://mist.io/">mist.io</a></dt>
|
|
||||||
<dd>
|
|
||||||
Mist.io is an open source project and a service that can assist you in
|
|
||||||
managing your virtual machines on a unified way, providing a simple
|
|
||||||
interface for all of your infrastructure (multiple public cloud
|
|
||||||
providers, OpenStack based public/private clouds, Docker servers, bare
|
|
||||||
metal servers and now KVM hypervisors).
|
|
||||||
</dd>
|
|
||||||
<dt><a href="https://ravada.upc.edu/">Ravada</a></dt>
|
|
||||||
<dd>
|
|
||||||
Ravada is an open source tool for managing Virtual Desktop
|
|
||||||
Infrastructure (VDI). It is very easy to install and use. Following
|
|
||||||
the documentation, you'll be ready to deploy virtual machines in
|
|
||||||
minutes. The only requirements for the users are a Web browser and
|
|
||||||
a lightweight remote viewer.
|
|
||||||
</dd>
|
|
||||||
<dt><a href="https://github.com/cutelyst/Virtlyst">Virtlyst</a></dt>
|
|
||||||
<dd>
|
|
||||||
Virtlyst is an open source web application built with C++11, Cutelyst and Qt.
|
|
||||||
It features:
|
|
||||||
<ul>
|
|
||||||
<li>Low memory usage (around 5 MiB of RAM)</li>
|
|
||||||
<li>Look and feel easily customized with HTML templates that use the Django syntax</li>
|
|
||||||
<li>VNC/Spice console directly in the browser using websockets on the same HTTP port</li>
|
|
||||||
<li>Host and Domain statistics graphs (CPU, Memory, IO, Network)</li>
|
|
||||||
<li>Connect to multiple libvirtd instances (over local Unix domain socket, SSH, TCP and TLS)</li>
|
|
||||||
<li>Manage Storage Pools, Storage Volumes, Networks, Interfaces, and Secrets</li>
|
|
||||||
<li>Create and launch VMs</li>
|
|
||||||
<li>Configure VMs with easy panels or go pro and edit the VM's XML</li>
|
|
||||||
</ul>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="mobile">Mobile applications</a></h2>
|
<h2><a name="mobile">Mobile applications</a></h2>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><a href="https://market.android.com/details?id=vm.manager">VM Manager</a></dt>
|
<dt><a href="https://market.android.com/details?id=vm.manager">VM Manager</a></dt>
|
||||||
@@ -494,19 +406,5 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><a id="other">Other</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><a href="https://cuckoosandbox.org/">Cuckoo Sandbox</a></dt>
|
|
||||||
<dd>
|
|
||||||
Cuckoo Sandbox is a malware analysis system. You can throw
|
|
||||||
any suspicious file at it and in a matter of seconds Cuckoo
|
|
||||||
will provide you back some detailed results outlining what
|
|
||||||
such file did when executed inside an isolated environment.
|
|
||||||
And libvirt is one of the backends that can be used for the
|
|
||||||
isolated environment.
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
7
docs/archdomain.html.in
Normal file
7
docs/archdomain.html.in
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?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>Domain management architecture</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1 >libvirt architecture</h1>
|
<h1 >libvirt architecture</h1>
|
||||||
@@ -13,38 +13,54 @@
|
|||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="Xen">Xen support</a></h2>
|
<h2><a name="Xen">Xen support</a></h2>
|
||||||
|
|
||||||
<p>When running in a Xen environment, programs using libvirt have to execute
|
<p>When running in a Xen environment, programs using libvirt have to execute
|
||||||
in "Domain 0", which is the primary Linux OS loaded on the machine. That OS
|
in "Domain 0", which is the primary Linux OS loaded on the machine. That OS
|
||||||
kernel provides most if not all of the actual drivers used by the set of
|
kernel provides most if not all of the actual drivers used by the set of
|
||||||
domains. It also runs the Xen Store, a database of information shared by the
|
domains. It also runs the Xen Store, a database of information shared by the
|
||||||
hypervisor, the backend drivers, any running domains, and libxl (aka libxenlight).
|
hypervisor, the kernels, the drivers and the xen daemon. Xend. The xen daemon
|
||||||
libxl provides a set of APIs for creating and managing domains, which can be used
|
supervise the control and execution of the sets of domains. The hypervisor,
|
||||||
by applications such as the xl tool provided by Xen or libvirt. The hypervisor,
|
|
||||||
drivers, kernels and daemons communicate though a shared system bus
|
drivers, kernels and daemons communicate though a shared system bus
|
||||||
implemented in the hypervisor. The figure below tries to provide a view of
|
implemented in the hypervisor. The figure below tries to provide a view of
|
||||||
this environment:</p>
|
this environment:</p>
|
||||||
<img src="architecture.gif" alt="The Xen architecture" />
|
<img src="architecture.gif" alt="The Xen architecture" />
|
||||||
<p>The library will interact with libxl for all management operations
|
<p>The library can be initialized in 2 ways depending on the level of
|
||||||
on a Xen system.</p>
|
privilege of the embedding program. If it runs with root access,
|
||||||
<p>Note that the libvirt libxl driver only supports root access.</p>
|
virConnectOpen() can be used, it will use three different ways to connect to
|
||||||
|
the Xen infrastructure:</p>
|
||||||
|
<ul>
|
||||||
|
<li>a connection to the Xen Daemon though an HTTP RPC layer</li>
|
||||||
|
<li>a read/write connection to the Xen Store</li>
|
||||||
|
<li>use Xen Hypervisor calls</li>
|
||||||
|
<li>when used as non-root libvirt connect to a proxy daemon running
|
||||||
|
as root and providing read-only support</li>
|
||||||
|
</ul>
|
||||||
|
<p>The library will usually interact with the Xen daemon for any operation
|
||||||
|
changing the state of the system, but for performance and accuracy reasons
|
||||||
|
may talk directly to the hypervisor when gathering state information at
|
||||||
|
least when possible (i.e. when the running program using libvirt has root
|
||||||
|
privilege access).</p>
|
||||||
|
<p>If it runs without root access virConnectOpenReadOnly() should be used to
|
||||||
|
connect to initialize the library. It will then fork a libvirt_proxy
|
||||||
|
program running as root and providing read_only access to the API, this is
|
||||||
|
then only useful for reporting and monitoring.</p>
|
||||||
|
|
||||||
<h2><a id="QEMU">QEMU and KVM support</a></h2>
|
<h2><a name="QEmu">QEmu and KVM support</a></h2>
|
||||||
|
|
||||||
<p>The model for QEMU and KVM is completely similar, basically KVM is based
|
<p>The model for QEmu and KVM is completely similar, basically KVM is based
|
||||||
on QEMU for the process controlling a new domain, only small details differs
|
on QEmu for the process controlling a new domain, only small details differs
|
||||||
between the two. In both case the libvirt API is provided by a controlling
|
between the two. In both case the libvirt API is provided by a controlling
|
||||||
process forked by libvirt in the background and which launch and control the
|
process forked by libvirt in the background and which launch and control the
|
||||||
QEMU or KVM process. That program called libvirt_qemud talks though a specific
|
QEmu or KVM process. That program called libvirt_qemud talks though a specific
|
||||||
protocol to the library, and connects to the console of the QEMU process in
|
protocol to the library, and connects to the console of the QEmu process in
|
||||||
order to control and report on its status. Libvirt tries to expose all the
|
order to control and report on its status. Libvirt tries to expose all the
|
||||||
emulations models of QEMU, the selection is done when creating the new
|
emulations models of QEmu, the selection is done when creating the new
|
||||||
domain, by specifying the architecture and machine type targeted.</p>
|
domain, by specifying the architecture and machine type targeted.</p>
|
||||||
<p>The code controlling the QEMU process is available in the
|
<p>The code controlling the QEmu process is available in the
|
||||||
<code>qemud/</code> directory.</p>
|
<code>qemud/</code> directory.</p>
|
||||||
|
|
||||||
<h2><a id="drivers">Driver based architecture</a></h2>
|
<h2><a name="drivers">Driver based architecture</a></h2>
|
||||||
|
|
||||||
<p>As the previous section explains, libvirt can communicate using different
|
<p>As the previous section explains, libvirt can communicate using different
|
||||||
channels with the current hypervisor, and should also be able to use
|
channels with the current hypervisor, and should also be able to use
|
||||||
@@ -67,9 +83,9 @@ drivers present in driver.h:</p>
|
|||||||
is in the <code>proxy/</code> directory.</li>
|
is in the <code>proxy/</code> directory.</li>
|
||||||
<li>xm_internal: provide support for Xen defined but not running
|
<li>xm_internal: provide support for Xen defined but not running
|
||||||
domains.</li>
|
domains.</li>
|
||||||
<li>qemu_internal: implement the driver functions for QEMU and
|
<li>qemu_internal: implement the driver functions for QEmu and
|
||||||
KVM virtualization engines. It also uses a qemud/ specific daemon
|
KVM virtualization engines. It also uses a qemud/ specific daemon
|
||||||
which interacts with the QEMU process to implement libvirt API.</li>
|
which interacts with the QEmu process to implement libvirt API.</li>
|
||||||
<li>test: this is a test driver useful for regression tests of the
|
<li>test: this is a test driver useful for regression tests of the
|
||||||
front-end part of libvirt.</li>
|
front-end part of libvirt.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
54
docs/archnetwork.html.in
Normal file
54
docs/archnetwork.html.in
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?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>Network management architecture</h1>
|
||||||
|
|
||||||
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
|
<h2><a name="architecture">Architecture illustration</a></h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The diagrams below illustrate some of the network configurations
|
||||||
|
enabled by the libvirt networking APIs
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><strong>VLAN 1</strong>. This virtual network has connectivity
|
||||||
|
to <code>LAN 2</code> with traffic forwarded and NATed.
|
||||||
|
</li>
|
||||||
|
<li><strong>VLAN 2</strong>. This virtual network is completely
|
||||||
|
isolated from any physical LAN.
|
||||||
|
</li>
|
||||||
|
<li><strong>Guest A</strong>. The first network interface is bridged
|
||||||
|
to the physical <code>LAN 1</code>. The second interface is connected
|
||||||
|
to a virtual network <code>VLAN 1</code>.
|
||||||
|
</li>
|
||||||
|
<li><strong>Guest B</strong>. The first network interface is connected
|
||||||
|
to a virtual network <code>VLAN 1</code>, giving it limited NAT
|
||||||
|
based connectivity to LAN2. It has a second network interface
|
||||||
|
connected to <code>VLAN 2</code>. It acts a router allowing limited
|
||||||
|
traffic between the two VLANs, thus giving <code>Guest C</code>
|
||||||
|
connectivity to the physical <code>LAN 2</code>.
|
||||||
|
</li>
|
||||||
|
<li><strong>Guest C</strong>. The only network interface is connected
|
||||||
|
to a virtual network <code>VLAN 2</code>. It has no direct connectivity
|
||||||
|
to a physical LAN, relying on <code>Guest B</code> to route traffic
|
||||||
|
on its behalf.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3><a name="logical">Logical diagram</a></h3>
|
||||||
|
|
||||||
|
<p class="image">
|
||||||
|
<img src="libvirt-net-logical.png" alt="Logical network architecture"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3><a name="physical">Physical diagram</a></h3>
|
||||||
|
|
||||||
|
<p class="image">
|
||||||
|
<img src="libvirt-net-physical.png" alt="Physical network architecture"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
7
docs/archnode.html.in
Normal file
7
docs/archnode.html.in
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?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>Node device management architecture</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
32
docs/archstorage.html.in
Normal file
32
docs/archstorage.html.in
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?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>Storage management architecture</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The storage management APIs are based around 2 core concepts
|
||||||
|
</p>
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
<strong>Volume</strong> - a single storage volume which can
|
||||||
|
be assigned to a guest, or used for creating further pools. A
|
||||||
|
volume is either a block device, a raw file, or a special format
|
||||||
|
file.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>Pool</strong> - provides a means for taking a chunk
|
||||||
|
of storage and carving it up into volumes. A pool can be used to
|
||||||
|
manage things such as a physical disk, a NFS server, a iSCSI target,
|
||||||
|
a host adapter, an LVM group.
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
These two concepts are mapped through to two libvirt objects, a
|
||||||
|
<code>virStorageVolPtr</code> and a <code>virStoragePoolPtr</code>,
|
||||||
|
each with a collection of APIs for their management.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Audit log</h1>
|
<h1>Audit log</h1>
|
||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="intro">Introduction</a></h2>
|
<h2><a name="intro">Introduction</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
A number of the libvirt virtualization drivers (QEMU/KVM and LXC) include
|
A number of the libvirt virtualization drivers (QEMU/KVM and LXC) include
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
the logs will usually end up in <code>/var/log/audit/audit.log</code>
|
the logs will usually end up in <code>/var/log/audit/audit.log</code>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="config">Configuration</a></h2>
|
<h2><a name="config">Configuration</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt audit integration is enabled by default on any host which has
|
The libvirt audit integration is enabled by default on any host which has
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
mentioned above.
|
mentioned above.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="types">Message types</a></h2>
|
<h2><a name="types">Message types</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Libvirt defines three core audit message types each of which will
|
Libvirt defines three core audit message types each of which will
|
||||||
@@ -57,13 +57,13 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>pid</code></dt>
|
<dt>pid</dt>
|
||||||
<dd>Process ID of the libvirtd daemon generating the audit record.</dd>
|
<dd>Process ID of the libvirtd daemon generating the audit record.</dd>
|
||||||
<dt><code>uid</code></dt>
|
<dt>uid</dt>
|
||||||
<dd>User ID of the libvirtd daemon process generating the audit record.</dd>
|
<dd>User ID of the libvirtd daemon process generating the audit record.</dd>
|
||||||
<dt><code>subj</code></dt>
|
<dt>subj</dt>
|
||||||
<dd>Security context of the libvirtd daemon process generating the audit record.</dd>
|
<dd>Security context of the libvirtd daemon process generating the audit record.</dd>
|
||||||
<dt><code>msg</code></dt>
|
<dt>msg</dt>
|
||||||
<dd>String containing a list of key=value pairs specific to the type of audit record being reported.</dd>
|
<dd>String containing a list of key=value pairs specific to the type of audit record being reported.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -72,25 +72,25 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>virt</code></dt>
|
<dt>virt</dt>
|
||||||
<dd>Type of virtualization driver used. One of <code>qemu</code> or <code>lxc</code></dd>
|
<dd>Type of virtualization driver used. One of <code>qemu</code> or <code>lxc</code></dd>
|
||||||
<dt><code>vm</code></dt>
|
<dt>vm</dt>
|
||||||
<dd>Host driver unique name of the guest</dd>
|
<dd>Host driver unique name of the guest</dd>
|
||||||
<dt><code>uuid</code></dt>
|
<dt>uuid</dt>
|
||||||
<dd>Globally unique identifier for the guest</dd>
|
<dd>Globally unique identifier for the guest</dd>
|
||||||
<dt><code>exe</code></dt>
|
<dt>exe</dt>
|
||||||
<dd>Path of the libvirtd daemon</dd>
|
<dd>Path of the libvirtd daemon</dd>
|
||||||
<dt><code>hostname</code></dt>
|
<dt>hostname</dt>
|
||||||
<dd>Currently unused</dd>
|
<dd>Currently unused</dd>
|
||||||
<dt><code>addr</code></dt>
|
<dt>addr</dt>
|
||||||
<dd>Currently unused</dd>
|
<dd>Currently unused</dd>
|
||||||
<dt><code>terminal</code></dt>
|
<dt>terminal</dt>
|
||||||
<dd>Currently unused</dd>
|
<dd>Currently unused</dd>
|
||||||
<dt><code>res</code></dt>
|
<dt>res</dt>
|
||||||
<dd>Result of the action, either <code>success</code> or <code>failed</code></dd>
|
<dd>Result of the action, either <code>success</code> or <code>failed</code></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h3><a id="typecontrol">VIRT_CONTROL</a></h3>
|
<h3><a name="typecontrol">VIRT_CONTROL</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Reports change in the lifecycle state of a virtual machine. The <code>msg</code>
|
Reports change in the lifecycle state of a virtual machine. The <code>msg</code>
|
||||||
@@ -98,19 +98,19 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>op</code></dt>
|
<dt>op</dt>
|
||||||
<dd>Type of operation performed. One of <code>start</code>, <code>stop</code> or <code>init</code></dd>
|
<dd>Type of operation performed. One of <code>start</code>, <code>stop</code> or <code>init</code></dd>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the operation to happen</dd>
|
<dd>The reason which caused the operation to happen</dd>
|
||||||
<dt><code>vm-pid</code></dt>
|
<dt>vm-pid</dt>
|
||||||
<dd>ID of the primary/leading process associated with the guest</dd>
|
<dd>ID of the primary/leading process associated with the guest</dd>
|
||||||
<dt><code>init-pid</code></dt>
|
<dt>init-pid</dt>
|
||||||
<dd>ID of the <code>init</code> process in a container. Only if <code>op=init</code> and <code>virt=lxc</code></dd>
|
<dd>ID of the <code>init</code> process in a container. Only if <code>op=init</code> and <code>virt=lxc</code></dd>
|
||||||
<dt><code>pid-ns</code></dt>
|
<dt>pid-ns</dt>
|
||||||
<dd>Namespace ID of the <code>init</code> process in a container. Only if <code>op=init</code> and <code>virt=lxc</code></dd>
|
<dd>Namespace ID of the <code>init</code> process in a container. Only if <code>op=init</code> and <code>virt=lxc</code></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h3><a id="typemachine">VIRT_MACHINE_ID</a></h3>
|
<h3><a name="typemachine">VIRT_MACHINE_ID</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Reports the association of a security context with a guest. The <code>msg</code>
|
Reports the association of a security context with a guest. The <code>msg</code>
|
||||||
@@ -118,15 +118,15 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>model</code></dt>
|
<dt>model</dt>
|
||||||
<dd>The security driver type. One of <code>selinux</code> or <code>apparmor</code></dd>
|
<dd>The security driver type. One of <code>selinux</code> or <code>apparmor</code></dd>
|
||||||
<dt><code>vm-ctx</code></dt>
|
<dt>vm-ctx</dt>
|
||||||
<dd>Security context for the guest process</dd>
|
<dd>Security context for the guest process</dd>
|
||||||
<dt><code>img-ctx</code></dt>
|
<dt>img-ctx</dt>
|
||||||
<dd>Security context for the guest disk images and other assigned host resources</dd>
|
<dd>Security context for the guest disk images and other assigned host resources</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h3><a id="typeresource">VIRT_RESOURCE</a></h3>
|
<h3><a name="typeresource">VIRT_RESOURCE</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Reports the usage of a host resource by a guest. The fields include will
|
Reports the usage of a host resource by a guest. The fields include will
|
||||||
@@ -137,71 +137,71 @@
|
|||||||
be generated.
|
be generated.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h4><a id="typeresourcevcpu">Virtual CPU</a></h4>
|
<h4><a name="typeresourcevcpu">Virtual CPU</a></h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>msg</code> field will include the following sub-fields
|
The <code>msg</code> field will include the following sub-fields
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>vcpu</code></dd>
|
<dd>The type of resource assigned. Set to <code>vcpu</code></dd>
|
||||||
<dt><code>old-vcpu</code></dt>
|
<dt>old-vcpu</dt>
|
||||||
<dd>Original vCPU count, or 0</dd>
|
<dd>Original vCPU count, or 0</dd>
|
||||||
<dt><code>new-vcpu</code></dt>
|
<dt>new-vcpu</dt>
|
||||||
<dd>Updated vCPU count</dd>
|
<dd>Updated vCPU count</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
<h4><a id="typeresourcemem">Memory</a></h4>
|
<h4><a name="typeresourcemem">Memory</a></h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>msg</code> field will include the following sub-fields
|
The <code>msg</code> field will include the following sub-fields
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>mem</code></dd>
|
<dd>The type of resource assigned. Set to <code>mem</code></dd>
|
||||||
<dt><code>old-mem</code></dt>
|
<dt>old-mem</dt>
|
||||||
<dd>Original memory size in bytes, or 0</dd>
|
<dd>Original memory size in bytes, or 0</dd>
|
||||||
<dt><code>new-mem</code></dt>
|
<dt>new-mem</dt>
|
||||||
<dd>Updated memory size in bytes</dd>
|
<dd>Updated memory size in bytes</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h4><a id="typeresourcedisk">Disk</a></h4>
|
<h4><a name="typeresourcedisk">Disk</a></h4>
|
||||||
<p>
|
<p>
|
||||||
The <code>msg</code> field will include the following sub-fields
|
The <code>msg</code> field will include the following sub-fields
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>disk</code></dd>
|
<dd>The type of resource assigned. Set to <code>disk</code></dd>
|
||||||
<dt><code>old-disk</code></dt>
|
<dt>old-disk</dt>
|
||||||
<dd>Original host file or device path acting as the disk backing file</dd>
|
<dd>Original host file or device path acting as the disk backing file</dd>
|
||||||
<dt><code>new-disk</code></dt>
|
<dt>new-disk</dt>
|
||||||
<dd>Updated host file or device path acting as the disk backing file</dd>
|
<dd>Updated host file or device path acting as the disk backing file</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h4><a id="typeresourcenic">Network interface</a></h4>
|
<h4><a name="typeresourcenic">Network interface</a></h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>msg</code> field will include the following sub-fields
|
The <code>msg</code> field will include the following sub-fields
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>net</code></dd>
|
<dd>The type of resource assigned. Set to <code>net</code></dd>
|
||||||
<dt><code>old-net</code></dt>
|
<dt>old-net</dt>
|
||||||
<dd>Original MAC address of the guest network interface</dd>
|
<dd>Original MAC address of the guest network interface</dd>
|
||||||
<dt><code>new-net</code></dt>
|
<dt>new-net</dt>
|
||||||
<dd>Updated MAC address of the guest network interface</dd>
|
<dd>Updated MAC address of the guest network interface</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -211,165 +211,111 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>net</code></dd>
|
<dd>The type of resource assigned. Set to <code>net</code></dd>
|
||||||
<dt><code>net</code></dt>
|
<dt>net</dt>
|
||||||
<dd>MAC address of the host network interface</dd>
|
<dd>MAC address of the host network interface</dd>
|
||||||
<dt><code>rdev</code></dt>
|
<dt>rdev</dt>
|
||||||
<dd>Name of the host network interface</dd>
|
<dd>Name of the host network interface</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h4><a id="typeresourcefs">Filesystem</a></h4>
|
<h4><a name="typeresourcefs">Filesystem</a></h4>
|
||||||
<p>
|
<p>
|
||||||
The <code>msg</code> field will include the following sub-fields
|
The <code>msg</code> field will include the following sub-fields
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>fs</code></dd>
|
<dd>The type of resource assigned. Set to <code>fs</code></dd>
|
||||||
<dt><code>old-fs</code></dt>
|
<dt>old-fs</dt>
|
||||||
<dd>Original host directory, file or device path backing the filesystem </dd>
|
<dd>Original host directory, file or device path backing the filesystem </dd>
|
||||||
<dt><code>new-fs</code></dt>
|
<dt>new-fs</dt>
|
||||||
<dd>Updated host directory, file or device path backing the filesystem</dd>
|
<dd>Updated host directory, file or device path backing the filesystem</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h4><a id="typeresourcehost">Host device</a></h4>
|
<h4><a name="typeresourcehost">Host device</a></h4>
|
||||||
<p>
|
<p>
|
||||||
The <code>msg</code> field will include the following sub-fields
|
The <code>msg</code> field will include the following sub-fields
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>hostdev</code> or <code>dev</code></dd>
|
<dd>The type of resource assigned. Set to <code>hostdev</code> or <code>dev</code></dd>
|
||||||
<dt><code>dev</code></dt>
|
<dt>dev</dt>
|
||||||
<dd>The unique bus identifier of the USB, PCI or SCSI device, if <code>resrc=dev</code></dd>
|
<dd>The unique bus identifier of the USB, PCI or SCSI device, if <code>resrc=dev</code></dd>
|
||||||
<dt><code>disk</code></dt>
|
<dt>disk</dt>
|
||||||
<dd>The path of the block device assigned to the guest, if <code>resrc=hostdev</code></dd>
|
<dd>The path of the block device assigned to the guest, if <code>resrc=hostdev</code></dd>
|
||||||
<dt><code>chardev</code></dt>
|
<dt>chardev</dt>
|
||||||
<dd>The path of the character device assigned to the guest, if <code>resrc=hostdev</code></dd>
|
<dd>The path of the character device assigned to the guest, if <code>resrc=hostdev</code></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h4><a id="typeresourcetpm">TPM</a></h4>
|
<h4><a name="typeresourcetpm">TPM</a></h4>
|
||||||
<p>
|
<p>
|
||||||
The <code>msg</code> field will include the following sub-fields
|
The <code>msg</code> field will include the following sub-fields
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>tpm</code> or <code>tpm-emulator</code></dd>
|
<dd>The type of resource assigned. Set to <code>tpm</code></dd>
|
||||||
<dt><code>device</code></dt>
|
<dt>device</dt>
|
||||||
<dd>The path of the host TPM device assigned to the guest</dd>
|
<dd>The path of the host TPM device assigned to the guest</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h4><a id="typeresourcerng">RNG</a></h4>
|
<h4><a name="typeresourcerng">RNG</a></h4>
|
||||||
<p>
|
<p>
|
||||||
The <code>msg</code> field will include the following sub-fields
|
The <code>msg</code> field will include the following sub-fields
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>rng</code></dd>
|
<dd>The type of resource assigned. Set to <code>rng</code></dd>
|
||||||
<dt><code>old-rng</code></dt>
|
<dt>old-rng</dt>
|
||||||
<dd>Original path of the host entropy source for the RNG</dd>
|
<dd>Original path of the host entropy source for the RNG</dd>
|
||||||
<dt><code>new-rng</code></dt>
|
<dt>new-rng</dt>
|
||||||
<dd>Updated path of the host entropy source for the RNG</dd>
|
<dd>Updated path of the host entropy source for the RNG</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h4><a id="typeresourcechardev">console/serial/parallel/channel</a></h4>
|
|
||||||
|
<h4><a name="typeresourceredir">Redirected device</a></h4>
|
||||||
<p>
|
<p>
|
||||||
The <code>msg</code> field will include the following sub-fields
|
The <code>msg</code> field will include the following sub-fields
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>chardev</code></dd>
|
|
||||||
<dt><code>old-chardev</code></dt>
|
|
||||||
<dd>Original path of the backing character device for given emulated device</dd>
|
|
||||||
<dt><code>new-chardev</code></dt>
|
|
||||||
<dd>Updated path of the backing character device for given emulated device</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h4><a id="typeresourcesmartcard">smartcard</a></h4>
|
|
||||||
<p>
|
|
||||||
The <code>msg</code> field will include the following sub-fields
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><code>reason</code></dt>
|
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
|
||||||
<dt><code>resrc</code></dt>
|
|
||||||
<dd>The type of resource assigned. Set to <code>smartcard</code></dd>
|
|
||||||
<dt><code>old-smartcard</code></dt>
|
|
||||||
<dd>Original path of the backing character device, certificate store or
|
|
||||||
"nss-smartcard-device" for host smartcard passthrough.
|
|
||||||
</dd>
|
|
||||||
<dt><code>new-smartcard</code></dt>
|
|
||||||
<dd>Updated path of the backing character device, certificate store or
|
|
||||||
"nss-smartcard-device" for host smartcard passthrough.
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h4><a id="typeresourceredir">Redirected device</a></h4>
|
|
||||||
<p>
|
|
||||||
The <code>msg</code> field will include the following sub-fields
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><code>reason</code></dt>
|
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
|
||||||
<dt><code>resrc</code></dt>
|
|
||||||
<dd>The type of resource assigned. Set to <code>redir</code></dd>
|
<dd>The type of resource assigned. Set to <code>redir</code></dd>
|
||||||
<dt><code>bus</code></dt>
|
<dt>bus</dt>
|
||||||
<dd>The bus type, only <code>usb</code> allowed</dd>
|
<dd>The bus type, only <code>usb</code> allowed</dd>
|
||||||
<dt><code>device</code></dt>
|
<dt>device</dt>
|
||||||
<dd>The device type, only <code>USB redir</code> allowed</dd>
|
<dd>The device type, only <code>USB redir</code> allowed</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h4><a id="typeresourcecgroup">Control group</a></h4>
|
<h4><a name="typeresourcecgroup">Control group</a></h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>msg</code> field will include the following sub-fields
|
The <code>msg</code> field will include the following sub-fields
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>reason</code></dt>
|
<dt>reason</dt>
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
<dd>The reason which caused the resource to be assigned to happen</dd>
|
||||||
<dt><code>resrc</code></dt>
|
<dt>resrc</dt>
|
||||||
<dd>The type of resource assigned. Set to <code>cgroup</code></dd>
|
<dd>The type of resource assigned. Set to <code>cgroup</code></dd>
|
||||||
<dt><code>cgroup</code></dt>
|
<dt>cgroup</dt>
|
||||||
<dd>The name of the cgroup controller</dd>
|
<dd>The name of the cgroup controller</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
<h4><a id="typeresourceshmem">Shared memory</a></h4>
|
|
||||||
<p>
|
|
||||||
The <code>msg</code> field will include the following sub-fields
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><code>resrc</code></dt>
|
|
||||||
<dd>The type of resource assigned. Set to <code>shmem</code></dd>
|
|
||||||
<dt><code>reason</code></dt>
|
|
||||||
<dd>The reason which caused the resource to be assigned to happen</dd>
|
|
||||||
<dt><code>size</code></dt>
|
|
||||||
<dd>The size of the shared memory region</dd>
|
|
||||||
<dt><code>shmem</code></dt>
|
|
||||||
<dd>Name of the shared memory region</dd>
|
|
||||||
<dt><code>source</code></dt>
|
|
||||||
<dd>Path of the backing character device for given emulated device</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Connection authentication</h1>
|
<h1>Connection authentication</h1>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="Auth_client_config">Client configuration</a></h2>
|
<h2><a name="Auth_client_config">Client configuration</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
When connecting to a remote hypervisor which requires authentication,
|
When connecting to a remote hypervisor which requires authentication,
|
||||||
@@ -76,11 +76,7 @@ password=letmein
|
|||||||
|
|
||||||
[credentials-dev]
|
[credentials-dev]
|
||||||
username=joe
|
username=joe
|
||||||
password=hello
|
password=hello</pre>
|
||||||
|
|
||||||
[credentials-defgrp]
|
|
||||||
username=defuser
|
|
||||||
password=defpw</pre>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The second set of groups provide mappings of credentials to
|
The second set of groups provide mappings of credentials to
|
||||||
@@ -94,8 +90,7 @@ credentials=$CREDENTIALS</pre>
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
For example, following the previous example, here is how to
|
For example, following the previous example, here is how to
|
||||||
map some machines. For convenience libvirt supports a default
|
list some machines
|
||||||
mapping of credentials to machines:
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
@@ -111,15 +106,8 @@ credentials=test
|
|||||||
[auth-libvirt-prod1.example.com]
|
[auth-libvirt-prod1.example.com]
|
||||||
credentials=prod
|
credentials=prod
|
||||||
|
|
||||||
[auth-libvirt-default]
|
|
||||||
credentials=defgrp
|
|
||||||
|
|
||||||
[auth-esx-dev1.example.com]
|
[auth-esx-dev1.example.com]
|
||||||
credentials=dev
|
credentials=dev</pre>
|
||||||
|
|
||||||
[auth-esx-default]
|
|
||||||
credentials=defgrp</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The following service types are known to libvirt
|
The following service types are known to libvirt
|
||||||
@@ -142,7 +130,7 @@ credentials=defgrp</pre>
|
|||||||
to storage VNC or SPICE login credentials
|
to storage VNC or SPICE login credentials
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="ACL_server_config">Server configuration</a></h2>
|
<h2><a name="ACL_server_config">Server configuration</a></h2>
|
||||||
<p>
|
<p>
|
||||||
The libvirt daemon allows the administrator to choose the authentication
|
The libvirt daemon allows the administrator to choose the authentication
|
||||||
mechanisms used for client connections on each network socket independently.
|
mechanisms used for client connections on each network socket independently.
|
||||||
@@ -153,7 +141,7 @@ currently a choice of <code>none</code>, <code>polkit</code>, and <code>sasl</co
|
|||||||
The SASL scheme can be further configured to choose between a large
|
The SASL scheme can be further configured to choose between a large
|
||||||
number of different mechanisms.
|
number of different mechanisms.
|
||||||
</p>
|
</p>
|
||||||
<h2><a id="ACL_server_unix_perms">UNIX socket permissions/group</a></h2>
|
<h2><a name="ACL_server_unix_perms">UNIX socket permissions/group</a></h2>
|
||||||
<p>
|
<p>
|
||||||
If libvirt does not contain support for PolicyKit, then access control for
|
If libvirt does not contain support for PolicyKit, then access control for
|
||||||
the UNIX domain socket is done using traditional file user/group ownership
|
the UNIX domain socket is done using traditional file user/group ownership
|
||||||
@@ -170,10 +158,10 @@ parameter. For example, setting the former to mode <code>0770</code> and the
|
|||||||
latter <code>wheel</code> would let any user in the wheel group connect to
|
latter <code>wheel</code> would let any user in the wheel group connect to
|
||||||
the libvirt daemon.
|
the libvirt daemon.
|
||||||
</p>
|
</p>
|
||||||
<h2><a id="ACL_server_polkit">UNIX socket PolicyKit auth</a></h2>
|
<h2><a name="ACL_server_polkit">UNIX socket PolicyKit auth</a></h2>
|
||||||
<p>
|
<p>
|
||||||
If libvirt contains support for PolicyKit, then access control options are
|
If libvirt contains support for PolicyKit, then access control options are
|
||||||
more advanced. The <code>auth_unix_rw</code> parameter will default to
|
more advanced. The <code>unix_sock_auth</code> parameter will default to
|
||||||
<code>polkit</code>, and the file permissions will default to <code>0777</code>
|
<code>polkit</code>, and the file permissions will default to <code>0777</code>
|
||||||
even on the RW socket. Upon connecting to the socket, the client application
|
even on the RW socket. Upon connecting to the socket, the client application
|
||||||
will be required to identify itself with PolicyKit. The default policy for the
|
will be required to identify itself with PolicyKit. The default policy for the
|
||||||
@@ -204,71 +192,15 @@ ResultActive=yes</pre>
|
|||||||
Further examples of PolicyKit setup can be found on the
|
Further examples of PolicyKit setup can be found on the
|
||||||
<a href="http://wiki.libvirt.org/page/SSHPolicyKitSetup">wiki page</a>.
|
<a href="http://wiki.libvirt.org/page/SSHPolicyKitSetup">wiki page</a>.
|
||||||
</p>
|
</p>
|
||||||
<h2><a id="ACL_server_sasl">SASL pluggable authentication</a></h2>
|
<h2><a name="ACL_server_username">Username/password auth</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Libvirt integrates with the cyrus-sasl library to provide a pluggable authentication
|
The plain TCP socket of the libvirt daemon defaults to using SASL for authentication.
|
||||||
system using the SASL protocol. SASL can be used in combination with libvirtd's TLS
|
The SASL mechanism configured by default is DIGEST-MD5, which provides a basic
|
||||||
or TCP socket listeners. When used with the TCP listener, the SASL mechanism is
|
username+password style authentication. It also provides for encryption of the data
|
||||||
rqeuired to provide session encryption in addition to authentication. Only a very
|
stream, so the security of the plain TCP socket is on a par with that of the TLS
|
||||||
few SASL mechanisms are able to do this, and of those that can do it, only the
|
socket. If desired the UNIX socket and TLS socket can also have SASL enabled by
|
||||||
GSSAPI plugin is considered acceptably secure by modern standards:
|
setting the <code>auth_unix_ro</code>, <code>auth_unix_rw</code>, <code>auth_tls</code>
|
||||||
</p>
|
config params in <code>libvirt.conf</code>.
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>GSSAPI</dt>
|
|
||||||
<dd><strong>This is the current default mechanism to use with libvirtd</strong>.
|
|
||||||
It uses the Kerberos v5 authentication protocol underneath, and assuming
|
|
||||||
the Kerberos client/server are configured with modern ciphers (AES),
|
|
||||||
it provides strong session encryption capabilities.</dd>
|
|
||||||
|
|
||||||
<dt>DIGEST-MD5</dt>
|
|
||||||
<dd>This was previously set as the default mechanism to use with libvirtd.
|
|
||||||
It provides a simple username/password based authentication mechanism
|
|
||||||
that includes session encryption.
|
|
||||||
<a href="https://tools.ietf.org/html/rfc6331">RFC 6331</a>, however,
|
|
||||||
documents a number of serious security flaws with DIGEST-MD5 and as a
|
|
||||||
result marks it as <code>OBSOLETE</code>. Specific concerns are that
|
|
||||||
it is vulnerable to MITM attacks and the MD5 hash can be brute-forced
|
|
||||||
to reveal the password. A replacement is provided via the SCRAM mechanism,
|
|
||||||
however, note that this does not provide encryption, so the SCRAM
|
|
||||||
mechanism can only be used on the libvirtd TLS listener.
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt>PASSDSS-3DES-1</dt>
|
|
||||||
<dd>This provides a simple username/password based authentication
|
|
||||||
mechanism that includes session encryption. The current cyrus-sasl
|
|
||||||
implementation does not provide a way to validate the server's
|
|
||||||
public key identity, thus it is susceptible to a MITM attacker
|
|
||||||
impersonating the server. It is also not enabled in many OS
|
|
||||||
distros when building SASL libraries.</dd>
|
|
||||||
|
|
||||||
<dt>KERBEROS_V4</dt>
|
|
||||||
<dd>This uses the obsolete Kerberos v4 protocol to provide both authentication
|
|
||||||
and session encryption. Kerberos v4 protocol has been obsolete since the
|
|
||||||
early 1990's and has known security vulnerabilities so this will never be
|
|
||||||
used in practice.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Other SASL mechanisms, not listed above, can only be used when the libvirtd
|
|
||||||
TLS or UNIX socket listeners.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3><a id="ACL_server_username">Username/password auth</a></h3>
|
|
||||||
<p>
|
|
||||||
As noted above, the DIGEST-MD5 mechanism is considered obsolete and should
|
|
||||||
not be used anymore. To provide a simple username/password auth scheme on
|
|
||||||
the libvirt UNIX socket or TLS listeners, however, it is possible to use
|
|
||||||
the SCRAM mechanism. The <code>auth_unix_ro</code>, <code>auth_unix_rw</code>,
|
|
||||||
<code>auth_tls</code> config params in <code>libvirt.conf</code> can be used
|
|
||||||
to turn on SASL auth in these listeners.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Since the libvirt SASL config file defaults to using GSSAPI (Kerberos), a
|
|
||||||
config change is rquired to enable plain password auth. This is done by
|
|
||||||
editting <code>/etc/sasl2/libvirt.conf</code> to set the <code>mech_list</code>
|
|
||||||
parameter to <code>scram-sha-1</code>.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Out of the box, no user accounts are defined, so no clients will be able to authenticate
|
Out of the box, no user accounts are defined, so no clients will be able to authenticate
|
||||||
@@ -297,13 +229,17 @@ again:
|
|||||||
<pre>
|
<pre>
|
||||||
# saslpasswd2 -a libvirt -d fred
|
# saslpasswd2 -a libvirt -d fred
|
||||||
</pre>
|
</pre>
|
||||||
<h3><a id="ACL_server_kerberos">GSSAPI/Kerberos auth</a></h3>
|
<h2><a name="ACL_server_kerberos">Kerberos auth</a></h2>
|
||||||
<p>
|
<p>
|
||||||
The plain TCP listener of the libvirt daemon defaults to using SASL for authentication.
|
The plain TCP socket of the libvirt daemon defaults to using SASL for authentication.
|
||||||
The libvirt SASL config also defaults to GSSAPI, so there is no need to edit the
|
The SASL mechanism configured by default is DIGEST-MD5, which provides a basic
|
||||||
SASL config when using GSSAPI. If the libvirtd TLS or UNIX listeners are used,
|
username+password style authentication. To enable Kerberos single-sign-on instead,
|
||||||
then the Kerberos session encryption will be disabled since it is not required
|
the libvirt SASL configuration file must be changed. This is <code>/etc/sasl2/libvirt.conf</code>.
|
||||||
in these scenarios - only the plain TCP listener needs encryption
|
The <code>mech_list</code> parameter must first be changed to <code>gssapi</code>
|
||||||
|
instead of the default <code>digest-md5</code>, and keytab should be set to
|
||||||
|
<code>/etc/libvirt/krb5.tab</code> . If SASL is enabled on the UNIX
|
||||||
|
and/or TLS sockets, Kerberos will also be used for them. Like DIGEST-MD5, the Kerberos
|
||||||
|
mechanism provides data encryption of the session.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Some operating systems do not install the SASL kerberos plugin by default. It
|
Some operating systems do not install the SASL kerberos plugin by default. It
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1 >Bindings for other languages and integration API modules</h1>
|
<h1 >Bindings for other languages</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Libvirt supports C and C++ directly, and has bindings available
|
Libvirt supports C and C++ directly, and has bindings available
|
||||||
@@ -14,17 +14,13 @@
|
|||||||
<strong>C#</strong>: Arnaud Champion develops
|
<strong>C#</strong>: Arnaud Champion develops
|
||||||
<a href="csharp.html">C# bindings</a>.
|
<a href="csharp.html">C# bindings</a>.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<strong>Go</strong>: Daniel Berrange develops
|
|
||||||
<a href="https://godoc.org/github.com/libvirt/libvirt-go">Go bindings</a>.
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<strong>Java</strong>: Daniel Veillard develops
|
<strong>Java</strong>: Daniel Veillard develops
|
||||||
<a href="java.html">Java bindings</a>.
|
<a href="java.html">Java bindings</a>.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>OCaml</strong>: Richard Jones develops
|
<strong>OCaml</strong>: Richard Jones develops
|
||||||
<a href="https://libvirt.org/ocaml/">OCaml bindings</a>.
|
<a href="http://libvirt.org/ocaml/">OCaml bindings</a>.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>Perl</strong>: Daniel Berrange develops
|
<strong>Perl</strong>: Daniel Berrange develops
|
||||||
@@ -33,7 +29,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
<strong>PHP</strong>: Radek Hladik started developing
|
<strong>PHP</strong>: Radek Hladik started developing
|
||||||
<a href="https://libvirt.org/php">PHP bindings</a> in 2010.
|
<a href="http://libvirt.org/php">PHP bindings</a> in 2010.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
In February 2011 the binding development has been moved to the libvirt.org website as
|
In February 2011 the binding development has been moved to the libvirt.org website as
|
||||||
@@ -43,15 +39,13 @@
|
|||||||
The project is now maintained by Michal Novotny and it's heavily based
|
The project is now maintained by Michal Novotny and it's heavily based
|
||||||
on Radek's version. For more information, including
|
on Radek's version. For more information, including
|
||||||
information on posting patches to libvirt-php, please refer
|
information on posting patches to libvirt-php, please refer
|
||||||
to the <a href="https://libvirt.org/php">PHP bindings</a> site.
|
to the <a href="http://libvirt.org/php">PHP bindings</a> site.
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
<strong>Python</strong>: Libvirt's python bindings are split to a
|
<strong>Python</strong>: Libvirt comes with direct support for
|
||||||
separate <a href="https://libvirt.org/git/?p=libvirt-python.git">package</a>
|
the Python language.
|
||||||
since version 1.2.0, older versions came with direct support for the
|
|
||||||
Python language.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
If your libvirt is installed as packages, rather than compiled
|
If your libvirt is installed as packages, rather than compiled
|
||||||
@@ -70,18 +64,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>Ruby</strong>: Chris Lalancette develops
|
<strong>Ruby</strong>: Chris Lalancette develops
|
||||||
<a href="https://libvirt.org/ruby/">Ruby bindings</a>.
|
<a href="http://libvirt.org/ruby/">Ruby bindings</a>.
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Integration API modules:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<strong>D-Bus</strong>: Pavel Hrdina develops
|
|
||||||
<a href="dbus.html">D-Bus API</a>.
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<browserconfig>
|
|
||||||
<msapplication>
|
|
||||||
<tile>
|
|
||||||
<square150x150logo src="/mstile-150x150.png"/>
|
|
||||||
<TileColor>#b91d47</TileColor>
|
|
||||||
</tile>
|
|
||||||
</msapplication>
|
|
||||||
</browserconfig>
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@@ -7,11 +7,11 @@
|
|||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="security">Security Issues</a></h2>
|
<h2><a name="security">Security Issues</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you think that an issue with libvirt may have security
|
If you think that an issue with libvirt may have security
|
||||||
implications, <strong>please do not</strong> publicly
|
implications, <strong>please do not</strong> publically
|
||||||
report it in the bug tracker, mailing lists, or irc. Libvirt
|
report it in the bug tracker, mailing lists, or irc. Libvirt
|
||||||
has <a href="securityprocess.html">a dedicated process for handling (potential) security issues</a>
|
has <a href="securityprocess.html">a dedicated process for handling (potential) security issues</a>
|
||||||
that should be used instead. So if your issue has security
|
that should be used instead. So if your issue has security
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<a href="securityprocess.html">security process</a> instead.
|
<a href="securityprocess.html">security process</a> instead.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="bugzilla">Bug Tracking</a></h2>
|
<h2><a name="bugzilla">Bug Tracking</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you are using libvirt binaries from a Linux distribution
|
If you are using libvirt binaries from a Linux distribution
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
first.
|
first.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="general">General libvirt bug reports</a></h2>
|
<h2><a name="general">General libvirt bug reports</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <a href="http://bugzilla.redhat.com">Red Hat Bugzilla Server</a>
|
The <a href="http://bugzilla.redhat.com">Red Hat Bugzilla Server</a>
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
<li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Virtualization%20Tools&component=libvirt">New libvirt ticket</a></li>
|
<li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Virtualization%20Tools&component=libvirt">New libvirt ticket</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a id="distribution">Linux Distribution specific bug reports</a></h2>
|
<h2><a name="distribution">Linux Distribution specific bug reports</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
If you are using binaries from <strong>Fedora</strong>, enter
|
If you are using binaries from <strong>Fedora</strong>, enter
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="quality">How to file high quality bug reports</a></h2>
|
<h2><a name="quality">How to file high quality bug reports</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
To increase the likelihood of your bug report being addressed it is
|
To increase the likelihood of your bug report being addressed it is
|
||||||
@@ -122,8 +122,7 @@
|
|||||||
<li>The hardware architecture being used</li>
|
<li>The hardware architecture being used</li>
|
||||||
<li>The name of the hypervisor (Xen, QEMU, KVM)</li>
|
<li>The name of the hypervisor (Xen, QEMU, KVM)</li>
|
||||||
<li>The XML config of the guest domain if relevant</li>
|
<li>The XML config of the guest domain if relevant</li>
|
||||||
<li>For Xen hypervisor, the domain logfiles from /var/log/xen and
|
<li>For Xen hypervisor, the XenD logfile from /var/log/xen</li>
|
||||||
/var/log/libvirt/libxl</li>
|
|
||||||
<li>For QEMU/KVM, the domain logfile from /var/log/libvirt/qemu</li>
|
<li>For QEMU/KVM, the domain logfile from /var/log/libvirt/qemu</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Control Groups Resource Management</h1>
|
<h1>Control Groups Resource Management</h1>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
for applying resource management to their virtual machines and containers.
|
for applying resource management to their virtual machines and containers.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="requiredControllers">Required controllers</a></h2>
|
<h2><a name="requiredControllers">Required controllers</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The control groups filesystem supports multiple "controllers". By default
|
The control groups filesystem supports multiple "controllers". By default
|
||||||
@@ -33,16 +33,16 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
The LXC driver is capable of using the <code>cpuset</code>,
|
The LXC driver is capable of using the <code>cpuset</code>,
|
||||||
<code>cpu</code>, <code>cpuacct</code>, <code>freezer</code>,
|
<code>cpu</code>, <code>cpuset</code>, <code>freezer</code>,
|
||||||
<code>memory</code>, <code>blkio</code> and <code>devices</code>
|
<code>memory</code>, <code>blkio</code> and <code>devices</code>
|
||||||
controllers. The <code>cpuacct</code>, <code>devices</code>
|
controllers. The <code>cpuset</code>, <code>devices</code>
|
||||||
and <code>memory</code> controllers are compulsory. Without
|
and <code>memory</code> controllers are compulsory. Without
|
||||||
them mounted, no containers can be started. If any of the
|
them mounted, no containers can be started. If any of the
|
||||||
other controllers are not mounted, the resource management APIs
|
other controllers are not mounted, the resource management APIs
|
||||||
which use them will cease to operate.
|
which use them will cease to operate.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="currentLayout">Current cgroups layout</a></h2>
|
<h2><a name="currentLayout">Current cgroups layout</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
As of libvirt 1.0.5 or later, the cgroups layout created by libvirt has been
|
As of libvirt 1.0.5 or later, the cgroups layout created by libvirt has been
|
||||||
@@ -63,14 +63,14 @@
|
|||||||
in two, one describing systemd hosts and the other non-systemd hosts.
|
in two, one describing systemd hosts and the other non-systemd hosts.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="currentLayoutSystemd">Systemd cgroups integration</a></h3>
|
<h3><a name="currentLayoutSystemd">Systemd cgroups integration</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
On hosts which use systemd, each consumer maps to a systemd scope unit,
|
On hosts which use systemd, each consumer maps to a systemd scope unit,
|
||||||
while partitions map to a system slice unit.
|
while partitions map to a system slice unit.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h4><a id="systemdScope">Systemd scope naming</a></h4>
|
<h4><a name="systemdScope">Systemd scope naming</a></h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The systemd convention is for the scope name of virtual machines / containers
|
The systemd convention is for the scope name of virtual machines / containers
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
The scope names map directly to the cgroup directory names.
|
The scope names map directly to the cgroup directory names.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h4><a id="systemdSlice">Systemd slice naming</a></h4>
|
<h4><a name="systemdSlice">Systemd slice naming</a></h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The systemd convention for slice naming is that a slice should include the
|
The systemd convention for slice naming is that a slice should include the
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
by libvirt will be associated with <code>machine.slice</code> by default.
|
by libvirt will be associated with <code>machine.slice</code> by default.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h4><a id="systemdLayout">Systemd cgroup layout</a></h4>
|
<h4><a name="systemdLayout">Systemd cgroup layout</a></h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Given this, a possible systemd cgroups layout involving 3 qemu guests,
|
Given this, a possible systemd cgroups layout involving 3 qemu guests,
|
||||||
@@ -145,7 +145,7 @@ $ROOT
|
|||||||
+- machine-lxc\x2dcontainer3.scope
|
+- machine-lxc\x2dcontainer3.scope
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="currentLayoutGeneric">Non-systemd cgroups layout</a></h3>
|
<h3><a name="currentLayoutGeneric">Non-systemd cgroups layout</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
On hosts which do not use systemd, each consumer has a corresponding cgroup
|
On hosts which do not use systemd, each consumer has a corresponding cgroup
|
||||||
@@ -206,7 +206,7 @@ $ROOT
|
|||||||
+- container3.libvirt-lxc
|
+- container3.libvirt-lxc
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2><a id="customPartiton">Using custom partitions</a></h2>
|
<h2><a name="customPartiton">Using custom partitions</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If there is a need to apply resource constraints to groups of
|
If there is a need to apply resource constraints to groups of
|
||||||
@@ -255,7 +255,7 @@ $ROOT
|
|||||||
later in this document did not support customization per guest.
|
later in this document did not support customization per guest.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="createSystemd">Creating custom partitions (systemd)</a></h3>
|
<h3><a name="createSystemd">Creating custom partitions (systemd)</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Given the XML config above, the admin on a systemd based host would
|
Given the XML config above, the admin on a systemd based host would
|
||||||
@@ -272,7 +272,7 @@ EOF
|
|||||||
# systemctl start machine-testing.slice
|
# systemctl start machine-testing.slice
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="createNonSystemd">Creating custom partitions (non-systemd)</a></h3>
|
<h3><a name="createNonSystemd">Creating custom partitions (non-systemd)</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Given the XML config above, the admin on a non-systemd based host
|
Given the XML config above, the admin on a non-systemd based host
|
||||||
@@ -291,7 +291,7 @@ EOF
|
|||||||
done
|
done
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2><a id="resourceAPIs">Resource management APIs/commands</a></h2>
|
<h2><a name="resourceAPIs">Resource management APIs/commands</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Since libvirt aims to provide an API which is portable across
|
Since libvirt aims to provide an API which is portable across
|
||||||
@@ -354,7 +354,7 @@ swap_hard_limit: unlimited
|
|||||||
network interfaces.
|
network interfaces.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="legacyLayout">Legacy cgroups layout</a></h2>
|
<h2><a name="legacyLayout">Legacy cgroups layout</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Prior to libvirt 1.0.5, the cgroups layout created by libvirt was different
|
Prior to libvirt 1.0.5, the cgroups layout created by libvirt was different
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1><a id="installation">libvirt Installation</a></h1>
|
<h1><a name="installation">libvirt Installation</a></h1>
|
||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="compiling">Compiling a release tarball</a></h2>
|
<h2><a name="compiling">Compiling a release tarball</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
libvirt uses the standard configure/make/install steps:
|
libvirt uses the standard configure/make/install steps:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
$ xz -c libvirt-x.x.x.tar.xz | tar xvf -
|
$ gunzip -c libvirt-x.x.x.tar.gz | tar xvf -
|
||||||
$ cd libvirt-x.x.x
|
$ cd libvirt-x.x.x
|
||||||
$ ./configure</pre>
|
$ ./configure</pre>
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ $ <b>sudo</b> <i>make install</i></pre>
|
|||||||
to update your list of installed shared libs.
|
to update your list of installed shared libs.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="building">Building from a GIT checkout</a></h2>
|
<h2><a name="building">Building from a GIT checkout</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt build process uses GNU autotools, so after obtaining a
|
The libvirt build process uses GNU autotools, so after obtaining a
|
||||||
@@ -125,7 +125,7 @@ $ make
|
|||||||
<pre>
|
<pre>
|
||||||
$ su -
|
$ su -
|
||||||
# service libvirtd stop (or systemctl stop libvirtd.service)
|
# service libvirtd stop (or systemctl stop libvirtd.service)
|
||||||
# /home/to/your/checkout/src/libvirtd
|
# /home/to/your/checkout/daemon/libvirtd
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Contacting the project contributors</h1>
|
<h1>Contacting the development team</h1>
|
||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="security">Security Issues</a></h2>
|
<h2><a name="security">Security Issues</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you think that an issue with libvirt may have security
|
If you think that an issue with libvirt may have security
|
||||||
implications, <strong>please do not</strong> publicly
|
implications, <strong>please do not</strong> publically
|
||||||
report it in the bug tracker, mailing lists, or irc. Libvirt
|
report it in the bug tracker, mailing lists, or irc. Libvirt
|
||||||
has <a href="securityprocess.html">a dedicated process for handling (potential) security issues</a>
|
has <a href="securityprocess.html">a dedicated process for handling (potential) security issues</a>
|
||||||
that should be used instead. So if your issue has security
|
that should be used instead. So if your issue has security
|
||||||
@@ -18,13 +18,13 @@
|
|||||||
<a href="securityprocess.html">security process</a> instead.
|
<a href="securityprocess.html">security process</a> instead.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="email">Mailing lists</a></h2>
|
<h2><a name="email">Mailing lists</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
There are three mailing-lists:
|
There are three mailing-lists:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl class="mail">
|
<dl>
|
||||||
<dt><a href="https://www.redhat.com/mailman/listinfo/libvir-list">libvir-list@redhat.com</a> (for development)</dt>
|
<dt><a href="https://www.redhat.com/mailman/listinfo/libvir-list">libvir-list@redhat.com</a> (for development)</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Archives at <a href="https://www.redhat.com/archives/libvir-list">https://www.redhat.com/archives/libvir-list</a>
|
Archives at <a href="https://www.redhat.com/archives/libvir-list">https://www.redhat.com/archives/libvir-list</a>
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
page.
|
page.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="irc">IRC discussion</a></h2>
|
<h2><a name="irc">IRC discussion</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Some of the libvirt developers may be found on IRC on the <a href="http://oftc.net">OFTC IRC</a>
|
Some of the libvirt developers may be found on IRC on the <a href="http://oftc.net">OFTC IRC</a>
|
||||||
|
|||||||
@@ -1,142 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<body>
|
|
||||||
<h1>Contributing to libvirt</h1>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This page provides guidance on how to contribute to the
|
|
||||||
libvirt project
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul id="toc"></ul>
|
|
||||||
|
|
||||||
<h2><a id="skills">Contributions required</a></h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The libvirt project is always looking for new contributors to
|
|
||||||
participate in ongoing activities. While code development is a
|
|
||||||
major part of the project, assistance is needed in many other
|
|
||||||
areas including documentation writing, bug triage, testing,
|
|
||||||
application integration, website / wiki content management,
|
|
||||||
translation, branding, social media and more. The only
|
|
||||||
requirement is an interest in virtualization and desire to
|
|
||||||
help.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The following is a non-exhaustive list of areas in which
|
|
||||||
people can contribute to libvirt. If you have ideas for
|
|
||||||
other contributions feel free to follow them.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><strong>Software development</strong>. The core library / daemon (and
|
|
||||||
thus the bulk of coding) is written in C, but there are
|
|
||||||
language bindings written in Python, Perl, Java, Ruby,
|
|
||||||
Php, OCaml and Go. There are also higher level wrappers
|
|
||||||
mapping libvirt into other object frameworks, such GLib,
|
|
||||||
CIM and SNMP. For those interested in working on the core parts of
|
|
||||||
libvirt, the <a href="hacking.html">contributor guidelines</a> are
|
|
||||||
mandatory reading</li>
|
|
||||||
<li><strong>Translation</strong>. All the libvirt modules aim to support
|
|
||||||
translations where appropriate. All translation is
|
|
||||||
handling outside of the normal libvirt review process,
|
|
||||||
using the <a href="http://fedora.zanata.org">Fedora
|
|
||||||
instance</a> of the Zanata tool. Thus people wishing
|
|
||||||
to contribute to translation should join the Fedora
|
|
||||||
translation team</li>
|
|
||||||
<li><strong>Documentation</strong>. There are docbook guides on various
|
|
||||||
aspects of libvirt, particularly application development
|
|
||||||
guides for the C library and Python, and a virsh command
|
|
||||||
reference. There is thus scope for work by people who are
|
|
||||||
familiar with using or developing against libvirt, to
|
|
||||||
write further content for these guides. There is also a
|
|
||||||
need for people to review existing content for copy editing
|
|
||||||
and identifying gaps in the docs</li>
|
|
||||||
<li><strong>Website / wiki curation</strong>. The bulk of the website is
|
|
||||||
maintained in the primary GIT repository, while the wiki
|
|
||||||
site uses mediawiki. In both cases there is a need for
|
|
||||||
people to both write new content and curate existing
|
|
||||||
content to identify outdated information, improve its
|
|
||||||
organization and target gaps.</li>
|
|
||||||
<li><strong>Testing</strong>. There are a number of tests suites that can run
|
|
||||||
automated tests against libvirt. The coverage of the tests
|
|
||||||
is never complete, so there is a need for people to create
|
|
||||||
new test suites and / or provide environments to actually
|
|
||||||
run the tests in a variety of deployment scenarios.</li>
|
|
||||||
<li><strong>Code analysis</strong>. The libvirt project has access to the coverity
|
|
||||||
tool to run static analysis against the codebase, however,
|
|
||||||
there are other types of code analysis that can be useful.
|
|
||||||
In particular fuzzing of the inputs can be very effective
|
|
||||||
at identifying problematic edge cases.</li>
|
|
||||||
<li><strong>Security handling</strong>. Downstream (operating system) vendors
|
|
||||||
who distribute libvirt may wish to propose a person to
|
|
||||||
be part of the security handling team, to get early access
|
|
||||||
to information about forthcoming vulnerability fixes.</li>
|
|
||||||
<li><strong>Evangalism</strong>. Work done by the project is of no benefit
|
|
||||||
unless the (potential) user community knows that it
|
|
||||||
exists. Thus it is critically important to the health
|
|
||||||
and future growth of the project, that there are a people
|
|
||||||
who evangalise the work created by the project. This can
|
|
||||||
take many forms, writing blog posts (about usage of features,
|
|
||||||
personal user experiences, areas for future work, and more),
|
|
||||||
syndicating docs and blogs via social media, giving user
|
|
||||||
group and/or conference talks about libvirt.</li>
|
|
||||||
<li><strong>User assistance</strong>. Since documentation
|
|
||||||
is never perfect, there are inevitably cases where users
|
|
||||||
will struggle to attain a deployment goal they have, or
|
|
||||||
run into trouble with managing an existing deployment.
|
|
||||||
While some users may be able to contact a software vendor
|
|
||||||
to obtain support, it is common to rely on community help
|
|
||||||
forums such as <a href="contact.html#email">libvirt users
|
|
||||||
mailing list</a>, or sites such as
|
|
||||||
<a href="http://stackoverflow.com/questions/tagged/libvirt">stackoverflow.</a>
|
|
||||||
People who are familiar with libvirt and have ability &
|
|
||||||
desire to help other users are encouraged to participate in
|
|
||||||
these help forums.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2><a id="comms">Communication</a></h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For full details on contacting other project contributors
|
|
||||||
read the <a href="contact.html">contact</a> page. There
|
|
||||||
are two main channels that libvirt uses for communication
|
|
||||||
between contributors:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3><a id="email">Mailing lists</a></h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The project has a number of
|
|
||||||
<a href="contact.html#email">mailing lists</a> for
|
|
||||||
general communication between contributors.
|
|
||||||
In general any design discussions and review
|
|
||||||
of contributions will take place on the mailing
|
|
||||||
lists, so it is important for all contributors
|
|
||||||
to follow the traffic.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3><a id="irc">Instant messaging / chat</a></h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Contributors to libvirt are encouraged to join the
|
|
||||||
<a href="contact.html#irc">IRC channel</a> used by
|
|
||||||
the project, where they can have live conversations
|
|
||||||
with others members.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2><a id="outreach">Student / outreach coding programs</a></h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Since 2016, the libvirt project directly participates as an
|
|
||||||
organization in the <a href="http://wiki.libvirt.org/page/Google_Summer_of_Code_Ideas">Google Summer of Code program</a>. Prior to
|
|
||||||
this the project had a number of students in the program
|
|
||||||
via a joint application with the QEMU project. People are
|
|
||||||
encouraged to look at both the libvirt and QEMU programs
|
|
||||||
to identify potentially interesting projects to work on.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>C# API bindings</h1>
|
<h1>C# API bindings</h1>
|
||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="description">Description</a></h2>
|
<h2><a name="description">Description</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The C# libvirt bindings are a class library. They use a Microsoft
|
The C# libvirt bindings are a class library. They use a Microsoft
|
||||||
@@ -19,7 +19,9 @@
|
|||||||
to libvirt.
|
to libvirt.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="requirements">Requirements</a></h2>
|
<p> </p>
|
||||||
|
|
||||||
|
<h2><a name="requirements">Requirements</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
These bindings depend upon the libvirt libraries being installed.
|
These bindings depend upon the libvirt libraries being installed.
|
||||||
@@ -29,8 +31,10 @@
|
|||||||
compiling libvirt for windows.
|
compiling libvirt for windows.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p> </p>
|
||||||
|
|
||||||
<!-- 2010-10-19 JC: Commented out until we have C# tarballs to download
|
<!-- 2010-10-19 JC: Commented out until we have C# tarballs to download
|
||||||
<h2><a id="getting">Getting them</a></h2>
|
<h2><a name="getting">Getting them</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The latest versions of the libvirt C# bindings can be downloaded from:
|
The latest versions of the libvirt C# bindings can be downloaded from:
|
||||||
@@ -38,19 +42,19 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="ftp://libvirt.org/libvirt/csharp/">libvirt.org FTP server</a></li>
|
<li><a href="ftp://libvirt.org/libvirt/csharp/">libvirt.org FTP server</a></li>
|
||||||
<li><a href="https://libvirt.org/sources/csharp/">libvirt.org HTTP server</a></li>
|
<li><a href="http://libvirt.org/sources/csharp/">libvirt.org HTTP server</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<h2><a id="git">GIT source repository</a></h2>
|
<h2><a name="git">GIT source repository</a></h2>
|
||||||
<p>
|
<p>
|
||||||
The C# bindings source code is maintained in a <a
|
The C# bindings source code is maintained in a <a
|
||||||
href="http://git-scm.com/">git</a> repository available on
|
href="http://git-scm.com/">git</a> repository available on
|
||||||
<a href="https://libvirt.org/git/">libvirt.org</a>:
|
<a href="http://libvirt.org/git/">libvirt.org</a>:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
git clone https://libvirt.org/git/libvirt-csharp.git
|
git clone git://libvirt.org/libvirt-csharp.git
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -58,10 +62,12 @@ git clone https://libvirt.org/git/libvirt-csharp.git
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-csharp.git;a=summary">https://libvirt.org/git/?p=libvirt-csharp.git;a=summary</a>
|
<a href="http://libvirt.org/git/?p=libvirt-csharp.git;a=summary">http://libvirt.org/git/?p=libvirt-csharp.git;a=summary</a>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2><a id="usage">Usage</a></h2>
|
<p> </p>
|
||||||
|
|
||||||
|
<h2><a name="usage">Usage</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt C# bindings class library exposes the <b>Libvirt</b>
|
The libvirt C# bindings class library exposes the <b>Libvirt</b>
|
||||||
@@ -110,15 +116,19 @@ git clone https://libvirt.org/git/libvirt-csharp.git
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a id="authors">Authors</a></h2>
|
<p> </p>
|
||||||
|
|
||||||
|
<h2><a name="authors">Authors</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The C# bindings are the work of Arnaud Champion
|
The C# bindings are the work of Arnaud Champion
|
||||||
<<a href="mailto:arnaud.champion AT devatom.fr">arnaud.champion AT devatom.fr</a>>,
|
<<a href="mailto:arnaud.champion AT devatom.fr">arnaud.champion AT devatom.fr</a>>,
|
||||||
based upon the previous work of Jaromír Červenka.
|
based upon the previous work of Jaromír Červenka.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="notes">Test Configuration</a></h2>
|
<p> </p>
|
||||||
|
|
||||||
|
<h2><a name="notes">Test Configuration</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Testing is performed using the following configurations:
|
Testing is performed using the following configurations:
|
||||||
@@ -129,85 +139,87 @@ git clone https://libvirt.org/git/libvirt-csharp.git
|
|||||||
<li>Ubuntu 10.10 amd64 / Mono 2.6.7 (compiled in 64 bits)</li>
|
<li>Ubuntu 10.10 amd64 / Mono 2.6.7 (compiled in 64 bits)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a id="type">Type Coverage</a></h2>
|
<p> </p>
|
||||||
|
|
||||||
|
<h2><a name="type">Type Coverage</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Coverage of the libvirt types is:
|
Coverage of the libvirt types is:
|
||||||
</p>
|
</p>
|
||||||
<table class="top_table">
|
<table class="top_table">
|
||||||
<tr><th>Type</th><th>Name</th><th>Binding?</th><th>Tested?</th><th>Sample Code?</th><th>Works?</th><th>Tested .Net/Windows Works?</th><th>Tested Mono (32-bit)/Windows Works?</th><th>Tested Mono (64-bit)/Linux Works?</th></tr>
|
<tr><th>Type</th><th>Name</th><th>Binding?</th><th>Tested?</th><th>Sample Code?</th><th>Works?</th><th>Tested .Net/Windows Works?</th><th>Tested Mono (32-bit)/Windows Works?</th><th>Tested Mono (64-bit)/Linux Works?</th></tr>
|
||||||
<tr><td>enum</td><td>virCPUCompareResult</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virCPUCompareResult</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virConnect</td><td>Yes, an IntPtr as the struct is not public</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virConnect</td><td>Yes, an IntPtr as the struct is not public</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virConnectAuth</td><td>Yes</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>struct</td><td>virConnectAuth</td><td>Yes</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>struct</td><td>virConnectCredential</td><td>Yes</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>struct</td><td>virConnectCredential</td><td>Yes</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>enum</td><td>virConnectCredentialType</td><td>Yes</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>enum</td><td>virConnectCredentialType</td><td>Yes</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>enum</td><td>virConnectFlags</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virConnectFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virDomain</td><td>Yes, an IntPtr as the struct is not public</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virDomain</td><td>Yes, an IntPtr as the struct is not public</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virDomainBlockInfo</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virDomainBlockInfo</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virDomainBlockStatsInfo</td><td>Yes</td><td>Yes</td><td>virDomainStats</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>struct</td><td>virDomainBlockStatsInfo</td><td>Yes</td><td>Yes</td><td>virDomainStats</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>enum</td><td>virDomainCoreDumpFlags</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainCoreDumpFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainCreateFlags</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainCreateFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainDeviceModifyFlags</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainDeviceModifyFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventDefinedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>enum</td><td>virDomainEventDefinedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>struct</td><td>virDomainEventGraphicsAddress</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virDomainEventGraphicsAddress</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventGraphicsAddressType</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainEventGraphicsAddressType</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventGraphicsPhase</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainEventGraphicsPhase</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virDomainEventGraphicsSubject</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virDomainEventGraphicsSubject</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virDomainEventGraphicsSubjectIdentity</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virDomainEventGraphicsSubjectIdentity</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventID</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainEventID</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventIOErrorAction</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainEventIOErrorAction</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventResumedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>enum</td><td>virDomainEventResumedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventStartedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>enum</td><td>virDomainEventStartedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventStoppedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>enum</td><td>virDomainEventStoppedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventSuspendedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>enum</td><td>virDomainEventSuspendedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>enum</td><td>virDomainEventType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventUndefinedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>enum</td><td>virDomainEventUndefinedDetailType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>enum</td><td>virDomainEventWatchdogAction</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainEventWatchdogAction</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virDomainInfo</td><td>Yes</td><td>Yes</td><td>virConnectSetErrorFunc, virDomainStats</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>struct</td><td>virDomainInfo</td><td>Yes</td><td>Yes</td><td>virConnectSetErrorFunc, virDomainStats</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>struct</td><td>virDomainInterfaceStatsStruct</td><td>Yes</td><td>Yes</td><td>virDomainStats</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>struct</td><td>virDomainInterfaceStatsStruct</td><td>Yes</td><td>Yes</td><td>virDomainStats</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>struct</td><td>virDomainJobInfo</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virDomainJobInfo</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainJobType</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainJobType</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainMemoryFlags</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainMemoryFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virDomainMemoryStatStruct</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virDomainMemoryStatStruct</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainMemoryStatTags</td><td>Yes</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainMemoryStatTags</td><td>Yes</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainMigrateFlags</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainMigrateFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virDomainSnapshot</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virDomainSnapshot</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainSnapshotDeleteFlags</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainSnapshotDeleteFlags</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainState</td><td>Yes</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainState</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virDomainXMLFlags</td><td>Yes</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virDomainXMLFlags</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virEventHandleType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>enum</td><td>virEventHandleType</td><td>Yes</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>struct</td><td>virInterface</td><td>Yes, an IntPtr as the struct is not public</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virInterface</td><td>Yes, an IntPtr as the struct is not public</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virInterfaceXMLFlags</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virInterfaceXMLFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virNWFilter</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virNWFilter</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virNetwork</td><td>Yes, an IntPtr as the struct is not public</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virNetwork</td><td>Yes, an IntPtr as the struct is not public</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virNodeDevice</td><td>Yes, an IntPtr as the struct is not public</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virNodeDevice</td><td>Yes, an IntPtr as the struct is not public</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virNodeInfo</td><td>Yes</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virNodeInfo</td><td>Yes</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virSchedParameter</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virSchedParameter</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virSchedParameterType</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virSchedParameterType</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virSecret</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virSecret</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virSecretUsageType</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virSecretUsageType</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virSecurityLabel</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virSecurityLabel</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virSecurityModel</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virSecurityModel</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virStoragePoolBuildFlags</td><td>Yes</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virStoragePoolBuildFlags</td><td>Yes</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virStoragePoolDeleteFlags</td><td>Yes</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virStoragePoolDeleteFlags</td><td>Yes</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virStoragePoolInfo</td><td>Yes</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virStoragePoolInfo</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virStoragePool</td><td>Yes, an IntPtr as the struct is not public</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virStoragePool</td><td>Yes, an IntPtr as the struct is not public</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virStoragePoolState</td><td>Yes</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virStoragePoolState</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virStorageVol</td><td>Yes, an IntPtr as the struct is not public</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virStorageVol</td><td>Yes, an IntPtr as the struct is not public</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virStorageVolDeleteFlags</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virStorageVolDeleteFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virStorageVolInfo</td><td>Yes</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virStorageVolInfo</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virStorageVolType</td><td>Yes</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virStorageVolType</td><td>Yes</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virStream</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virStream</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virStreamEventType</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virStreamEventType</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virStreamFlags</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virStreamFlags</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virVcpuInfo</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>struct</td><td>virVcpuInfo</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>enum</td><td>virVcpuState</td><td>No</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>enum</td><td>virVcpuState</td><td>No</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>struct</td><td>virError</td><td>Yes</td><td>Yes</td><td>virConnectSetErrorFunc, virDomainStats</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>struct</td><td>virError</td><td>Yes</td><td>Yes</td><td>virConnectSetErrorFunc, virDomainStats</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p></p>
|
<p> </p>
|
||||||
|
|
||||||
<h2><a id="funccover">Function Coverage</a></h2>
|
<h2><a name="funccover">Function Coverage</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Coverage of the libvirt functions is:
|
Coverage of the libvirt functions is:
|
||||||
@@ -215,274 +227,274 @@ git clone https://libvirt.org/git/libvirt-csharp.git
|
|||||||
<table class="top_table">
|
<table class="top_table">
|
||||||
<tr><th>Name</th><th>Binding?</th><th>Type?</th><th>Tested?</th><th>Sample Code?</th><th>Working?</th><th>Tested .Net/Windows Works?</th><th>Tested Mono (32-bit)/Windows Works?</th><th>Tested Mono (64-bit)/Linux Works?</th></tr>
|
<tr><th>Name</th><th>Binding?</th><th>Type?</th><th>Tested?</th><th>Sample Code?</th><th>Working?</th><th>Tested .Net/Windows Works?</th><th>Tested Mono (32-bit)/Windows Works?</th><th>Tested Mono (64-bit)/Linux Works?</th></tr>
|
||||||
<tr><td>virConnectAuthCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectAuthCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectBaselineCPU</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectBaselineCPU</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectClose</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectClose</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectCompareCPU</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectCompareCPU</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainEventCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainEventCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainEventDeregister</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainEventDeregister</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainEventDeregisterAny</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainEventDeregisterAny</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainEventGenericCallback</td><td>No</td><td>delegate</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainEventGenericCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainEventGraphicsCallback</td><td>No</td><td>delegate</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainEventGraphicsCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainEventIOErrorCallback</td><td>No</td><td>delegate</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainEventIOErrorCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainEventIOErrorReasonCallback</td><td>No</td><td>delegate</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainEventIOErrorReasonCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainEventRTCChangeCallback</td><td>No</td><td>delegate</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainEventRTCChangeCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainEventRegister</td><td>Yes</td><td>function</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectDomainEventRegister</td><td>Yes</td><td>function</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectDomainEventRegisterAny</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainEventRegisterAny</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainEventWatchdogCallback</td><td>No</td><td>delegate</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainEventWatchdogCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainXMLFromNative</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainXMLFromNative</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectDomainXMLToNative</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectDomainXMLToNative</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectFindStoragePoolSources</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectFindStoragePoolSources</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectGetCapabilities</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectGetCapabilities</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectGetHostname</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectGetHostname</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectGetLibVersion</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectGetLibVersion</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectGetMaxVcpus</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectGetMaxVcpus</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectGetType</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectGetType</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectGetURI</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectGetURI</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectGetVersion</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectGetVersion</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectIsEncrypted</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectIsEncrypted</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectIsSecure</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectIsSecure</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectListDefinedDomains</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectListDefinedDomains</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectListDefinedInterfaces </td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectListDefinedInterfaces </td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectListDefinedNetworks</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectListDefinedNetworks</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectListDefinedStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectListDefinedStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectListDomains</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectListDomains</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectListInterfaces</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes, if the host handle the method</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectListInterfaces</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes, if the host handle the method</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectListNWFilters </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectListNWFilters </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectListNetworks</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectListNetworks</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectListSecrets</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectListSecrets</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectListStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpen</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectListStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpen</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectNumOfDefinedDomains</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectNumOfDefinedDomains</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectNumOfDefinedInterfaces</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectNumOfDefinedInterfaces</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectNumOfDefinedNetworks</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectNumOfDefinedNetworks</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectNumOfDefinedStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectNumOfDefinedStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectNumOfDomains</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectNumOfDomains</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectNumOfInterfaces</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectNumOfInterfaces</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectNumOfNWFilters</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectNumOfNWFilters</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectNumOfNetworks </td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectNumOfNetworks </td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectNumOfSecrets</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectNumOfSecrets</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectNumOfStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpen</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectNumOfStoragePools</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpen</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectOpen</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpen, virEventRegisterImpl, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectOpen</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpen, virEventRegisterImpl, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectOpenAuth</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnectOpenAuth</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnectOpenReadOnly</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectOpenReadOnly</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virConnectRef</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virConnectRef</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainAbortJob</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainAbortJob</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainAttachDevice</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainAttachDevice</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainAttachDeviceFlags</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainAttachDeviceFlags</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainBlockPeek</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainBlockPeek</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainBlockStats</td><td>Yes</td><td>function</td><td>Yes</td><td>virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virDomainBlockStats</td><td>Yes</td><td>function</td><td>Yes</td><td>virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virDomainCoreDump</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainCoreDump</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainCreate</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainCreate</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainCreateLinux</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainCreateLinux</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainCreateWithFlags</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainCreateWithFlags</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainCreateXML</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainCreateXML</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainDefineXML</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainDefineXML</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainDestroy</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainDestroy</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainDetachDevice</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainDetachDevice</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainDetachDeviceFlags</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainDetachDeviceFlags</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainFree</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainFree</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetAutostart</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetAutostart</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetBlockInfo</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetBlockInfo</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetConnect</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetConnect</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetID</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetID</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetInfo</td><td>Yes</td><td>function</td><td>Yes</td><td>virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virDomainGetInfo</td><td>Yes</td><td>function</td><td>Yes</td><td>virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virDomainGetJobInfo</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetJobInfo</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetMaxMemory</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetMaxMemory</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetMaxVcpus</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetMaxVcpus</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetName</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virDomainGetName</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virDomainGetOSType</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetOSType</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetSchedulerParameters</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetSchedulerParameters</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetSchedulerType</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetSchedulerType</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetSecurityLabel</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetSecurityLabel</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetUUID</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetUUID</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetUUIDString</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetUUIDString</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetVcpus</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainGetVcpus</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainGetXMLDesc</td><td>Yes</td><td>function</td><td>Yes</td><td>virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virDomainGetXMLDesc</td><td>Yes</td><td>function</td><td>Yes</td><td>virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virDomainHasCurrentSnapshot</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainHasCurrentSnapshot</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainHasManagedSaveImage</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainHasManagedSaveImage</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainInterfaceStats </td><td>No</td><td>function</td><td>Yes</td><td>virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virDomainInterfaceStats </td><td>No</td><td>function</td><td>Yes</td><td>virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virDomainIsActive</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainIsActive</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainIsPersistent</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainIsPersistent</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainLookupByID</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virDomainLookupByID</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectOpenAuth, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virDomainLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td>virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virDomainLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td>virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virDomainLookupByUUID</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainLookupByUUID</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainLookupByUUIDString</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainLookupByUUIDString</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainManagedSave </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainManagedSave </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainManagedSaveRemove</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainManagedSaveRemove</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainMemoryPeek</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainMemoryPeek</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainMemoryStats</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainMemoryStats</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainMigrate</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainMigrate</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainMigrateSetMaxDowntime</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainMigrateSetMaxDowntime</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainMigrateToURI </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainMigrateToURI </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainPinVcpu</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainPinVcpu</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainReboot</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainReboot</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainRef </td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainRef </td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainRestore</td><td>Yes </td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainRestore</td><td>Yes </td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainResume </td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainResume </td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainRevertToSnapshot</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainRevertToSnapshot</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSave</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSave</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSetAutostart</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSetAutostart</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSetMaxMemory </td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSetMaxMemory </td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSetMemory</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSetMemory</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSetSchedulerParameters</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSetSchedulerParameters</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSetVcpus</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSetVcpus</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainShutdown</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainShutdown</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSnapshotCreateXML</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSnapshotCreateXML</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSnapshotCurrent</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSnapshotCurrent</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSnapshotDelete</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSnapshotDelete</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSnapshotFree</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSnapshotFree</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSnapshotGetXMLDesc</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSnapshotGetXMLDesc</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSnapshotListNames</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSnapshotListNames</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSnapshotLookupByName</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSnapshotLookupByName</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSnapshotNum</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSnapshotNum</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainSuspend</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainSuspend</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainUndefine</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainUndefine</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virDomainUpdateDeviceFlags</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virDomainUpdateDeviceFlags</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virEventAddHandleFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virEventAddHandleFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virEventAddTimeoutFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virEventAddTimeoutFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virEventHandleCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virEventHandleCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virEventRegisterImpl</td><td>Yes</td><td>function</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virEventRegisterImpl</td><td>Yes</td><td>function</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virEventRemoveHandleFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virEventRemoveHandleFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virEventRemoveTimeoutFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virEventRemoveTimeoutFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virEventTimeoutCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virEventTimeoutCallback</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virEventUpdateHandleFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virEventUpdateHandleFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virEventUpdateTimeoutFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virEventUpdateTimeoutFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virFreeCallback</td><td>Yes</td><td>function</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virFreeCallback</td><td>Yes</td><td>function</td><td>Yes</td><td>virEventRegisterImpl</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virGetVersion</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virGetVersion</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInitialize</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virInitialize</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceCreate</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceCreate</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceDefineXML</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceDefineXML</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceDestroy</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceDestroy</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceFree</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceFree</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceGetConnect</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceGetConnect</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceGetMACString</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceGetMACString</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceGetName</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceGetName</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceGetXMLDesc</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceGetXMLDesc</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceIsActive</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceIsActive</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceLookupByMACString</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceLookupByMACString</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceLookupByName</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceLookupByName</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceRef </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceRef </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virInterfaceUndefine</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virInterfaceUndefine</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterDefineXML</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterDefineXML</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterFree</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterFree</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterGetName</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterGetName</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterGetUUID</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterGetUUID</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterGetUUIDString</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterGetUUIDString</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterGetXMLDesc</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterGetXMLDesc</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterLookupByName </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterLookupByName </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterLookupByUUID</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterLookupByUUID</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterLookupByUUIDString</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterLookupByUUIDString</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterRef </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterRef </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNWFilterUndefine</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNWFilterUndefine</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkCreate</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkCreate</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkCreateXML</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkCreateXML</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkDefineXML</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkDefineXML</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkDestroy</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkDestroy</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkFree</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkFree</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkGetAutostart</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkGetAutostart</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkGetBridgeName</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkGetBridgeName</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkGetConnect</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkGetConnect</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkGetName</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkGetName</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkGetUUID</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkGetUUID</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkGetUUIDString </td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkGetUUIDString </td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkGetXMLDesc</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkGetXMLDesc</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkIsActive</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkIsActive</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkIsPersistent</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkIsPersistent</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkLookupByUUID</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkLookupByUUID</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkLookupByUUIDString</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkLookupByUUIDString</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkRef</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkRef</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkSetAutostart</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkSetAutostart</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNetworkUndefine</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNetworkUndefine</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceCreateXML</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceCreateXML</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceDestroy</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceDestroy</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceDettach</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceDettach</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceFree</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceFree</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceGetName</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceGetName</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceGetParent</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceGetParent</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceGetXMLDesc</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceGetXMLDesc</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceListCaps</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceListCaps</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceNumOfCaps</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceNumOfCaps</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceReAttach</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceReAttach</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceRef</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceRef</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeDeviceReset</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeDeviceReset</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeGetCellsFreeMemory</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeGetCellsFreeMemory</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeGetFreeMemory</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeGetFreeMemory</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeGetInfo</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeGetInfo</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeGetSecurityModel </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeGetSecurityModel </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeListDevices</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeListDevices</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virNodeNumOfDevices</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virNodeNumOfDevices</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretDefineXML</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretDefineXML</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretFree </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretFree </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretGetConnect</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretGetConnect</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretGetUUID</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretGetUUID</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretGetUUIDString </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretGetUUIDString </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretGetUsageID</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretGetUsageID</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretGetUsageType</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretGetUsageType</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretGetValue</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretGetValue</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretGetXMLDesc</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretGetXMLDesc</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretLookupByUUID</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretLookupByUUID</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretLookupByUUIDString</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretLookupByUUIDString</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretLookupByUsage</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretLookupByUsage</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretRef</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretRef</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretSetValue</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretSetValue</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virSecretUndefine</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virSecretUndefine</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolBuild</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolBuild</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolCreate</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolCreate</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolCreateXML </td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolCreateXML </td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolDefineXML</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolDefineXML</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolDelete</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolDelete</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolDestroy</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolDestroy</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolFree</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolFree</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolGetAutostart</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolGetAutostart</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolGetConnect</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolGetConnect</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolGetInfo</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolGetInfo</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolGetName</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolGetName</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolGetUUID</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolGetUUID</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolGetUUIDString</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolGetUUIDString</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolGetXMLDesc</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolGetXMLDesc</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolIsActive</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolIsActive</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolIsPersistent</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolIsPersistent</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolListVolumes</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolListVolumes</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolLookupByUUID</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolLookupByUUID</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolLookupByUUIDString</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolLookupByUUIDString</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolLookupByVolume</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolLookupByVolume</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolNumOfVolumes</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolNumOfVolumes</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolRef</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolRef</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolRefresh</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolRefresh</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolSetAutostart</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolSetAutostart</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStoragePoolUndefine</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStoragePoolUndefine</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolCreateXML</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolCreateXML</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolCreateXMLFrom</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolCreateXMLFrom</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolDelete</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolDelete</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolFree</td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolFree</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolGetConnect </td><td>Yes</td><td>function</td><td>No</td><td></td><td>Maybe</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolGetConnect </td><td>Yes</td><td>function</td><td>No</td><td> </td><td>Maybe</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolGetInfo</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolGetInfo</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolGetKey</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolGetKey</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolGetName</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolGetName</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolGetPath</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolGetPath</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolGetXMLDesc </td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolGetXMLDesc </td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolLookupByKey</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolLookupByKey</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolLookupByName</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolLookupByPath</td><td>Yes</td><td>function</td><td>Yes</td><td></td><td>Yes</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolLookupByPath</td><td>Yes</td><td>function</td><td>Yes</td><td> </td><td>Yes</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolRef</td><td>Yes</td><td>function</td><td>No</td><td></td><td>No</td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolRef</td><td>Yes</td><td>function</td><td>No</td><td> </td><td>No</td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStorageVolWipe</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStorageVolWipe</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamAbort </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamAbort </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamEventAddCallback</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamEventAddCallback</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamEventCallback</td><td>No</td><td>delegate</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamEventCallback</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamEventRemoveCallback</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamEventRemoveCallback</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamEventUpdateCallback</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamEventUpdateCallback</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamFinish </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamFinish </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamFree </td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamFree </td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamNew</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamNew</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamRecv</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamRecv</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamRecvAll</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamRecvAll</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamRef</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamRef</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamSend</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamSend</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamSendAll</td><td>No</td><td>function</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamSendAll</td><td>No</td><td>function</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamSinkFunc</td><td>No</td><td>delegate</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamSinkFunc</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virStreamSourceFunc</td><td>No</td><td>delegate</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
|
<tr><td>virStreamSourceFunc</td><td>No</td><td>delegate</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
|
||||||
<tr><td>virGetLastError</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectSetErrorFunc</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virGetLastError</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectSetErrorFunc</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virConnSetErrorFunc</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectSetErrorFunc</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virConnSetErrorFunc</td><td>Yes</td><td>function</td><td>Yes</td><td>virConnectSetErrorFunc</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
<tr><td>virErrorFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virConnectSetErrorFunc, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
<tr><td>virErrorFunc</td><td>Yes</td><td>delegate</td><td>Yes</td><td>virConnectSetErrorFunc, virDomainInfos</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr>
|
||||||
|
|||||||
@@ -1,102 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<body>
|
|
||||||
<h1>D-Bus API bindings</h1>
|
|
||||||
|
|
||||||
<ul id="toc"></ul>
|
|
||||||
|
|
||||||
<h2><a name="description">Description</a></h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
libvirt-dbus wraps libvirt API to provide a high-level object-oriented
|
|
||||||
API better suited for dbus-based applications.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2><a name="git">GIT source repository</a></h2>
|
|
||||||
<p>
|
|
||||||
The D-Bus bindings source code is maintained in a
|
|
||||||
<a href="https://git-scm.com/">git</a> repository available on
|
|
||||||
<a href="https://libvirt.org/git/">libvirt.org</a>:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
git clone https://libvirt.org/git/libvirt-dbus.git
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
They can also be browsed online:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-dbus.git">https://libvirt.org/git/?p=libvirt-dbus.git</a>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h2><a name="usage">Usage</a></h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
libvirt-dbus exports libvirt API using D-Bus objects with methods and
|
|
||||||
properties described by interfaces. Currently only local connection
|
|
||||||
to libvirt is exported and the list of supported drivers depends
|
|
||||||
on the type of the bus connection (session or system).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The name of the libvirt-dbus service is <code>org.libvirt</code>.
|
|
||||||
libvirt-dbus distributes an interface XML descriptions which can be
|
|
||||||
usually found at <code>/usr/share/dbus-1/interfaces/</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
By default unprivileged user has access only to the session D-Bus
|
|
||||||
connection. In order to allow specific user "foo" to access the system
|
|
||||||
D-Bus connection you need to create a file
|
|
||||||
<code>/etc/dbus-1/system.d/org.libvirt.conf</code> that contains:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
|
||||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
|
||||||
|
|
||||||
<busconfig>
|
|
||||||
|
|
||||||
<policy user="foo">
|
|
||||||
<allow send_destination="org.libvirt"/>
|
|
||||||
</policy>
|
|
||||||
|
|
||||||
</busconfig>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To get a list of supported drivers for the specific bus connection
|
|
||||||
you can run these commands (not all drivers may be available on
|
|
||||||
the host):
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
gdbus introspect --xml --session --dest org.libvirt --object-path /org/libvirt
|
|
||||||
gdbus introspect --xml --system --dest org.libvirt --object-path /org/libvirt
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Every object is introspectable so you can get a list of available
|
|
||||||
interfaces with methods, signals and properties running this command:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
gdbus introspect --xml --system --dest org.libvirt --object-path /org/libvirt/QEMU
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To get a list of domains for specific connection driver you can run
|
|
||||||
this command:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
gdbus call --system --dest org.libvirt --object-path /org/libvirt/QEMU \
|
|
||||||
--method org.libvirt.Connect.ListDomains 0
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
50
docs/deployment.html.in
Normal file
50
docs/deployment.html.in
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<?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>Deployment</h1>
|
||||||
|
|
||||||
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
|
<h2><a name="packages">Pre-packaged releases</a></h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The libvirt API is now available in all major Linux distributions,
|
||||||
|
so the simplest deployment approach is to use your distributions'
|
||||||
|
package management software to install the <code>libvirt</code>
|
||||||
|
module.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2><a name="tarball">Self-built releases</a></h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
libvirt uses GNU autotools for its build system, so deployment
|
||||||
|
follows the usual process of <code>configure; make ; make install</code>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
# ./configure --prefix=$HOME/usr
|
||||||
|
# make
|
||||||
|
# make install
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<h2><a name="git">Built from GIT</a></h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
When building from GIT it is necessary to generate the autotools
|
||||||
|
support files. This requires having <code>autoconf</code>,
|
||||||
|
<code>automake</code>, <code>libtool</code> and <code>intltool</code>
|
||||||
|
installed. The process can be automated with the <code>autogen.sh</code>
|
||||||
|
script.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
# ./autogen.sh --prefix=$HOME/usr
|
||||||
|
# make
|
||||||
|
# make install
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,42 +1,56 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>libvirt Application Development Guides</h1>
|
<h1>libvirt Application Development Guide</h1>
|
||||||
|
|
||||||
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt API is accessible from a number of programming languages.
|
The guide is both a learning tool for developing with libvirt and an
|
||||||
At this time, there are application development guides available
|
API reference document. It is a work in progress, composed by a
|
||||||
which cover the C API and the Python API. Of the two, the Python guide
|
professional author from contributions written by members of the
|
||||||
is currently the more comprehensive document.
|
libvirt team.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Contributions to the guide are <b>VERY</b> welcome. If you'd like to get
|
||||||
|
your name on this and demonstrate your virtualisation prowess, a solid
|
||||||
|
contribution to the content here will do it. :)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2><a name="online">Browsable online</a></h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://libvirt.org/docs/libvirt-appdev-guide/en-US/html/">Application Development Guide (C language) HTML</a></li>
|
<li><a href="http://libvirt.org/guide/html/">
|
||||||
<li><a href="https://libvirt.org/docs/libvirt-appdev-guide/en-US/pdf/">Application Development Guide (C language) PDF</a></li>
|
HTML format using multiple pages</a></li>
|
||||||
<li><a href="https://libvirt.org/docs/libvirt-appdev-guide-python/en-US/html/">Application Development Guide (Python language) HTML</a></li>
|
<li><a href="http://libvirt.org/guide/html-single/">
|
||||||
<li><a href="https://libvirt.org/docs/libvirt-appdev-guide-python/en-US/pdf/">Application Development Guide (Python language) PDF</a></li>
|
HTML format using one big page</a></li>
|
||||||
|
<li><a href="http://libvirt.org/guide/pdf/Application_Development_Guide.pdf">
|
||||||
|
PDF format</a></li>
|
||||||
|
<li><a href="http://libvirt.org/guide/libvirt-0.7.5-Application_Development_Guide-en-US.epub">
|
||||||
|
ePub format</a></li>
|
||||||
|
<li><a href="http://libvirt.org/guide/txt/Application_Development_Guide.txt">
|
||||||
|
Plain text format</a></li>
|
||||||
|
<li><a href="http://libvirt.org/guide/libvirt-Application_Development_Guide-0.7.5-web-en-US-1-9.el5.src.rpm">
|
||||||
|
Source RPM format</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>Contributing content</h2>
|
<h2><a name="git">GIT source repository</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
These guides are written in DocBook and published with the
|
The source is in a git repository:
|
||||||
publican tool, which is also used for Fedora and Red Hat
|
|
||||||
documentation. The original content is provided in GIT and
|
|
||||||
any contributions to the guide are welcome.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# C language
|
git clone git://libvirt.org/libvirt-appdev-guide.git</pre>
|
||||||
$ git clone <a href="https://libvirt.org/git/?p=libvirt-appdev-guide.git">https://libvirt.org/git/libvirt-appdev-guide.git</a>
|
|
||||||
|
|
||||||
# Python language
|
<p>
|
||||||
$ git clone <a href="https://libvirt.org/git/?p=libvirt-appdev-guide-python.git">https://libvirt.org/git/libvirt-appdev-guide-python.git</a>
|
Browsable here:
|
||||||
|
</p>
|
||||||
|
|
||||||
# Publican Style/Theme
|
<pre>
|
||||||
$ git clone <a href="https://libvirt.org/git/?p=libvirt-publican.git">https://libvirt.org/git/libvirt-publican.git</a>
|
<a href="http://libvirt.org/git/?p=libvirt-appdev-guide.git;a=summary">http://libvirt.org/git/?p=libvirt-appdev-guide.git;a=summary</a></pre>
|
||||||
</pre>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -566,8 +566,8 @@ initially for the <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.
|
|||||||
paravirtualization</a> but should be able to integrate other virtualization
|
paravirtualization</a> but should be able to integrate other virtualization
|
||||||
mechanisms if needed.</p>
|
mechanisms if needed.</p>
|
||||||
<p> If you get lost searching for some specific API use, try
|
<p> If you get lost searching for some specific API use, try
|
||||||
<a href="https://libvirt.org/search.php">the online search
|
<a href="http://libvirt.org/search.php">the online search
|
||||||
engine</a> hosted on <a href="https://libvirt.org/">libvirt.org</a>
|
engine</a> hosted on <a href="http://libvirt.org/">libvirt.org</a>
|
||||||
it indexes the project page, the APIs as well as the mailing-list archives. </p>
|
it indexes the project page, the APIs as well as the mailing-list archives. </p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,171 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body class="docs">
|
<body>
|
||||||
<div class="panel">
|
<h1>Documentation</h1>
|
||||||
<h2>Deployment / operation</h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><a href="apps.html">Applications</a></dt>
|
|
||||||
<dd>Applications known to use libvirt</dd>
|
|
||||||
|
|
||||||
<dt><a href="windows.html">Windows</a></dt>
|
|
||||||
<dd>Downloads for Windows</dd>
|
|
||||||
|
|
||||||
<dt><a href="migration.html">Migration</a></dt>
|
|
||||||
<dd>Migrating guests between machines</dd>
|
|
||||||
|
|
||||||
<dt><a href="remote.html">Remote access</a></dt>
|
|
||||||
<dd>Enable remote access over TCP</dd>
|
|
||||||
|
|
||||||
<dt><a href="auth.html">Authentication</a></dt>
|
|
||||||
<dd>Configure authentication for the libvirt daemon</dd>
|
|
||||||
|
|
||||||
<dt><a href="acl.html">Access control</a></dt>
|
|
||||||
<dd>Configure access control libvirt APIs with <a href="aclpolkit.html">polkit</a></dd>
|
|
||||||
|
|
||||||
<dt><a href="logging.html">Logging</a></dt>
|
|
||||||
<dd>The library and the daemon logging support</dd>
|
|
||||||
|
|
||||||
<dt><a href="auditlog.html">Audit log</a></dt>
|
|
||||||
<dd>Audit trail logs for host operations</dd>
|
|
||||||
|
|
||||||
<dt><a href="firewall.html">Firewall</a></dt>
|
|
||||||
<dd>Firewall and network filter configuration</dd>
|
|
||||||
|
|
||||||
<dt><a href="hooks.html">Hooks</a></dt>
|
|
||||||
<dd>Hooks for system specific management</dd>
|
|
||||||
|
|
||||||
<dt><a href="nss.html">NSS module</a></dt>
|
|
||||||
<dd>Enable domain host name translation to IP addresses</dd>
|
|
||||||
|
|
||||||
<dt><a href="http://wiki.libvirt.org/page/FAQ">FAQ</a></dt>
|
|
||||||
<dd>Frequently asked questions</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel">
|
|
||||||
<h2>Application development</h2>
|
|
||||||
<dl>
|
|
||||||
<dt><a href="devguide.html">Development Guide</a></dt>
|
|
||||||
<dd>A guide and reference for developing with libvirt</dd>
|
|
||||||
|
|
||||||
<dt><a href="virshcmdref.html">Virsh Commands</a></dt>
|
|
||||||
<dd>Command reference for virsh</dd>
|
|
||||||
|
|
||||||
<dt><a href="bindings.html">Language bindings and API modules</a></dt>
|
|
||||||
<dd>Bindings of the libvirt API for
|
|
||||||
<a href="csharp.html">c#</a>,
|
|
||||||
<a href="https://godoc.org/github.com/libvirt/libvirt-go">go</a>,
|
|
||||||
<a href="java.html">java</a>,
|
|
||||||
<a href="https://libvirt.org/ocaml/">ocaml</a>,
|
|
||||||
<a href="http://search.cpan.org/dist/Sys-Virt/">perl</a>,
|
|
||||||
<a href="python.html">python</a>,
|
|
||||||
<a href="php.html">php</a>,
|
|
||||||
<a href="https://libvirt.org/ruby/">ruby</a>
|
|
||||||
and integration API modules for
|
|
||||||
<a href="dbus.html">D-Bus</a></dd>
|
|
||||||
|
|
||||||
|
|
||||||
<dt><a href="format.html">XML schemas</a></dt>
|
|
||||||
<dd>Description of the XML schemas for
|
|
||||||
<a href="formatdomain.html">domains</a>,
|
|
||||||
<a href="formatnetwork.html">networks</a>,
|
|
||||||
<a href="formatnwfilter.html">network filtering</a>,
|
|
||||||
<a href="formatstorage.html">storage</a>,
|
|
||||||
<a href="formatstorageencryption.html">storage encryption</a>,
|
|
||||||
<a href="formatcaps.html">capabilities</a>,
|
|
||||||
<a href="formatdomaincaps.html">domain capabilities</a>,
|
|
||||||
<a href="formatnode.html">node devices</a>,
|
|
||||||
<a href="formatsecret.html">secrets</a>,
|
|
||||||
<a href="formatsnapshot.html">snapshots</a></dd>
|
|
||||||
|
|
||||||
<dt><a href="uri.html">URI format</a></dt>
|
|
||||||
<dd>The URI formats used for connecting to libvirt</dd>
|
|
||||||
|
|
||||||
<dt><a href="locking.html">Disk locking</a></dt>
|
|
||||||
<dd>Ensuring exclusive guest access to disks with
|
|
||||||
<a href="locking-lockd.html">virtlockd</a> or
|
|
||||||
<a href="locking-sanlock.html">Sanlock</a></dd>
|
|
||||||
|
|
||||||
<dt><a href="cgroups.html">CGroups</a></dt>
|
|
||||||
<dd>Control groups integration</dd>
|
|
||||||
|
|
||||||
<dt><a href="html/index.html">API reference</a></dt>
|
|
||||||
<dd>Reference manual for the C public API, split in
|
|
||||||
<a href="html/libvirt-libvirt-common.html">common</a>,
|
|
||||||
<a href="html/libvirt-libvirt-domain.html">domain</a>,
|
|
||||||
<a href="html/libvirt-libvirt-domain-snapshot.html">domain snapshot</a>,
|
|
||||||
<a href="html/libvirt-virterror.html">error</a>,
|
|
||||||
<a href="html/libvirt-libvirt-event.html">event</a>,
|
|
||||||
<a href="html/libvirt-libvirt-host.html">host</a>,
|
|
||||||
<a href="html/libvirt-libvirt-interface.html">interface</a>,
|
|
||||||
<a href="html/libvirt-libvirt-network.html">network</a>,
|
|
||||||
<a href="html/libvirt-libvirt-nodedev.html">node device</a>,
|
|
||||||
<a href="html/libvirt-libvirt-nwfilter.html">network filter</a>,
|
|
||||||
<a href="html/libvirt-libvirt-secret.html">secret</a>,
|
|
||||||
<a href="html/libvirt-libvirt-storage.html">storage</a>,
|
|
||||||
<a href="html/libvirt-libvirt-stream.html">stream</a>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt><a href="drivers.html">Drivers</a></dt>
|
|
||||||
<dd>Hypervisor specific driver information</dd>
|
|
||||||
|
|
||||||
<dt><a href="support.html">Support guarantees</a></dt>
|
|
||||||
<dd>Details of support status for various interfaces</dd>
|
|
||||||
|
|
||||||
<dt><a href="hvsupport.html">Driver support</a></dt>
|
|
||||||
<dd>matrix of API support per hypervisor per release</dd>
|
|
||||||
|
|
||||||
<dt><a href="secureusage.html">Secure usage</a></dt>
|
|
||||||
<dd>Secure usage of the libvirt APIs</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel">
|
|
||||||
<h2>Project development</h2>
|
|
||||||
<dl>
|
|
||||||
<dt><a href="hacking.html">Contributor guidelines</a></dt>
|
|
||||||
<dd>General hacking guidelines for contributors</dd>
|
|
||||||
|
|
||||||
<dt><a href="bugs.html">Bug reports</a></dt>
|
|
||||||
<dd>How and where to report bugs and request features</dd>
|
|
||||||
|
|
||||||
<dt><a href="compiling.html">Compiling</a></dt>
|
|
||||||
<dd>How to compile libvirt</dd>
|
|
||||||
|
|
||||||
<dt><a href="goals.html">Goals</a></dt>
|
|
||||||
<dd>Terminology and goals of libvirt API</dd>
|
|
||||||
|
|
||||||
<dt><a href="api.html">API concepts</a></dt>
|
|
||||||
<dd>The libvirt API concepts</dd>
|
|
||||||
|
|
||||||
<dt><a href="api_extension.html">API extensions</a></dt>
|
|
||||||
<dd>Adding new public libvirt APIs</dd>
|
|
||||||
|
|
||||||
<dt><a href="internals/eventloop.html">Event loop and worker pool</a></dt>
|
|
||||||
<dd>Libvirt's event loop and worker pool mode</dd>
|
|
||||||
|
|
||||||
<dt><a href="internals/command.html">Spawning commands</a></dt>
|
|
||||||
<dd>Spawning commands from libvirt driver code</dd>
|
|
||||||
|
|
||||||
<dt><a href="internals/rpc.html">RPC protocol & APIs</a></dt>
|
|
||||||
<dd>RPC protocol information and API / dispatch guide</dd>
|
|
||||||
|
|
||||||
<dt><a href="internals/locking.html">Lock managers</a></dt>
|
|
||||||
<dd>Use lock managers to protect disk content</dd>
|
|
||||||
|
|
||||||
<dt><a href="internals/oomtesting.html">Out of memory testing</a></dt>
|
|
||||||
<dd>Simulating OOM conditions in the test suite</dd>
|
|
||||||
|
|
||||||
<dt><a href="testsuites.html">Functional testing</a></dt>
|
|
||||||
<dd>Testing libvirt with <a href="testtck.html">TCK test suite</a> and
|
|
||||||
<a href="testapi.html">Libvirt-test-API</a></dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br class="clear"/>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,505 +1,51 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Downloads</h1>
|
<h1>Downloads</h1>
|
||||||
|
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
|
|
||||||
<h2><a id="releases">Project modules</a></h2>
|
<h2><a name="releases">Official Releases</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt project maintains a number of inter-related modules beyond
|
The latest versions of the libvirt C library can be downloaded from:
|
||||||
the core C library/daemon.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<table class="top_table downloads">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Module</th>
|
|
||||||
<th>Releases</th>
|
|
||||||
<th>GIT Repo</th>
|
|
||||||
<th>GIT Mirrors</th>
|
|
||||||
<th>Resources</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>libvirt</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt">github</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="html/index.html">api ref</a>
|
|
||||||
<a href="news.html">changes</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="7">Language bindings</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>C#</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/csharp/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/csharp/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-csharp.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-csharp">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-csharp">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Go</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/go/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/go/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-go.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-go">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-go">github</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://godoc.org/github.com/libvirt/libvirt-go">api ref</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Java</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/java/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/java/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-java.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-java">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-java">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>OCaml</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/ocaml/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/ocaml/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-ocaml.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-ocaml">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-ocaml">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Perl (Sys::Virt)</td>
|
|
||||||
<td>
|
|
||||||
<a href="http://search.cpan.org/dist/Sys-Virt/">cpan</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-perl.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-perl">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-perl">github</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="http://search.cpan.org/dist/Sys-Virt/">api ref</a>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-perl.git;a=blob;f=Changes;hb=HEAD">changes</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>PHP</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/php/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/php/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-php.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-php">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-php">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Python</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/python/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/python/">https</a>
|
|
||||||
<a href="https://pypi.python.org/pypi/libvirt-python">pypi</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-python.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-python">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-python">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Ruby</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/ruby/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/ruby/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=ruby-libvirt.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/ruby-libvirt">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/ruby-libvirt">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Rust</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/rust/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/rust/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-rust.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-rust">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-rust">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="7">Integration modules</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>GLib / GConfig / GObject</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/glib/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/glib/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-glib.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-glib">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-glib">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Go XML</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/go/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/go/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-go-xml.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-go-xml">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-go-xml">github</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://godoc.org/github.com/libvirt/libvirt-go-xml">api ref</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>D-Bus</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/dbus/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/dbus/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-dbus.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-dbus">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-dbus">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Console Proxy</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/consoleproxy/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/consoleproxy/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-console-proxy.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-console-proxy">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-console-proxy">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>CIM provider</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/CIM/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/CIM/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-cim.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-cim">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-cim">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>CIM utils</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/CIM/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/CIM/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libcmpiutil.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libcmpiutil">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libcmpiutil">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>SNMP</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/snmp/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/snmp/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-snmp.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-snmp">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-snmp">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Application Sandbox</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/sandbox/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/sandbox/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-sandbox.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-sandbox">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-sandbox">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="7">Testing</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>TCK</td>
|
|
||||||
<td>
|
|
||||||
<a href="ftp://libvirt.org/libvirt/tck/">ftp</a>
|
|
||||||
<a href="https://libvirt.org/sources/tck/">https</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-tck.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-tck">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-tck">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Test API</td>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-test-API.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-test-API">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-test-API">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Jenkins Config</td>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-jenkins-ci.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-jenkins-ci">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-jenkins-ci">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>CIM Test</td>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=cimtest.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/cimtest">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/cimtest">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="7">Documentation</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Publican Brand</td>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-publican.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-publican">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-publican">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>App Development Guide</td>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-appdev-guide.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-appdev-guide">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-appdev-guide">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>App Development Guide Python</td>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-appdev-guide-python.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-appdev-guide-python">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-appdev-guide-python">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>virsh Command Reference</td>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
<a href="https://libvirt.org/git/?p=libvirt-virshcmdref.git;a=summary">libvirt</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="https://gitlab.com/libvirt/libvirt-virshcmdref">gitlab</a>
|
|
||||||
<a href="https://github.com/libvirt/libvirt-virshcmdref">github</a>
|
|
||||||
</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<h2>Primary download site</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Most modules have releases made available for download on the project
|
|
||||||
site, via FTP, HTTP or HTTPS. Some modules are instead made available
|
|
||||||
at alternative locations, for example, the Perl binding is made
|
|
||||||
available only on CPAN.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="ftp://libvirt.org/libvirt/">libvirt.org FTP server</a></li>
|
<li><a href="ftp://libvirt.org/libvirt/">libvirt.org FTP server</a></li>
|
||||||
<li><a href="https://libvirt.org/sources/">libvirt.org HTTP server</a></li>
|
<li><a href="http://libvirt.org/sources/">libvirt.org HTTP server</a></li>
|
||||||
<li><a href="https://libvirt.org/sources/">libvirt.org HTTPS server</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a id="schedule">Primary release schedule</a></h2>
|
<h2><a name="hourly">Hourly development snapshots</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The core libvirt module follows a time based plan, with releases made
|
Once an hour, an automated snapshot is made from the git server
|
||||||
once a month on the 1st of each month give or take a few days. The only
|
source tree. These snapshots should be usable, but we make no guarantees
|
||||||
exception is at the start of the year where there are two 6 weeks gaps
|
about their stability; furthermore, they should NOT be
|
||||||
(first release in the middle of Jan, then skip the Feb release), giving
|
considered formal releases, and they may have transient security
|
||||||
a total of 11 releases a year. The Python and Perl modules will aim to
|
problems that will not be assigned a CVE.
|
||||||
release at the same time as the core libvirt module. Other modules have
|
|
||||||
independent ad-hoc releases with no fixed time schedule.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="numbering">Release numbering</a></h2>
|
<ul>
|
||||||
|
<li><a href="ftp://libvirt.org/libvirt/libvirt-git-snapshot.tar.gz">libvirt.org FTP server</a></li>
|
||||||
|
<li><a href="http://libvirt.org/sources/libvirt-git-snapshot.tar.gz">libvirt.org HTTP server</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2><a name="maintenance">Maintenance releases</a></h2>
|
||||||
<p>
|
<p>
|
||||||
Since libvirt 2.0.0, a time based version numbering rule
|
In the git repository are several stable maintenance branches,
|
||||||
is applied to the core library releases. As such, the changes
|
matching the
|
||||||
in version number have do not have any implications with respect
|
pattern <code>v<i>major</i>.<i>minor</i>.<i>micro</i>-maint</code>;
|
||||||
to the scope of features or bugfixes included, the stability of
|
|
||||||
the code, or the API / ABI compatibility (libvirt API / ABI is
|
|
||||||
guaranteed stable forever). The rules applied for changing the
|
|
||||||
libvirt version number are:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><code>major</code></dt>
|
|
||||||
<dd>incremented by 1 for the first release of the year (the
|
|
||||||
Jan 15th release)</dd>
|
|
||||||
<dt><code>minor</code></dt>
|
|
||||||
<dd>reset to 0 with every major increment, otherwise incremented by 1
|
|
||||||
for each monthly release from git master</dd>
|
|
||||||
<dt><code>micro</code></dt>
|
|
||||||
<dd>always 0 for releases from git master, incremented by 1
|
|
||||||
for each stable maintenance release</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Prior to 2.0.0, the major/minor numbers were incremented
|
|
||||||
fairly arbitrarily, and maintenance releases appended a
|
|
||||||
fourth digit. The language bindings will aim to use the
|
|
||||||
same version number as the most recent core library API
|
|
||||||
they support. The other modules have their own distinct
|
|
||||||
release numbering sequence, though they generally aim
|
|
||||||
to follow the above rules for incrementing major/minor/micro
|
|
||||||
digits.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2><a id="maintenance">Maintenance releases</a></h2>
|
|
||||||
<p>
|
|
||||||
In the git repository are several stable maintenance branches
|
|
||||||
for the core library, matching the
|
|
||||||
pattern <code>v<i>major</i>.<i>minor</i>-maint</code>;
|
|
||||||
these branches are forked off the corresponding
|
these branches are forked off the corresponding
|
||||||
<code>v<i>major</i>.<i>minor</i>.0</code> formal
|
<code>v<i>major</i>.<i>minor</i>.<i>micro</i></code> formal
|
||||||
release, and may have further releases of the
|
release, and may have further releases of the
|
||||||
form <code>v<i>major</i>.<i>minor</i>.<i>micro</i></code>.
|
form <code>v<i>major</i>.<i>minor</i>.<i>micro</i>.<i>rel</i></code>.
|
||||||
These maintenance branches should only contain bug fixes, and no
|
These maintenance branches should only contain bug fixes, and no
|
||||||
new features, backported from the master branch, and are
|
new features, backported from the master branch, and are
|
||||||
supported as long as at least one downstream distribution
|
supported as long as at least one downstream distribution
|
||||||
expresses interest in a given branch. These maintenance
|
expresses interest in a given branch. These maintenance
|
||||||
branches are considered during CVE analysis. In contrast
|
branches are considered during CVE analysis.
|
||||||
to the primary releases which are made once a month, there
|
|
||||||
is no formal schedule for the maintenance releases, which
|
|
||||||
are made whenever there is a need to make available key
|
|
||||||
bugfixes to downstream consumers. The language bindings
|
|
||||||
and other modules generally do not provide stable branch
|
|
||||||
releases.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -508,38 +54,71 @@
|
|||||||
wiki page</a>.
|
wiki page</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="git">GIT source repository</a></h2>
|
<h2><a name="git">GIT source repository</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
All modules maintained by the libvirt project have their primary
|
Libvirt code source is now maintained in a <a href="http://git-scm.com/">git</a>
|
||||||
source available in the <a href="https://libvirt.org/git/">project GIT server</a>.
|
repository available on <a href="http://libvirt.org/git/">libvirt.org</a>:
|
||||||
Each module can be cloned anonymously using:
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
git clone https://libvirt.org/git/[module name].git</pre>
|
git clone git://libvirt.org/libvirt.git</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>git://</code> protocol is also available if desired, but
|
It can also be browsed at:
|
||||||
<code>https://</code> is encouraged, since it is more reliable when
|
|
||||||
faced with strict firewalls.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
git clone git://libvirt.org/[module name].git</pre>
|
<a href="http://libvirt.org/git/?p=libvirt.git;a=summary">http://libvirt.org/git/?p=libvirt.git;a=summary</a></pre>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<h1>libvirt Application Development Guide</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In addition to this primary repository, there are the following read-only git
|
The guide is both a learning tool for developing with libvirt and an
|
||||||
repositories which mirror the master one. Note that we currently do not
|
API reference document. It is a work in progress, composed by a
|
||||||
use the full set of features on these mirrors (e.g. pull requests on
|
professional author from contributions written by members of the
|
||||||
GitHub, so please don't use them). All patch review and discussion only
|
libvirt team.
|
||||||
occurs on the <a href="contact.html">libvir-list</a> mailing list. Also
|
</p>
|
||||||
note that some repositories listed below allow HTTP checkouts too.
|
|
||||||
|
<p>
|
||||||
|
Contributions to the guide are <b>VERY</b> welcome. If you'd like to get
|
||||||
|
your name on this and demonstrate your virtualisation prowess, a solid
|
||||||
|
contribution to the content here will do it. :)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2><a name="appdevpdf">Application Development Guide PDF</a></h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
PDF download is available here:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><a href="http://libvirt.org/guide/pdf/Application_Development_Guide.pdf">libvirt App Dev Guide</a> (PDF)</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2><a name="appdevgit">Application Development Guide source GIT repository</a></h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The source is also in a git repository:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<a href="https://github.com/libvirt/">https://github.com/libvirt/</a>
|
git clone git://libvirt.org/libvirt-appdev-guide.git</pre>
|
||||||
<a href="https://gitlab.com/libvirt/libvirt">https://gitlab.com/libvirt/</a></pre>
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Browsable at:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<a href="http://libvirt.org/git/?p=libvirt-appdev-guide.git;a=summary">http://libvirt.org/git/?p=libvirt-appdev-guide.git;a=summary</a></pre>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Once you've have obtained the libvirt source code, you can compile it
|
||||||
|
using the <a href="compiling.html">instructions here</a>.
|
||||||
|
</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Internal drivers</h1>
|
<h1>Internal drivers</h1>
|
||||||
|
|
||||||
<ul>
|
<ul id="toc"></ul>
|
||||||
<li><a href="#hypervisor">Hypervisor drivers</a></li>
|
|
||||||
<li><a href="#storage">Storage drivers</a></li>
|
|
||||||
<li><a href="drvnodedev.html">Node device driver</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt public API delegates its implementation to one or
|
The libvirt public API delegates its implementation to one or
|
||||||
@@ -18,7 +14,7 @@
|
|||||||
network and storage driver active.
|
network and storage driver active.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="hypervisor">Hypervisor drivers</a></h2>
|
<h2><a name="hypervisor">Hypervisor drivers</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The hypervisor drivers currently supported by libvirt are:
|
The hypervisor drivers currently supported by libvirt are:
|
||||||
@@ -36,11 +32,10 @@
|
|||||||
<li><strong><a href="drvxen.html">Xen</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="drvhyperv.html">Microsoft Hyper-V</a></strong></li>
|
||||||
<li><strong><a href="drvphyp.html">IBM PowerVM (phyp)</a></strong></li>
|
<li><strong><a href="drvphyp.html">IBM PowerVM (phyp)</a></strong></li>
|
||||||
<li><strong><a href="drvvirtuozzo.html">Virtuozzo</a></strong></li>
|
<li><strong><a href="drvparallels.html">Parallels</a></strong></li>
|
||||||
<li><strong><a href="drvbhyve.html">Bhyve</a></strong> - The BSD Hypervisor</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a id="storage">Storage drivers</a></h2>
|
<h2><a name="storage">Storage drivers</a></h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong><a href="storage.html#StorageBackendDir">Directory backend</a></strong></li>
|
<li><strong><a href="storage.html#StorageBackendDir">Directory backend</a></strong></li>
|
||||||
|
|||||||
@@ -1,466 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<body>
|
|
||||||
<h1>Bhyve driver</h1>
|
|
||||||
|
|
||||||
<ul id="toc"></ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Bhyve is a FreeBSD hypervisor. It first appeared in FreeBSD 10.0. However, it's
|
|
||||||
recommended to keep tracking FreeBSD 10-STABLE to make sure all new features
|
|
||||||
of bhyve are supported.
|
|
||||||
|
|
||||||
In order to enable bhyve on your FreeBSD host, you'll need to load the <code>vmm</code>
|
|
||||||
kernel module. Additionally, <code>if_tap</code> and <code>if_bridge</code> modules
|
|
||||||
should be loaded for networking support. Also, <span class="since">since 3.2.0</span> the
|
|
||||||
<code>virt-host-validate(1)</code> supports the bhyve host validation and could be
|
|
||||||
used like this:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
$ virt-host-validate bhyve
|
|
||||||
BHYVE: Checking for vmm module : PASS
|
|
||||||
BHYVE: Checking for if_tap module : PASS
|
|
||||||
BHYVE: Checking for if_bridge module : PASS
|
|
||||||
BHYVE: Checking for nmdm module : PASS
|
|
||||||
$
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Additional information on bhyve could be obtained on <a href="http://bhyve.org/">bhyve.org</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2><a id="uri">Connections to the Bhyve driver</a></h2>
|
|
||||||
<p>
|
|
||||||
The libvirt bhyve driver is a single-instance privileged driver. Some sample
|
|
||||||
connection URIs are:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
bhyve:///system (local access)
|
|
||||||
bhyve+unix:///system (local access)
|
|
||||||
bhyve+ssh://root@example.com/system (remote access, SSH tunnelled)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h2><a id="exconfig">Example guest domain XML configurations</a></h2>
|
|
||||||
|
|
||||||
<h3>Example config</h3>
|
|
||||||
<p>
|
|
||||||
The bhyve driver in libvirt is in its early stage and under active development. So it supports
|
|
||||||
only limited number of features bhyve provides.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Note: in older libvirt versions, only a single network device and a single
|
|
||||||
disk device were supported per-domain. However,
|
|
||||||
<span class="since">since 1.2.6</span> the libvirt bhyve driver supports
|
|
||||||
up to 31 PCI devices.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Note: the Bhyve driver in libvirt will boot whichever device is first. If you
|
|
||||||
want to install from CD, put the CD device first. If not, put the root HDD
|
|
||||||
first.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Note: Only the SATA bus is supported. Only <code>cdrom</code>- and
|
|
||||||
<code>disk</code>-type disks are supported.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<domain type='bhyve'>
|
|
||||||
<name>bhyve</name>
|
|
||||||
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
|
|
||||||
<memory>219136</memory>
|
|
||||||
<currentMemory>219136</currentMemory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<os>
|
|
||||||
<type>hvm</type>
|
|
||||||
</os>
|
|
||||||
<features>
|
|
||||||
<apic/>
|
|
||||||
<acpi/>
|
|
||||||
</features>
|
|
||||||
<clock offset='utc'/>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>destroy</on_crash>
|
|
||||||
<devices>
|
|
||||||
<disk type='file'>
|
|
||||||
<driver name='file' type='raw'/>
|
|
||||||
<source file='/path/to/bhyve_freebsd.img'/>
|
|
||||||
<target dev='hda' bus='sata'/>
|
|
||||||
</disk>
|
|
||||||
<disk type='file' device='cdrom'>
|
|
||||||
<driver name='file' type='raw'/>
|
|
||||||
<source file='/path/to/cdrom.iso'/>
|
|
||||||
<target dev='hdc' bus='sata'/>
|
|
||||||
<readonly/>
|
|
||||||
</disk>
|
|
||||||
<interface type='bridge'>
|
|
||||||
<model type='virtio'/>
|
|
||||||
<source bridge="virbr0"/>
|
|
||||||
</interface>
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>(The <disk> sections may be swapped in order to install from
|
|
||||||
<em>cdrom.iso</em>.)</p>
|
|
||||||
|
|
||||||
<h3>Example config (Linux guest)</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Note the addition of <bootloader>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<domain type='bhyve'>
|
|
||||||
<name>linux_guest</name>
|
|
||||||
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
|
|
||||||
<memory>131072</memory>
|
|
||||||
<currentMemory>131072</currentMemory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<bootloader>/usr/local/sbin/grub-bhyve</bootloader>
|
|
||||||
<os>
|
|
||||||
<type>hvm</type>
|
|
||||||
</os>
|
|
||||||
<features>
|
|
||||||
<apic/>
|
|
||||||
<acpi/>
|
|
||||||
</features>
|
|
||||||
<clock offset='utc'/>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>destroy</on_crash>
|
|
||||||
<devices>
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<driver name='file' type='raw'/>
|
|
||||||
<source file='/path/to/guest_hdd.img'/>
|
|
||||||
<target dev='hda' bus='sata'/>
|
|
||||||
</disk>
|
|
||||||
<disk type='file' device='cdrom'>
|
|
||||||
<driver name='file' type='raw'/>
|
|
||||||
<source file='/path/to/cdrom.iso'/>
|
|
||||||
<target dev='hdc' bus='sata'/>
|
|
||||||
<readonly/>
|
|
||||||
</disk>
|
|
||||||
<interface type='bridge'>
|
|
||||||
<model type='virtio'/>
|
|
||||||
<source bridge="virbr0"/>
|
|
||||||
</interface>
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3>Example config (Linux UEFI guest, VNC, tablet)</h3>
|
|
||||||
|
|
||||||
<p>This is an example to boot into Fedora 25 installation:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<domain type='bhyve'>
|
|
||||||
<name>fedora_uefi_vnc_tablet</name>
|
|
||||||
<memory unit='G'>4</memory>
|
|
||||||
<vcpu>2</vcpu>
|
|
||||||
<os>
|
|
||||||
<type>hvm</type>
|
|
||||||
<b><loader readonly="yes" type="pflash">/usr/local/share/uefi-firmware/BHYVE_UEFI.fd</loader></b>
|
|
||||||
</os>
|
|
||||||
<features>
|
|
||||||
<apic/>
|
|
||||||
<acpi/>
|
|
||||||
</features>
|
|
||||||
<clock offset='utc'/>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>destroy</on_crash>
|
|
||||||
<devices>
|
|
||||||
<disk type='file' device='cdrom'>
|
|
||||||
<driver name='file' type='raw'/>
|
|
||||||
<source file='/path/to/Fedora-Workstation-Live-x86_64-25-1.3.iso'/>
|
|
||||||
<target dev='hdc' bus='sata'/>
|
|
||||||
<readonly/>
|
|
||||||
</disk>
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<driver name='file' type='raw'/>
|
|
||||||
<source file='/path/to/linux_uefi.img'/>
|
|
||||||
<target dev='hda' bus='sata'/>
|
|
||||||
</disk>
|
|
||||||
<interface type='bridge'>
|
|
||||||
<model type='virtio'/>
|
|
||||||
<source bridge="virbr0"/>
|
|
||||||
</interface>
|
|
||||||
<serial type="nmdm">
|
|
||||||
<source master="/dev/nmdm0A" slave="/dev/nmdm0B"/>
|
|
||||||
</serial>
|
|
||||||
<b><graphics type='vnc' port='5904'>
|
|
||||||
<listen type='address' address='127.0.0.1'/>
|
|
||||||
</graphics>
|
|
||||||
<controller type='usb' model='nec-xhci'/>
|
|
||||||
<input type='tablet' bus='usb'/></b>
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Please refer to the <a href="#uefi">UEFI</a> section for a more detailed explanation.</p>
|
|
||||||
|
|
||||||
<h2><a id="usage">Guest usage / management</a></h2>
|
|
||||||
|
|
||||||
<h3><a id="console">Connecting to a guest console</a></h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Guest console connection is supported through the <code>nmdm</code> device. It could be enabled by adding
|
|
||||||
the following to the domain XML (<span class="since">Since 1.2.4</span>):
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<devices>
|
|
||||||
<serial type="nmdm">
|
|
||||||
<source master="/dev/nmdm0A" slave="/dev/nmdm0B"/>
|
|
||||||
</serial>
|
|
||||||
</devices>
|
|
||||||
...</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<p>Make sure to load the <code>nmdm</code> kernel module if you plan to use that.</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Then <code>virsh console</code> command can be used to connect to the text console
|
|
||||||
of a guest.</p>
|
|
||||||
|
|
||||||
<p><b>NB:</b> Some versions of bhyve have a bug that prevents guests from booting
|
|
||||||
until the console is opened by a client. This bug was fixed in FreeBSD
|
|
||||||
<a href="http://svnweb.freebsd.org/changeset/base/262884">r262884</a>. If
|
|
||||||
an older version is used, one either has to open a console manually with <code>virsh console</code>
|
|
||||||
to let a guest boot or start a guest using:</p>
|
|
||||||
|
|
||||||
<pre>start --console domname</pre>
|
|
||||||
|
|
||||||
<p><b>NB:</b> A bootloader configured to require user interaction will prevent
|
|
||||||
the domain from starting (and thus <code>virsh console</code> or <code>start
|
|
||||||
--console</code> from functioning) until the user interacts with it manually on
|
|
||||||
the VM host. Because users typically do not have access to the VM host,
|
|
||||||
interactive bootloaders are unsupported by libvirt. <em>However,</em> if you happen to
|
|
||||||
run into this scenario and also happen to have access to the Bhyve host
|
|
||||||
machine, you may select a boot option and allow the domain to finish starting
|
|
||||||
by using an alternative terminal client on the VM host to connect to the
|
|
||||||
domain-configured null modem device. One example (assuming
|
|
||||||
<code>/dev/nmdm0B</code> is configured as the slave end of the domain serial
|
|
||||||
device) is:</p>
|
|
||||||
|
|
||||||
<pre>cu -l /dev/nmdm0B</pre>
|
|
||||||
|
|
||||||
<h3><a id="xmltonative">Converting from domain XML to Bhyve args</a></h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The <code>virsh domxml-to-native</code> command can preview the actual
|
|
||||||
<code>bhyve</code> commands that will be executed for a given domain.
|
|
||||||
It outputs two lines, the first line is a <code>bhyveload</code> command and
|
|
||||||
the second is a <code>bhyve</code> command.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>Please note that the <code>virsh domxml-to-native</code> doesn't do any
|
|
||||||
real actions other than printing the command, for example, it doesn't try to
|
|
||||||
find a proper TAP interface and create it, like what is done when starting
|
|
||||||
a domain; and always returns <code>tap0</code> for the network interface. So
|
|
||||||
if you're going to run these commands manually, most likely you might want to
|
|
||||||
tweak them.</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
# virsh -c "bhyve:///system" domxml-to-native --format bhyve-argv --xml /path/to/bhyve.xml
|
|
||||||
/usr/sbin/bhyveload -m 214 -d /home/user/vm1.img vm1
|
|
||||||
/usr/sbin/bhyve -c 2 -m 214 -A -I -H -P -s 0:0,hostbridge -s 3:0,virtio-net,tap0,mac=52:54:00:5d:74:e3 -s 2:0,virtio-blk,/home/user/vm1.img -s 1,lpc -l com1,/dev/nmdm0A vm1
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3><a id="zfsvolume">Using ZFS volumes</a></h3>
|
|
||||||
|
|
||||||
<p>It's possible to use ZFS volumes as disk devices <span class="since">since 1.2.8</span>.
|
|
||||||
An example of domain XML device entry for that will look like:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<disk type='volume' device='disk'>
|
|
||||||
<source pool='zfspool' volume='vol1'/>
|
|
||||||
<target dev='vdb' bus='virtio'/>
|
|
||||||
</disk>
|
|
||||||
...</pre>
|
|
||||||
|
|
||||||
<p>Please refer to the <a href="storage.html">Storage documentation</a> for more details on storage
|
|
||||||
management.</p>
|
|
||||||
|
|
||||||
<h3><a id="grubbhyve">Using grub2-bhyve or Alternative Bootloaders</a></h3>
|
|
||||||
|
|
||||||
<p>It's possible to boot non-FreeBSD guests by specifying an explicit
|
|
||||||
bootloader, e.g. <code>grub-bhyve(1)</code>. Arguments to the bootloader may be
|
|
||||||
specified as well. If the bootloader is <code>grub-bhyve</code> and arguments
|
|
||||||
are omitted, libvirt will try and infer boot ordering from user-supplied
|
|
||||||
<boot order='N'> configuration in the domain. Failing that, it will boot
|
|
||||||
the first disk in the domain (either <code>cdrom</code>- or
|
|
||||||
<code>disk</code>-type devices). If the disk type is <code>disk</code>, it will
|
|
||||||
attempt to boot from the first partition in the disk image.</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<bootloader>/usr/local/sbin/grub-bhyve</bootloader>
|
|
||||||
<bootloader_args>...</bootloader_args>
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Caveat: <code>bootloader_args</code> does not support any quoting.
|
|
||||||
Filenames, etc, must not have spaces or they will be tokenized incorrectly.</p>
|
|
||||||
|
|
||||||
<h3><a id="uefi">Using UEFI bootrom, VNC, and USB tablet</a></h3>
|
|
||||||
|
|
||||||
<p><span class="since">Since 3.2.0</span>, in addition to <a href="#grubbhyve">grub-bhyve</a>,
|
|
||||||
non-FreeBSD guests could be also booted using an UEFI boot ROM, provided both guest OS and
|
|
||||||
installed <code>bhyve(1)</code> version support UEFI. To use that, <code>loader</code>
|
|
||||||
should be specified in the <code>os</code> section:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<domain type='bhyve'>
|
|
||||||
...
|
|
||||||
<os>
|
|
||||||
<type>hvm</type>
|
|
||||||
<loader readonly="yes" type="pflash">/usr/local/share/uefi-firmware/BHYVE_UEFI.fd</loader>
|
|
||||||
</os>
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>This uses the UEFI firmware provided by
|
|
||||||
the <a href="https://www.freshports.org/sysutils/bhyve-firmware/">sysutils/bhyve-firmware</a>
|
|
||||||
FreeBSD port.</p>
|
|
||||||
|
|
||||||
<p>VNC and the tablet input device could be configured this way:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<domain type='bhyve'>
|
|
||||||
<devices>
|
|
||||||
...
|
|
||||||
<graphics type='vnc' port='5904'>
|
|
||||||
<listen type='address' address='127.0.0.1'/>
|
|
||||||
</graphics>
|
|
||||||
<controller type='usb' model='nec-xhci'/>
|
|
||||||
<input type='tablet' bus='usb'/>
|
|
||||||
</devices>
|
|
||||||
...
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>This way, VNC will be accessible on <code>127.0.0.1:5904</code>.</p>
|
|
||||||
|
|
||||||
<p>Please note that the tablet device requires to have a USB controller
|
|
||||||
of the <code>nec-xhci</code> model. Currently, only a single controller of this
|
|
||||||
type and a single tablet are supported per domain.</p>
|
|
||||||
|
|
||||||
<p><span class="since">Since 3.5.0</span>, it's possible to configure how the video device is exposed
|
|
||||||
to the guest using the <code>vgaconf</code> attribute:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<domain type='bhyve'>
|
|
||||||
<devices>
|
|
||||||
...
|
|
||||||
<graphics type='vnc' port='5904'>
|
|
||||||
<listen type='address' address='127.0.0.1'/>
|
|
||||||
</graphics>
|
|
||||||
<video>
|
|
||||||
<driver vgaconf='on'/>
|
|
||||||
<model type='gop' heads='1' primary='yes'/>
|
|
||||||
</video>
|
|
||||||
...
|
|
||||||
</devices>
|
|
||||||
...
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>If not specified, bhyve's default mode for <code>vgaconf</code>
|
|
||||||
will be used. Please refer to the
|
|
||||||
<a href="https://www.freebsd.org/cgi/man.cgi?query=bhyve&sektion=8&manpath=FreeBSD+12-current">bhyve(8)</a>
|
|
||||||
manual page and the <a href="https://wiki.freebsd.org/bhyve">bhyve wiki</a> for more details on using
|
|
||||||
the <code>vgaconf</code> option.</p>
|
|
||||||
|
|
||||||
<p><span class="since">Since 3.7.0</span>, it's possible to use <code>autoport</code>
|
|
||||||
to let libvirt allocate VNC port automatically (instead of explicitly specifying
|
|
||||||
it with the <code>port</code> attribute):</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<graphics type='vnc' autoport='yes'>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3><a id="clockconfig">Clock configuration</a></h3>
|
|
||||||
|
|
||||||
<p>Originally bhyve supported only localtime for RTC. Support for UTC time was introduced in
|
|
||||||
<a href="http://svnweb.freebsd.org/changeset/base/284894">r284894</a> for <i>10-STABLE</i> and
|
|
||||||
in <a href="http://svnweb.freebsd.org/changeset/base/279225">r279225</a> for <i>-CURRENT</i>.
|
|
||||||
It's possible to use this in libvirt <span class="since">since 1.2.18</span>, just place the
|
|
||||||
following to domain XML:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<domain type="bhyve">
|
|
||||||
...
|
|
||||||
<clock offset='utc'/>
|
|
||||||
...
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>Please note that if you run the older bhyve version that doesn't support UTC time, you'll
|
|
||||||
fail to start a domain. As UTC is used as a default when you do not specify clock settings,
|
|
||||||
you'll need to explicitly specify 'localtime' in this case:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<domain type="bhyve">
|
|
||||||
...
|
|
||||||
<clock offset='localtime'/>
|
|
||||||
...
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3><a id="e1000">e1000 NIC</a></h3>
|
|
||||||
|
|
||||||
<p>As of <a href="https://svnweb.freebsd.org/changeset/base/302504">r302504</a> bhyve
|
|
||||||
supports Intel e1000 network adapter emulation. It's supported in libvirt
|
|
||||||
<span class="since">since 3.1.0</span> and could be used as follows:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<interface type='bridge'>
|
|
||||||
<source bridge='virbr0'/>
|
|
||||||
<model type='<b>e1000</b>'/>
|
|
||||||
</interface>
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3><a id="wired">Wiring guest memory</a></h3>
|
|
||||||
|
|
||||||
<p><span class="since">Since 4.4.0</span>, it's possible to specify that guest memory should
|
|
||||||
be wired and cannot be swapped out as follows:</p>
|
|
||||||
<pre>
|
|
||||||
<domain type="bhyve">
|
|
||||||
...
|
|
||||||
<memoryBacking>
|
|
||||||
<locked/>
|
|
||||||
</memoryBacking>
|
|
||||||
...
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<h3><a id="cputopology">CPU topology</a></h3>
|
|
||||||
|
|
||||||
<p><span class="since">Since 4.5.0</span>, it's possible to specify guest CPU topology, if bhyve
|
|
||||||
supports that. Support for specifying guest CPU topology was added to bhyve in
|
|
||||||
<a href="http://svnweb.freebsd.org/changeset/base/332298">r332298</a> for <i>-CURRENT</i>.
|
|
||||||
Example:</p>
|
|
||||||
<pre>
|
|
||||||
<domain type="bhyve">
|
|
||||||
...
|
|
||||||
<cpu>
|
|
||||||
<topology sockets='1' cores='2' threads='1'/>
|
|
||||||
</cpu>
|
|
||||||
...
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>VMware ESX hypervisor driver</h1>
|
<h1>VMware ESX hypervisor driver</h1>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
connect to a VMware vCenter 2.5/4.x/5.x (VPX).
|
connect to a VMware vCenter 2.5/4.x/5.x (VPX).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="project">Project Links</a></h2>
|
<h2><a name="project">Project Links</a></h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a id="prereq">Deployment pre-requisites</a></h2>
|
<h2><a name="prereq">Deployment pre-requisites</a></h2>
|
||||||
<p>
|
<p>
|
||||||
None. Any out-of-the-box installation of VPX/ESX(i)/GSX should work. No
|
None. Any out-of-the-box installation of VPX/ESX(i)/GSX should work. No
|
||||||
preparations are required on the server side, no libvirtd must be
|
preparations are required on the server side, no libvirtd must be
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
VMware vSphere API</a>.
|
VMware vSphere API</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="uri">Connections to the VMware ESX driver</a></h2>
|
<h2><a name="uri">Connections to the VMware ESX driver</a></h2>
|
||||||
<p>
|
<p>
|
||||||
Some example remote connection URIs for the driver are:
|
Some example remote connection URIs for the driver are:
|
||||||
</p>
|
</p>
|
||||||
@@ -54,7 +54,7 @@ esx://example-esx.com/?no_verify=1 (ESX over HTTPS, but doesn't verify the s
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="uriformat">URI Format</a></h3>
|
<h3><a name="uriformat">URI Format</a></h3>
|
||||||
<p>
|
<p>
|
||||||
URIs have this general form (<code>[...]</code> marks an optional part).
|
URIs have this general form (<code>[...]</code> marks an optional part).
|
||||||
</p>
|
</p>
|
||||||
@@ -93,7 +93,7 @@ vpx://example-vcenter.com/folder1/dc1/folder2/example-esx.com
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h4><a id="extraparams">Extra parameters</a></h4>
|
<h4><a name="extraparams">Extra parameters</a></h4>
|
||||||
<p>
|
<p>
|
||||||
Extra parameters can be added to a URI as part of the query string
|
Extra parameters can be added to a URI as part of the query string
|
||||||
(the part following <code>?</code>). A single parameter is formed by a
|
(the part following <code>?</code>). A single parameter is formed by a
|
||||||
@@ -148,7 +148,7 @@ vpx://example-vcenter.com/folder1/dc1/folder2/example-esx.com
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
If set to 1, this disables libcurl client checks of the server's
|
If set to 1, this disables libcurl client checks of the server's
|
||||||
SSL certificate. The default value is 0. See the
|
SSL certificate. The default value it 0. See the
|
||||||
<a href="#certificates">Certificates for HTTPS</a> section for
|
<a href="#certificates">Certificates for HTTPS</a> section for
|
||||||
details.
|
details.
|
||||||
</td>
|
</td>
|
||||||
@@ -164,7 +164,7 @@ vpx://example-vcenter.com/folder1/dc1/folder2/example-esx.com
|
|||||||
If set to 1, the driver answers all
|
If set to 1, the driver answers all
|
||||||
<a href="#questions">questions</a> with the default answer.
|
<a href="#questions">questions</a> with the default answer.
|
||||||
If set to 0, questions are reported as errors. The default
|
If set to 0, questions are reported as errors. The default
|
||||||
value is 0. <span class="since">Since 0.7.5</span>.
|
value it 0. <span class="since">Since 0.7.5</span>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -188,7 +188,7 @@ vpx://example-vcenter.com/folder1/dc1/folder2/example-esx.com
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="auth">Authentication</a></h3>
|
<h3><a name="auth">Authentication</a></h3>
|
||||||
<p>
|
<p>
|
||||||
In order to perform any useful operation the driver needs to log into
|
In order to perform any useful operation the driver needs to log into
|
||||||
the ESX server. Therefore, only <code>virConnectOpenAuth</code> can be
|
the ESX server. Therefore, only <code>virConnectOpenAuth</code> can be
|
||||||
@@ -208,7 +208,7 @@ vpx://example-vcenter.com/folder1/dc1/folder2/example-esx.com
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="certificates">Certificates for HTTPS</a></h3>
|
<h3><a name="certificates">Certificates for HTTPS</a></h3>
|
||||||
<p>
|
<p>
|
||||||
By default the ESX driver uses HTTPS to communicate with an ESX server.
|
By default the ESX driver uses HTTPS to communicate with an ESX server.
|
||||||
Proper HTTPS communication requires correctly configured SSL
|
Proper HTTPS communication requires correctly configured SSL
|
||||||
@@ -244,7 +244,7 @@ error: internal error curl_easy_perform() returned an error: Peer certificate ca
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="connproblems">Connection problems</a></h3>
|
<h3><a name="connproblems">Connection problems</a></h3>
|
||||||
<p>
|
<p>
|
||||||
There are also other causes for connection problems than the
|
There are also other causes for connection problems than the
|
||||||
<a href="#certificates">HTTPS certificate</a> related ones.
|
<a href="#certificates">HTTPS certificate</a> related ones.
|
||||||
@@ -303,7 +303,7 @@ error: invalid argument in libvirt was built without the 'esx' driver
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="questions">Questions blocking tasks</a></h2>
|
<h2><a name="questions">Questions blocking tasks</a></h2>
|
||||||
<p>
|
<p>
|
||||||
Some methods of the VI API start tasks, for example
|
Some methods of the VI API start tasks, for example
|
||||||
<code>PowerOnVM_Task()</code>. Such tasks may be blocked by questions
|
<code>PowerOnVM_Task()</code>. Such tasks may be blocked by questions
|
||||||
@@ -322,12 +322,12 @@ error: invalid argument in libvirt was built without the 'esx' driver
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="xmlspecial">Specialties in the domain XML config</a></h2>
|
<h2><a name="xmlspecial">Specialties in the domain XML config</a></h2>
|
||||||
<p>
|
<p>
|
||||||
There are several specialties in the domain XML config for ESX domains.
|
There are several specialties in the domain XML config for ESX domains.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="restrictions">Restrictions</a></h3>
|
<h3><a name="restrictions">Restrictions</a></h3>
|
||||||
<p>
|
<p>
|
||||||
There are some restrictions for some values of the domain XML config.
|
There are some restrictions for some values of the domain XML config.
|
||||||
The driver will complain if this restrictions are violated.
|
The driver will complain if this restrictions are violated.
|
||||||
@@ -347,7 +347,7 @@ error: invalid argument in libvirt was built without the 'esx' driver
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="datastore">Datastore references</a></h3>
|
<h3><a name="datastore">Datastore references</a></h3>
|
||||||
<p>
|
<p>
|
||||||
Storage is managed in datastores. VMware uses a special path format to
|
Storage is managed in datastores. VMware uses a special path format to
|
||||||
reference files in a datastore. Basically, the datastore name is put
|
reference files in a datastore. Basically, the datastore name is put
|
||||||
@@ -366,7 +366,7 @@ error: invalid argument in libvirt was built without the 'esx' driver
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="macaddresses">MAC addresses</a></h3>
|
<h3><a name="macaddresses">MAC addresses</a></h3>
|
||||||
<p>
|
<p>
|
||||||
VMware has registered two MAC address prefixes for domains:
|
VMware has registered two MAC address prefixes for domains:
|
||||||
<code>00:0c:29</code> and <code>00:50:56</code>. These prefixes are
|
<code>00:0c:29</code> and <code>00:50:56</code>. These prefixes are
|
||||||
@@ -427,7 +427,7 @@ ethernet0.checkMACAddress = "false"
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="hardware">Available hardware</a></h3>
|
<h3><a name="hardware">Available hardware</a></h3>
|
||||||
<p>
|
<p>
|
||||||
VMware ESX supports different models of SCSI controllers and network
|
VMware ESX supports different models of SCSI controllers and network
|
||||||
cards.
|
cards.
|
||||||
@@ -437,7 +437,7 @@ ethernet0.checkMACAddress = "false"
|
|||||||
<dl>
|
<dl>
|
||||||
<dt><code>auto</code></dt>
|
<dt><code>auto</code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
This isn't an actual controller model. If specified the ESX driver
|
This isn't a actual controller model. If specified the ESX driver
|
||||||
tries to detect the SCSI controller model referenced in the
|
tries to detect the SCSI controller model referenced in the
|
||||||
<code>.vmdk</code> file and use it. Autodetection fails when a
|
<code>.vmdk</code> file and use it. Autodetection fails when a
|
||||||
SCSI controller has multiple disks attached and the SCSI controller
|
SCSI controller has multiple disks attached and the SCSI controller
|
||||||
@@ -523,14 +523,14 @@ ethernet0.checkMACAddress = "false"
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="importexport">Import and export of domain XML configs</a></h2>
|
<h2><a name="importexport">Import and export of domain XML configs</a></h2>
|
||||||
<p>
|
<p>
|
||||||
The ESX driver currently supports a native config format known as
|
The ESX driver currently supports a native config format known as
|
||||||
<code>vmware-vmx</code> to handle VMware VMX configs.
|
<code>vmware-vmx</code> to handle VMware VMX configs.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="xmlimport">Converting from VMware VMX config to domain XML config</a></h3>
|
<h3><a name="xmlimport">Converting from VMware VMX config to domain XML config</a></h3>
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh domxml-from-native</code> provides a way to convert an
|
The <code>virsh domxml-from-native</code> provides a way to convert an
|
||||||
existing VMware VMX config into a domain XML config that can then be
|
existing VMware VMX config into a domain XML config that can then be
|
||||||
@@ -621,7 +621,7 @@ Enter root password for example.com:
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="xmlexport">Converting from domain XML config to VMware VMX config</a></h3>
|
<h3><a name="xmlexport">Converting from domain XML config to VMware VMX config</a></h3>
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh domxml-to-native</code> provides a way to convert a
|
The <code>virsh domxml-to-native</code> provides a way to convert a
|
||||||
domain XML config into a VMware VMX config.
|
domain XML config into a VMware VMX config.
|
||||||
@@ -675,7 +675,7 @@ ethernet0.address = "00:50:56:25:48:C7"
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="xmlconfig">Example domain XML configs</a></h2>
|
<h2><a name="xmlconfig">Example domain XML configs</a></h2>
|
||||||
|
|
||||||
<h3>Fedora11 on x86_64</h3>
|
<h3>Fedora11 on x86_64</h3>
|
||||||
<pre>
|
<pre>
|
||||||
@@ -704,7 +704,7 @@ ethernet0.address = "00:50:56:25:48:C7"
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="migration">Migration</a></h2>
|
<h2><a name="migration">Migration</a></h2>
|
||||||
<p>
|
<p>
|
||||||
A migration cannot be initiated on an ESX server directly, a VMware
|
A migration cannot be initiated on an ESX server directly, a VMware
|
||||||
vCenter is necessary for this. The <code>vcenter</code> query
|
vCenter is necessary for this. The <code>vcenter</code> query
|
||||||
@@ -749,7 +749,7 @@ Enter administrator password for example-vcenter.com:
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="scheduler">Scheduler configuration</a></h2>
|
<h2><a name="scheduler">Scheduler configuration</a></h2>
|
||||||
<p>
|
<p>
|
||||||
The driver exposes the ESX CPU scheduler. The parameters listed below
|
The driver exposes the ESX CPU scheduler. The parameters listed below
|
||||||
are available to control the scheduler.
|
are available to control the scheduler.
|
||||||
@@ -780,7 +780,7 @@ Enter administrator password for example-vcenter.com:
|
|||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="tools">VMware tools</a></h2>
|
<h2><a name="tools">VMware tools</a></h2>
|
||||||
<p>
|
<p>
|
||||||
Some actions require installed VMware tools. If the VMware tools are
|
Some actions require installed VMware tools. If the VMware tools are
|
||||||
not installed in the guest and one of the actions below is to be
|
not installed in the guest and one of the actions below is to be
|
||||||
@@ -796,7 +796,7 @@ Enter administrator password for example-vcenter.com:
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="links">Links</a></h2>
|
<h2><a name="links">Links</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="http://www.vmware.com/support/developer/vc-sdk/">
|
<a href="http://www.vmware.com/support/developer/vc-sdk/">
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>Microsoft Hyper-V hypervisor driver</h1>
|
<h1>Microsoft Hyper-V hypervisor driver</h1>
|
||||||
<ul id="toc"></ul>
|
<ul id="toc"></ul>
|
||||||
<p>
|
<p>
|
||||||
The libvirt Microsoft Hyper-V driver can manage Hyper-V 2008 R2 and newer.
|
The libvirt Microsoft Hyper-V driver can manage Hyper-V 2008 R2.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="project">Project Links</a></h2>
|
<h2><a name="project">Project Links</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
The <a href="http://www.microsoft.com/hyper-v-server/">Microsoft Hyper-V</a>
|
The <a href="http://www.microsoft.com/hyper-v-server/">Microsoft Hyper-V</a>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="uri">Connections to the Microsoft Hyper-V driver</a></h2>
|
<h2><a name="uri">Connections to the Microsoft Hyper-V driver</a></h2>
|
||||||
<p>
|
<p>
|
||||||
Some example remote connection URIs for the driver are:
|
Some example remote connection URIs for the driver are:
|
||||||
</p>
|
</p>
|
||||||
@@ -36,7 +36,7 @@ hyperv://example-hyperv.com/?transport=http (over HTTP)
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="uriformat">URI Format</a></h3>
|
<h3><a name="uriformat">URI Format</a></h3>
|
||||||
<p>
|
<p>
|
||||||
URIs have this general form (<code>[...]</code> marks an optional part).
|
URIs have this general form (<code>[...]</code> marks an optional part).
|
||||||
</p>
|
</p>
|
||||||
@@ -49,7 +49,7 @@ hyperv://[username@]hostname[:port]/[?extraparameters]
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h4><a id="extraparams">Extra parameters</a></h4>
|
<h4><a name="extraparams">Extra parameters</a></h4>
|
||||||
<p>
|
<p>
|
||||||
Extra parameters can be added to a URI as part of the query string
|
Extra parameters can be added to a URI as part of the query string
|
||||||
(the part following <code>?</code>). A single parameter is formed by a
|
(the part following <code>?</code>). A single parameter is formed by a
|
||||||
@@ -83,7 +83,7 @@ hyperv://[username@]hostname[:port]/[?extraparameters]
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="auth">Authentication</a></h3>
|
<h3><a name="auth">Authentication</a></h3>
|
||||||
<p>
|
<p>
|
||||||
In order to perform any useful operation the driver needs to log into
|
In order to perform any useful operation the driver needs to log into
|
||||||
the Hyper-V server. Therefore, only <code>virConnectOpenAuth</code> can
|
the Hyper-V server. Therefore, only <code>virConnectOpenAuth</code> can
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>LXC container driver</h1>
|
<h1>LXC container driver</h1>
|
||||||
@@ -18,7 +18,7 @@ particular sVirt for mandatory access control, auditing of operations,
|
|||||||
integration with control groups and many other features.
|
integration with control groups and many other features.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="cgroups">Control groups Requirements</a></h2>
|
<h2><a name="cgroups">Control groups Requirements</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In order to control the resource usage of processes inside containers, the
|
In order to control the resource usage of processes inside containers, the
|
||||||
@@ -32,7 +32,7 @@ init service will be required. For further information, consult the general
|
|||||||
libvirt <a href="cgroups.html">cgroups documentation</a>.
|
libvirt <a href="cgroups.html">cgroups documentation</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="namespaces">Namespace requirements</a></h2>
|
<h2><a name="namespaces">Namespace requirements</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In order to separate processes inside a container from those in the
|
In order to separate processes inside a container from those in the
|
||||||
@@ -47,9 +47,9 @@ configured UID/GID mapping is a pre-requisite to making containers
|
|||||||
secure, in the absence of sVirt confinement.</strong>
|
secure, in the absence of sVirt confinement.</strong>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="init">Default container setup</a></h2>
|
<h2><a name="init">Default container setup</a></h2>
|
||||||
|
|
||||||
<h3><a id="cliargs">Command line arguments</a></h3>
|
<h3><a name="cliargs">Command line arguments</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
When the container "init" process is started, it will typically
|
When the container "init" process is started, it will typically
|
||||||
@@ -70,7 +70,7 @@ would use the following XML
|
|||||||
</os>
|
</os>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="envvars">Environment variables</a></h3>
|
<h3><a name="envvars">Environment variables</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
When the container "init" process is started, it will be given several useful
|
When the container "init" process is started, it will be given several useful
|
||||||
@@ -80,16 +80,14 @@ to be provided by all container technologies on Linux.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>container</code></dt>
|
<dt>container</dt>
|
||||||
<dd>The fixed string <code>libvirt-lxc</code> to identify libvirt as the creator</dd>
|
<dd>The fixed string <code>libvirt-lxc</code> to identify libvirt as the creator</dd>
|
||||||
<dt><code>container_uuid</code></dt>
|
<dt>container_uuid</dt>
|
||||||
<dd>The UUID assigned to the container by libvirt</dd>
|
<dd>The UUID assigned to the container by libvirt</dd>
|
||||||
<dt><code>PATH</code></dt>
|
<dt>PATH</dt>
|
||||||
<dd>The fixed string <code>/bin:/usr/bin</code></dd>
|
<dd>The fixed string <code>/bin:/usr/bin</code></dd>
|
||||||
<dt><code>TERM</code></dt>
|
<dt>TERM</dt>
|
||||||
<dd>The fixed string <code>linux</code></dd>
|
<dd>The fixed string <code>linux</code></dd>
|
||||||
<dt><code>HOME</code></dt>
|
|
||||||
<dd>The fixed string <code>/</code></dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -98,17 +96,17 @@ environment variables are also provided
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>LIBVIRT_LXC_NAME</code></dt>
|
<dt>LIBVIRT_LXC_NAME</dt>
|
||||||
<dd>The name assigned to the container by libvirt</dd>
|
<dd>The name assigned to the container by libvirt</dd>
|
||||||
<dt><code>LIBVIRT_LXC_UUID</code></dt>
|
<dt>LIBVIRT_LXC_UUID</dt>
|
||||||
<dd>The UUID assigned to the container by libvirt</dd>
|
<dd>The UUID assigned to the container by libvirt</dd>
|
||||||
<dt><code>LIBVIRT_LXC_CMDLINE</code></dt>
|
<dt>LIBVIRT_LXC_CMDLINE</dt>
|
||||||
<dd>The unparsed command line arguments specified in the container configuration.
|
<dd>The unparsed command line arguments specified in the container configuration.
|
||||||
Use of this is discouraged, in favour of passing arguments directly to the
|
Use of this is discouraged, in favour of passing arguments directly to the
|
||||||
container init process via the <code>initarg</code> config element.</dd>
|
container init process via the <code>initarg</code> config element.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h3><a id="fsmounts">Filesystem mounts</a></h3>
|
<h3><a name="fsmounts">Filesystem mounts</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In the absence of any explicit configuration, the container will
|
In the absence of any explicit configuration, the container will
|
||||||
@@ -131,7 +129,7 @@ only expose the sub-tree associated with the container</li>
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="devnodes">Device nodes</a></h3>
|
<h3><a name="devnodes">Device nodes</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The container init process will be started with <code>CAP_MKNOD</code>
|
The container init process will be started with <code>CAP_MKNOD</code>
|
||||||
@@ -167,7 +165,7 @@ numbered incrementally from there.
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
Since /dev/ttyN and /dev/console are linked to the pts devices. The
|
Since /dev/ttyN and /dev/console are linked to the pts devices. The
|
||||||
tty device of login program is pts device. The pam module securetty
|
tty device of login program is pts device. the pam module securetty
|
||||||
may prevent root user from logging in container. If you want root
|
may prevent root user from logging in container. If you want root
|
||||||
user to log in container successfully, add the pts device to the file
|
user to log in container successfully, add the pts device to the file
|
||||||
/etc/securetty of container.
|
/etc/securetty of container.
|
||||||
@@ -178,7 +176,7 @@ Further block or character devices will be made available to containers
|
|||||||
depending on their configuration.
|
depending on their configuration.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="security">Security considerations</a></h2>
|
<h2><a name="security">Security considerations</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt LXC driver is fairly flexible in how it can be configured,
|
The libvirt LXC driver is fairly flexible in how it can be configured,
|
||||||
@@ -190,7 +188,7 @@ isolation between a container and the host must ensure that they are
|
|||||||
writing a suitable configuration.
|
writing a suitable configuration.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="securenetworking">Network isolation</a></h3>
|
<h3><a name="securenetworking">Network isolation</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If the guest configuration does not list any network interfaces,
|
If the guest configuration does not list any network interfaces,
|
||||||
@@ -205,7 +203,7 @@ namespace is not wanted, then applications should set the
|
|||||||
<code><features>....</features></code> element.
|
<code><features>....</features></code> element.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="securefs">Filesystem isolation</a></h3>
|
<h3><a name="securefs">Filesystem isolation</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If the guest configuration does not list any filesystems, then
|
If the guest configuration does not list any filesystems, then
|
||||||
@@ -250,7 +248,7 @@ a bind mount to hide them. This is particularly important for the
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="secureusers">User and group isolation</a></h3>
|
<h3><a name="secureusers">User and group isolation</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If the guest configuration does not list any ID mapping, then the
|
If the guest configuration does not list any ID mapping, then the
|
||||||
@@ -281,7 +279,7 @@ causes libvirt to activate the user namespace feature.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="activation">Systemd Socket Activation Integration</a></h2>
|
<h2><a name="activation">Systemd Socket Activation Integration</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt LXC driver provides the ability to pass across pre-opened file
|
The libvirt LXC driver provides the ability to pass across pre-opened file
|
||||||
@@ -308,8 +306,8 @@ unit file specifies how systemd will start the libvirt LXC container
|
|||||||
Description=My little container
|
Description=My little container
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/virsh -c lxc:///system start --pass-fds 3 mycontainer
|
ExecStart=/usr/bin/virsh -c lxc:/// start --pass-fds 3 mycontainer
|
||||||
ExecStop=/usr/bin/virsh -c lxc:///system destroy mycontainer
|
ExecStop=/usr/bin/virsh -c lxc:/// destroy mycontainer
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
KillMode=none
|
KillMode=none
|
||||||
@@ -429,7 +427,7 @@ be considered secure against exploits of the host OS. The sVirt SELinux
|
|||||||
driver provides a way to secure containers even when the "user" namespace
|
driver provides a way to secure containers even when the "user" namespace
|
||||||
is not used. The cost is that writing a policy to allow execution of
|
is not used. The cost is that writing a policy to allow execution of
|
||||||
arbitrary OS is not practical. The SELinux sVirt policy is typically
|
arbitrary OS is not practical. The SELinux sVirt policy is typically
|
||||||
tailored to work with a simpler application confinement use case,
|
tailored to work with an simpler application confinement use case,
|
||||||
as provided by the "libvirt-sandbox" project.
|
as provided by the "libvirt-sandbox" project.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -477,7 +475,7 @@ configured to block read/write/mknod from all devices except those
|
|||||||
that a container is authorized to use.
|
that a container is authorized to use.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="exconfig">Example configurations</a></h2>
|
<h2><a name="exconfig">Example configurations</a></h2>
|
||||||
|
|
||||||
<h3>Example config version 1</h3>
|
<h3>Example config version 1</h3>
|
||||||
<p></p>
|
<p></p>
|
||||||
@@ -542,94 +540,22 @@ debootstrap, whatever) under /opt/vm-1-root:
|
|||||||
</domain>
|
</domain>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2><a id="capabilities">Altering the available capabilities</a></h2>
|
|
||||||
|
|
||||||
<p>
|
<h2><a name="usage">Container usage / management</a></h2>
|
||||||
By default the libvirt LXC driver drops some capabilities among which CAP_MKNOD.
|
|
||||||
However <span class="since">since 1.2.6</span> libvirt can be told to keep or
|
|
||||||
drop some capabilities using a domain configuration like the following:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<features>
|
|
||||||
<capabilities policy='default'>
|
|
||||||
<mknod state='on'/>
|
|
||||||
<sys_chroot state='off'/>
|
|
||||||
</capabilities>
|
|
||||||
</features>
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
The capabilities children elements are named after the capabilities as defined in
|
|
||||||
<code>man 7 capabilities</code>. An <code>off</code> state tells libvirt to drop the
|
|
||||||
capability, while an <code>on</code> state will force to keep the capability even though
|
|
||||||
this one is dropped by default.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The <code>policy</code> attribute can be one of <code>default</code>, <code>allow</code>
|
|
||||||
or <code>deny</code>. It defines the default rules for capabilities: either keep the
|
|
||||||
default behavior that is dropping a few selected capabilities, or keep all capabilities
|
|
||||||
or drop all capabilities. The interest of <code>allow</code> and <code>deny</code> is that
|
|
||||||
they guarantee that all capabilities will be kept (or removed) even if new ones are added
|
|
||||||
later.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The following example, drops all capabilities but CAP_MKNOD:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<features>
|
|
||||||
<capabilities policy='deny'>
|
|
||||||
<mknod state='on'/>
|
|
||||||
</capabilities>
|
|
||||||
</features>
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
Note that allowing capabilities that are normally dropped by default can seriously
|
|
||||||
affect the security of the container and the host.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2><a id="share">Inherit namespaces</a></h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Libvirt allows you to inherit the namespace from container/process just like lxc tools
|
|
||||||
or docker provides to share the network namespace. The following can be used to share
|
|
||||||
required namespaces. If we want to share only one then the other namespaces can be ignored.
|
|
||||||
The netns option is specific to sharenet. It can be used in cases we want to use existing network namespace
|
|
||||||
rather than creating new network namespace for the container. In this case privnet option will be
|
|
||||||
ignored.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
<domain type='lxc' xmlns:lxc='http://libvirt.org/schemas/domain/lxc/1.0'>
|
|
||||||
...
|
|
||||||
<lxc:namespace>
|
|
||||||
<lxc:sharenet type='netns' value='red'/>
|
|
||||||
<lxc:shareuts type='name' value='container1'/>
|
|
||||||
<lxc:shareipc type='pid' value='12345'/>
|
|
||||||
</lxc:namespace>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The use of namespace passthrough requires libvirt >= 1.2.19
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2><a id="usage">Container usage / management</a></h2>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
As with any libvirt virtualization driver, LXC containers can be
|
As with any libvirt virtualization driver, LXC containers can be
|
||||||
managed via a wide variety of libvirt based tools. At the lowest
|
managed via a wide variety of libvirt based tools. At the lowest
|
||||||
level the <code>virsh</code> command can be used to perform many
|
level the <code>virsh</code> command can be used to perform many
|
||||||
tasks, by passing the <code>-c lxc:///system</code> argument. As an
|
tasks, by passing the <code>-c lxc:///</code> argument. As an
|
||||||
alternative to repeating the URI with every command, the <code>LIBVIRT_DEFAULT_URI</code>
|
alternative to repeating the URI with every command, the <code>LIBVIRT_DEFAULT_URI</code>
|
||||||
environment variable can be set to <code>lxc:///system</code>. The
|
environment variable can be set to <code>lxc:///</code>. The
|
||||||
examples that follow outline some common operations with virsh
|
examples that follow outline some common operations with virsh
|
||||||
and LXC. For further details about usage of virsh consult its
|
and LXC. For further details about usage of virsh consult its
|
||||||
manual page.
|
manual page.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="usageSave">Defining (saving) container configuration</a></h3>
|
<h3><a name="usageSave">Defining (saving) container configuration></a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh define</code> command takes an XML configuration
|
The <code>virsh define</code> command takes an XML configuration
|
||||||
@@ -637,10 +563,10 @@ document and loads it into libvirt, saving the configuration on disk
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system define myguest.xml
|
# virsh -c lxc:/// define myguest.xml
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="usageView">Viewing container configuration</a></h3>
|
<h3><a name="usageView">Viewing container configuration</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh dumpxml</code> command can be used to view the
|
The <code>virsh dumpxml</code> command can be used to view the
|
||||||
@@ -652,10 +578,10 @@ using the <code>--inactive</code> flag
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system dumpxml myguest
|
# virsh -c lxc:/// dumpxml myguest
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="usageStart">Starting containers</a></h3>
|
<h3><a name="usageStart">Starting containers</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh start</code> command can be used to start a
|
The <code>virsh start</code> command can be used to start a
|
||||||
@@ -663,7 +589,7 @@ container from a previously defined persistent configuration
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system start myguest
|
# virsh -c lxc:/// start myguest
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -673,11 +599,11 @@ by libvirt, using the <code>virsh create</code> command.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system create myguest.xml
|
# virsh -c lxc:/// create myguest.xml
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="usageStop">Stopping containers</a></h3>
|
<h3><a name="usageStop">Stopping containers</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh shutdown</code> command can be used
|
The <code>virsh shutdown</code> command can be used
|
||||||
@@ -689,7 +615,7 @@ to PID 1 inside the container.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system shutdown myguest
|
# virsh -c lxc:/// shutdown myguest
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -698,11 +624,11 @@ request, it can be forcibly stopped using the <code>virsh destroy</code>
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system destroy myguest
|
# virsh -c lxc:/// destroy myguest
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="usageReboot">Rebooting a container</a></h3>
|
<h3><a name="usageReboot">Rebooting a container</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh reboot</code> command can be used
|
The <code>virsh reboot</code> command can be used
|
||||||
@@ -714,10 +640,10 @@ to PID 1 inside the container.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system reboot myguest
|
# virsh -c lxc:/// reboot myguest
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="usageDelete">Undefining (deleting) a container configuration</a></h3>
|
<h3><a name="usageDelete">Undefining (deleting) a container configuration</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh undefine</code> command can be used to delete the
|
The <code>virsh undefine</code> command can be used to delete the
|
||||||
@@ -726,10 +652,10 @@ running, this will turn it into a "transient" guest.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system undefine myguest
|
# virsh -c lxc:/// undefine myguest
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="usageConnect">Connecting to a container console</a></h3>
|
<h3><a name="usageConnect">Connecting to a container console</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh console</code> command can be used to connect
|
The <code>virsh console</code> command can be used to connect
|
||||||
@@ -737,7 +663,7 @@ to the text console associated with a container.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system console myguest
|
# virsh -c lxc:/// console myguest
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -749,10 +675,10 @@ as 'console0', 'console1', 'console2', etc.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system console myguest --devname console1
|
# virsh -c lxc:/// console myguest --devname console1
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="usageEnter">Running commands in a container</a></h3>
|
<h3><a name="usageEnter">Running commands in a container</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh lxc-enter-namespace</code> command can be used
|
The <code>virsh lxc-enter-namespace</code> command can be used
|
||||||
@@ -761,10 +687,10 @@ and then execute an arbitrary command.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virsh -c lxc:///system lxc-enter-namespace myguest -- /bin/ls -al /dev
|
# virsh -c lxc:/// lxc-enter-namespace myguest -- /bin/ls -al /dev
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="usageTop">Monitoring container utilization</a></h3>
|
<h3><a name="usageTop">Monitoring container utilization</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virt-top</code> command can be used to monitor the
|
The <code>virt-top</code> command can be used to monitor the
|
||||||
@@ -773,40 +699,8 @@ host
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
# virt-top -c lxc:///system
|
# virt-top -c lxc:///
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h3><a id="usageConvert">Converting LXC container configuration</a></h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The <code>virsh domxml-from-native</code> command can be used to convert
|
|
||||||
most of the LXC container configuration into a domain XML fragment
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
# virsh -c lxc:///system domxml-from-native lxc-tools /var/lib/lxc/myguest/config
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This conversion has some limitations due to the fact that the
|
|
||||||
domxml-from-native command output has to be independent of the host. Here
|
|
||||||
are a few things to take care of before converting:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
Replace the fstab file referenced by <tt>lxc.mount</tt> by the corresponding
|
|
||||||
lxc.mount.entry lines.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Replace all relative sizes of tmpfs mount entries to absolute sizes. Also
|
|
||||||
make sure that tmpfs entries all have a size option (default is 50%).
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Define <tt>lxc.cgroup.memory.limit_in_bytes</tt> to properly limit the memory
|
|
||||||
available to the container. The conversion will use 64MiB as the default.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,374 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<body>
|
|
||||||
<h1>Host device management</h1>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Libvirt provides management of both physical and virtual host devices
|
|
||||||
(historically also referred to as node devices) like USB, PCI, SCSI, and
|
|
||||||
network devices. This also includes various virtualization capabilities
|
|
||||||
which the aforementioned devices provide for utilization, for example
|
|
||||||
SR-IOV, NPIV, MDEV, DRM, etc.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The node device driver provides means to list and show details about host
|
|
||||||
devices (<code>virsh nodedev-list</code>,
|
|
||||||
<code>virsh nodedev-dumpxml</code>), which are generic and can be used
|
|
||||||
with all devices. It also provides means to create and destroy devices
|
|
||||||
(<code>virsh nodedev-create</code>, <code>virsh nodedev-destroy</code>)
|
|
||||||
which are meant to be used to create virtual devices, currently only
|
|
||||||
supported by NPIV
|
|
||||||
(<a href="http://wiki.libvirt.org/page/NPIV_in_libvirt">more info about NPIV)</a>).
|
|
||||||
Devices on the host system are arranged in a tree-like hierarchy, with
|
|
||||||
the root node being called <code>computer</code>. The node device driver
|
|
||||||
supports two backends to manage the devices, HAL and udev, with the former
|
|
||||||
being deprecated in favour of the latter.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The generic format of a host device XML can be seen below.
|
|
||||||
To identify a device both within the host and the device tree hierarchy,
|
|
||||||
the following elements are used:
|
|
||||||
</p>
|
|
||||||
<dl>
|
|
||||||
<dt><code>name</code></dt>
|
|
||||||
<dd>
|
|
||||||
The device's name will be generated by libvirt using the subsystem,
|
|
||||||
like pci and the device's sysfs basename.
|
|
||||||
</dd>
|
|
||||||
<dt><code>path</code></dt>
|
|
||||||
<dd>
|
|
||||||
Fully qualified sysfs path to the device.
|
|
||||||
</dd>
|
|
||||||
<dt><code>parent</code></dt>
|
|
||||||
<dd>
|
|
||||||
This element identifies the parent node in the device hierarchy. The
|
|
||||||
value of the element will correspond with the device parent's
|
|
||||||
<code>name</code> element or <code>computer</code> if the device does
|
|
||||||
not have any parent.
|
|
||||||
</dd>
|
|
||||||
<dt><code>driver</code></dt>
|
|
||||||
<dd>
|
|
||||||
This elements reports the driver in use for this device. The presence
|
|
||||||
of this element in the output XML depends on whether the underlying
|
|
||||||
device manager (most likely udev) exposes information about the
|
|
||||||
driver.
|
|
||||||
</dd>
|
|
||||||
<dt><code>capability</code></dt>
|
|
||||||
<dd>
|
|
||||||
Describes the device in terms of feature support. The element has one
|
|
||||||
mandatory attribute <code>type</code> the value of which determines
|
|
||||||
the type of the device. Currently recognized values for the attribute
|
|
||||||
are:
|
|
||||||
<code>system</code>,
|
|
||||||
<code>pci</code>,
|
|
||||||
<code>usb</code>,
|
|
||||||
<code>usb_device</code>,
|
|
||||||
<code>net</code>,
|
|
||||||
<code>scsi</code>,
|
|
||||||
<code>scsi_host</code> (<span class="since">Since 0.4.7</span>),
|
|
||||||
<code>fc_host</code>,
|
|
||||||
<code>vports</code>,
|
|
||||||
<code>scsi_target</code> (<span class="since">Since 0.7.3</span>),
|
|
||||||
<code>storage</code> (<span class="since">Since 1.0.4</span>),
|
|
||||||
<code>scsi_generic</code> (<span class="since">Since 1.0.7</span>),
|
|
||||||
<code>drm</code> (<span class="since">Since 3.1.0</span>), and
|
|
||||||
<code>mdev</code> (<span class="since">Since 3.4.0</span>).
|
|
||||||
This element can be nested in which case it further specifies a
|
|
||||||
device's capability. Refer to specific device types to see more values
|
|
||||||
for the <code>type</code> attribute which are exclusive.
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h2>Basic structure of a node device</h2>
|
|
||||||
<pre>
|
|
||||||
<device>
|
|
||||||
<name>pci_0000_00_17_0</name>
|
|
||||||
<path>/sys/devices/pci0000:00/0000:00:17.0</path>
|
|
||||||
<parent>computer</parent>
|
|
||||||
<driver>
|
|
||||||
<name>ahci</name>
|
|
||||||
</driver>
|
|
||||||
<capability type='pci'>
|
|
||||||
...
|
|
||||||
</capability>
|
|
||||||
</device></pre>
|
|
||||||
|
|
||||||
<ul id="toc"/>
|
|
||||||
|
|
||||||
<h2><a id="PCI">PCI host devices</a></h2>
|
|
||||||
<dl>
|
|
||||||
<dt><code>capability</code></dt>
|
|
||||||
<dd>
|
|
||||||
When used as top level element, the supported values for the
|
|
||||||
<code>type</code> attribute are <code>pci</code> and
|
|
||||||
<code>phys_function</code> (see <a href="#SRIOVCap">SR-IOV below</a>).
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<pre>
|
|
||||||
<device>
|
|
||||||
<name>pci_0000_04_00_1</name>
|
|
||||||
<path>/sys/devices/pci0000:00/0000:00:06.0/0000:04:00.1</path>
|
|
||||||
<parent>pci_0000_00_06_0</parent>
|
|
||||||
<driver>
|
|
||||||
<name>igb</name>
|
|
||||||
</driver>
|
|
||||||
<capability type='pci'>
|
|
||||||
<domain>0</domain>
|
|
||||||
<bus>4</bus>
|
|
||||||
<slot>0</slot>
|
|
||||||
<function>1</function>
|
|
||||||
<product id='0x10c9'>82576 Gigabit Network Connection</product>
|
|
||||||
<vendor id='0x8086'>Intel Corporation</vendor>
|
|
||||||
<iommuGroup number='15'>
|
|
||||||
<address domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
|
|
||||||
</iommuGroup>
|
|
||||||
<numa node='0'/>
|
|
||||||
<pci-express>
|
|
||||||
<link validity='cap' port='1' speed='2.5' width='2'/>
|
|
||||||
<link validity='sta' speed='2.5' width='2'/>
|
|
||||||
</pci-express>
|
|
||||||
</capability>
|
|
||||||
</device></pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The XML format for a PCI device stays the same for any further
|
|
||||||
capabilities it supports, a single nested <code><capability></code>
|
|
||||||
element will be included for each capability the device supports.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3><a id="SRIOVCap">SR-IOV capability</a></h3>
|
|
||||||
<p>
|
|
||||||
Single root input/output virtualization (SR-IOV) allows sharing of the
|
|
||||||
PCIe resources by multiple virtual environments. That is achieved by
|
|
||||||
slicing up a single full-featured physical resource called physical
|
|
||||||
function (PF) into multiple devices called virtual functions (VFs) sharing
|
|
||||||
their configuration with the underlying PF. Despite the SR-IOV
|
|
||||||
specification, the amount of VFs that can be created on a PF varies among
|
|
||||||
manufacturers.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Suppose the NIC <a href="#PCI">above</a> was also SR-IOV capable, it would
|
|
||||||
also include a nested
|
|
||||||
<code><capability></code> element enumerating all virtual
|
|
||||||
functions available on the physical device (physical port) like in the
|
|
||||||
example below.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<capability type='pci'>
|
|
||||||
...
|
|
||||||
<capability type='virt_functions' maxCount='7'>
|
|
||||||
<address domain='0x0000' bus='0x04' slot='0x10' function='0x1'/>
|
|
||||||
<address domain='0x0000' bus='0x04' slot='0x10' function='0x3'/>
|
|
||||||
<address domain='0x0000' bus='0x04' slot='0x10' function='0x5'/>
|
|
||||||
<address domain='0x0000' bus='0x04' slot='0x10' function='0x7'/>
|
|
||||||
<address domain='0x0000' bus='0x04' slot='0x11' function='0x1'/>
|
|
||||||
<address domain='0x0000' bus='0x04' slot='0x11' function='0x3'/>
|
|
||||||
<address domain='0x0000' bus='0x04' slot='0x11' function='0x5'/>
|
|
||||||
</capability>
|
|
||||||
...
|
|
||||||
</capability></pre>
|
|
||||||
<p>
|
|
||||||
A SR-IOV child device on the other hand, would then report its top level
|
|
||||||
capability type as a <code>phys_function</code> instead:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<device>
|
|
||||||
...
|
|
||||||
<capability type='phys_function'>
|
|
||||||
<address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
|
|
||||||
</capability>
|
|
||||||
...
|
|
||||||
<device></pre>
|
|
||||||
|
|
||||||
<h3><a id="MDEVCap">MDEV capability</a></h3>
|
|
||||||
<p>
|
|
||||||
A PCI device capable of creating mediated devices will include a nested
|
|
||||||
capability <code>mdev_types</code> which enumerates all supported mdev
|
|
||||||
types on the physical device, along with the type attributes available
|
|
||||||
through sysfs:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><code>type</code></dt>
|
|
||||||
<dd>
|
|
||||||
This element describes a mediated device type which acts as an
|
|
||||||
abstract template defining a resource allocation for instances of this
|
|
||||||
device type. The element has one attribute <code>id</code> which holds
|
|
||||||
an official vendor-supplied identifier for the type.
|
|
||||||
<span class="since">Since 3.4.0</span>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt><code>name</code></dt>
|
|
||||||
<dd>
|
|
||||||
The <code>name</code> element holds a vendor-supplied code name for
|
|
||||||
the given mediated device type. This is an optional element.
|
|
||||||
<span class="since">Since 3.4.0</span>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt><code>deviceAPI</code></dt>
|
|
||||||
<dd>
|
|
||||||
The value of this element describes how an instance of the given type
|
|
||||||
will be presented to the guest by the VFIO framework.
|
|
||||||
<span class="since">Since 3.4.0</span>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt><code>availableInstances</code></dt>
|
|
||||||
<dd>
|
|
||||||
This element reports the current state of resource allocation. In other
|
|
||||||
words, how many instances of the given type can still be successfully
|
|
||||||
created on the physical device.
|
|
||||||
<span class="since">Since 3.4.0</span>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For a more info about mediated devices, refer to the
|
|
||||||
<a href="#MDEV">paragraph below</a>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<device>
|
|
||||||
...
|
|
||||||
<driver>
|
|
||||||
<name>nvidia</name>
|
|
||||||
</driver>
|
|
||||||
<capability type='pci'>
|
|
||||||
...
|
|
||||||
<capability type='mdev_types'>
|
|
||||||
<type id='nvidia-11'>
|
|
||||||
<name>GRID M60-0B</name>
|
|
||||||
<deviceAPI>vfio-pci</deviceAPI>
|
|
||||||
<availableInstances>16</availableInstances>
|
|
||||||
</type>
|
|
||||||
<!-- Here would come the rest of the available mdev types -->
|
|
||||||
</capability>
|
|
||||||
...
|
|
||||||
</capability>
|
|
||||||
</device></pre>
|
|
||||||
|
|
||||||
<h2><a id="MDEV">Mediated devices (MDEVs)</a></h2>
|
|
||||||
<p>
|
|
||||||
Mediated devices (<span class="since">Since 3.2.0</span>) are software
|
|
||||||
devices defining resource allocation on the backing physical device which
|
|
||||||
in turn allows the parent physical device's resources to be divided into
|
|
||||||
several mediated devices, thus sharing the physical device's performance
|
|
||||||
among multiple guests. Unlike SR-IOV however, where a PCIe device appears
|
|
||||||
as multiple separate PCIe devices on the host's PCI bus, mediated devices
|
|
||||||
only appear on the mdev virtual bus. Therefore, no detach/reattach
|
|
||||||
procedure from/to the host driver procedure is involved even though
|
|
||||||
mediated devices are used in a direct device assignment manner.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The following sub-elements and attributes are exposed within the
|
|
||||||
<code>capability</code> element:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><code>type</code></dt>
|
|
||||||
<dd>
|
|
||||||
This element describes a mediated device type which acts as an
|
|
||||||
abstract template defining a resource allocation for instances of this
|
|
||||||
device type. The element has one attribute <code>id</code> which holds
|
|
||||||
an official vendor-supplied identifier for the type.
|
|
||||||
<span class="since">Since 3.4.0</span>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt><code>iommuGroup</code></dt>
|
|
||||||
<dd>
|
|
||||||
This element supports a single attribute <code>number</code> which holds
|
|
||||||
the IOMMU group number the mediated device belongs to.
|
|
||||||
<span class="since">Since 3.4.0</span>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h3>Example of a mediated device</h3>
|
|
||||||
<pre>
|
|
||||||
<device>
|
|
||||||
<name>mdev_4b20d080_1b54_4048_85b3_a6a62d165c01</name>
|
|
||||||
<path>/sys/devices/pci0000:00/0000:00:02.0/4b20d080-1b54-4048-85b3-a6a62d165c01</path>
|
|
||||||
<parent>pci_0000_06_00_0</parent>
|
|
||||||
<driver>
|
|
||||||
<name>vfio_mdev</name>
|
|
||||||
</driver>
|
|
||||||
<capability type='mdev'>
|
|
||||||
<type id='nvidia-11'/>
|
|
||||||
<iommuGroup number='12'/>
|
|
||||||
<capability/>
|
|
||||||
<device/></pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The support of mediated device's framework in libvirt's node device driver
|
|
||||||
covers the following features:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
list available mediated devices on the host
|
|
||||||
(<span class="since">Since 3.4.0</span>)
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
display device details
|
|
||||||
(<span class="since">Since 3.4.0</span>)
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Because mediated devices are instantiated from vendor specific templates,
|
|
||||||
simply called 'types', information describing these types is contained
|
|
||||||
within the parent device's capabilities
|
|
||||||
(see the example in <a href="#PCI">PCI host devices</a>).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To see the supported mediated device types on a specific physical device
|
|
||||||
use the following:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
$ ls /sys/class/mdev_bus/<device>/mdev_supported_types</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Before creating a mediated device, unbind the device from the respective
|
|
||||||
device driver, eg. subchannel I/O driver for a CCW device. Then bind the
|
|
||||||
device to the respective VFIO driver. For a CCW device, also unbind the
|
|
||||||
corresponding subchannel of the CCW device from the subchannel I/O driver
|
|
||||||
and then bind the subchannel (instead of the CCW device) to the vfio_ccw
|
|
||||||
driver. The below example shows the unbinding and binding steps for a CCW
|
|
||||||
device.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
device="0.0.1234"
|
|
||||||
subchannel="0.0.0123"
|
|
||||||
echo $device > /sys/bus/ccw/devices/$device/driver/unbind
|
|
||||||
echo $subchannel > /sys/bus/css/devices/$subchannel/driver/unbind
|
|
||||||
echo $subchannel > /sys/bus/css/drivers/vfio_ccw/bind
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To manually instantiate a mediated device, use one of the following as a
|
|
||||||
reference. For a CCW device, use the subchannel ID instead of the device
|
|
||||||
ID.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
$ uuidgen > /sys/class/mdev_bus/<device>/mdev_supported_types/<type>/create
|
|
||||||
...
|
|
||||||
$ echo <UUID> > /sys/class/mdev_bus/<device>/mdev_supported_types/<type>/create</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Manual removal of a mediated device is then performed as follows:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
$ echo 1 > /sys/bus/mdev/devices/<uuid>/remove</pre>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>OpenVZ container driver</h1>
|
<h1>OpenVZ container driver</h1>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
undue trouble.
|
undue trouble.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="project">Project Links</a></h2>
|
<h2><a name="project">Project Links</a></h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a id="connections">Connections to OpenVZ driver</a></h2>
|
<h2><a name="connections">Connections to OpenVZ driver</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt OpenVZ driver is a single-instance privileged driver,
|
The libvirt OpenVZ driver is a single-instance privileged driver,
|
||||||
@@ -40,7 +40,7 @@ openvz+tcp://example.com/system (remote access, SASl/Kerberos)
|
|||||||
openvz+ssh://root@example.com/system (remote access, SSH tunnelled)
|
openvz+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2><a id="notes">Notes on bridged networking</a></h2>
|
<h2><a name="notes">Notes on bridged networking</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Bridged networking enables a guest domain (ie container) to have its
|
Bridged networking enables a guest domain (ie container) to have its
|
||||||
@@ -49,7 +49,7 @@ openvz+ssh://root@example.com/system (remote access, SSH tunnelled)
|
|||||||
the host OS.
|
the host OS.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="host">Host network devices</a></h3>
|
<h3><a name="host">Host network devices</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
One or more of the physical devices must be attached to a bridge. The
|
One or more of the physical devices must be attached to a bridge. The
|
||||||
@@ -60,7 +60,7 @@ openvz+ssh://root@example.com/system (remote access, SSH tunnelled)
|
|||||||
physical device "eth0", or a bonding device "bond0".
|
physical device "eth0", or a bonding device "bond0".
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="tools">OpenVZ tools configuration</a></h3>
|
<h3><a name="tools">OpenVZ tools configuration</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
OpenVZ releases later than 3.0.23 ship with a standard network device
|
OpenVZ releases later than 3.0.23 ship with a standard network device
|
||||||
@@ -85,7 +85,7 @@ EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr"
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="example">Example guest domain XML configuration</a></h2>
|
<h2><a name="example">Example guest domain XML configuration</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The current libvirt OpenVZ driver has a restriction that the
|
The current libvirt OpenVZ driver has a restriction that the
|
||||||
|
|||||||
70
docs/drvparallels.html.in
Normal file
70
docs/drvparallels.html.in
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
<?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>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,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>IBM PowerVM hypervisor driver (phyp)</h1>
|
<h1>IBM PowerVM hypervisor driver (phyp)</h1>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="project">Project Links</a></h2>
|
<h2><a name="project">Project Links</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
The <a href="http://www-03.ibm.com/systems/power/software/virtualization/index.html">IBM
|
The <a href="http://www-03.ibm.com/systems/power/software/virtualization/index.html">IBM
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h2><a id="uri">Connections to the PowerVM driver</a></h2>
|
<h2><a name="uri">Connections to the PowerVM driver</a></h2>
|
||||||
<p>
|
<p>
|
||||||
Some example remote connection URIs for the driver are:
|
Some example remote connection URIs for the driver are:
|
||||||
</p>
|
</p>
|
||||||
@@ -38,7 +38,7 @@ phyp://user@ivm/system (IVM connection)
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="uriformat">URI Format</a></h3>
|
<h3><a name="uriformat">URI Format</a></h3>
|
||||||
<p>
|
<p>
|
||||||
URIs have this general form (<code>[...]</code> marks an
|
URIs have this general form (<code>[...]</code> marks an
|
||||||
optional part, <code>{...|...}</code> marks a mandatory choice).
|
optional part, <code>{...|...}</code> marks a mandatory choice).
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE html>
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<body>
|
||||||
<h1>KVM/QEMU hypervisor driver</h1>
|
<h1>KVM/QEMU hypervisor driver</h1>
|
||||||
@@ -8,22 +8,24 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt KVM/QEMU driver can manage any QEMU emulator from
|
The libvirt KVM/QEMU driver can manage any QEMU emulator from
|
||||||
version 0.12.0 or later.
|
version 0.8.1 or later. It can also manage Xenner, which
|
||||||
|
provides the same QEMU command line syntax and monitor
|
||||||
|
interaction.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="project">Project Links</a></h2>
|
<h2><a name="project">Project Links</a></h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
The <a href="https://www.linux-kvm.org/">KVM</a> Linux
|
The <a href="http://www.linux-kvm.org/">KVM</a> Linux
|
||||||
hypervisor
|
hypervisor
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
The <a href="https://wiki.qemu.org/Index.html">QEMU</a> emulator
|
The <a href="http://wiki.qemu.org/Index.html">QEMU</a> emulator
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a id="prereq">Deployment pre-requisites</a></h2>
|
<h2><a name="prereq">Deployment pre-requisites</a></h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@@ -41,9 +43,15 @@
|
|||||||
node. If both are found, then KVM fullyvirtualized, hardware accelerated
|
node. If both are found, then KVM fullyvirtualized, hardware accelerated
|
||||||
guests will be available.
|
guests will be available.
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>Xenner hypervisor</strong>: The driver will probe <code>/usr/bin</code>
|
||||||
|
for the presence of <code>xenner</code> and <code>/dev/kvm</code> device
|
||||||
|
node. If both are found, then Xen paravirtualized guests can be run using
|
||||||
|
the KVM hardware acceleration.
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a id="uris">Connections to QEMU driver</a></h2>
|
<h2><a name="uris">Connections to QEMU driver</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt QEMU driver is a multi-instance driver, providing a single
|
The libvirt QEMU driver is a multi-instance driver, providing a single
|
||||||
@@ -63,14 +71,14 @@ qemu+tcp://example.com/system (remote access, SASl/Kerberos)
|
|||||||
qemu+ssh://root@example.com/system (remote access, SSH tunnelled)
|
qemu+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2><a id="security">Driver security architecture</a></h2>
|
<h2><a name="security">Driver security architecture</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
There are multiple layers to security in the QEMU driver, allowing for
|
There are multiple layers to security in the QEMU driver, allowing for
|
||||||
flexibility in the use of QEMU based virtual machines.
|
flexibility in the use of QEMU based virtual machines.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="securitydriver">Driver instances</a></h3>
|
<h3><a name="securitydriver">Driver instances</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
As explained above there are two ways to access the QEMU driver
|
As explained above there are two ways to access the QEMU driver
|
||||||
@@ -94,7 +102,7 @@ qemu+ssh://root@example.com/system (remote access, SSH tunnelled)
|
|||||||
elevated privileges.
|
elevated privileges.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="securitydac">POSIX users/groups</a></h3>
|
<h3><a name="securitydac">POSIX users/groups</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In the "session" instance, the POSIX users/groups model restricts QEMU
|
In the "session" instance, the POSIX users/groups model restricts QEMU
|
||||||
@@ -187,7 +195,7 @@ chmod o+x /path/to/directory
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3><a id="securitycap">Linux process capabilities</a></h3>
|
<h3><a name="securitycap">Linux process capabilities</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The libvirt QEMU driver has a build time option allowing it to use
|
The libvirt QEMU driver has a build time option allowing it to use
|
||||||
@@ -224,7 +232,7 @@ chmod o+x /path/to/directory
|
|||||||
to changing the <code>/etc/libvirt/qemu.conf</code> settings.
|
to changing the <code>/etc/libvirt/qemu.conf</code> settings.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="securityselinux">SELinux basic confinement</a></h3>
|
<h3><a name="securityselinux">SELinux basic confinement</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The basic SELinux protection for QEMU virtual machines is intended to
|
The basic SELinux protection for QEMU virtual machines is intended to
|
||||||
@@ -255,7 +263,7 @@ chmod o+x /path/to/directory
|
|||||||
SELinux boolean.
|
SELinux boolean.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="securitysvirt">SELinux sVirt confinement</a></h3>
|
<h3><a name="securitysvirt">SELinux sVirt confinement</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The SELinux sVirt protection for QEMU virtual machines builds to the
|
The SELinux sVirt protection for QEMU virtual machines builds to the
|
||||||
@@ -305,7 +313,7 @@ chmod o+x /path/to/directory
|
|||||||
file can be used to change the setting to <code>security_driver="none"</code>
|
file can be used to change the setting to <code>security_driver="none"</code>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a id="securitysvirtaa">AppArmor sVirt confinement</a></h3>
|
<h3><a name="securitysvirtaa">AppArmor sVirt confinement</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
When using basic AppArmor protection for the libvirtd daemon and
|
When using basic AppArmor protection for the libvirtd daemon and
|
||||||
@@ -373,7 +381,7 @@ chmod o+x /path/to/directory
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3><a id="securityacl">Cgroups device ACLs</a></h3>
|
<h3><a name="securityacl">Cgroups device ACLs</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Recent Linux kernels have a capability known as "cgroups" which is used
|
Recent Linux kernels have a capability known as "cgroups" which is used
|
||||||
@@ -396,8 +404,7 @@ chmod o+x /path/to/directory
|
|||||||
/dev/null, /dev/full, /dev/zero,
|
/dev/null, /dev/full, /dev/zero,
|
||||||
/dev/random, /dev/urandom,
|
/dev/random, /dev/urandom,
|
||||||
/dev/ptmx, /dev/kvm, /dev/kqemu,
|
/dev/ptmx, /dev/kvm, /dev/kqemu,
|
||||||
/dev/rtc, /dev/hpet, /dev/net/tun,
|
/dev/rtc, /dev/hpet, /dev/net/tun
|
||||||
/dev/sev
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -417,7 +424,7 @@ mount -t cgroup none /dev/cgroup -o devices
|
|||||||
<code>/dev/cgroup/libvirt/qemu/$VMNAME/</code>
|
<code>/dev/cgroup/libvirt/qemu/$VMNAME/</code>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a id="imex">Import and export of libvirt domain XML configs</a></h2>
|
<h2><a name="imex">Import and export of libvirt domain XML configs</a></h2>
|
||||||
|
|
||||||
<p>The QEMU driver currently supports a single native
|
<p>The QEMU driver currently supports a single native
|
||||||
config format known as <code>qemu-argv</code>. The data for this format
|
config format known as <code>qemu-argv</code>. The data for this format
|
||||||
@@ -425,7 +432,7 @@ mount -t cgroup none /dev/cgroup -o devices
|
|||||||
then the QEMu binary name, finally followed by the QEMU command line
|
then the QEMu binary name, finally followed by the QEMU command line
|
||||||
arguments</p>
|
arguments</p>
|
||||||
|
|
||||||
<h3><a id="xmlimport">Converting from QEMU args to domain XML</a></h3>
|
<h3><a name="xmlimport">Converting from QEMU args to domain XML</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh domxml-from-native</code> provides a way to
|
The <code>virsh domxml-from-native</code> provides a way to
|
||||||
@@ -474,7 +481,7 @@ $ virsh domxml-from-native qemu-argv demo.args
|
|||||||
|
|
||||||
<p>NB, don't include the literal \ in the args, put everything on one line</p>
|
<p>NB, don't include the literal \ in the args, put everything on one line</p>
|
||||||
|
|
||||||
<h3><a id="xmlexport">Converting from domain XML to QEMU args</a></h3>
|
<h3><a name="xmlexport">Converting from domain XML to QEMU args</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh domxml-to-native</code> provides a way to convert a
|
The <code>virsh domxml-to-native</code> provides a way to convert a
|
||||||
@@ -516,7 +523,7 @@ $ virsh domxml-to-native qemu-argv demo.xml
|
|||||||
-serial none -parallel none -usb
|
-serial none -parallel none -usb
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2><a id="qemucommand">Pass-through of arbitrary qemu
|
<h2><a name="qemucommand">Pass-through of arbitrary qemu
|
||||||
commands</a></h2>
|
commands</a></h2>
|
||||||
|
|
||||||
<p>Libvirt provides an XML namespace and an optional
|
<p>Libvirt provides an XML namespace and an optional
|
||||||
@@ -568,7 +575,7 @@ $ virsh domxml-to-native qemu-argv demo.xml
|
|||||||
</dl>
|
</dl>
|
||||||
<p>Example:</p><pre>
|
<p>Example:</p><pre>
|
||||||
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
||||||
<name>QEMU-fedora-i686</name>
|
<name>QEmu-fedora-i686</name>
|
||||||
<memory>219200</memory>
|
<memory>219200</memory>
|
||||||
<os>
|
<os>
|
||||||
<type arch='i686' machine='pc'>hvm</type>
|
<type arch='i686' machine='pc'>hvm</type>
|
||||||
@@ -583,12 +590,12 @@ $ virsh domxml-to-native qemu-argv demo.xml
|
|||||||
</domain>
|
</domain>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2><a id="xmlconfig">Example domain XML config</a></h2>
|
<h2><a name="xmlconfig">Example domain XML config</a></h2>
|
||||||
|
|
||||||
<h3>QEMU emulated guest on x86_64</h3>
|
<h3>QEMU emulated guest on x86_64</h3>
|
||||||
|
|
||||||
<pre><domain type='qemu'>
|
<pre><domain type='qemu'>
|
||||||
<name>QEMU-fedora-i686</name>
|
<name>QEmu-fedora-i686</name>
|
||||||
<uuid>c7a5fdbd-cdaf-9455-926a-d65c16db1809</uuid>
|
<uuid>c7a5fdbd-cdaf-9455-926a-d65c16db1809</uuid>
|
||||||
<memory>219200</memory>
|
<memory>219200</memory>
|
||||||
<currentMemory>219200</currentMemory>
|
<currentMemory>219200</currentMemory>
|
||||||
@@ -640,5 +647,9 @@ $ virsh domxml-to-native qemu-argv demo.xml
|
|||||||
</devices>
|
</devices>
|
||||||
</domain></pre>
|
</domain></pre>
|
||||||
|
|
||||||
|
<h3>Xen paravirtualized guests with hardware acceleration</h3>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user