mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-08-24 09:49:59 +03:00
Compare commits
292 Commits
Author | SHA1 | Date | |
---|---|---|---|
c759ae5509 | |||
d81275974a | |||
67d0c6eb94 | |||
add254feea | |||
547147084d | |||
1e4434d652 | |||
bc429a0e54 | |||
bf32184d48 | |||
9dfcca0353 | |||
88b4cc5fe9 | |||
2a004db6c7 | |||
f7bd305904 | |||
69ba4d0971 | |||
1476b6d487 | |||
eb6d21cc0e | |||
96619805cb | |||
1a982aef18 | |||
2c359dd609 | |||
39c7e7a6b7 | |||
609e31dd3e | |||
ecd937164f | |||
14435163a0 | |||
fd90b67afe | |||
173c230e66 | |||
b052424c0d | |||
4c4ea03d7a | |||
9e0809911c | |||
cc7499dd03 | |||
d45242c616 | |||
73f34b31f5 | |||
8ceac55c29 | |||
b547201561 | |||
31bd8cb6d0 | |||
2fa4a8b991 | |||
3f305eb1e9 | |||
5de555cae2 | |||
f7f52b1592 | |||
387935345c | |||
5ea25b7801 | |||
c1b2aea80c | |||
a06b407fce | |||
c57932c663 | |||
144276aa1a | |||
2be4d86740 | |||
c0b64e9daa | |||
502278d5b2 | |||
ac75bd1b1e | |||
53603043c7 | |||
3f63c44d12 | |||
659bd66529 | |||
c9d9eddaa4 | |||
bfb59c172b | |||
39f775cc05 | |||
c4a6bc4977 | |||
7c4ce7eb03 | |||
ae974a2bbf | |||
0420a03240 | |||
a8b12e4f27 | |||
d2c9fe850b | |||
56a46886ad | |||
3bdda17adc | |||
bf5d6f431e | |||
1fbe229b3c | |||
04cbe68797 | |||
56ecebf22d | |||
abed6fca87 | |||
d12a6ef9c2 | |||
ce958c191c | |||
f969e393a9 | |||
3166570f7c | |||
e11013d19c | |||
69d4634635 | |||
0ca460eada | |||
b0b968efd5 | |||
3621d42e0f | |||
1b28a99d14 | |||
c0d74ed43b | |||
7cce4768ae | |||
7d633ec400 | |||
81d0ffbc3b | |||
66220e3e61 | |||
6c3ef35064 | |||
8a1a2ac558 | |||
43692df590 | |||
b121c7871f | |||
545c815c4c | |||
34497fdb37 | |||
4ff19ced3a | |||
58c73c1789 | |||
525c3d40a9 | |||
8c13e4fef0 | |||
110c64209c | |||
a35f6aee6a | |||
c31300e69f | |||
2afc3bfd8b | |||
ee8553e156 | |||
dcd9865385 | |||
7c99cb93c5 | |||
fb828ed21d | |||
ad8a5e5daa | |||
b811851b8d | |||
a76e46044d | |||
107a7bd06b | |||
595ade9f41 | |||
3d4a0ccbc6 | |||
7828b5ccb0 | |||
d8dbd61107 | |||
60d4777190 | |||
4d5383fd36 | |||
c9e6c8c02f | |||
8d96348704 | |||
73bc011483 | |||
e8da987570 | |||
d879d360eb | |||
6a140adb78 | |||
2d1de285b3 | |||
4aa0959d60 | |||
5f99a7fd23 | |||
6244c173ba | |||
b8893d0277 | |||
f7ea2b5d7f | |||
b509716b33 | |||
adf4384501 | |||
bb175dfc53 | |||
5b13f4375d | |||
de658ab4e4 | |||
6962a2dd7e | |||
3ce55d22e4 | |||
67cc35ade9 | |||
37623bf49a | |||
cd223d93da | |||
fa1ceca232 | |||
ee0d7552e2 | |||
7afe94e7e2 | |||
0d11a25e6d | |||
af8600678d | |||
be9e5185b4 | |||
6852c88fc7 | |||
3804161eb6 | |||
885de7f8cf | |||
5b31c7d08a | |||
52c5f7adc8 | |||
37ede4d5f5 | |||
470317f5c7 | |||
0a31be6ba2 | |||
72dc6d60ab | |||
b8761bb215 | |||
1a60d6bcd6 | |||
e978774ec6 | |||
6582d5872d | |||
65ecb4b434 | |||
426f9772b8 | |||
9927ca6274 | |||
9959a1dd9d | |||
0c8a9d2d51 | |||
a331653dad | |||
27d72bd517 | |||
79d9d2432f | |||
2e878906e4 | |||
070c1c82b0 | |||
b81c7c0892 | |||
328eac61cd | |||
6059354da6 | |||
67e2804ecb | |||
54ebbde1e1 | |||
88e22e4e8c | |||
0fb9066aaf | |||
7022759b7e | |||
2a1c7b57ff | |||
1dfc35677e | |||
7ee54d8356 | |||
9f9ce6130d | |||
1d6c713b18 | |||
4f10759024 | |||
5432ec8ded | |||
81748c62c7 | |||
9ccdbb5d61 | |||
840955ff7c | |||
03f3736511 | |||
2a9ca74164 | |||
48e9d6862a | |||
3f24e6c21c | |||
5314dffc85 | |||
a4d0a3fd50 | |||
aaabde58cb | |||
cb4a6614fa | |||
9cae1d5ed6 | |||
62aa1b56d6 | |||
1aac8114ae | |||
1fbee8dadf | |||
741fecedaa | |||
d83ded2dba | |||
220bcb0535 | |||
9c19a898f9 | |||
7a367cca30 | |||
4c3f3b4d46 | |||
ec4e379125 | |||
5237c2b847 | |||
b4ee10dfde | |||
bfc48afa14 | |||
a4b1c0977a | |||
55671efe80 | |||
943a2f2b60 | |||
fd9a55254f | |||
969209ce07 | |||
89626e8d69 | |||
ac6797b28c | |||
cfa30de3b8 | |||
c881b32215 | |||
cb43623acd | |||
8372a8c127 | |||
26eb2feedd | |||
001390a684 | |||
fa4126087b | |||
9a15c48d2d | |||
2cd9b2d8ee | |||
10d1650843 | |||
81e6a22192 | |||
d24f6aabbb | |||
5caa1e0eb0 | |||
a6c612a4ad | |||
9fa79000ec | |||
169afbe9aa | |||
316befbb0c | |||
f61208bde9 | |||
1951b95cb2 | |||
a28a644680 | |||
14687aad81 | |||
cab9eed62e | |||
06e43a8f2c | |||
4fb341d741 | |||
b2df3510b7 | |||
8536e697b6 | |||
6d910c9fd4 | |||
766b2250e1 | |||
a843f44c51 | |||
e807e4d9e9 | |||
9ec1a56923 | |||
f0817018b1 | |||
92ff72b52c | |||
e4073623a6 | |||
11b0ed46c5 | |||
d9ec9c6937 | |||
0722925986 | |||
89dd05cc6f | |||
8b8f4c5cbc | |||
55ae53d971 | |||
ecedb9cef3 | |||
10467f1c5b | |||
61243e0f57 | |||
b02c0455d1 | |||
e4c65831e3 | |||
dab6391f2d | |||
9a47149559 | |||
83a618f807 | |||
3ad8a273b5 | |||
b2f5ba21b8 | |||
461afc2200 | |||
45707d5631 | |||
4d3d0039e5 | |||
c61180dcd7 | |||
b7071653fa | |||
3b97f7db53 | |||
cb7593bd19 | |||
97230f6a35 | |||
667f669fdc | |||
60623a7ce0 | |||
aac6018a35 | |||
de4950b200 | |||
c29d092905 | |||
92d313ebe6 | |||
b75a469852 | |||
0ad4ece725 | |||
c86afc85ee | |||
df59fdce06 | |||
b68a19be0f | |||
2068f2f5a3 | |||
d2c77e06c7 | |||
b44af714d3 | |||
8fa62166c4 | |||
35625e5aa8 | |||
2dedb34a91 | |||
aa08419ca8 | |||
29ed758ae0 | |||
24a149cfa2 | |||
2567fac4a7 | |||
aad6873175 | |||
a3262d812b | |||
bdd6894713 | |||
27a63a76af | |||
4dfb7e8b2e | |||
7f39e2e5e5 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -19,6 +19,8 @@ config.status
|
||||
config.sub
|
||||
configure
|
||||
coverage
|
||||
cscope.files
|
||||
cscope.out
|
||||
libtool
|
||||
libvirt-*.tar.gz
|
||||
libvirt.pc
|
||||
|
21
.hgignore
21
.hgignore
@ -46,12 +46,19 @@ docs/examples/info1
|
||||
docs/examples/python/Makefile
|
||||
docs/examples/python/Makefile.in
|
||||
docs/examples/suspend
|
||||
docs/schemas/Makefile
|
||||
docs/schemas/Makefile.in
|
||||
examples/domain-events/events-c/*.exe
|
||||
examples/domain-events/events-c/.deps
|
||||
examples/domain-events/events-c/.libs
|
||||
examples/domain-events/events-c/Makefile
|
||||
examples/domain-events/events-c/Makefile.in
|
||||
examples/domain-events/events-c/event-test
|
||||
examples/hellolibvirt/.deps
|
||||
examples/hellolibvirt/.libs
|
||||
examples/hellolibvirt/Makefile
|
||||
examples/hellolibvirt/Makefile.in
|
||||
examples/hellolibvirt/hellolibvirt
|
||||
gnulib/lib/*.la
|
||||
gnulib/lib/*.lo
|
||||
gnulib/lib/.deps
|
||||
@ -228,9 +235,11 @@ src/*.exe
|
||||
src/*.gcda
|
||||
src/*.gcno
|
||||
src/*.gcov
|
||||
src/*.i
|
||||
src/*.la
|
||||
src/*.lo
|
||||
src/*.loT
|
||||
src/*.s
|
||||
src/.deps
|
||||
src/.libs
|
||||
src/Makefile
|
||||
@ -254,12 +263,20 @@ tests/Makefile.in
|
||||
tests/confdata/Makefile
|
||||
tests/confdata/Makefile.in
|
||||
tests/conftest
|
||||
tests/eventtest
|
||||
tests/nodedevxml2xmltest
|
||||
tests/nodeinfotest
|
||||
tests/object-locking
|
||||
tests/object-locking-files.txt
|
||||
tests/object-locking.cmi
|
||||
tests/object-locking.cmx
|
||||
tests/qemuargv2xmltest
|
||||
tests/qemuhelptest
|
||||
tests/qemuxml2argvtest
|
||||
tests/qemuxml2xmltest
|
||||
tests/qparamtest
|
||||
tests/reconnect
|
||||
tests/seclabeltest
|
||||
tests/sexpr2xmldata/Makefile
|
||||
tests/sexpr2xmldata/Makefile.in
|
||||
tests/sexpr2xmltest
|
||||
@ -274,4 +291,8 @@ tests/xmconfigtest
|
||||
tests/xml2sexprdata/Makefile
|
||||
tests/xml2sexprdata/Makefile.in
|
||||
tests/xml2sexprtest
|
||||
tools/Makefile
|
||||
tools/Makefile.in
|
||||
tools/virt-xml-validate
|
||||
tools/virt-xml-validate.1
|
||||
update.log
|
||||
|
15
AUTHORS
15
AUTHORS
@ -63,7 +63,20 @@ Patches have also been contributed by:
|
||||
James Morris <jmorris@namei.org>
|
||||
Daniel J Walsh <dwalsh@redhat.com>
|
||||
Maximilian Wilhelm <max@rfc2324.org>
|
||||
Ryota Ozaki <ozaki.ryota@gmail.com>
|
||||
Pritesh Kothari <Pritesh.Kothari@Sun.COM>
|
||||
Amit Shah <amit.shah@redhat.com>
|
||||
Florian Vichot <florian.vichot@diateam.net>
|
||||
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||
Serge E. Hallyn <serue@us.ibm.com>
|
||||
Soren Hansen <soren@canonical.com>
|
||||
Laine Stump <laine@redhat.com>
|
||||
Abel Míguez Rodríguez<amiguezr@pdi.ucm.es>
|
||||
Doug Goldstein <cardoe@gentoo.org>
|
||||
Javier Fontan <jfontan@gmail.com>
|
||||
Federico Simoncelli <federico.simoncelli@gmail.com>
|
||||
Amy Griffis <amy.griffis@hp.com>
|
||||
Henrik Persson E <henrik.e.persson@ericsson.com>
|
||||
Satoru SATOH <satoru.satoh@gmail.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
LCOV = lcov
|
||||
GENHTML = genhtml
|
||||
|
||||
SUBDIRS = gnulib/lib include src qemud proxy docs gnulib/tests \
|
||||
SUBDIRS = gnulib/lib include src qemud tools proxy docs gnulib/tests \
|
||||
python tests po examples/domain-events/events-c examples/hellolibvirt
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4
|
||||
@ -19,7 +19,8 @@ EXTRA_DIST = \
|
||||
.x-sc_require_config_h \
|
||||
.x-sc_prohibit_nonreentrant \
|
||||
Makefile.nonreentrant \
|
||||
autogen.sh
|
||||
autogen.sh \
|
||||
mylibtool
|
||||
|
||||
man_MANS = virsh.1
|
||||
|
||||
|
@ -32,7 +32,7 @@ local-checks-available = \
|
||||
# Arrange to print the name of each syntax-checking rule just before running it.
|
||||
$(syntax-check-rules): %: %.m
|
||||
$(patsubst %, %.m, $(syntax-check-rules)):
|
||||
@echo $(patsubst sc_%.m, %, $@)
|
||||
@echo "CHECK:" $(patsubst sc_%.m, %, $@)
|
||||
|
||||
local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available))
|
||||
|
||||
@ -332,6 +332,7 @@ msg_gen_function += errorf
|
||||
msg_gen_function += lxcError
|
||||
msg_gen_function += networkLog
|
||||
msg_gen_function += networkReportError
|
||||
msg_gen_function += oneError
|
||||
msg_gen_function += openvzError
|
||||
msg_gen_function += openvzLog
|
||||
msg_gen_function += qemudDispatchClientFailure
|
||||
|
132
NEWS
132
NEWS
@ -5,6 +5,138 @@
|
||||
http://libvirt.org/news.html
|
||||
|
||||
|
||||
0.6.4: May 29 2009:
|
||||
- New features: new API virStorageVolCreateXMLFrom (Cole Robinson),
|
||||
full VBox graphic capabilities (Pritesh Kothari), Interface config
|
||||
APIs (Laine Stump), APIs for domain XML conversions (Daniel
|
||||
Berrange), initial version of OpenNebula driver (Abel Miguez
|
||||
Rodriguez)
|
||||
- Portability: better compiler warning selection (Daniel Berrange),
|
||||
Win32 portability fixes (Daniel Berrange)
|
||||
- Documentation: documentation for <sound> device XML format (Cole
|
||||
Robinson), storage format documentation fixes (Ryota Ozaki),
|
||||
docs for XML conversion APIs (Daniel Berrange), inconsistencies
|
||||
in storage volume docs and schemas (Ryota Ozaki)
|
||||
- Bug fixes: fix hostdev managed handling (Mark McLoughlin),
|
||||
lxc_controller should not cash without args (Guido Gunther),
|
||||
bug fixes in I/O routines (Guido Gunther), fix migrationsave/restore
|
||||
for QEmu 0.10.0 (Daniel Berrange), avoid crash on VBox init
|
||||
(Guido Gunther), fix dev and cgroup init in LXC (Ryota Ozaki),
|
||||
QEmu startup fix (Cole Robinson), block node reboots from LXCs (Ryota
|
||||
Ozaki), QEmu argv detection fix for recent kvm (Daniel Berrange),
|
||||
fix watch/timer event deletion (Daniel Berrange), fix XML escaping
|
||||
bug, various locking bugs (Daniel Berrange), avoid a deadlock in
|
||||
HAL nodedev driver (Cole Robinson), detection of node device media
|
||||
insert/eject (Cole Robinson), broken networking with new QEMU/KVM
|
||||
>= 86 (Daniel Berrange), various fixes in domain and network
|
||||
startup error report (Cole Robinson), double free on unexpected
|
||||
client disconnect (Daniel Berrange)
|
||||
- Improvements: cleanups and doc on virExec (Cole Robinson), error
|
||||
reporting in QEmu migrations (Cole Robinson), better path and driver
|
||||
detection in VBox (Pritesh Kothari), avoid caching QEMU driver
|
||||
capabilities(Cole Robinson), multiple graphics elements definitions
|
||||
(Pritesh Kothari), LSB init header init.d improvements (Frederik
|
||||
Himpe), special erro code for invalid operations (Daniel Berrange),
|
||||
dlopen error logging (Daniel Berrange), fix UUID and name uniqueness
|
||||
(Daniel Berrange), improvement on VBox initialization (Pritesh
|
||||
Kothari and Dan Berrange), "Host only" and "Internal" network in VBox
|
||||
(Pritesh Kothari), add utility virExecDaemonize (Cole Robinson),
|
||||
enable bridges without IP (Ludwig Nussel), 'make -s' silencing
|
||||
(Daniel Berrange), test case for exercising the event loop (Daniel
|
||||
Berrange), virsh commands vol-clone and vol-create-from (Cole
|
||||
Robinson), new xend don't use [] around cpumaps (Tatsuro Enokura),
|
||||
add the CIL mutex lock checker (Daniel Berrange), fix some LXC
|
||||
error code (Amy Griffis), virInterface python bindings (Daniel
|
||||
Berrange), fix to the example code for event handling (Pritesh
|
||||
Kothari), always add location informations to logging (Daniel
|
||||
Berrange), python domain events example and binding (Daniel
|
||||
Berrange), PPC Qemu Machine Type update (Thomas Baker)
|
||||
- Cleanups: strings bug in virsh (Daniel Berrange), various cleanups
|
||||
in storage code (Cole Robinson), rpm spec cleanups, destructors
|
||||
data cleanups (Laine Stump), some QEmu code refactoring (Daniel
|
||||
Berrange), avoid dependancy on libcap (Daniel Berrange), python
|
||||
import cleanup (Cole Robinson), virAsprintf based cleanups in
|
||||
storage code (Cole Robinson), fix some direct stderr logging,
|
||||
OpenNebula driver cleanups (Daniel Berrange)
|
||||
|
||||
|
||||
0.6.3: Apr 24 2009:
|
||||
- New features: VirtualBox driver support (Pritesh Kothari),
|
||||
virt-xml-validate new command (Daniel Berrange)
|
||||
- Portability: patch to build on Centos (Joseph Shraibman),
|
||||
build breakage (Anton Protopopov),
|
||||
- Documentation: Linux Containers documentation (Serge Hallyn),
|
||||
improvement and updates of architecture pages, fix
|
||||
virNodeGetFreeMemory documentation to reflect reality,
|
||||
man page cleanups (Daniel Berrange), man page typo
|
||||
(Robert P. J. Day), VirtualBox Documentation (Pritesh Kothari),
|
||||
|
||||
- Bug fixes: veth off-by-one error (Dan Smith), vcpupin to inactive
|
||||
Xen crash (Takahashi Tomohiro), virsh ttyconsole return value,
|
||||
use format= not fmt= on QEmu commandline (Mark McLoughlin),
|
||||
use UUID for internal domain lookups (Daniel Berrange), remote
|
||||
domain ID related bugs (Daniel Berrange), QEmu pidfile handling
|
||||
bugs (Daniel Berrange), network config handling on old Xen (Daniel
|
||||
Berrange)
|
||||
- Improvements: add SCSI storage rescan (David Allan), rootless
|
||||
LXC containers support improvements (Serge Hallyn), getHostname
|
||||
support for LXC (Dan Smith), cleanup and logging output of some
|
||||
domain functions (Guido G<>nther), drop pool lock when allocating
|
||||
volumes (Cole Robinson), LXC handle kernel without CLONE_NEWUSER
|
||||
support (Serge Hallyn), cpu pinning on defined Xen domains (Takahashi
|
||||
Tomohiro), dynamic bridge names support (Soren Hansen), LXC use
|
||||
of private /dev/pts when available (Daniel Berrange),
|
||||
virNodeDeviceCreateXML and virNodeDeviceDestroy entry points
|
||||
(Dave Allan)
|
||||
- Cleanups: don't hardcode getgrnam_r buffer to 1024 bytes (Guido
|
||||
G<>nther), qemudBuildCommandLine API cleanup (Daniel Berrange),
|
||||
|
||||
|
||||
|
||||
0.6.2: Apr 3 2009:
|
||||
- New features: support SASL auth for VNC server (Daniel Berrange),
|
||||
memory ballooning in QEMU (Daniel Berrange), SCSI HBA storage pool
|
||||
support (Dave Allan), PCI passthrough in Xen driver (Daniel
|
||||
Berrange)
|
||||
- Portability: be more flexible in QEmu binaries paths (Daniel
|
||||
Berrange), Mingw portability fixes (Daniel Berrange),
|
||||
- Documentation: add security attributes in RNG schemas, cleanup
|
||||
of architecture docs, missing disk bus values in RNG schemas,
|
||||
- Bug fixes: tap vs vbd type on block detach (Cole Robinson and
|
||||
Takahashi Tomohiro), bad free on storage volume error (Daniel
|
||||
Berrange), maplenght computations in remote driver (Daniel Berrange),
|
||||
event dispatching in the daemon (Daniel Berrange), virDomainSetVcpus
|
||||
deadlock (Daniel Berrange), save deadlock in test driver (Cole
|
||||
Robinson), fix timing of security driver init (Cole Robinson),
|
||||
forbid readonly connections from dumping the XML safe info (Cole
|
||||
Robinson), file descriptor leak on remote access,
|
||||
fix labelling of shared/readonly devices (Dan Walsh),
|
||||
virsh missing auth on shell commands (Matthias Bolte),
|
||||
avoid zombie on exec pipe errors (Ryota Ozaki),
|
||||
memory leak in virNodeDeviceGetParent (Daniel Berrange),
|
||||
URI check in migration (Daniel Berrange), various memory bug fixes
|
||||
(Daniel Berrange), python bindings generator fix (Daniel Berrange),
|
||||
NUMA memory fixes (Daniel Berrange), various svirt fixes (Daniel
|
||||
Berrange), fix sparse volume allocation reporting (Cole Robinson),
|
||||
test driver domain restore return value (Cole Robinson),
|
||||
do not lose file format info on volume refresh (Cole Robinson)
|
||||
- Improvements: get CPU usage info for LXC (Ryota Ozaki), fix domain
|
||||
RNG to add ac97 and tests (Pritesh Kothari), OpenVZ support for
|
||||
non-template filesystem root (Florian Vichot), improve arch
|
||||
capabilities generation (Daniel Berrange), modularization of spec
|
||||
file (Ryota Ozaki), better error reports in SEXPR generation (Daniel
|
||||
Berrange), support for vifname parameter in VIF config (Daniel
|
||||
Berrange), localtime handling for new xen (Daniel Berrange),
|
||||
error reporting/ verification of security labels (Dan Walsh),
|
||||
add --console arg for create and start virsh commands (Daniel
|
||||
Berrange), refresh volume alloc/capacity when dumping XML (Cole
|
||||
Robinson)
|
||||
- Cleanups: FILE * leaks removal, unused parameters flagging
|
||||
(Maximilian Wilhelm), switch to pre-C99 struct initialization
|
||||
for drivers (Chris Lalancette), symlinks resolving cleanup (Daniel
|
||||
Berrange)
|
||||
|
||||
|
||||
0.6.1: Mar 3 2009:
|
||||
- New features: new APIs for Node device detach reattach and reset
|
||||
(Mark McLoughlin), sVirt mandatory access control support (James
|
||||
|
@ -74,6 +74,7 @@ if [ -x /usr/bin/i686-pc-mingw32-gcc ]; then
|
||||
--without-qemu \
|
||||
--without-lxc \
|
||||
--without-uml \
|
||||
--without-vbox \
|
||||
--without-openvz \
|
||||
--without-libvirtd
|
||||
|
||||
|
202
configure.in
202
configure.in
@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([libvirt], [0.6.1])
|
||||
AC_INIT([libvirt], [0.6.5])
|
||||
AC_CONFIG_SRCDIR([src/libvirt.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
@ -23,11 +23,12 @@ AC_SUBST([LIBVIRT_VERSION_INFO])
|
||||
AC_SUBST([LIBVIRT_VERSION_NUMBER])
|
||||
|
||||
dnl Required minimum versions of all libs we depend on
|
||||
LIBXML_REQUIRED="2.5.0"
|
||||
LIBXML_REQUIRED="2.6.0"
|
||||
GNUTLS_REQUIRED="1.0.25"
|
||||
AVAHI_REQUIRED="0.6.0"
|
||||
POLKIT_REQUIRED="0.6"
|
||||
PARTED_REQUIRED="1.8.0"
|
||||
NETCF_REQUIRED="0.0.1"
|
||||
|
||||
dnl Checks for C compiler.
|
||||
AC_PROG_CC
|
||||
@ -57,6 +58,9 @@ dnl Support building Win32 DLLs (must appear *before* AM_PROG_LIBTOOL)
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
dnl Override normal libtool in favour of our quiet version
|
||||
LIBTOOL='$(SHELL) $(top_srcdir)/mylibtool'
|
||||
AC_SUBST([LIBTOOL])
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
@ -72,7 +76,7 @@ dnl Use --disable-largefile if you don't want this.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
dnl Availability of various common functions (non-fatal if missing).
|
||||
AC_CHECK_FUNCS([cfmakeraw regexec uname sched_getaffinity getuid getgid])
|
||||
AC_CHECK_FUNCS([cfmakeraw regexec uname sched_getaffinity getuid getgid posix_fallocate mmap readlink])
|
||||
|
||||
dnl Availability of various not common threadsafe functions
|
||||
AC_CHECK_FUNCS([strerror_r strtok_r getmntent_r getgrnam_r getpwuid_r])
|
||||
@ -182,8 +186,12 @@ AC_ARG_WITH([uml],
|
||||
[ --with-uml add UML support (on)],[],[with_uml=yes])
|
||||
AC_ARG_WITH([openvz],
|
||||
[ --with-openvz add OpenVZ support (on)],[],[with_openvz=yes])
|
||||
AC_ARG_WITH([vbox],
|
||||
[ --with-vbox add VirtualBox support (on)],[],[with_vbox=yes])
|
||||
AC_ARG_WITH([lxc],
|
||||
[ --with-lxc add Linux Container support (on)],[],[with_lxc=yes])
|
||||
AC_ARG_WITH([one],
|
||||
[ --with-one add ONE support (on)],[],[with_one=check])
|
||||
AC_ARG_WITH([test],
|
||||
[ --with-test add test driver support (on)],[],[with_test=yes])
|
||||
AC_ARG_WITH([remote],
|
||||
@ -277,6 +285,11 @@ if test "$with_openvz" = "yes"; then
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_OPENVZ], [test "$with_openvz" = "yes"])
|
||||
|
||||
if test "x$with_vbox" = "xyes"; then
|
||||
AC_DEFINE_UNQUOTED([WITH_VBOX], 1, [whether VirtualBox driver is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_VBOX], [test "$with_vbox" = "yes"])
|
||||
|
||||
if test "$with_libvirtd" = "no" ; then
|
||||
with_lxc=no
|
||||
fi
|
||||
@ -298,6 +311,11 @@ if test "$with_uml" = "yes" ; then
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_UML], [test "$with_uml" = "yes"])
|
||||
|
||||
if test "$with_one" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_ONE],1,[whether ONE driver is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_ONE],[test "$with_one" = "yes"])
|
||||
|
||||
if test "$with_test" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_TEST], 1, [whether Test driver is enabled])
|
||||
fi
|
||||
@ -399,6 +417,34 @@ dnl check for kvm headers
|
||||
dnl
|
||||
AC_CHECK_HEADERS([linux/kvm.h])
|
||||
|
||||
dnl OpenNebula driver Compilation setting
|
||||
dnl
|
||||
|
||||
XMLRPC_REQUIRED=1.14.0
|
||||
|
||||
XMLRPC_CFLAGS=
|
||||
XMLRPC_LIBS=
|
||||
if test "x$with_one" = "xyes" -o "x$with_one" = "xcheck"; then
|
||||
PKG_CHECK_MODULES(XMLRPC, xmlrpc_client >= $XMLRPC_REQUIRED,
|
||||
[with_one=yes], [
|
||||
if test "x$with_one" = "xcheck" ; then
|
||||
with_one=no
|
||||
else
|
||||
AC_MSG_ERROR(
|
||||
[You must install XMLRPC-C >= $XMLRPC_REQUIRED to compile libvirt ONE driver])
|
||||
fi
|
||||
])
|
||||
if test "x$with_one" = "xyes" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_XMLRPC], 1,
|
||||
[whether One is used to broadcast server presence])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_XMLRPC], [test "x$with_one" = "xyes"])
|
||||
AM_CONDITIONAL([WITH_ONE], [test "x$with_one" = "xyes"])
|
||||
AC_SUBST([XMLRPC_CFLAGS])
|
||||
AC_SUBST([XMLRPC_LIBS])
|
||||
|
||||
|
||||
dnl Need to test if pkg-config exists
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
@ -516,18 +562,26 @@ if test "x$with_sasl" != "xno"; then
|
||||
fail=1
|
||||
fi])
|
||||
if test "x$with_sasl" != "xno" ; then
|
||||
AC_CHECK_LIB([sasl2], [sasl_client_init],[with_sasl=yes],[
|
||||
if test "x$with_sasl" = "xcheck" ; then
|
||||
AC_CHECK_LIB([sasl2], [sasl_client_init],[
|
||||
SASL_LIBS="$SASL_LIBS -lsasl2"
|
||||
with_sasl=yes
|
||||
],[
|
||||
AC_CHECK_LIB([sasl], [sasl_client_init],[
|
||||
SASL_LIBS="$SASL_LIBS -lsasl"
|
||||
with_sasl=yes
|
||||
],[
|
||||
if test "x$with_sasl" = "xcheck" ; then
|
||||
with_sasl=no
|
||||
else
|
||||
else
|
||||
fail=1
|
||||
fi])
|
||||
fi
|
||||
])
|
||||
])
|
||||
fi
|
||||
test $fail = 1 &&
|
||||
AC_MSG_ERROR([You must install the Cyrus SASL development package in order to compile libvirt])
|
||||
CFLAGS="$old_cflags"
|
||||
LIBS="$old_libs"
|
||||
SASL_LIBS="$SASL_LIBS -lsasl2"
|
||||
if test "x$with_sasl" = "xyes" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_SASL], 1,
|
||||
[whether Cyrus SASL is available for authentication])
|
||||
@ -714,6 +768,49 @@ AM_CONDITIONAL([HAVE_NUMACTL], [test "$with_numactl" != "no"])
|
||||
AC_SUBST([NUMACTL_CFLAGS])
|
||||
AC_SUBST([NUMACTL_LIBS])
|
||||
|
||||
|
||||
|
||||
dnl libcap-ng
|
||||
AC_ARG_WITH([capng],
|
||||
[ --with-capng use libcap-ng to reduce libvirtd privileges],
|
||||
[],
|
||||
[with_capng=check])
|
||||
|
||||
dnl
|
||||
dnl This check looks for 'capng_updatev' since that was
|
||||
dnl introduced in 0.4.0 release which need as minimum
|
||||
dnl
|
||||
CAPNG_CFLAGS=
|
||||
CAPNG_LIBS=
|
||||
if test "$with_qemu" = "yes" -a "$with_capng" != "no"; then
|
||||
old_cflags="$CFLAGS"
|
||||
old_libs="$LIBS"
|
||||
if test "$with_capng" = "check"; then
|
||||
AC_CHECK_HEADER([cap-ng.h],[],[with_capng=no])
|
||||
AC_CHECK_LIB([cap-ng], [capng_updatev],[],[with_capng=no])
|
||||
if test "$with_capng" != "no"; then
|
||||
with_capng="yes"
|
||||
fi
|
||||
else
|
||||
fail=0
|
||||
AC_CHECK_HEADER([cap-ng.h],[],[fail=1])
|
||||
AC_CHECK_LIB([cap-ng], [capng_updatev],[],[fail=1])
|
||||
test $fail = 1 &&
|
||||
AC_MSG_ERROR([You must install the capng >= 0.4.0 development package in order to compile and run libvirt])
|
||||
fi
|
||||
CFLAGS="$old_cflags"
|
||||
LIBS="$old_libs"
|
||||
fi
|
||||
if test "$with_capng" = "yes"; then
|
||||
CAPNG_LIBS="-lcap-ng"
|
||||
AC_DEFINE_UNQUOTED([HAVE_CAPNG], 1, [whether capng is available for privilege reduction])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_CAPNG], [test "$with_capng" != "no"])
|
||||
AC_SUBST([CAPNG_CFLAGS])
|
||||
AC_SUBST([CAPNG_LIBS])
|
||||
|
||||
|
||||
|
||||
dnl virsh libraries
|
||||
AC_CHECK_HEADERS([readline/readline.h])
|
||||
|
||||
@ -774,9 +871,31 @@ if test "$with_qemu:$with_lxc:$with_network" != "no:no:no"; then
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_BRIDGE], [test "$with_bridge" = "yes"])
|
||||
|
||||
dnl
|
||||
dnl Storage driver checks
|
||||
dnl
|
||||
dnl netcf library
|
||||
AC_ARG_WITH([netcf],
|
||||
[ --with-netcf libnetcf support to configure physical host network interfaces],
|
||||
[], [with_netcf=check])
|
||||
|
||||
NETCF_CFLAGS=
|
||||
NETCF_LIBS=
|
||||
if test "$with_netcf" = "yes" -o "$with_netcf" = "check"; then
|
||||
PKG_CHECK_MODULES(NETCF, netcf >= $NETCF_REQUIRED,
|
||||
[with_netcf=yes], [
|
||||
if test "$with_netcf" = "check" ; then
|
||||
with_netcf=no
|
||||
else
|
||||
AC_MSG_ERROR(
|
||||
[You must install libnetcf >= $NETCF_REQUIRED to compile libvirt])
|
||||
fi
|
||||
])
|
||||
if test "$with_netcf" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_NETCF], 1,
|
||||
[whether libnetcf is available to configure physical host network interfaces])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_NETCF], [test "$with_netcf" = "yes"])
|
||||
AC_SUBST([NETCF_CFLAGS])
|
||||
AC_SUBST([NETCF_LIBS])
|
||||
|
||||
AC_ARG_WITH([storage-fs],
|
||||
[ --with-storage-fs with FileSystem backend for the storage driver (on)],[],[with_storage_fs=check])
|
||||
@ -784,6 +903,8 @@ AC_ARG_WITH([storage-lvm],
|
||||
[ --with-storage-lvm with LVM backend for the storage driver (on)],[],[with_storage_lvm=check])
|
||||
AC_ARG_WITH([storage-iscsi],
|
||||
[ --with-storage-iscsi with iSCSI backend for the storage driver (on)],[],[with_storage_iscsi=check])
|
||||
AC_ARG_WITH([storage-scsi],
|
||||
[ --with-storage-scsi with SCSI backend for the storage driver (on)],[],[with_storage_scsi=check])
|
||||
AC_ARG_WITH([storage-disk],
|
||||
[ --with-storage-disk with GPartd Disk backend for the storage driver (on)],[],[with_storage_disk=check])
|
||||
|
||||
@ -793,6 +914,7 @@ if test "$with_libvirtd" = "no"; then
|
||||
with_storage_fs=no
|
||||
with_storage_lvm=no
|
||||
with_storage_iscsi=no
|
||||
with_storage_scsi=no
|
||||
with_storage_disk=no
|
||||
fi
|
||||
if test "$with_storage_dir" = "yes" ; then
|
||||
@ -829,21 +951,6 @@ if test "$with_storage_fs" = "yes"; then
|
||||
[Location or name of the showmount program])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG([QEMU_IMG], [qemu-img], [], [$PATH:/sbin:/usr/sbin:/bin:/usr/bin])
|
||||
if test -n "$QEMU_IMG" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_QEMU_IMG], 1, [whether qemu-img is available for non-raw files])
|
||||
AC_DEFINE_UNQUOTED([QEMU_IMG],["$QEMU_IMG"],
|
||||
[Location or name of the qemu-img program])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG([QCOW_CREATE], [qcow-create], [], [$PATH:/sbin:/usr/sbin:/bin:/usr/bin])
|
||||
if test -n "$QCOW_CREATE" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_QCOW_CREATE], 1, [whether qcow-create is available for non-raw files])
|
||||
AC_DEFINE_UNQUOTED([QCOW_CREATE],["$QCOW_CREATE"],
|
||||
[Location or name of the qcow-create program])
|
||||
fi
|
||||
|
||||
|
||||
if test "$with_storage_lvm" = "yes" -o "$with_storage_lvm" = "check"; then
|
||||
AC_PATH_PROG([PVCREATE], [pvcreate], [], [$PATH:/sbin:/usr/sbin])
|
||||
AC_PATH_PROG([VGCREATE], [vgcreate], [], [$PATH:/sbin:/usr/sbin])
|
||||
@ -921,6 +1028,13 @@ if test "$with_storage_iscsi" = "yes" -o "$with_storage_iscsi" = "check"; then
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_STORAGE_ISCSI], [test "$with_storage_iscsi" = "yes"])
|
||||
|
||||
if test "$with_storage_scsi" = "check"; then
|
||||
with_storage_scsi=yes
|
||||
|
||||
AC_DEFINE_UNQUOTED([WITH_STORAGE_SCSI], 1,
|
||||
[whether SCSI backend for storage driver is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_STORAGE_SCSI], [test "$with_storage_scsi" = "yes"])
|
||||
|
||||
|
||||
LIBPARTED_CFLAGS=
|
||||
@ -1104,6 +1218,22 @@ if test "${enable_oom}" = yes; then
|
||||
AC_DEFINE([TEST_OOM], 1, [Whether malloc OOM checking is enabled])
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE([test-locking],
|
||||
[ --enable-test-locking thread locking tests using CIL],
|
||||
[case "${enableval}" in
|
||||
yes|no) ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for test-locking option]) ;;
|
||||
esac],
|
||||
[enableval=no])
|
||||
enable_locking=$enableval
|
||||
|
||||
if test "$enable_locking" = "yes"; then
|
||||
LOCK_CHECKING_CFLAGS="-Dbool=char -D_Bool=char -save-temps"
|
||||
AC_SUBST([LOCK_CHECKING_CFLAGS])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_CIL],[test "$enable_locking" = "yes"])
|
||||
|
||||
dnl Enable building the proxy?
|
||||
|
||||
AC_ARG_WITH([xen-proxy],
|
||||
@ -1324,6 +1454,7 @@ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
|
||||
include/libvirt/Makefile include/libvirt/libvirt.h \
|
||||
python/Makefile python/tests/Makefile \
|
||||
qemud/Makefile \
|
||||
tools/Makefile \
|
||||
tests/Makefile proxy/Makefile \
|
||||
tests/xml2sexprdata/Makefile \
|
||||
tests/sexpr2xmldata/Makefile \
|
||||
@ -1344,11 +1475,14 @@ AC_MSG_NOTICE([ Proxy: $with_xen_proxy])
|
||||
AC_MSG_NOTICE([ QEMU: $with_qemu])
|
||||
AC_MSG_NOTICE([ UML: $with_uml])
|
||||
AC_MSG_NOTICE([ OpenVZ: $with_openvz])
|
||||
AC_MSG_NOTICE([ VBox: $with_vbox])
|
||||
AC_MSG_NOTICE([ LXC: $with_lxc])
|
||||
AC_MSG_NOTICE([ ONE: $with_one])
|
||||
AC_MSG_NOTICE([ Test: $with_test])
|
||||
AC_MSG_NOTICE([ Remote: $with_remote])
|
||||
AC_MSG_NOTICE([ Network: $with_network])
|
||||
AC_MSG_NOTICE([Libvirtd: $with_libvirtd])
|
||||
AC_MSG_NOTICE([ netcf: $with_netcf])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Storage Drivers])
|
||||
AC_MSG_NOTICE([])
|
||||
@ -1357,6 +1491,7 @@ AC_MSG_NOTICE([ FS: $with_storage_fs])
|
||||
AC_MSG_NOTICE([ NetFS: $with_storage_fs])
|
||||
AC_MSG_NOTICE([ LVM: $with_storage_lvm])
|
||||
AC_MSG_NOTICE([ iSCSI: $with_storage_iscsi])
|
||||
AC_MSG_NOTICE([ SCSI: $with_storage_scsi])
|
||||
AC_MSG_NOTICE([ Disk: $with_storage_disk])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Security Drivers])
|
||||
@ -1400,6 +1535,11 @@ AC_MSG_NOTICE([ numactl: $NUMACTL_CFLAGS $NUMACTL_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ numactl: no])
|
||||
fi
|
||||
if test "$with_capng" = "yes" ; then
|
||||
AC_MSG_NOTICE([ capng: $CAPNG_CFLAGS $CAPNG_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ capng: no])
|
||||
fi
|
||||
if test "$with_xen" = "yes" ; then
|
||||
AC_MSG_NOTICE([ xen: $XEN_CFLAGS $XEN_LIBS])
|
||||
else
|
||||
@ -1415,6 +1555,16 @@ AC_MSG_NOTICE([ devkit: $DEVKIT_CFLAGS $DEVKIT_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ devkit: no])
|
||||
fi
|
||||
if test "$with_netcf" = "yes" ; then
|
||||
AC_MSG_NOTICE([ netcf: $NETCF_CFLAGS $NETCF_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ netcf: no])
|
||||
fi
|
||||
if test "$with_one" = "yes" ; then
|
||||
AC_MSG_NOTICE([ xmlrpc: $XMLRPC_CFLAGS $XMLRPC_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ xmlrpc: no])
|
||||
fi
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Test suite])
|
||||
AC_MSG_NOTICE([])
|
||||
|
@ -29,6 +29,9 @@ png = \
|
||||
libvirtLogo.png \
|
||||
libvirt-net-logical.png \
|
||||
libvirt-net-physical.png \
|
||||
libvirt-daemon-arch.png \
|
||||
libvirt-driver-arch.png \
|
||||
libvirt-object-model.png \
|
||||
madeWith.png \
|
||||
windows-cygwin-1.png \
|
||||
windows-cygwin-2.png \
|
||||
@ -43,6 +46,8 @@ gif = \
|
||||
dot_html_in = $(wildcard *.html.in)
|
||||
dot_html = $(dot_html_in:%.html.in=%.html)
|
||||
|
||||
patches = $(wildcard api_extension/*.patch)
|
||||
|
||||
xml = \
|
||||
libvirt-api.xml \
|
||||
libvirt-refs.xml \
|
||||
@ -54,19 +59,23 @@ xml = \
|
||||
|
||||
fig = \
|
||||
libvirt-net-logical.fig \
|
||||
libvirt-net-physical.fig
|
||||
libvirt-net-physical.fig \
|
||||
libvirt-daemon-arch.fig \
|
||||
libvirt-driver-arch.fig \
|
||||
libvirt-object-model.fig
|
||||
|
||||
EXTRA_DIST= \
|
||||
libvirt-api.xml libvirt-refs.xml apibuild.py \
|
||||
site.xsl newapi.xsl news.xsl page.xsl ChangeLog.xsl \
|
||||
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
|
||||
$(xml) $(fig) $(png) \
|
||||
$(patches) \
|
||||
virsh.pod ChangeLog.awk
|
||||
|
||||
all: web $(top_builddir)/NEWS $(man_MANS)
|
||||
|
||||
virsh.1: virsh.pod
|
||||
pod2man -c "Virtualization Support" $(srcdir)/virsh.pod > $@-t
|
||||
pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" $(srcdir)/virsh.pod > $@-t
|
||||
mv $@-t $@
|
||||
cp $@ $(top_builddir)
|
||||
|
||||
@ -83,6 +92,9 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl
|
||||
name=`echo $@ | sed -e 's/.tmp//'`; \
|
||||
$(XSLTPROC) --nonet $(top_srcdir)/docs/ChangeLog.xsl $< > $@ || (rm $@ && exit 1) ; fi )
|
||||
|
||||
%.png: %.fig
|
||||
convert -rotate 90 $< $@
|
||||
|
||||
%.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in
|
||||
@(if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Generating $@"; \
|
||||
|
246
docs/api.html
Normal file
246
docs/api.html
Normal file
@ -0,0 +1,246 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
This file is autogenerated from api.html.in
|
||||
Do not edit this file. Changes will be lost.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
||||
<title>libvirt: The libvirt API concepts</title>
|
||||
<meta name="description" content="libvirt, virtualization, virtualization API" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="headerLogo"></div>
|
||||
<div id="headerSearch">
|
||||
<form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><div>
|
||||
<input id="query" name="query" type="text" size="12" value="" />
|
||||
<input id="submit" name="submit" type="submit" value="Search" />
|
||||
</div></form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="menu">
|
||||
<ul class="l0"><li>
|
||||
<div>
|
||||
<a title="Front page of the libvirt website" class="inactive" href="index.html">Home</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Details of new features and bugs fixed in each release" class="inactive" href="news.html">News</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="downloads.html">Downloads</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Information for users, administrators and developers" class="active" href="docs.html">Documentation</a>
|
||||
<ul class="l1"><li>
|
||||
<div>
|
||||
<a title="Information about deploying and using libvirt" class="inactive" href="deployment.html">Deployment</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="active" href="intro.html">Architecture</a>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<span class="active">API concepts</span>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Providing isolated networks and NAT based network connectivity" class="inactive" href="archnetwork.html">Network</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Managing storage pools and volumes" class="inactive" href="archstorage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Enumerating host node devices" class="inactive" href="archnode.html">Node Devices</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Description of the XML formats used in libvirt" class="inactive" href="format.html">XML format</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Hypervisor specific driver information" class="inactive" href="drivers.html">Drivers</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Frequently asked questions" class="inactive" href="FAQ.html">FAQ</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How and where to report bugs and request features" class="inactive" href="bugs.html">Bug reports</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How to contact the developers via email and IRC" class="inactive" href="contact.html">Contact</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Miscellaneous links of interest related to libvirt" class="inactive" href="relatedlinks.html">Related Links</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of all content on the website" class="inactive" href="sitemap.html">Sitemap</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>The libvirt API concepts</h1>
|
||||
<p> This page describes the main principles and architecture choices
|
||||
behind the definition of the libvirt API:
|
||||
</p>
|
||||
<ul><li>
|
||||
<a href="#Objects">Objects exposed</a>
|
||||
</li><li>
|
||||
<a href="#Functions">Functions and naming conventions</a>
|
||||
</li><li>
|
||||
<a href="#Driver">The drivers</a>
|
||||
</li><li>
|
||||
<a href="#Remote">Daemon and remote access</a>
|
||||
</li></ul>
|
||||
<h2>
|
||||
<a name="Objects" id="Objects">Objects exposed</a>
|
||||
</h2>
|
||||
<p> As defined in the <a href="goals.html">goals section</a>, libvirt
|
||||
API need to expose all the resources needed to manage the virtualization
|
||||
support of recent operating systems. The first object manipulated though
|
||||
the API is <code>virConnectPtr</code> which represent a connection to
|
||||
an hypervisor. Any application using libvirt is likely to start using the
|
||||
API by calling one of <a href="html/libvirt-libvirt.html#virConnectOpen">the virConnectOpen functions</a>. You will note that those functions take
|
||||
a name argument which is actually an URI to select the right hypervisor to
|
||||
open, this is needed to allow remote connections and also select between
|
||||
different possible hypervisors (for example on a Linux system it may be
|
||||
possible to use both KVM and LinuxContainers on the same node). A NULL
|
||||
name will default to a preselected hypervisor but it's probably not a
|
||||
wise thing to do in most cases. See the <a href="uri.html">connection
|
||||
URI</a> page for a full descriptions of the values allowed.</p>
|
||||
<p>
|
||||
</p>
|
||||
<p> Once the application obtained a <a href="html/libvirt-libvirt.html#virConnectPtr"><code>virConnectPtr</code></a>
|
||||
connection to the
|
||||
hypervisor it can then use it to manage domains and related resources
|
||||
available for virtualization like storage and networking. All those are
|
||||
exposed as first class objects, and connected to the hypervisor connection
|
||||
(and the node or cluster where it is available).</p>
|
||||
<p class="image">
|
||||
<img alt="first class objects exposed by the API" src="libvirt-object-model.png" /></p>
|
||||
<p> The figure above shows the five main objects exported by the API:</p>
|
||||
<ul><li>virConnectPtr: represent a connection to an hypervisor.</li><li>virDomainPtr: represent one domain either active or defined (i.e.
|
||||
existing as permanent config file and storage but not currently running
|
||||
on that node). The function <a href="html/libvirt-libvirt.html#virConnectListDomains"><code>virConnectListDomains</code></a>
|
||||
allows to list all the IDs for the domains active on this hypervisor.</li><li>virNetworkPtr: represent one network either active or defined (i.e.
|
||||
existing as permanent config file and storage but not currently activated.
|
||||
The function <a href="html/libvirt-libvirt.html#virConnectListNetworks"><code>virConnectListNetworks</code></a>
|
||||
allows to list all the virtualization networks actived on this node.</li><li>virStorageVolPtr: represent one storage volume, usually this is used
|
||||
as a block device available to one of the domains. The function
|
||||
<a href="html/libvirt-libvirt.html#virStorageVolLookupByPath"><code>virStorageVolLookupByPath</code></a> allows to find
|
||||
the object based on its path on the node.</li><li>virStoragePoolPtr: represent a storage pool, i.e. a logical area
|
||||
which can be used to allocate and store storage volumes. The function
|
||||
<a href="html/libvirt-libvirt.html#virStoragePoolLookupByVolume"><code>virStoragePoolLookupByVolume</code></a> allows to find
|
||||
the storage pool containing a given storage volume.</li></ul>
|
||||
<p> Most object manipulated by the library can also be represented using
|
||||
XML descriptions. This is used primarily to create those object, but is
|
||||
also helpful to modify or save their description back.</p>
|
||||
<p> Domains, network and storage pools can be either <code>active</code>
|
||||
i.e. either running or available for immediate use, or
|
||||
<code>defined</code> in which case they are inactive but there is
|
||||
a permanent definition available in the system for them. Based on this
|
||||
thay can be activated dynamically in order to be used.</p>
|
||||
<p> Most kind of object can also be named in various ways:</p>
|
||||
<p>
|
||||
</p>
|
||||
<ul><li>by their <code>name</code>, an user friendly identifier but
|
||||
whose unicity cannot be garanteed between two nodes.</li><li>by their <code>ID</code>, which is a runtime unique identifier
|
||||
provided by the hypervisor for one given activation of the object,
|
||||
but it becomes invalid once the resource is deactivated.</li><li>by their <code>UUID</code>, a 16 bytes unique identifier
|
||||
as defined in <a href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>,
|
||||
which is garanteed to be unique for long term usage and across a
|
||||
set of nodes.</li></ul>
|
||||
<h2>
|
||||
<a name="Functions" id="Functions">Functions and naming
|
||||
conventions</a>
|
||||
</h2>
|
||||
<p> The naming of the functions present in the library is usually
|
||||
made of a prefix describing the object associated to the function
|
||||
and a verb describing the action on that object.</p>
|
||||
<p> For each first class object you will find apis
|
||||
for the following actions:</p>
|
||||
<ul><li><b>Lookup</b>:...LookupByName,
|
||||
</li><li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
|
||||
those are used to enumerate a set of object available to an given
|
||||
hypervisor connection like:
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains"><code>virConnectListDomains</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains"><code>virConnectNumOfDomains</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virConnectListNetworks"><code>virConnectListNetworks</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virConnectListStoragePools"><code>virConnectListStoragePools</code></a>, etc.</li><li><b>Description</b>: ...GetInfo: those are generic accessor providing
|
||||
a set of informations about an object, they are
|
||||
<a href="html/libvirt-libvirt.html#virNodeGetInfo"><code>virNodeGetInfo</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo"><code>virDomainGetInfo</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virStoragePoolGetInfo"><code>virStoragePoolGetInfo</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virStorageVolGetInfo"><code>virStorageVolGetInfo</code></a>.</li><li><b>Accessors</b>: ...Get... and ...Set...: those are more specific
|
||||
accessors to query or modify the given object, like
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType"><code>virConnectGetType</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory"><code>virDomainGetMaxMemory</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMemory"><code>virDomainSetMemory</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetVcpus"><code>virDomainGetVcpus</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virStoragePoolSetAutostart"><code>virStoragePoolSetAutostart</code></a>,
|
||||
<a href="html/libvirt-libvirt.html#virNetworkGetBridgeName"><code>virNetworkGetBridgeName</code></a>, etc.</li><li><b>Creation</b>: </li><li><b>Destruction</b>: ... </li></ul>
|
||||
<p> For more in-depth details of the storage related APIs see
|
||||
<a href="storage.html">the storage management page</a>,
|
||||
</p>
|
||||
<h2>
|
||||
<a name="Driver" id="Driver">The libvirt drivers</a>
|
||||
</h2>
|
||||
<p></p>
|
||||
<p class="image">
|
||||
<img alt="The libvirt driver architecture" src="libvirt-driver-arch.png" /></p>
|
||||
<h2>
|
||||
<a name="Remote" id="Remote">Daemon and remote access</a>
|
||||
</h2>
|
||||
<p></p>
|
||||
<p class="image">
|
||||
<img alt="The libvirt daemon and remote architecture" src="libvirt-daemon-arch.png" /></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p id="sponsor">
|
||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
136
docs/api.html.in
Normal file
136
docs/api.html.in
Normal file
@ -0,0 +1,136 @@
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>The libvirt API concepts</h1>
|
||||
|
||||
<p> This page describes the main principles and architecture choices
|
||||
behind the definition of the libvirt API:
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#Objects">Objects exposed</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#Functions">Functions and naming conventions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#Driver">The drivers</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#Remote">Daemon and remote access</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a name="Objects" id="Objects">Objects exposed</a></h2>
|
||||
<p> As defined in the <a href="goals.html">goals section</a>, libvirt
|
||||
API need to expose all the resources needed to manage the virtualization
|
||||
support of recent operating systems. The first object manipulated though
|
||||
the API is <code>virConnectPtr</code> which represent a connection to
|
||||
an hypervisor. Any application using libvirt is likely to start using the
|
||||
API by calling one of <a href="html/libvirt-libvirt.html#virConnectOpen"
|
||||
>the virConnectOpen functions</a>. You will note that those functions take
|
||||
a name argument which is actually an URI to select the right hypervisor to
|
||||
open, this is needed to allow remote connections and also select between
|
||||
different possible hypervisors (for example on a Linux system it may be
|
||||
possible to use both KVM and LinuxContainers on the same node). A NULL
|
||||
name will default to a preselected hypervisor but it's probably not a
|
||||
wise thing to do in most cases. See the <a href="uri.html">connection
|
||||
URI</a> page for a full descriptions of the values allowed.<p>
|
||||
<p> Once the application obtained a <code class='docref'>virConnectPtr</code>
|
||||
connection to the
|
||||
hypervisor it can then use it to manage domains and related resources
|
||||
available for virtualization like storage and networking. All those are
|
||||
exposed as first class objects, and connected to the hypervisor connection
|
||||
(and the node or cluster where it is available).</p>
|
||||
<p class="image">
|
||||
<img alt="first class objects exposed by the API"
|
||||
src="libvirt-object-model.png"/>
|
||||
</p>
|
||||
<p> The figure above shows the five main objects exported by the API:</p>
|
||||
<ul>
|
||||
<li>virConnectPtr: represent a connection to an hypervisor.</li>
|
||||
<li>virDomainPtr: represent one domain either active or defined (i.e.
|
||||
existing as permanent config file and storage but not currently running
|
||||
on that node). The function <code class='docref'>virConnectListDomains</code>
|
||||
allows to list all the IDs for the domains active on this hypervisor.</li>
|
||||
<li>virNetworkPtr: represent one network either active or defined (i.e.
|
||||
existing as permanent config file and storage but not currently activated.
|
||||
The function <code class='docref'>virConnectListNetworks</code>
|
||||
allows to list all the virtualization networks actived on this node.</li>
|
||||
<li>virStorageVolPtr: represent one storage volume, usually this is used
|
||||
as a block device available to one of the domains. The function
|
||||
<code class="docref">virStorageVolLookupByPath</code> allows to find
|
||||
the object based on its path on the node.</li>
|
||||
<li>virStoragePoolPtr: represent a storage pool, i.e. a logical area
|
||||
which can be used to allocate and store storage volumes. The function
|
||||
<code class="docref">virStoragePoolLookupByVolume</code> allows to find
|
||||
the storage pool containing a given storage volume.</li>
|
||||
</ul>
|
||||
<p> Most object manipulated by the library can also be represented using
|
||||
XML descriptions. This is used primarily to create those object, but is
|
||||
also helpful to modify or save their description back.</p>
|
||||
<p> Domains, network and storage pools can be either <code>active</code>
|
||||
i.e. either running or available for immediate use, or
|
||||
<code>defined</code> in which case they are inactive but there is
|
||||
a permanent definition available in the system for them. Based on this
|
||||
thay can be activated dynamically in order to be used.</p>
|
||||
<p> Most kind of object can also be named in various ways:<p>
|
||||
<ul>
|
||||
<li>by their <code>name</code>, an user friendly identifier but
|
||||
whose unicity cannot be garanteed between two nodes.</li>
|
||||
<li>by their <code>ID</code>, which is a runtime unique identifier
|
||||
provided by the hypervisor for one given activation of the object,
|
||||
but it becomes invalid once the resource is deactivated.</li >
|
||||
<li>by their <code>UUID</code>, a 16 bytes unique identifier
|
||||
as defined in <a href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>,
|
||||
which is garanteed to be unique for long term usage and across a
|
||||
set of nodes.</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="Functions" id="Functions">Functions and naming
|
||||
conventions</a></h2>
|
||||
<p> The naming of the functions present in the library is usually
|
||||
made of a prefix describing the object associated to the function
|
||||
and a verb describing the action on that object.</p>
|
||||
<p> For each first class object you will find apis
|
||||
for the following actions:</p>
|
||||
<ul>
|
||||
<li><b>Lookup</b>:...LookupByName,
|
||||
<li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
|
||||
those are used to enumerate a set of object available to an given
|
||||
hypervisor connection like:
|
||||
<code class='docref'>virConnectListDomains</code>,
|
||||
<code class='docref'>virConnectNumOfDomains</code>,
|
||||
<code class='docref'>virConnectListNetworks</code>,
|
||||
<code class='docref'>virConnectListStoragePools</code>, etc.</li>
|
||||
<li><b>Description</b>: ...GetInfo: those are generic accessor providing
|
||||
a set of informations about an object, they are
|
||||
<code class='docref'>virNodeGetInfo</code>,
|
||||
<code class='docref'>virDomainGetInfo</code>,
|
||||
<code class='docref'>virStoragePoolGetInfo</code>,
|
||||
<code class='docref'>virStorageVolGetInfo</code>.</li>
|
||||
<li><b>Accessors</b>: ...Get... and ...Set...: those are more specific
|
||||
accessors to query or modify the given object, like
|
||||
<code class='docref'>virConnectGetType</code>,
|
||||
<code class='docref'>virDomainGetMaxMemory</code>,
|
||||
<code class='docref'>virDomainSetMemory</code>,
|
||||
<code class='docref'>virDomainGetVcpus</code>,
|
||||
<code class='docref'>virStoragePoolSetAutostart</code>,
|
||||
<code class='docref'>virNetworkGetBridgeName</code>, etc.</li>
|
||||
<li><b>Creation</b>: </li>
|
||||
<li><b>Destruction</b>: ... </li>
|
||||
</ul>
|
||||
<p> For more in-depth details of the storage related APIs see
|
||||
<a href="storage.html">the storage management page</a>,
|
||||
<h2><a name="Driver" id="Driver">The libvirt drivers</a></h2>
|
||||
<p></p>
|
||||
<p class="image">
|
||||
<img alt="The libvirt driver architecture"
|
||||
src="libvirt-driver-arch.png"/>
|
||||
</p>
|
||||
<h2><a name="Remote" id="Remote">Daemon and remote access</a></h2>
|
||||
<p></p>
|
||||
<p class="image">
|
||||
<img alt="The libvirt daemon and remote architecture"
|
||||
src="libvirt-daemon-arch.png"/>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
365
docs/api_extension.html
Normal file
365
docs/api_extension.html
Normal file
@ -0,0 +1,365 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
This file is autogenerated from api_extension.html.in
|
||||
Do not edit this file. Changes will be lost.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
||||
<title>libvirt: Implementing a new API in Libvirt</title>
|
||||
<meta name="description" content="libvirt, virtualization, virtualization API" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="headerLogo"></div>
|
||||
<div id="headerSearch">
|
||||
<form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><div>
|
||||
<input id="query" name="query" type="text" size="12" value="" />
|
||||
<input id="submit" name="submit" type="submit" value="Search" />
|
||||
</div></form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="menu">
|
||||
<ul class="l0"><li>
|
||||
<div>
|
||||
<a title="Front page of the libvirt website" class="inactive" href="index.html">Home</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Details of new features and bugs fixed in each release" class="inactive" href="news.html">News</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="downloads.html">Downloads</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Information for users, administrators and developers" class="active" href="docs.html">Documentation</a>
|
||||
<ul class="l1"><li>
|
||||
<div>
|
||||
<a title="Information about deploying and using libvirt" class="inactive" href="deployment.html">Deployment</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="intro.html">Architecture</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Description of the XML formats used in libvirt" class="inactive" href="format.html">XML format</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Hypervisor specific driver information" class="inactive" href="drivers.html">Drivers</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="active" href="internals.html">Internals</a>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<a title="General hacking guidelines for contributors" class="inactive" href="hacking.html">Contributor guidelines</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<span class="active">API extensions</span>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Frequently asked questions" class="inactive" href="FAQ.html">FAQ</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How and where to report bugs and request features" class="inactive" href="bugs.html">Bug reports</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How to contact the developers via email and IRC" class="inactive" href="contact.html">Contact</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Miscellaneous links of interest related to libvirt" class="inactive" href="relatedlinks.html">Related Links</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of all content on the website" class="inactive" href="sitemap.html">Sitemap</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Implementing a new API in Libvirt</h1>
|
||||
<ul><li>
|
||||
<a href="#publicapi">Defining the public API</a>
|
||||
</li><li>
|
||||
<a href="#internalapi">Defining the internal API</a>
|
||||
</li><li>
|
||||
<a href="#implpublic">Implementing the public API</a>
|
||||
</li><li>
|
||||
<a href="#wireproto">Defining the wire protocol format</a>
|
||||
</li><li>
|
||||
<a href="#rpcclient">Implement the RPC client</a>
|
||||
</li><li>
|
||||
<a href="#serverdispatch">Implement the server side dispatcher</a>
|
||||
</li><li>
|
||||
<a href="#driverimpl">Implement the driver methods</a>
|
||||
</li><li>
|
||||
<a href="#virsh">Implement virsh commands</a>
|
||||
</li></ul>
|
||||
<p>
|
||||
This document walks you through the process of implementing a new
|
||||
API in libvirt. It uses as an example the addition of the node device
|
||||
create and destroy APIs.
|
||||
</p>
|
||||
<p>
|
||||
Before you begin coding, it is critical that you propose your
|
||||
changes on the libvirt mailing list and get feedback on your ideas to
|
||||
make sure what you're proposing fits with the general direction of the
|
||||
project. Even before doing a proof of concept implementation, send an
|
||||
email giving an overview of the functionality you think should be
|
||||
added to libvirt. Someone may already be working on the feature you
|
||||
want. Also, recognize that everything you write is likely to undergo
|
||||
significant rework as you discuss it with the other developers, so
|
||||
don't wait too long before getting feedback.
|
||||
</p>
|
||||
<p>
|
||||
Adding a new API to libvirt is not difficult, but there are quite a
|
||||
few steps. This document assumes that you are familiar with C
|
||||
programming and have checked out the libvirt code from the source code
|
||||
repository and successfully built the existing tree. Instructions on
|
||||
how to check out and build the code can be found at:
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://libvirt.org/downloads.html">http://libvirt.org/downloads.html</a>
|
||||
</p>
|
||||
<p>
|
||||
Once you have a working development environment, the steps to create a
|
||||
new API are:
|
||||
</p>
|
||||
<ol><li>define the public API</li><li>define the internal driver API</li><li>implement the public API</li><li>define the wire protocol format</li><li>implement the RPC client</li><li>implement the server side dispatcher</li><li>implement the driver methods</li><li>add virsh support</li></ol>
|
||||
<p>
|
||||
It is, of course, possible to implement the pieces in any order, but
|
||||
if the development tasks are completed in the order listed, the code
|
||||
will compile after each step. Given the number of changes required,
|
||||
verification after each step is highly recommended.
|
||||
</p>
|
||||
<p>
|
||||
Submit new code in the form shown in the example code: one patch
|
||||
per step. That's not to say submit patches before you have working
|
||||
functionality--get the whole thing working and make sure you're happy
|
||||
with it. Then use git or some other version control system that lets
|
||||
you rewrite your commit history and break patches into pieces so you
|
||||
don't drop a big blob of code on the mailing list at one go. For
|
||||
example, I didn't follow my own advice when I originally submitted the
|
||||
example code to the libvirt list but rather submitted it in several
|
||||
large chunks. I've used git's ability to rewrite my commit history to
|
||||
break the code apart into the example patches shown.
|
||||
</p>
|
||||
<p>
|
||||
Don't mix anything else into the patches you submit. The patches
|
||||
should be the minimal changes required to implement the functionality
|
||||
you're adding. If you notice a bug in unrelated code (i.e., code you
|
||||
don't have to touch to implement your API change) during development,
|
||||
create a patch that just addresses that bug and submit it
|
||||
separately.
|
||||
</p>
|
||||
<p>With that said, let's begin.</p>
|
||||
<h2>
|
||||
<a name="publicapi" id="publicapi">Defining the public API</a>
|
||||
</h2>
|
||||
<p>The first task is to define the public API and add it to:</p>
|
||||
<p>
|
||||
<code>include/libvirt/libvirt.h.in</code>
|
||||
</p>
|
||||
<p>
|
||||
This task is in many ways the most important to get right, since once
|
||||
the API has been committed to the repository, it's libvirt's policy
|
||||
never to change it. Mistakes in the implementation are bugs that you
|
||||
can fix. Make a mistake in the API definition and you're stuck with
|
||||
it, so think carefully about the interface and don't be afraid to
|
||||
rework it as you go through the process of implementing it.
|
||||
</p>
|
||||
<p>Once you have defined the API, you have to add the symbol names to:</p>
|
||||
<p>
|
||||
<code>src/libvirt_public.syms</code>
|
||||
</p>
|
||||
<p class="example">See <a href="api_extension/0001-Step-1-of-8-Define-the-public-API.patch">0001-Step-1-of-8-Define-the-public-API.patch</a> for example code.</p>
|
||||
<h2>
|
||||
<a name="internalapi" id="internalapi">Defining the internal API</a>
|
||||
</h2>
|
||||
<p>
|
||||
Each public API call is associated with a driver, such as a host
|
||||
virtualization driver, a network virtualization driver, a storage
|
||||
virtualization driver, a state driver, or a device monitor. Adding
|
||||
the internal API is ordinarily a matter of adding a new member to the
|
||||
struct representing one of these drivers.
|
||||
</p>
|
||||
<p>
|
||||
Of course, it's possible that the new API will involve the creation of
|
||||
an entire new driver type, in which case the changes will include the
|
||||
creation of a new struct type to represent the new driver type.
|
||||
</p>
|
||||
<p>The driver structs are defined in:</p>
|
||||
<p>
|
||||
<code>src/driver.h</code>
|
||||
</p>
|
||||
<p>
|
||||
To define the internal API, first typedef the driver function
|
||||
prototype and then add a new field for it to the relevant driver
|
||||
struct.
|
||||
</p>
|
||||
<p class="example">See <a href="api_extension/0002-Step-2-of-8-Define-the-internal-driver-API.patch">0002-Step-2-of-8-Define-the-internal-driver-API.patch</a></p>
|
||||
<h2>
|
||||
<a name="implpublic" id="implpublic">Implementing the public API</a>
|
||||
</h2>
|
||||
<p>
|
||||
Implementing the public API is largely a formality in which we wire up
|
||||
public API to the internal driver API. The public API implementation
|
||||
takes care of some basic validity checks before passing control to the
|
||||
driver implementation. In RFC 2119 vocabulary, this function:
|
||||
</p>
|
||||
<ol class="ordinarylist"><li>SHOULD log a message with VIR_DEBUG() indicating that it is
|
||||
being called and its parameters;</li><li>MUST call virResetLastError();</li><li>SHOULD confirm that the connection is valid with
|
||||
VIR_IS_CONNECT(conn);</li><li><strong>SECURITY: If the API requires a connection with write
|
||||
privileges, MUST confirm that the connection flags do not
|
||||
indicate that the connection is read-only;</strong></li><li>SHOULD do basic validation of the parameters that are being
|
||||
passed in;</li><li>MUST confirm that the driver for this connection exists and that
|
||||
it implements this function;</li><li>MUST call the internal API;</li><li>SHOULD log a message with VIR_DEBUG() indicating that it is
|
||||
returning, its return value, and status.</li><li>MUST return status to the caller.</li></ol>
|
||||
<p>The public API calls are implemented in:</p>
|
||||
<p>
|
||||
<code>src/libvirt.c</code>
|
||||
</p>
|
||||
<p class="example">See <a href="api_extension/0003-Step-3-of-8-Implement-the-public-API.patch">0003-Step-3-of-8-Implement-the-public-API.patch</a></p>
|
||||
<h2>
|
||||
<a name="wireproto" id="wireproto">Defining the wire protocol format</a>
|
||||
</h2>
|
||||
<p>
|
||||
Defining the wire protocol is essentially a straightforward exercise
|
||||
which is probably most easily understood by referring to the existing
|
||||
remote protocol wire format definitions and the example patch. It
|
||||
involves making two additions to:
|
||||
</p>
|
||||
<p>
|
||||
<code>qemud/remote_protocol.x</code>
|
||||
</p>
|
||||
<p>
|
||||
First, create two new structs for each new function that you're adding
|
||||
to the API. One struct describes the parameters to be passed to the
|
||||
remote function, and a second struct describes the value returned by
|
||||
the remote function. The one exception to this rule is that functions
|
||||
that return only integer status do not require a struct for returned
|
||||
data.
|
||||
</p>
|
||||
<p>
|
||||
Second, add values to the remote_procedure enum for each new function
|
||||
added to the API.
|
||||
</p>
|
||||
<p class="example">See <a href="api_extension/0004-Step-4-of-8-Define-the-wire-protocol-format.patch">0004-Step-4-of-8-Define-the-wire-protocol-format.patch</a></p>
|
||||
<p>
|
||||
Once these changes are in place, it's necessary to run 'make rpcgen'
|
||||
in the qemud directory to create the .c and .h files required by the
|
||||
remote protocol code. This must be done on a Linux host using the
|
||||
GLibC rpcgen program. Other rpcgen versions may generate code which
|
||||
results in bogus compile time warnings
|
||||
</p>
|
||||
<h2>
|
||||
<a name="rpcclient" id="rpcclient">Implement the RPC client</a>
|
||||
</h2>
|
||||
<p>
|
||||
Implementing the RPC client is also relatively mechanical, so refer to
|
||||
the exising code and example patch for guidance. The RPC client uses
|
||||
the rpcgen generated .h files. The remote method calls go in:
|
||||
</p>
|
||||
<p>
|
||||
<code>src/remote_internal.c</code>
|
||||
</p>
|
||||
<p>Each remote method invocation does the following:</p>
|
||||
<ol class="ordinarylist"><li>locks the remote driver;</li><li>sets up the method arguments;</li><li>invokes the remote function;</li><li>checks the return value, if necessary;</li><li>extracts any returned data;</li><li>frees any returned data;</li><li>unlocks the remote driver.</li></ol>
|
||||
<p>
|
||||
Once you have created the remote method calls, you have to add fields
|
||||
for them to the driver structs for the appropriate remote driver.
|
||||
</p>
|
||||
<p class="example">See <a href="api_extension/0005-Step-5-of-8-Implement-the-RPC-client.patch">0005-Step-5-of-8-Implement-the-RPC-client.patch</a></p>
|
||||
<h2>
|
||||
<a name="serverdispatch" id="serverdispatch">Implement the server side dispatcher</a>
|
||||
</h2>
|
||||
<p>
|
||||
Implementing the server side of the remote function calls is simply a
|
||||
matter of deserializing the parameters passed in from the remote
|
||||
caller and passing them to the corresponding internal API function.
|
||||
The server side dispatchers are implemented in:
|
||||
</p>
|
||||
<p>
|
||||
<code>qemud/remote.c</code>
|
||||
</p>
|
||||
<p>Again, this step uses the .h files generated by make rpcgen.</p>
|
||||
<p class="example">See <a href="api_extension/0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch">0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch</a></p>
|
||||
<h2>
|
||||
<a name="driverimpl" id="driverimpl">Implement the driver methods</a>
|
||||
</h2>
|
||||
<p>
|
||||
So, after all that, we get to the fun part. All functionality in
|
||||
libvirt is implemented inside a driver. Thus, here is where you
|
||||
implement whatever functionality you're adding to libvirt. You'll
|
||||
either need to add additional files to the src directory or extend
|
||||
files that are already there, depending on what functionality you're
|
||||
adding.
|
||||
</p>
|
||||
<p>
|
||||
In the example code, the extension is only an additional two function
|
||||
calls in the node device API, so most of the new code is additions to
|
||||
existing files. The only new files are there for multi-platform
|
||||
implementation convenience, as some of the new code is Linux specific.
|
||||
</p>
|
||||
<p>
|
||||
The example code is probably uninteresting unless you're concerned
|
||||
with libvirt storage, but I've included it here to show how new files
|
||||
are added to the build environment.
|
||||
</p>
|
||||
<p class="example">See <a href="api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch">0007-Step-7-of-8-Implement-the-driver-methods.patch</a></p>
|
||||
<h2>
|
||||
<a name="virsh" id="virsh">Implement virsh commands</a>
|
||||
</h2>
|
||||
<p>
|
||||
Once you have the new functionality in place, the easiest way to test
|
||||
it and also to provide it to end users is to implement support for it
|
||||
in virsh.
|
||||
</p>
|
||||
<p>
|
||||
A virsh command is composed of a few pieces of code. You need to
|
||||
define an array of vshCmdInfo structs for each new command that
|
||||
contain the help text and the command description text. You also need
|
||||
an array of vshCmdOptDef structs to describe the command options.
|
||||
Once you have those pieces of data in place you can write the function
|
||||
implementing the virsh command. Finally, you need to add the new
|
||||
command to the commands[] array.
|
||||
</p>
|
||||
<p class="example">See <a href="api_extension/0008-Step-8-of-8-Add-virsh-support.patch">0008-Step-8-of-8-Add-virsh-support.patch</a></p>
|
||||
<p>Once you have working functionality, run make check and make
|
||||
syntax-check before generating patches.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p id="sponsor">
|
||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
302
docs/api_extension.html.in
Normal file
302
docs/api_extension.html.in
Normal file
@ -0,0 +1,302 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Implementing a new API in Libvirt</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Implementing a new API in Libvirt</h1>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<p>
|
||||
This document walks you through the process of implementing a new
|
||||
API in libvirt. It uses as an example the addition of the node device
|
||||
create and destroy APIs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Before you begin coding, it is critical that you propose your
|
||||
changes on the libvirt mailing list and get feedback on your ideas to
|
||||
make sure what you're proposing fits with the general direction of the
|
||||
project. Even before doing a proof of concept implementation, send an
|
||||
email giving an overview of the functionality you think should be
|
||||
added to libvirt. Someone may already be working on the feature you
|
||||
want. Also, recognize that everything you write is likely to undergo
|
||||
significant rework as you discuss it with the other developers, so
|
||||
don't wait too long before getting feedback.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Adding a new API to libvirt is not difficult, but there are quite a
|
||||
few steps. This document assumes that you are familiar with C
|
||||
programming and have checked out the libvirt code from the source code
|
||||
repository and successfully built the existing tree. Instructions on
|
||||
how to check out and build the code can be found at:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="http://libvirt.org/downloads.html">http://libvirt.org/downloads.html</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once you have a working development environment, the steps to create a
|
||||
new API are:
|
||||
</p>
|
||||
<ol>
|
||||
<li>define the public API</li>
|
||||
<li>define the internal driver API</li>
|
||||
<li>implement the public API</li>
|
||||
<li>define the wire protocol format</li>
|
||||
<li>implement the RPC client</li>
|
||||
<li>implement the server side dispatcher</li>
|
||||
<li>implement the driver methods</li>
|
||||
<li>add virsh support</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
It is, of course, possible to implement the pieces in any order, but
|
||||
if the development tasks are completed in the order listed, the code
|
||||
will compile after each step. Given the number of changes required,
|
||||
verification after each step is highly recommended.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Submit new code in the form shown in the example code: one patch
|
||||
per step. That's not to say submit patches before you have working
|
||||
functionality--get the whole thing working and make sure you're happy
|
||||
with it. Then use git or some other version control system that lets
|
||||
you rewrite your commit history and break patches into pieces so you
|
||||
don't drop a big blob of code on the mailing list at one go. For
|
||||
example, I didn't follow my own advice when I originally submitted the
|
||||
example code to the libvirt list but rather submitted it in several
|
||||
large chunks. I've used git's ability to rewrite my commit history to
|
||||
break the code apart into the example patches shown.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Don't mix anything else into the patches you submit. The patches
|
||||
should be the minimal changes required to implement the functionality
|
||||
you're adding. If you notice a bug in unrelated code (i.e., code you
|
||||
don't have to touch to implement your API change) during development,
|
||||
create a patch that just addresses that bug and submit it
|
||||
separately.
|
||||
</p>
|
||||
|
||||
<p>With that said, let's begin.</p>
|
||||
|
||||
<h2><a name='publicapi'>Defining the public API</a></h2>
|
||||
|
||||
<p>The first task is to define the public API and add it to:</p>
|
||||
|
||||
<p><code>include/libvirt/libvirt.h.in</code></p>
|
||||
|
||||
<p>
|
||||
This task is in many ways the most important to get right, since once
|
||||
the API has been committed to the repository, it's libvirt's policy
|
||||
never to change it. Mistakes in the implementation are bugs that you
|
||||
can fix. Make a mistake in the API definition and you're stuck with
|
||||
it, so think carefully about the interface and don't be afraid to
|
||||
rework it as you go through the process of implementing it.
|
||||
</p>
|
||||
|
||||
<p>Once you have defined the API, you have to add the symbol names to:</p>
|
||||
|
||||
<p><code>src/libvirt_public.syms</code></p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0001-Step-1-of-8-Define-the-public-API.patch">0001-Step-1-of-8-Define-the-public-API.patch</a> for example code.</p>
|
||||
|
||||
|
||||
<h2><a name='internalapi'>Defining the internal API</a></h2>
|
||||
|
||||
<p>
|
||||
Each public API call is associated with a driver, such as a host
|
||||
virtualization driver, a network virtualization driver, a storage
|
||||
virtualization driver, a state driver, or a device monitor. Adding
|
||||
the internal API is ordinarily a matter of adding a new member to the
|
||||
struct representing one of these drivers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Of course, it's possible that the new API will involve the creation of
|
||||
an entire new driver type, in which case the changes will include the
|
||||
creation of a new struct type to represent the new driver type.
|
||||
</p>
|
||||
|
||||
<p>The driver structs are defined in:</p>
|
||||
|
||||
<p><code>src/driver.h</code></p>
|
||||
|
||||
<p>
|
||||
To define the internal API, first typedef the driver function
|
||||
prototype and then add a new field for it to the relevant driver
|
||||
struct.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0002-Step-2-of-8-Define-the-internal-driver-API.patch">0002-Step-2-of-8-Define-the-internal-driver-API.patch</a></p>
|
||||
|
||||
<h2><a name='implpublic'>Implementing the public API</a></h2>
|
||||
|
||||
<p>
|
||||
Implementing the public API is largely a formality in which we wire up
|
||||
public API to the internal driver API. The public API implementation
|
||||
takes care of some basic validity checks before passing control to the
|
||||
driver implementation. In RFC 2119 vocabulary, this function:
|
||||
</p>
|
||||
|
||||
<ol class="ordinarylist">
|
||||
<li>SHOULD log a message with VIR_DEBUG() indicating that it is
|
||||
being called and its parameters;</li>
|
||||
<li>MUST call virResetLastError();</li>
|
||||
<li>SHOULD confirm that the connection is valid with
|
||||
VIR_IS_CONNECT(conn);</li>
|
||||
<li><strong>SECURITY: If the API requires a connection with write
|
||||
privileges, MUST confirm that the connection flags do not
|
||||
indicate that the connection is read-only;</strong></li>
|
||||
<li>SHOULD do basic validation of the parameters that are being
|
||||
passed in;</li>
|
||||
<li>MUST confirm that the driver for this connection exists and that
|
||||
it implements this function;</li>
|
||||
<li>MUST call the internal API;</li>
|
||||
<li>SHOULD log a message with VIR_DEBUG() indicating that it is
|
||||
returning, its return value, and status.</li>
|
||||
<li>MUST return status to the caller.</li>
|
||||
</ol>
|
||||
|
||||
<p>The public API calls are implemented in:</p>
|
||||
|
||||
<p><code>src/libvirt.c</code></p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0003-Step-3-of-8-Implement-the-public-API.patch">0003-Step-3-of-8-Implement-the-public-API.patch</a></p>
|
||||
|
||||
|
||||
<h2><a name='wireproto'>Defining the wire protocol format</a></h2>
|
||||
|
||||
<p>
|
||||
Defining the wire protocol is essentially a straightforward exercise
|
||||
which is probably most easily understood by referring to the existing
|
||||
remote protocol wire format definitions and the example patch. It
|
||||
involves making two additions to:
|
||||
</p>
|
||||
|
||||
<p><code>qemud/remote_protocol.x</code></p>
|
||||
|
||||
<p>
|
||||
First, create two new structs for each new function that you're adding
|
||||
to the API. One struct describes the parameters to be passed to the
|
||||
remote function, and a second struct describes the value returned by
|
||||
the remote function. The one exception to this rule is that functions
|
||||
that return only integer status do not require a struct for returned
|
||||
data.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Second, add values to the remote_procedure enum for each new function
|
||||
added to the API.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0004-Step-4-of-8-Define-the-wire-protocol-format.patch">0004-Step-4-of-8-Define-the-wire-protocol-format.patch</a></p>
|
||||
|
||||
<p>
|
||||
Once these changes are in place, it's necessary to run 'make rpcgen'
|
||||
in the qemud directory to create the .c and .h files required by the
|
||||
remote protocol code. This must be done on a Linux host using the
|
||||
GLibC rpcgen program. Other rpcgen versions may generate code which
|
||||
results in bogus compile time warnings
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name='rpcclient'>Implement the RPC client</a></h2>
|
||||
|
||||
<p>
|
||||
Implementing the RPC client is also relatively mechanical, so refer to
|
||||
the exising code and example patch for guidance. The RPC client uses
|
||||
the rpcgen generated .h files. The remote method calls go in:
|
||||
</p>
|
||||
|
||||
<p><code>src/remote_internal.c</code></p>
|
||||
|
||||
<p>Each remote method invocation does the following:</p>
|
||||
|
||||
<ol class="ordinarylist">
|
||||
<li>locks the remote driver;</li>
|
||||
<li>sets up the method arguments;</li>
|
||||
<li>invokes the remote function;</li>
|
||||
<li>checks the return value, if necessary;</li>
|
||||
<li>extracts any returned data;</li>
|
||||
<li>frees any returned data;</li>
|
||||
<li>unlocks the remote driver.</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
Once you have created the remote method calls, you have to add fields
|
||||
for them to the driver structs for the appropriate remote driver.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0005-Step-5-of-8-Implement-the-RPC-client.patch">0005-Step-5-of-8-Implement-the-RPC-client.patch</a></p>
|
||||
|
||||
<h2><a name="serverdispatch">Implement the server side dispatcher</a></h2>
|
||||
|
||||
<p>
|
||||
Implementing the server side of the remote function calls is simply a
|
||||
matter of deserializing the parameters passed in from the remote
|
||||
caller and passing them to the corresponding internal API function.
|
||||
The server side dispatchers are implemented in:
|
||||
</p>
|
||||
|
||||
<p><code>qemud/remote.c</code></p>
|
||||
|
||||
<p>Again, this step uses the .h files generated by make rpcgen.</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch">0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch</a></p>
|
||||
|
||||
|
||||
<h2><a name="driverimpl">Implement the driver methods</a></h2>
|
||||
|
||||
<p>
|
||||
So, after all that, we get to the fun part. All functionality in
|
||||
libvirt is implemented inside a driver. Thus, here is where you
|
||||
implement whatever functionality you're adding to libvirt. You'll
|
||||
either need to add additional files to the src directory or extend
|
||||
files that are already there, depending on what functionality you're
|
||||
adding.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In the example code, the extension is only an additional two function
|
||||
calls in the node device API, so most of the new code is additions to
|
||||
existing files. The only new files are there for multi-platform
|
||||
implementation convenience, as some of the new code is Linux specific.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The example code is probably uninteresting unless you're concerned
|
||||
with libvirt storage, but I've included it here to show how new files
|
||||
are added to the build environment.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch">0007-Step-7-of-8-Implement-the-driver-methods.patch</a></p>
|
||||
|
||||
<h2><a name="virsh">Implement virsh commands</a></h2>
|
||||
|
||||
<p>
|
||||
Once you have the new functionality in place, the easiest way to test
|
||||
it and also to provide it to end users is to implement support for it
|
||||
in virsh.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
A virsh command is composed of a few pieces of code. You need to
|
||||
define an array of vshCmdInfo structs for each new command that
|
||||
contain the help text and the command description text. You also need
|
||||
an array of vshCmdOptDef structs to describe the command options.
|
||||
Once you have those pieces of data in place you can write the function
|
||||
implementing the virsh command. Finally, you need to add the new
|
||||
command to the commands[] array.
|
||||
</p>
|
||||
|
||||
<p class="example">See <a href="api_extension/0008-Step-8-of-8-Add-virsh-support.patch">0008-Step-8-of-8-Add-virsh-support.patch</a></p>
|
||||
|
||||
<p>Once you have working functionality, run make check and make
|
||||
syntax-check before generating patches.</p>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,45 @@
|
||||
From 2ae8fd62a1e5e085b7902da9bc207b806d84fd91 Mon Sep 17 00:00:00 2001
|
||||
From: David Allan <dallan@redhat.com>
|
||||
Date: Tue, 19 May 2009 16:16:11 -0400
|
||||
Subject: [PATCH] Step 1 of 8 Define the public API
|
||||
|
||||
---
|
||||
include/libvirt/libvirt.h.in | 6 ++++++
|
||||
src/libvirt_public.syms | 6 ++++++
|
||||
2 files changed, 12 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
|
||||
index a028b21..2f7076f 100644
|
||||
--- a/include/libvirt/libvirt.h.in
|
||||
+++ b/include/libvirt/libvirt.h.in
|
||||
@@ -1124,6 +1124,12 @@ int virNodeDeviceDettach (virNodeDevicePtr dev);
|
||||
int virNodeDeviceReAttach (virNodeDevicePtr dev);
|
||||
int virNodeDeviceReset (virNodeDevicePtr dev);
|
||||
|
||||
+virNodeDevicePtr virNodeDeviceCreateXML (virConnectPtr conn,
|
||||
+ const char *xmlDesc,
|
||||
+ unsigned int flags);
|
||||
+
|
||||
+int virNodeDeviceDestroy (virNodeDevicePtr dev);
|
||||
+
|
||||
/*
|
||||
* Domain Event Notification
|
||||
*/
|
||||
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
|
||||
index f7ebbc3..b8f9128 100644
|
||||
--- a/src/libvirt_public.syms
|
||||
+++ b/src/libvirt_public.syms
|
||||
@@ -258,4 +258,10 @@ LIBVIRT_0.6.1 {
|
||||
virNodeGetSecurityModel;
|
||||
} LIBVIRT_0.6.0;
|
||||
|
||||
+LIBVIRT_0.6.3 {
|
||||
+ global:
|
||||
+ virNodeDeviceCreateXML;
|
||||
+ virNodeDeviceDestroy;
|
||||
+} LIBVIRT_0.6.1;
|
||||
+
|
||||
# .... define new API here using predicted next version number ....
|
||||
--
|
||||
1.6.0.6
|
||||
|
@ -0,0 +1,37 @@
|
||||
From b26d7fc2d64e7e6e4d3ea2b43361015d3620d7a6 Mon Sep 17 00:00:00 2001
|
||||
From: David Allan <dallan@redhat.com>
|
||||
Date: Tue, 19 May 2009 16:19:14 -0400
|
||||
Subject: [PATCH] Step 2 of 8 Define the internal driver API
|
||||
|
||||
---
|
||||
src/driver.h | 7 +++++++
|
||||
1 files changed, 7 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/driver.h b/src/driver.h
|
||||
index 39dc413..c357b76 100644
|
||||
--- a/src/driver.h
|
||||
+++ b/src/driver.h
|
||||
@@ -684,6 +684,11 @@ typedef int (*virDevMonDeviceListCaps)(virNodeDevicePtr dev,
|
||||
char **const names,
|
||||
int maxnames);
|
||||
|
||||
+typedef virNodeDevicePtr (*virDrvNodeDeviceCreateXML)(virConnectPtr conn,
|
||||
+ const char *xmlDesc,
|
||||
+ unsigned int flags);
|
||||
+typedef int (*virDrvNodeDeviceDestroy)(virNodeDevicePtr dev);
|
||||
+
|
||||
/**
|
||||
* _virDeviceMonitor:
|
||||
*
|
||||
@@ -702,6 +707,8 @@ struct _virDeviceMonitor {
|
||||
virDevMonDeviceGetParent deviceGetParent;
|
||||
virDevMonDeviceNumOfCaps deviceNumOfCaps;
|
||||
virDevMonDeviceListCaps deviceListCaps;
|
||||
+ virDrvNodeDeviceCreateXML deviceCreateXML;
|
||||
+ virDrvNodeDeviceDestroy deviceDestroy;
|
||||
};
|
||||
|
||||
/*
|
||||
--
|
||||
1.6.0.6
|
||||
|
@ -0,0 +1,120 @@
|
||||
From fc585594a207dfb9149e7d3d01c9eb1c79b6d52d Mon Sep 17 00:00:00 2001
|
||||
From: David Allan <dallan@redhat.com>
|
||||
Date: Tue, 19 May 2009 16:22:23 -0400
|
||||
Subject: [PATCH] Step 3 of 8 Implement the public API
|
||||
|
||||
---
|
||||
src/libvirt.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 97 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/libvirt.c b/src/libvirt.c
|
||||
index f3d4484..ded18a7 100644
|
||||
--- a/src/libvirt.c
|
||||
+++ b/src/libvirt.c
|
||||
@@ -7509,6 +7509,103 @@ error:
|
||||
}
|
||||
|
||||
|
||||
+/**
|
||||
+ * virNodeDeviceCreateXML:
|
||||
+ * @conn: pointer to the hypervisor connection
|
||||
+ * @xmlDesc: string containing an XML description of the device to be created
|
||||
+ * @flags: callers should always pass 0
|
||||
+ *
|
||||
+ * Create a new device on the VM host machine, for example, virtual
|
||||
+ * HBAs created using vport_create.
|
||||
+ *
|
||||
+ * Returns a node device object if successful, NULL in case of failure
|
||||
+ */
|
||||
+virNodeDevicePtr
|
||||
+virNodeDeviceCreateXML(virConnectPtr conn,
|
||||
+ const char *xmlDesc,
|
||||
+ unsigned int flags)
|
||||
+{
|
||||
+ VIR_DEBUG("conn=%p, xmlDesc=%s, flags=%d", conn, xmlDesc, flags);
|
||||
+
|
||||
+ virResetLastError();
|
||||
+
|
||||
+ if (!VIR_IS_CONNECT(conn)) {
|
||||
+ virLibConnError(NULL, VIR_ERR_INVALID_CONN, __FUNCTION__);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (conn->flags & VIR_CONNECT_RO) {
|
||||
+ virLibConnError(conn, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ if (xmlDesc == NULL) {
|
||||
+ virLibConnError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ if (conn->deviceMonitor &&
|
||||
+ conn->deviceMonitor->deviceCreateXML) {
|
||||
+ virNodeDevicePtr dev = conn->deviceMonitor->deviceCreateXML(conn, xmlDesc, flags);
|
||||
+ if (dev == NULL)
|
||||
+ goto error;
|
||||
+ return dev;
|
||||
+ }
|
||||
+
|
||||
+ virLibConnError (conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
|
||||
+
|
||||
+error:
|
||||
+ /* Copy to connection error object for back compatability */
|
||||
+ virSetConnError(conn);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/**
|
||||
+ * virNodeDeviceDestroy:
|
||||
+ * @dev: a device object
|
||||
+ *
|
||||
+ * Destroy the device object. The virtual device is removed from the host operating system.
|
||||
+ * This function may require privileged access
|
||||
+ *
|
||||
+ * Returns 0 in case of success and -1 in case of failure.
|
||||
+ */
|
||||
+int
|
||||
+virNodeDeviceDestroy(virNodeDevicePtr dev)
|
||||
+{
|
||||
+ DEBUG("dev=%p", dev);
|
||||
+
|
||||
+ virResetLastError();
|
||||
+
|
||||
+ if (!VIR_IS_CONNECTED_NODE_DEVICE(dev)) {
|
||||
+ virLibNodeDeviceError(NULL, VIR_ERR_INVALID_NODE_DEVICE, __FUNCTION__);
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ if (dev->conn->flags & VIR_CONNECT_RO) {
|
||||
+ virLibConnError(dev->conn, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ if (dev->conn->deviceMonitor &&
|
||||
+ dev->conn->deviceMonitor->deviceDestroy) {
|
||||
+ int retval = dev->conn->deviceMonitor->deviceDestroy(dev);
|
||||
+ if (retval < 0) {
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ virLibConnError (dev->conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
|
||||
+
|
||||
+error:
|
||||
+ /* Copy to connection error object for back compatability */
|
||||
+ virSetConnError(dev->conn);
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/*
|
||||
* Domain Event Notification
|
||||
*/
|
||||
--
|
||||
1.6.0.6
|
||||
|
@ -0,0 +1,48 @@
|
||||
From bce8f1243b0454c0d70e3db832a039d22faab09a Mon Sep 17 00:00:00 2001
|
||||
From: David Allan <dallan@redhat.com>
|
||||
Date: Wed, 20 May 2009 13:58:58 -0400
|
||||
Subject: [PATCH] Step 4 of 8 Define the wire protocol format
|
||||
|
||||
---
|
||||
qemud/remote_protocol.x | 18 +++++++++++++++++-
|
||||
1 files changed, 17 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/qemud/remote_protocol.x b/qemud/remote_protocol.x
|
||||
index 2d8e6a2..2c79949 100644
|
||||
--- a/qemud/remote_protocol.x
|
||||
+++ b/qemud/remote_protocol.x
|
||||
@@ -1109,6 +1109,19 @@ struct remote_node_device_reset_args {
|
||||
remote_nonnull_string name;
|
||||
};
|
||||
|
||||
+struct remote_node_device_create_xml_args {
|
||||
+ remote_nonnull_string xml_desc;
|
||||
+ int flags;
|
||||
+};
|
||||
+
|
||||
+struct remote_node_device_create_xml_ret {
|
||||
+ remote_nonnull_node_device dev;
|
||||
+};
|
||||
+
|
||||
+struct remote_node_device_destroy_args {
|
||||
+ remote_nonnull_string name;
|
||||
+};
|
||||
+
|
||||
|
||||
/**
|
||||
* Events Register/Deregister:
|
||||
@@ -1270,7 +1283,10 @@ enum remote_procedure {
|
||||
REMOTE_PROC_NODE_DEVICE_RESET = 120,
|
||||
|
||||
REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL = 121,
|
||||
- REMOTE_PROC_NODE_GET_SECURITY_MODEL = 122
|
||||
+ REMOTE_PROC_NODE_GET_SECURITY_MODEL = 122,
|
||||
+
|
||||
+ REMOTE_PROC_NODE_DEVICE_CREATE_XML = 123,
|
||||
+ REMOTE_PROC_NODE_DEVICE_DESTROY = 124
|
||||
};
|
||||
|
||||
/* Custom RPC structure. */
|
||||
--
|
||||
1.6.0.6
|
||||
|
@ -0,0 +1,85 @@
|
||||
From ff272552c297966ace3492aefe91fc830152251a Mon Sep 17 00:00:00 2001
|
||||
From: David Allan <dallan@redhat.com>
|
||||
Date: Tue, 19 May 2009 16:26:12 -0400
|
||||
Subject: [PATCH] Step 5 of 8 Implement the RPC client
|
||||
|
||||
---
|
||||
src/remote_internal.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 55 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/remote_internal.c b/src/remote_internal.c
|
||||
index 4b3afb0..e665ef8 100644
|
||||
--- a/src/remote_internal.c
|
||||
+++ b/src/remote_internal.c
|
||||
@@ -4978,6 +4978,59 @@ done:
|
||||
}
|
||||
|
||||
|
||||
+static virNodeDevicePtr
|
||||
+remoteNodeDeviceCreateXML(virConnectPtr conn,
|
||||
+ const char *xmlDesc,
|
||||
+ unsigned int flags)
|
||||
+{
|
||||
+ remote_node_device_create_xml_args args;
|
||||
+ remote_node_device_create_xml_ret ret;
|
||||
+ virNodeDevicePtr dev = NULL;
|
||||
+ struct private_data *priv = conn->privateData;
|
||||
+
|
||||
+ remoteDriverLock(priv);
|
||||
+
|
||||
+ memset(&ret, 0, sizeof ret);
|
||||
+ args.xml_desc = (char *)xmlDesc;
|
||||
+ args.flags = flags;
|
||||
+
|
||||
+ if (call(conn, priv, 0, REMOTE_PROC_NODE_DEVICE_CREATE_XML,
|
||||
+ (xdrproc_t) xdr_remote_node_device_create_xml_args, (char *) &args,
|
||||
+ (xdrproc_t) xdr_remote_node_device_create_xml_ret, (char *) &ret) == -1)
|
||||
+ goto done;
|
||||
+
|
||||
+ dev = get_nonnull_node_device(conn, ret.dev);
|
||||
+ xdr_free ((xdrproc_t) xdr_remote_node_device_create_xml_ret, (char *) &ret);
|
||||
+
|
||||
+done:
|
||||
+ remoteDriverUnlock(priv);
|
||||
+ return dev;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+remoteNodeDeviceDestroy(virNodeDevicePtr dev)
|
||||
+{
|
||||
+ int rv = -1;
|
||||
+ remote_node_device_destroy_args args;
|
||||
+ struct private_data *priv = dev->conn->privateData;
|
||||
+
|
||||
+ remoteDriverLock(priv);
|
||||
+
|
||||
+ args.name = dev->name;
|
||||
+
|
||||
+ if (call(dev->conn, priv, 0, REMOTE_PROC_NODE_DEVICE_DESTROY,
|
||||
+ (xdrproc_t) xdr_remote_node_device_destroy_args, (char *) &args,
|
||||
+ (xdrproc_t) xdr_void, (char *) NULL) == -1)
|
||||
+ goto done;
|
||||
+
|
||||
+ rv = 0;
|
||||
+
|
||||
+done:
|
||||
+ remoteDriverUnlock(priv);
|
||||
+ return rv;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
static int
|
||||
@@ -6982,6 +7035,8 @@ static virDeviceMonitor dev_monitor = {
|
||||
.deviceGetParent = remoteNodeDeviceGetParent,
|
||||
.deviceNumOfCaps = remoteNodeDeviceNumOfCaps,
|
||||
.deviceListCaps = remoteNodeDeviceListCaps,
|
||||
+ .deviceCreateXML = remoteNodeDeviceCreateXML,
|
||||
+ .deviceDestroy = remoteNodeDeviceDestroy
|
||||
};
|
||||
|
||||
|
||||
--
|
||||
1.6.0.6
|
||||
|
@ -0,0 +1,71 @@
|
||||
From 4c5166df583459574526841234d61d6ae5be19a0 Mon Sep 17 00:00:00 2001
|
||||
From: David Allan <dallan@redhat.com>
|
||||
Date: Tue, 19 May 2009 16:26:55 -0400
|
||||
Subject: [PATCH] Step 6 of 8 Implement the server side dispatcher
|
||||
|
||||
---
|
||||
qemud/remote.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 48 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/qemud/remote.c b/qemud/remote.c
|
||||
index e27820f..8d24a3a 100644
|
||||
--- a/qemud/remote.c
|
||||
+++ b/qemud/remote.c
|
||||
@@ -4323,6 +4323,54 @@ remoteDispatchNodeDeviceReset (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
+static int
|
||||
+remoteDispatchNodeDeviceCreateXml(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
+ struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
+ virConnectPtr conn,
|
||||
+ remote_error *rerr,
|
||||
+ remote_node_device_create_xml_args *args,
|
||||
+ remote_node_device_create_xml_ret *ret)
|
||||
+{
|
||||
+ virNodeDevicePtr dev;
|
||||
+
|
||||
+ dev = virNodeDeviceCreateXML (conn, args->xml_desc, args->flags);
|
||||
+ if (dev == NULL) {
|
||||
+ remoteDispatchConnError(rerr, conn);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ make_nonnull_node_device (&ret->dev, dev);
|
||||
+ virNodeDeviceFree(dev);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+remoteDispatchNodeDeviceDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
+ struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
+ virConnectPtr conn,
|
||||
+ remote_error *rerr,
|
||||
+ remote_node_device_destroy_args *args,
|
||||
+ void *ret ATTRIBUTE_UNUSED)
|
||||
+{
|
||||
+ virNodeDevicePtr dev;
|
||||
+
|
||||
+ dev = virNodeDeviceLookupByName(conn, args->name);
|
||||
+ if (dev == NULL) {
|
||||
+ remoteDispatchFormatError(rerr, "%s", _("node_device not found"));
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (virNodeDeviceDestroy(dev) == -1) {
|
||||
+ remoteDispatchConnError(rerr, conn);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/**************************
|
||||
* Async Events
|
||||
**************************/
|
||||
--
|
||||
1.6.0.6
|
||||
|
File diff suppressed because it is too large
Load Diff
133
docs/api_extension/0008-Step-8-of-8-Add-virsh-support.patch
Normal file
133
docs/api_extension/0008-Step-8-of-8-Add-virsh-support.patch
Normal file
@ -0,0 +1,133 @@
|
||||
From 193cc4abbb6c2fc5557d3699f86ff0103d5a21ef Mon Sep 17 00:00:00 2001
|
||||
From: David Allan <dallan@redhat.com>
|
||||
Date: Tue, 19 May 2009 16:47:31 -0400
|
||||
Subject: [PATCH 8/8] Step 8 of 8 Add virsh support
|
||||
|
||||
---
|
||||
src/virsh.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 103 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/virsh.c b/src/virsh.c
|
||||
index cb32ede..ab2a2b7 100644
|
||||
--- a/src/virsh.c
|
||||
+++ b/src/virsh.c
|
||||
@@ -2962,6 +2962,107 @@ cmdPoolCreate(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
|
||||
/*
|
||||
+ * "nodedev-create" command
|
||||
+ */
|
||||
+static const vshCmdInfo info_node_device_create[] = {
|
||||
+ {"help", gettext_noop("create a device defined "
|
||||
+ "by an XML file on the node")},
|
||||
+ {"desc", gettext_noop("Create a device on the node. Note that this "
|
||||
+ "command creates devices on the physical host "
|
||||
+ "that can then be assigned to a virtual machine.")},
|
||||
+ {NULL, NULL}
|
||||
+};
|
||||
+
|
||||
+static const vshCmdOptDef opts_node_device_create[] = {
|
||||
+ {"file", VSH_OT_DATA, VSH_OFLAG_REQ,
|
||||
+ gettext_noop("file containing an XML description of the device")},
|
||||
+ {NULL, 0, 0, NULL}
|
||||
+};
|
||||
+
|
||||
+static int
|
||||
+cmdNodeDeviceCreate(vshControl *ctl, const vshCmd *cmd)
|
||||
+{
|
||||
+ virNodeDevicePtr dev = NULL;
|
||||
+ char *from;
|
||||
+ int found = 0;
|
||||
+ int ret = TRUE;
|
||||
+ char *buffer;
|
||||
+
|
||||
+ if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ from = vshCommandOptString(cmd, "file", &found);
|
||||
+ if (!found) {
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0) {
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ dev = virNodeDeviceCreateXML(ctl->conn, buffer, 0);
|
||||
+ free (buffer);
|
||||
+
|
||||
+ if (dev != NULL) {
|
||||
+ vshPrint(ctl, _("Node device %s created from %s\n"),
|
||||
+ virNodeDeviceGetName(dev), from);
|
||||
+ } else {
|
||||
+ vshError(ctl, FALSE, _("Failed to create node device from %s"), from);
|
||||
+ ret = FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
+ * "nodedev-destroy" command
|
||||
+ */
|
||||
+static const vshCmdInfo info_node_device_destroy[] = {
|
||||
+ {"help", gettext_noop("destroy a device on the node")},
|
||||
+ {"desc", gettext_noop("Destroy a device on the node. Note that this "
|
||||
+ "command destroys devices on the physical host ")},
|
||||
+ {NULL, NULL}
|
||||
+};
|
||||
+
|
||||
+static const vshCmdOptDef opts_node_device_destroy[] = {
|
||||
+ {"name", VSH_OT_DATA, VSH_OFLAG_REQ,
|
||||
+ gettext_noop("name of the device to be destroyed")},
|
||||
+ {NULL, 0, 0, NULL}
|
||||
+};
|
||||
+
|
||||
+static int
|
||||
+cmdNodeDeviceDestroy(vshControl *ctl, const vshCmd *cmd)
|
||||
+{
|
||||
+ virNodeDevicePtr dev = NULL;
|
||||
+ int ret = TRUE;
|
||||
+ int found = 0;
|
||||
+ char *name;
|
||||
+
|
||||
+ if (!vshConnectionUsability(ctl, ctl->conn, TRUE)) {
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ name = vshCommandOptString(cmd, "name", &found);
|
||||
+ if (!found) {
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ dev = virNodeDeviceLookupByName(ctl->conn, name);
|
||||
+
|
||||
+ if (virNodeDeviceDestroy(dev) == 0) {
|
||||
+ vshPrint(ctl, _("Destroyed node device '%s'\n"), name);
|
||||
+ } else {
|
||||
+ vshError(ctl, FALSE, _("Failed to destroy node device '%s'"), name);
|
||||
+ ret = FALSE;
|
||||
+ }
|
||||
+
|
||||
+ virNodeDeviceFree(dev);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
* XML Building helper for pool-define-as and pool-create-as
|
||||
*/
|
||||
static const vshCmdOptDef opts_pool_X_as[] = {
|
||||
@@ -5895,6 +5996,8 @@ static const vshCmdDef commands[] = {
|
||||
{"nodedev-dettach", cmdNodeDeviceDettach, opts_node_device_dettach, info_node_device_dettach},
|
||||
{"nodedev-reattach", cmdNodeDeviceReAttach, opts_node_device_reattach, info_node_device_reattach},
|
||||
{"nodedev-reset", cmdNodeDeviceReset, opts_node_device_reset, info_node_device_reset},
|
||||
+ {"nodedev-create", cmdNodeDeviceCreate, opts_node_device_create, info_node_device_create},
|
||||
+ {"nodedev-destroy", cmdNodeDeviceDestroy, opts_node_device_destroy, info_node_device_destroy},
|
||||
|
||||
{"pool-autostart", cmdPoolAutostart, opts_pool_autostart, info_pool_autostart},
|
||||
{"pool-build", cmdPoolBuild, opts_pool_build, info_pool_build},
|
||||
--
|
||||
1.6.0.6
|
||||
|
@ -39,6 +39,7 @@ ignored_functions = {
|
||||
"virDomainMigratePrepare": "private function for migration",
|
||||
"virDomainMigratePrepare2": "private function for migration",
|
||||
"virDrvSupportsFeature": "private function for remote access",
|
||||
"DllMain": "specific function fo Win32",
|
||||
}
|
||||
|
||||
def escape(raw):
|
||||
|
@ -47,6 +47,14 @@
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="active" href="intro.html">Architecture</a>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<span class="active">Domains</span>
|
||||
</div>
|
||||
@ -80,6 +88,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -47,6 +47,14 @@
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="active" href="intro.html">Architecture</a>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
||||
</div>
|
||||
@ -80,6 +88,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -47,6 +47,14 @@
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="active" href="intro.html">Architecture</a>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
||||
</div>
|
||||
@ -80,6 +88,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -47,6 +47,14 @@
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="active" href="intro.html">Architecture</a>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
||||
</div>
|
||||
@ -80,6 +88,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -72,6 +72,10 @@
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -84,9 +84,11 @@ typedef struct _virNodeDevice <a href="#virNodeDevice">virNodeDevice</a>;
|
||||
typedef <a href="libvirt-libvirt.html#virConnect">virConnect</a> * <a href="#virConnectPtr">virConnectPtr</a>;
|
||||
typedef struct _virStorageVol <a href="#virStorageVol">virStorageVol</a>;
|
||||
typedef <a href="libvirt-libvirt.html#virNodeDevice">virNodeDevice</a> * <a href="#virNodeDevicePtr">virNodeDevicePtr</a>;
|
||||
typedef struct _virInterface <a href="#virInterface">virInterface</a>;
|
||||
typedef struct _virSchedParameter <a href="#virSchedParameter">virSchedParameter</a>;
|
||||
typedef enum <a href="#virConnectFlags">virConnectFlags</a>;
|
||||
typedef enum <a href="#virDomainEventDefinedDetailType">virDomainEventDefinedDetailType</a>;
|
||||
typedef <a href="libvirt-libvirt.html#virInterface">virInterface</a> * <a href="#virInterfacePtr">virInterfacePtr</a>;
|
||||
typedef enum <a href="#virDomainMemoryFlags">virDomainMemoryFlags</a>;
|
||||
typedef enum <a href="#virDomainEventStoppedDetailType">virDomainEventStoppedDetailType</a>;
|
||||
typedef <a href="libvirt-libvirt.html#virStorageVol">virStorageVol</a> * <a href="#virStorageVolPtr">virStorageVolPtr</a>;
|
||||
@ -122,6 +124,7 @@ int <a href="#virNodeGetCellsFreeMemory">virNodeGetCellsFreeMemory</a> (<a href=
|
||||
int <a href="#virInitialize">virInitialize</a> (void);
|
||||
const char * <a href="#virNodeDeviceGetName">virNodeDeviceGetName</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev);
|
||||
int <a href="#virStoragePoolSetAutostart">virStoragePoolSetAutostart</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> int autostart);
|
||||
char * <a href="#virConnectDomainXMLFromNative">virConnectDomainXMLFromNative</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * nativeFormat, <br/> const char * nativeConfig, <br/> unsigned int flags);
|
||||
int <a href="#virNodeDeviceDettach">virNodeDeviceDettach</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev);
|
||||
int <a href="#virDomainGetSecurityLabel">virDomainGetSecurityLabel</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> <a href="libvirt-libvirt.html#virSecurityLabelPtr">virSecurityLabelPtr</a> seclabel);
|
||||
int <a href="#virConnectDomainEventDeregister">virConnectDomainEventDeregister</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb);
|
||||
@ -130,6 +133,7 @@ int <a href="#virDomainGetSchedulerParameters">virDomainGetSchedulerParameters</
|
||||
int <a href="#virConnectNumOfDefinedNetworks">virConnectNumOfDefinedNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
int <a href="#virConnectNumOfDomains">virConnectNumOfDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
int <a href="#virNetworkGetUUID">virNetworkGetUUID</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br/> unsigned char * uuid);
|
||||
char * <a href="#virInterfaceGetXMLDesc">virInterfaceGetXMLDesc</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br/> unsigned int flags);
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virStoragePoolGetConnect">virStoragePoolGetConnect</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool);
|
||||
int <a href="#virConnectGetVersion">virConnectGetVersion</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> unsigned long * hvVer);
|
||||
int <a href="#virDomainFree">virDomainFree</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
|
||||
@ -142,6 +146,7 @@ int <a href="#virDomainSetAutostart">virDomainSetAutostart</a> (<a href="libvir
|
||||
int <a href="#virNetworkCreate">virNetworkCreate</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network);
|
||||
int <a href="#virDomainSetMaxMemory">virDomainSetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned long memory);
|
||||
void <a href="#virEventRegisterImpl">virEventRegisterImpl</a> (<a href="libvirt-libvirt.html#virEventAddHandleFunc">virEventAddHandleFunc</a> addHandle, <br/> <a href="libvirt-libvirt.html#virEventUpdateHandleFunc">virEventUpdateHandleFunc</a> updateHandle, <br/> <a href="libvirt-libvirt.html#virEventRemoveHandleFunc">virEventRemoveHandleFunc</a> removeHandle, <br/> <a href="libvirt-libvirt.html#virEventAddTimeoutFunc">virEventAddTimeoutFunc</a> addTimeout, <br/> <a href="libvirt-libvirt.html#virEventUpdateTimeoutFunc">virEventUpdateTimeoutFunc</a> updateTimeout, <br/> <a href="libvirt-libvirt.html#virEventRemoveTimeoutFunc">virEventRemoveTimeoutFunc</a> removeTimeout);
|
||||
<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> <a href="#virInterfaceDefineXML">virInterfaceDefineXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * xml, <br/> unsigned int flags);
|
||||
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainMigrate">virDomainMigrate</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> dconn, <br/> unsigned long flags, <br/> const char * dname, <br/> const char * uri, <br/> unsigned long bandwidth);
|
||||
int <a href="#virDomainSuspend">virDomainSuspend</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
|
||||
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainCreateLinux">virDomainCreateLinux</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * xmlDesc, <br/> unsigned int flags);
|
||||
@ -150,17 +155,20 @@ typedef void <a href="#virEventUpdateHandleFunc">virEventUpdateHandleFunc</a> (i
|
||||
int <a href="#virDomainDestroy">virDomainDestroy</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
|
||||
int <a href="#virConnectNumOfNetworks">virConnectNumOfNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> <a href="#virStoragePoolLookupByUUIDString">virStoragePoolLookupByUUIDString</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * uuidstr);
|
||||
int <a href="#virInterfaceCreate">virInterfaceCreate</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br/> unsigned int flags);
|
||||
char * <a href="#virDomainGetXMLDesc">virDomainGetXMLDesc</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> int flags);
|
||||
int <a href="#virStoragePoolGetUUID">virStoragePoolGetUUID</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned char * uuid);
|
||||
int <a href="#virNodeDeviceFree">virNodeDeviceFree</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev);
|
||||
int <a href="#virStorageVolGetInfo">virStorageVolGetInfo</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br/> <a href="libvirt-libvirt.html#virStorageVolInfoPtr">virStorageVolInfoPtr</a> info);
|
||||
int <a href="#virDomainGetInfo">virDomainGetInfo</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> <a href="libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a> info);
|
||||
<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> <a href="#virNodeDeviceCreateXML">virNodeDeviceCreateXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * xmlDesc, <br/> unsigned int flags);
|
||||
int <a href="#virNetworkDestroy">virNetworkDestroy</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network);
|
||||
<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> <a href="#virStoragePoolLookupByName">virStoragePoolLookupByName</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * name);
|
||||
<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> <a href="#virStoragePoolCreateXML">virStoragePoolCreateXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * xmlDesc, <br/> unsigned int flags);
|
||||
int <a href="#virNetworkGetAutostart">virNetworkGetAutostart</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br/> int * autostart);
|
||||
char * <a href="#virNetworkGetBridgeName">virNetworkGetBridgeName</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network);
|
||||
char * <a href="#virStorageVolGetXMLDesc">virStorageVolGetXMLDesc</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br/> unsigned int flags);
|
||||
char * <a href="#virConnectDomainXMLToNative">virConnectDomainXMLToNative</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * nativeFormat, <br/> const char * domainXml, <br/> unsigned int flags);
|
||||
int <a href="#virDomainSetSchedulerParameters">virDomainSetSchedulerParameters</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> <a href="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> params, <br/> int nparams);
|
||||
const char * <a href="#virConnectGetType">virConnectGetType</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolCreateXML">virStorageVolCreateXML</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> const char * xmldesc, <br/> unsigned int flags);
|
||||
@ -169,6 +177,7 @@ int <a href="#virDomainCreate">virDomainCreate</a> (<a href="libvirt-libvirt.h
|
||||
int <a href="#virConnectListDomains">virConnectListDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> int * ids, <br/> int maxids);
|
||||
int <a href="#virDomainCoreDump">virDomainCoreDump</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> const char * to, <br/> int flags);
|
||||
int <a href="#virDomainSetMemory">virDomainSetMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned long memory);
|
||||
const char * <a href="#virInterfaceGetName">virInterfaceGetName</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface);
|
||||
int <a href="#virStoragePoolCreate">virStoragePoolCreate</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags);
|
||||
int <a href="#virNodeGetInfo">virNodeGetInfo</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> info);
|
||||
int <a href="#virNetworkSetAutostart">virNetworkSetAutostart</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br/> int autostart);
|
||||
@ -191,6 +200,7 @@ const char * <a href="#virDomainGetName">virDomainGetName</a> (<a href="libvirt-
|
||||
int <a href="#virStoragePoolRef">virStoragePoolRef</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool);
|
||||
char * <a href="#virNetworkGetXMLDesc">virNetworkGetXMLDesc</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br/> int flags);
|
||||
int <a href="#virConnectNumOfStoragePools">virConnectNumOfStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virInterfaceGetConnect">virInterfaceGetConnect</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface);
|
||||
const char * <a href="#virNetworkGetName">virNetworkGetName</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network);
|
||||
int <a href="#virConnectListDefinedDomains">virConnectListDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> char ** const names, <br/> int maxnames);
|
||||
char * <a href="#virConnectGetCapabilities">virConnectGetCapabilities</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
@ -199,27 +209,31 @@ char * <a href="#virConnectFindStoragePoolSources">virConnectFindStoragePoolSour
|
||||
int <a href="#virDomainPinVcpu">virDomainPinVcpu</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int vcpu, <br/> unsigned char * cpumap, <br/> int maplen);
|
||||
int <a href="#virNodeGetSecurityModel">virNodeGetSecurityModel</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-libvirt.html#virSecurityModelPtr">virSecurityModelPtr</a> secmodel);
|
||||
int <a href="#virDomainRestore">virDomainRestore</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * from);
|
||||
int <a href="#virNodeDeviceDestroy">virNodeDeviceDestroy</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev);
|
||||
char * <a href="#virStorageVolGetPath">virStorageVolGetPath</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol);
|
||||
<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> <a href="#virNetworkLookupByUUIDString">virNetworkLookupByUUIDString</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * uuidstr);
|
||||
typedef int <a href="#virConnectDomainEventCallback">virConnectDomainEventCallback</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br/> int event, <br/> int detail, <br/> void * opaque);
|
||||
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByID">virDomainLookupByID</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> int id);
|
||||
int <a href="#virStorageVolDelete">virStorageVolDelete</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br/> unsigned int flags);
|
||||
int <a href="#virStorageVolFree">virStorageVolFree</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol);
|
||||
int <a href="#virConnectListInterfaces">virConnectListInterfaces</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> char ** const names, <br/> int maxnames);
|
||||
int <a href="#virDomainMemoryPeek">virDomainMemoryPeek</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br/> unsigned long long start, <br/> size_t size, <br/> void * buffer, <br/> unsigned int flags);
|
||||
<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> <a href="#virNetworkLookupByUUID">virNetworkLookupByUUID</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const unsigned char * uuid);
|
||||
int <a href="#virConnectListDefinedNetworks">virConnectListDefinedNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> char ** const names, <br/> int maxnames);
|
||||
int <a href="#virConnectRef">virConnectRef</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
int <a href="#virDomainGetUUID">virDomainGetUUID</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned char * uuid);
|
||||
<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> <a href="#virNetworkCreateXML">virNetworkCreateXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * xmlDesc);
|
||||
int <a href="#virConnectDomainEventRegister">virConnectDomainEventRegister</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb, <br/> void * opaque, <br/> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> freecb);
|
||||
int <a href="#virDomainGetVcpus">virDomainGetVcpus</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> <a href="libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a> info, <br/> int maxinfo, <br/> unsigned char * cpumaps, <br/> int maplen);
|
||||
<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> <a href="#virNodeDeviceLookupByName">virNodeDeviceLookupByName</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * name);
|
||||
int <a href="#virStoragePoolGetInfo">virStoragePoolGetInfo</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> <a href="libvirt-libvirt.html#virStoragePoolInfoPtr">virStoragePoolInfoPtr</a> info);
|
||||
int <a href="#virDomainResume">virDomainResume</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
|
||||
int <a href="#virNodeListDevices">virNodeListDevices</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * cap, <br/> char ** const names, <br/> int maxnames, <br/> unsigned int flags);
|
||||
int <a href="#virInterfaceRef">virInterfaceRef</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface);
|
||||
const char * <a href="#virInterfaceGetMACString">virInterfaceGetMACString</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface);
|
||||
int <a href="#virNetworkRef">virNetworkRef</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network);
|
||||
int <a href="#virStoragePoolRefresh">virStoragePoolRefresh</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags);
|
||||
int <a href="#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolLookupByKey">virStorageVolLookupByKey</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * key);
|
||||
<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolCreateXMLFrom">virStorageVolCreateXMLFrom</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> const char * xmldesc, <br/> <a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> clonevol, <br/> unsigned int flags);
|
||||
int <a href="#virDomainUndefine">virDomainUndefine</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
|
||||
int <a href="#virDomainReboot">virDomainReboot</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int flags);
|
||||
int <a href="#virNetworkGetUUIDString">virNetworkGetUUIDString</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br/> char * buf);
|
||||
@ -243,9 +257,12 @@ typedef int <a href="#virEventAddHandleFunc">virEventAddHandleFunc</a> (int fd,
|
||||
int <a href="#virNetworkUndefine">virNetworkUndefine</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network);
|
||||
int <a href="#virConnectListDefinedStoragePools">virConnectListDefinedStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> char ** const names, <br/> int maxnames);
|
||||
typedef void <a href="#virEventTimeoutCallback">virEventTimeoutCallback</a> (int timer, <br/> void * opaque);
|
||||
int <a href="#virInterfaceFree">virInterfaceFree</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface);
|
||||
int <a href="#virNodeDeviceNumOfCaps">virNodeDeviceNumOfCaps</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev);
|
||||
<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> <a href="#virInterfaceLookupByMACString">virInterfaceLookupByMACString</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * macstr);
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virNetworkGetConnect">virNetworkGetConnect</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> net);
|
||||
unsigned long long <a href="#virNodeGetFreeMemory">virNodeGetFreeMemory</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
int <a href="#virInterfaceDestroy">virInterfaceDestroy</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br/> unsigned int flags);
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virStorageVolGetConnect">virStorageVolGetConnect</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol);
|
||||
int <a href="#virNodeNumOfDevices">virNodeNumOfDevices</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * cap, <br/> unsigned int flags);
|
||||
int <a href="#virStoragePoolDestroy">virStoragePoolDestroy</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool);
|
||||
@ -257,18 +274,22 @@ int <a href="#virConnectGetMaxVcpus">virConnectGetMaxVcpus</a> (<a href="libvir
|
||||
int <a href="#virDomainGetUUIDString">virDomainGetUUIDString</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> char * buf);
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virDomainGetConnect">virDomainGetConnect</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom);
|
||||
int <a href="#virConnectNumOfDefinedStoragePools">virConnectNumOfDefinedStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
int <a href="#virNodeListDevices">virNodeListDevices</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * cap, <br/> char ** const names, <br/> int maxnames, <br/> unsigned int flags);
|
||||
const char * <a href="#virNodeDeviceGetParent">virNodeDeviceGetParent</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev);
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpen">virConnectOpen</a> (const char * name);
|
||||
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainCreateXML">virDomainCreateXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * xmlDesc, <br/> unsigned int flags);
|
||||
int <a href="#virNodeDeviceRef">virNodeDeviceRef</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev);
|
||||
int <a href="#virInterfaceUndefine">virInterfaceUndefine</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface);
|
||||
int <a href="#virDomainSetVcpus">virDomainSetVcpus</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int nvcpus);
|
||||
int <a href="#virDomainRef">virDomainRef</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
|
||||
int <a href="#virConnectDomainEventRegister">virConnectDomainEventRegister</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb, <br/> void * opaque, <br/> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> freecb);
|
||||
int <a href="#virConnectNumOfInterfaces">virConnectNumOfInterfaces</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
unsigned int <a href="#virDomainGetID">virDomainGetID</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
|
||||
int <a href="#virDomainBlockPeek">virDomainBlockPeek</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br/> const char * path, <br/> unsigned long long offset, <br/> size_t size, <br/> void * buffer, <br/> unsigned int flags);
|
||||
typedef int <a href="#virEventAddTimeoutFunc">virEventAddTimeoutFunc</a> (int timeout, <br/> <a href="libvirt-libvirt.html#virEventTimeoutCallback">virEventTimeoutCallback</a> cb, <br/> void * opaque, <br/> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> ff);
|
||||
<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> <a href="#virInterfaceLookupByName">virInterfaceLookupByName</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * name);
|
||||
int <a href="#virDomainInterfaceStats">virDomainInterfaceStats</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br/> const char * path, <br/> <a href="libvirt-libvirt.html#virDomainInterfaceStatsPtr">virDomainInterfaceStatsPtr</a> stats, <br/> size_t size);
|
||||
int <a href="#virConnectListNetworks">virConnectListNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> char ** const names, <br/> int maxnames);
|
||||
<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolLookupByKey">virStorageVolLookupByKey</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * key);
|
||||
</pre>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
@ -547,6 +568,16 @@ The content of this structure is not made public by the API.
|
||||
<a name="VIR_EVENT_HANDLE_HANGUP">VIR_EVENT_HANDLE_HANGUP</a> = 8
|
||||
};
|
||||
</pre><p/>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterface">Structure </a>virInterface</h3><pre class="programlisting">struct _virInterface {
|
||||
The content of this structure is not made public by the API.
|
||||
} virInterface;
|
||||
</pre><p/>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfacePtr">Typedef </a>virInterfacePtr</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virInterface">virInterface</a> * virInterfacePtr;
|
||||
</pre><p>a <a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> is pointer to a <a href="libvirt-libvirt.html#virInterface">virInterface</a> private structure, this is the type used to reference a virtual interface in the API.</p>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNetwork">Structure </a>virNetwork</h3><pre class="programlisting">struct _virNetwork {
|
||||
@ -791,6 +822,14 @@ The content of this structure is not made public by the API.
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectDomainEventRegister"/>virConnectDomainEventRegister ()</h3><pre class="programlisting">int virConnectDomainEventRegister (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb, <br/> void * opaque, <br/> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> freecb)<br/>
|
||||
</pre><p>Adds a Domain Event Callback. Registering for a domain callback will enable delivery of the events The <a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> object handle passed into the callback upon delivery of an event is only valid for the duration of execution of the callback. If the callback wishes to keep the domain object after the callback</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the connection</td></tr><tr><td><span class="term"><i><tt>cb</tt></i>:</span></td><td>callback to the function handling domain events</td></tr><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td>opaque data to pass on to the callback</td></tr><tr><td><span class="term"><i><tt>freecb</tt></i>:</span></td><td>optional function to deallocate opaque when not used anymore</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>it shall take a reference to it, by calling virDomainRef. The reference can be released once the object is no longer required by calling virDomainFree. Returns 0 on success, -1 on failure</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectDomainXMLFromNative"/>virConnectDomainXMLFromNative ()</h3><pre class="programlisting">char * virConnectDomainXMLFromNative (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * nativeFormat, <br/> const char * nativeConfig, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Reads native configuration data describing a domain, and generates libvirt domain XML. The format of the native data is hypervisor dependant.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>a connection object</td></tr><tr><td><span class="term"><i><tt>nativeFormat</tt></i>:</span></td><td>configuration format importing from</td></tr><tr><td><span class="term"><i><tt>nativeConfig</tt></i>:</span></td><td>the configuration data to import</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>currently unused, pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectDomainXMLToNative"/>virConnectDomainXMLToNative ()</h3><pre class="programlisting">char * virConnectDomainXMLToNative (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * nativeFormat, <br/> const char * domainXml, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Reads a domain XML configuration document, and generates generates a native configuration file describing the domain. The format of the native data is hypervisor dependant.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>a connection object</td></tr><tr><td><span class="term"><i><tt>nativeFormat</tt></i>:</span></td><td>configuration format exporting to</td></tr><tr><td><span class="term"><i><tt>domainXml</tt></i>:</span></td><td>the domain configuration to export</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>currently unused, pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded native config datafile, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectFindStoragePoolSources"/>virConnectFindStoragePoolSources ()</h3><pre class="programlisting">char * virConnectFindStoragePoolSources (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * type, <br/> const char * srcSpec, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Talks to a storage backend and attempts to auto-discover the set of available storage pool sources. e.g. For iSCSI this would be a set of iSCSI targets. For NFS this would be a list of exported paths. The srcSpec (optional for some storage pool types, e.g. local ones) is an instance of the storage pool's source element specifying where to look for the pools. srcSpec is not required for some types (e.g., those querying local storage resources only)</p>
|
||||
@ -835,6 +874,10 @@ The content of this structure is not made public by the API.
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectListDomains"/>virConnectListDomains ()</h3><pre class="programlisting">int virConnectListDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> int * ids, <br/> int maxids)<br/>
|
||||
</pre><p>Collect the list of active domains, and store their ID in @maxids</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>ids</tt></i>:</span></td><td>array to collect the list of IDs of active domains</td></tr><tr><td><span class="term"><i><tt>maxids</tt></i>:</span></td><td>size of @ids</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectListInterfaces"/>virConnectListInterfaces ()</h3><pre class="programlisting">int virConnectListInterfaces (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> char ** const names, <br/> int maxnames)<br/>
|
||||
</pre><p>Collect the list of physical host interfaces, and store their names in @names</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array to collect the list of names of interfaces</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of @names</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of interfaces found or -1 in case of error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectListNetworks"/>virConnectListNetworks ()</h3><pre class="programlisting">int virConnectListNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> char ** const names, <br/> int maxnames)<br/>
|
||||
</pre><p>Collect the list of active networks, and store their names in @names</p>
|
||||
@ -859,6 +902,10 @@ The content of this structure is not made public by the API.
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectNumOfDomains"/>virConnectNumOfDomains ()</h3><pre class="programlisting">int virConnectNumOfDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br/>
|
||||
</pre><p>Provides the number of active domains.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectNumOfInterfaces"/>virConnectNumOfInterfaces ()</h3><pre class="programlisting">int virConnectNumOfInterfaces (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br/>
|
||||
</pre><p>Provides the number of interfaces on the physical host.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of interface found or -1 in case of error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectNumOfNetworks"/>virConnectNumOfNetworks ()</h3><pre class="programlisting">int virConnectNumOfNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br/>
|
||||
</pre><p>Provides the number of active networks.</p>
|
||||
@ -882,7 +929,7 @@ The content of this structure is not made public by the API.
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectRef"/>virConnectRef ()</h3><pre class="programlisting">int virConnectRef (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br/>
|
||||
</pre><p>Increment the reference count on the connection. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virConnectClose">virConnectClose</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a connection would increment the reference count.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>the connection to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>the connection to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virDomainAttachDevice"/>virDomainAttachDevice ()</h3><pre class="programlisting">int virDomainAttachDevice (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> const char * xml)<br/>
|
||||
</pre><p>Create a virtual device attachment to backend.</p>
|
||||
@ -913,7 +960,7 @@ The content of this structure is not made public by the API.
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xmlDesc</tt></i>:</span></td><td>string containing an XML description of the domain</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>callers should always pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virDomainDefineXML"/>virDomainDefineXML ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainDefineXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * xml)<br/>
|
||||
</pre><p>Define a domain, but does not start it. This definition is persistent, until explicitly undefined with virDomainUndefine().</p>
|
||||
</pre><p>Define a domain, but does not start it. This definition is persistent, until explicitly undefined with virDomainUndefine(). A previous definition for this domain would be overriden if it already exists.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>the XML description for the domain, preferably in UTF-8</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a pointer to the domain otherwise</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virDomainDestroy"/>virDomainDestroy ()</h3><pre class="programlisting">int virDomainDestroy (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br/>
|
||||
@ -969,8 +1016,8 @@ The content of this structure is not made public by the API.
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><span class="term"><i><tt>nparams</tt></i>:</span></td><td>number of scheduler parameters(return value)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error. The caller must free the returned string.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virDomainGetSecurityLabel"/>virDomainGetSecurityLabel ()</h3><pre class="programlisting">int virDomainGetSecurityLabel (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> <a href="libvirt-libvirt.html#virSecurityLabelPtr">virSecurityLabelPtr</a> seclabel)<br/>
|
||||
</pre><p>Extract security label of an active domain.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>seclabel</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virSecurityLabel">virSecurityLabel</a> structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure, and -2 if the operation is not supported (caller decides if that's an error).</td></tr></tbody></table></div></div>
|
||||
</pre><p>Extract security label of an active domain. The 'label' field in the @seclabel argument will be initialized to the empty string if the domain is not running under a security model.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>seclabel</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virSecurityLabel">virSecurityLabel</a> structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virDomainGetUUID"/>virDomainGetUUID ()</h3><pre class="programlisting">int virDomainGetUUID (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned char * uuid)<br/>
|
||||
</pre><p>Get the UUID for a domain</p>
|
||||
@ -1026,7 +1073,7 @@ The content of this structure is not made public by the API.
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virDomainRef"/>virDomainRef ()</h3><pre class="programlisting">int virDomainRef (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br/>
|
||||
</pre><p>Increment the reference count on the domain. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virDomainFree">virDomainFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a domain would increment the reference count.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>the domain to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virDomainRestore"/>virDomainRestore ()</h3><pre class="programlisting">int virDomainRestore (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * from)<br/>
|
||||
</pre><p>This method will restore a domain saved to disk by virDomainSave().</p>
|
||||
@ -1083,6 +1130,54 @@ The content of this structure is not made public by the API.
|
||||
<div class="refsect2" lang="en"><h3><a name="virInitialize"/>virInitialize ()</h3><pre class="programlisting">int virInitialize (void)<br/>
|
||||
</pre><p>Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceCreate"/>virInterfaceCreate ()</h3><pre class="programlisting">int virInterfaceCreate (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Activate an interface (ie call "ifup")</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>pointer to a defined interface</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceDefineXML"/>virInterfaceDefineXML ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> virInterfaceDefineXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * xml, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Define an interface (or modify existing interface configuration)</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>the XML description for the interface, preferably in UTF-8</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a pointer to the interface otherwise</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceDestroy"/>virInterfaceDestroy ()</h3><pre class="programlisting">int virInterfaceDestroy (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br/> unsigned int flags)<br/>
|
||||
</pre><p>deactivate an interface (ie call "ifdown") This does not remove the interface from the config, and does not free the associated <a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> object.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>an interface object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceFree"/>virInterfaceFree ()</h3><pre class="programlisting">int virInterfaceFree (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br/>
|
||||
</pre><p>Free the interface object. The interface itself is unaltered. The data structure is freed and should not be used thereafter.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>a interface object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceGetConnect"/>virInterfaceGetConnect ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virInterfaceGetConnect (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br/>
|
||||
</pre><p>Provides the connection pointer associated with an interface. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the interface object together.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>pointer to a interface</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceGetMACString"/>virInterfaceGetMACString ()</h3><pre class="programlisting">const char * virInterfaceGetMACString (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br/>
|
||||
</pre><p>Get the MAC for a interface as string. For more information about MAC see RFC4122.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>a interface object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the MAC address (in null-terminated ASCII format) or NULL, the string need not be deallocated its lifetime will be the same as the interface object.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceGetName"/>virInterfaceGetName ()</h3><pre class="programlisting">const char * virInterfaceGetName (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br/>
|
||||
</pre><p>Get the public name for that interface</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>a interface object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the interface object.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceGetXMLDesc"/>virInterfaceGetXMLDesc ()</h3><pre class="programlisting">char * virInterfaceGetXMLDesc (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Provide an XML description of the interface. The description may be reused later to recreate the interface with virInterfaceCreateXML().</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>a interface object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceLookupByMACString"/>virInterfaceLookupByMACString ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> virInterfaceLookupByMACString (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * macstr)<br/>
|
||||
</pre><p>Try to lookup an interface on the given hypervisor based on its MAC.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>macstr</tt></i>:</span></td><td>the MAC for the interface (null-terminated ASCII format)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new interface object or NULL in case of failure. If the interface cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_INTERFACE">VIR_ERR_NO_INTERFACE</a> error is raised.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceLookupByName"/>virInterfaceLookupByName ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> virInterfaceLookupByName (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * name)<br/>
|
||||
</pre><p>Try to lookup an interface on the given hypervisor based on its name.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name for the interface</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new interface object or NULL in case of failure. If the interface cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_INTERFACE">VIR_ERR_NO_INTERFACE</a> error is raised.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceRef"/>virInterfaceRef ()</h3><pre class="programlisting">int virInterfaceRef (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br/>
|
||||
</pre><p>Increment the reference count on the interface. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virInterfaceFree">virInterfaceFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a interface would increment the reference count.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>the interface to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virInterfaceUndefine"/>virInterfaceUndefine ()</h3><pre class="programlisting">int virInterfaceUndefine (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br/>
|
||||
</pre><p>Undefine an interface, ie remove it from the config. This does not free the associated <a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> object.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>pointer to a defined interface</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNetworkCreate"/>virNetworkCreate ()</h3><pre class="programlisting">int virNetworkCreate (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br/>
|
||||
</pre><p>Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.</p>
|
||||
@ -1146,7 +1241,7 @@ The content of this structure is not made public by the API.
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNetworkRef"/>virNetworkRef ()</h3><pre class="programlisting">int virNetworkRef (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br/>
|
||||
</pre><p>Increment the reference count on the network. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virNetworkFree">virNetworkFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a network would increment the reference count.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>the network to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNetworkSetAutostart"/>virNetworkSetAutostart ()</h3><pre class="programlisting">int virNetworkSetAutostart (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br/> int autostart)<br/>
|
||||
</pre><p>Configure the network to be automatically started when the host machine boots.</p>
|
||||
@ -1155,10 +1250,18 @@ The content of this structure is not made public by the API.
|
||||
<div class="refsect2" lang="en"><h3><a name="virNetworkUndefine"/>virNetworkUndefine ()</h3><pre class="programlisting">int virNetworkUndefine (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br/>
|
||||
</pre><p>Undefine a network but does not stop it if it is running</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>pointer to a defined network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeDeviceCreateXML"/>virNodeDeviceCreateXML ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> virNodeDeviceCreateXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * xmlDesc, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Create a new device on the VM host machine, for example, virtual HBAs created using vport_create.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xmlDesc</tt></i>:</span></td><td>string containing an XML description of the device to be created</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>callers should always pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a node device object if successful, NULL in case of failure</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeDeviceDestroy"/>virNodeDeviceDestroy ()</h3><pre class="programlisting">int virNodeDeviceDestroy (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br/>
|
||||
</pre><p>Destroy the device object. The virtual device is removed from the host operating system. This function may require privileged access</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>a device object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeDeviceDettach"/>virNodeDeviceDettach ()</h3><pre class="programlisting">int virNodeDeviceDettach (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br/>
|
||||
</pre><p/>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
|
||||
</pre><p>Dettach the node device from the node itself so that it may be assigned to a guest domain. Depending on the hypervisor, this may involve operations such as unbinding any device drivers from the device, binding the device to a dummy device driver and resetting the device. If the device is currently in use by the node, this method may fail. Once the device is not assigned to any guest, it may be re-attached to the node using the virNodeDeviceReattach() method.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeDeviceFree"/>virNodeDeviceFree ()</h3><pre class="programlisting">int virNodeDeviceFree (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br/>
|
||||
</pre><p>Drops a reference to the node device, freeing it if this was the last reference.</p>
|
||||
@ -1190,31 +1293,31 @@ The content of this structure is not made public by the API.
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeDeviceReAttach"/>virNodeDeviceReAttach ()</h3><pre class="programlisting">int virNodeDeviceReAttach (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br/>
|
||||
</pre><p>Re-attach a previously dettached node device to the node so that it may be used by the node again. Depending on the hypervisor, this may involve operations such as resetting the device, unbinding it from a dummy device driver and binding it to its appropriate driver. If the device is currently in use by a guest, this method may fail.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeDeviceRef"/>virNodeDeviceRef ()</h3><pre class="programlisting">int virNodeDeviceRef (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br/>
|
||||
</pre><p>Increment the reference count on the dev. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virNodeDeviceFree">virNodeDeviceFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a dev would increment the reference count.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the dev to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeDeviceReset"/>virNodeDeviceReset ()</h3><pre class="programlisting">int virNodeDeviceReset (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br/>
|
||||
</pre><p>Reset a previously dettached node device to the node before or after assigning it to a guest. The exact reset semantics depends on the hypervisor and device type but, for example, KVM will attempt to reset PCI devices with a Function Level Reset, Secondary Bus Reset or a Power Management D-State reset. If the reset will affect other devices which are currently in use, this function may fail.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeGetCellsFreeMemory"/>virNodeGetCellsFreeMemory ()</h3><pre class="programlisting">int virNodeGetCellsFreeMemory (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> unsigned long long * freeMems, <br/> int startCell, <br/> int maxCells)<br/>
|
||||
</pre><p>This call returns the amount of free memory in one or more NUMA cells. The @freeMems array must be allocated by the caller and will be filled with the amount of free memory in kilobytes for each cell requested, starting with startCell (in freeMems[0]), up to either (startCell + maxCells), or the number of additional cells in the node, whichever is smaller.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>freeMems</tt></i>:</span></td><td>pointer to the array of unsigned long long</td></tr><tr><td><span class="term"><i><tt>startCell</tt></i>:</span></td><td>index of first cell to return freeMems info on.</td></tr><tr><td><span class="term"><i><tt>maxCells</tt></i>:</span></td><td>Maximum number of cells for which freeMems information can be returned.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries filled in freeMems, or -1 in case of error.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeGetFreeMemory"/>virNodeGetFreeMemory ()</h3><pre class="programlisting">unsigned long long virNodeGetFreeMemory (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br/>
|
||||
</pre><p>provides the free memory available on the Node</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the available free memory in kilobytes or 0 in case of error</td></tr></tbody></table></div></div>
|
||||
</pre><p>provides the free memory available on the Node Note: most libvirt APIs provide memory sizes in kilobytes, but in this function the returned value is in bytes. Divide by 1024 as necessary.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the available free memory in bytes or 0 in case of error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeGetInfo"/>virNodeGetInfo ()</h3><pre class="programlisting">int virNodeGetInfo (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> info)<br/>
|
||||
</pre><p>Extract hardware information about the node.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> structure allocated by the user</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeGetSecurityModel"/>virNodeGetSecurityModel ()</h3><pre class="programlisting">int virNodeGetSecurityModel (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-libvirt.html#virSecurityModelPtr">virSecurityModelPtr</a> secmodel)<br/>
|
||||
</pre><p>Extract the security model of a hypervisor.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>a connection object</td></tr><tr><td><span class="term"><i><tt>secmodel</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virSecurityModel">virSecurityModel</a> structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure, and -2 if the operation is not supported (caller decides if that's an error).</td></tr></tbody></table></div></div>
|
||||
</pre><p>Extract the security model of a hypervisor. The 'model' field in the @secmodel argument may be initialized to the empty string if the driver has not activated a security model.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>a connection object</td></tr><tr><td><span class="term"><i><tt>secmodel</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virSecurityModel">virSecurityModel</a> structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virNodeListDevices"/>virNodeListDevices ()</h3><pre class="programlisting">int virNodeListDevices (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * cap, <br/> char ** const names, <br/> int maxnames, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Collect the list of node devices, and store their names in @names If the optional 'cap' argument is non-NULL, then the count will be restricted to devices with the specified capability</p>
|
||||
@ -1306,7 +1409,7 @@ The content of this structure is not made public by the API.
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virStoragePoolRef"/>virStoragePoolRef ()</h3><pre class="programlisting">int virStoragePoolRef (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br/>
|
||||
</pre><p>Increment the reference count on the pool. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virStoragePoolFree">virStoragePoolFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a pool would increment the reference count.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>the pool to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virStoragePoolRefresh"/>virStoragePoolRefresh ()</h3><pre class="programlisting">int virStoragePoolRefresh (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Request that the pool refresh its list of volumes. This may involve communicating with a remote server, and/or initializing new devices at the OS layer</p>
|
||||
@ -1323,6 +1426,10 @@ The content of this structure is not made public by the API.
|
||||
<div class="refsect2" lang="en"><h3><a name="virStorageVolCreateXML"/>virStorageVolCreateXML ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXML (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> const char * xmldesc, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virStorageVolCreateXMLFrom"/>virStorageVolCreateXMLFrom ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXMLFrom (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> const char * xmldesc, <br/> <a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> clonevol, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Create a storage volume in the parent pool, using the 'clonevol' volume as input. Information for the new volume (name, perms) are passed via a typical volume XML description.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to parent pool for the new volume</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>clonevol</tt></i>:</span></td><td>storage volume to use as input</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virStorageVolDelete"/>virStorageVolDelete ()</h3><pre class="programlisting">int virStorageVolDelete (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Delete the storage volume from the pool</p>
|
||||
@ -1370,7 +1477,7 @@ The content of this structure is not made public by the API.
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virStorageVolRef"/>virStorageVolRef ()</h3><pre class="programlisting">int virStorageVolRef (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br/>
|
||||
</pre><p>Increment the reference count on the vol. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virStorageVolFree">virStorageVolFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a vol would increment the reference count.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>the vol to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -106,7 +106,10 @@ void <a href="#virConnResetLastError">virConnResetLastError</a> (<a href="libvi
|
||||
<a name="VIR_FROM_UML">VIR_FROM_UML</a> = 21 /* Error at the UML driver */
|
||||
<a name="VIR_FROM_NODEDEV">VIR_FROM_NODEDEV</a> = 22 /* Error from node device monitor */
|
||||
<a name="VIR_FROM_XEN_INOTIFY">VIR_FROM_XEN_INOTIFY</a> = 23 /* Error from xen inotify layer */
|
||||
<a name="VIR_FROM_SECURITY">VIR_FROM_SECURITY</a> = 24 /* Error from security framework */
|
||||
<a name="VIR_FROM_SECURITY">VIR_FROM_SECURITY</a> = 24 /* Error from security framework */
|
||||
<a name="VIR_FROM_VBOX">VIR_FROM_VBOX</a> = 25 /* Error from VirtualBox driver */
|
||||
<a name="VIR_FROM_INTERFACE">VIR_FROM_INTERFACE</a> = 26 /* Error when operating on an interface */
|
||||
<a name="VIR_FROM_ONE">VIR_FROM_ONE</a> = 27 /* Error from OpenNebula driver */
|
||||
};
|
||||
</pre><p/>
|
||||
</div>
|
||||
@ -174,7 +177,11 @@ void <a href="#virConnResetLastError">virConnResetLastError</a> (<a href="libvi
|
||||
<a name="VIR_WAR_NO_NODE">VIR_WAR_NO_NODE</a> = 51 /* failed to start node driver */
|
||||
<a name="VIR_ERR_INVALID_NODE_DEVICE">VIR_ERR_INVALID_NODE_DEVICE</a> = 52 /* invalid node device object */
|
||||
<a name="VIR_ERR_NO_NODE_DEVICE">VIR_ERR_NO_NODE_DEVICE</a> = 53 /* node device not found */
|
||||
<a name="VIR_ERR_NO_SECURITY_MODEL">VIR_ERR_NO_SECURITY_MODEL</a> = 54 /* security model not found */
|
||||
<a name="VIR_ERR_NO_SECURITY_MODEL">VIR_ERR_NO_SECURITY_MODEL</a> = 54 /* security model not found */
|
||||
<a name="VIR_ERR_OPERATION_INVALID">VIR_ERR_OPERATION_INVALID</a> = 55 /* operation is not applicable at this time */
|
||||
<a name="VIR_WAR_NO_INTERFACE">VIR_WAR_NO_INTERFACE</a> = 56 /* failed to start interface driver */
|
||||
<a name="VIR_ERR_NO_INTERFACE">VIR_ERR_NO_INTERFACE</a> = 57 /* interface driver not running */
|
||||
<a name="VIR_ERR_INVALID_INTERFACE">VIR_ERR_INVALID_INTERFACE</a> = 58 /* invalid interface object */
|
||||
};
|
||||
</pre><p/>
|
||||
</div>
|
||||
|
@ -63,6 +63,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -86,6 +86,14 @@
|
||||
<div>
|
||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -96,6 +104,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -137,7 +149,7 @@
|
||||
<p>
|
||||
The hypervisor drivers currently supported by libvirt are:
|
||||
</p>
|
||||
<ul><li><strong><a href="drvxen.html">Xen</a></strong></li><li><strong><a href="drvqemu.html">QEMU</a></strong></li><li><strong><a href="drvlxc.html">LXC</a></strong></li><li><strong><a href="drvtest.html">Test</a></strong></li><li><strong><a href="drvopenvz.html">OpenVZ</a></strong></li></ul>
|
||||
<ul><li><strong><a href="drvxen.html">Xen</a></strong></li><li><strong><a href="drvqemu.html">QEMU</a></strong></li><li><strong><a href="drvlxc.html">LXC</a></strong></li><li><strong><a href="drvtest.html">Test</a></strong></li><li><strong><a href="drvopenvz.html">OpenVZ</a></strong></li><li><strong><a href="drvvbox.html">VirtualBox</a></strong></li><li><strong><a href="drvone.html">OpenNebula</a></strong></li></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
|
@ -22,6 +22,8 @@
|
||||
<li><strong><a href="drvlxc.html">LXC</a></strong></li>
|
||||
<li><strong><a href="drvtest.html">Test</a></strong></li>
|
||||
<li><strong><a href="drvopenvz.html">OpenVZ</a></strong></li>
|
||||
<li><strong><a href="drvvbox.html">VirtualBox</a></strong></li>
|
||||
<li><strong><a href="drvone.html">OpenNebula</a></strong></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -86,6 +86,14 @@
|
||||
<div>
|
||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -96,6 +104,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -126,6 +138,81 @@
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>LXC container driver</h1>
|
||||
<p>
|
||||
The libvirt LXC driver manages "Linux Containers". Containers are sets of processes
|
||||
with private namespaces which can (but don't always) look like separate machines, but
|
||||
do not have their own OS. Here are two example configurations. The first is a very
|
||||
light-weight "application container" which does not have it's own root image. You would
|
||||
start it using
|
||||
</p>
|
||||
<h3>Example config version 1</h3>
|
||||
<p></p>
|
||||
<pre>
|
||||
<domain type='lxc'>
|
||||
<name>vm1</name>
|
||||
<memory>500000</memory>
|
||||
<os>
|
||||
<type>exe</type>
|
||||
<init>/bin/sh</init>
|
||||
</os>
|
||||
<vcpu>1</vcpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
||||
<interface type='network'>
|
||||
<source network='default'/>
|
||||
</interface>
|
||||
<console type='pty' />
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
<p>
|
||||
The next example assumes there is a private root filesystem
|
||||
(perhaps hand-crafted using busybox, or installed from media,
|
||||
debootstrap, whatever) under /opt/vm-1-root:
|
||||
</p>
|
||||
<p></p>
|
||||
<pre>
|
||||
<domain type='lxc'>
|
||||
<name>vm1</name>
|
||||
<memory>32768</memory>
|
||||
<os>
|
||||
<type>exe</type>
|
||||
<init>/init</init>
|
||||
</os>
|
||||
<vcpu>1</vcpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
||||
<filesystem type='mount'>
|
||||
<source dir='/opt/vm-1-root'/>
|
||||
<target dir='/'/>
|
||||
</filesystem>
|
||||
<interface type='network'>
|
||||
<source network='default'/>
|
||||
</interface>
|
||||
<console type='pty' />
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
<p>
|
||||
In both cases, you can define and start a container using:</p>
|
||||
<pre>
|
||||
virsh --connect lxc:/// define v1.xml
|
||||
virsh --connect lxc:/// start v1.xml
|
||||
</pre>
|
||||
<pre>
|
||||
virsh --connect lxc:/// console v1
|
||||
</pre>
|
||||
<p>Now doing 'ps -ef' will only show processes in the container, for
|
||||
instance.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
|
@ -1,5 +1,84 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>LXC container driver</h1>
|
||||
<p>
|
||||
The libvirt LXC driver manages "Linux Containers". Containers are sets of processes
|
||||
with private namespaces which can (but don't always) look like separate machines, but
|
||||
do not have their own OS. Here are two example configurations. The first is a very
|
||||
light-weight "application container" which does not have it's own root image. You would
|
||||
start it using
|
||||
</p>
|
||||
|
||||
<h3>Example config version 1</h3>
|
||||
<p></p>
|
||||
<pre>
|
||||
<domain type='lxc'>
|
||||
<name>vm1</name>
|
||||
<memory>500000</memory>
|
||||
<os>
|
||||
<type>exe</type>
|
||||
<init>/bin/sh</init>
|
||||
</os>
|
||||
<vcpu>1</vcpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
||||
<interface type='network'>
|
||||
<source network='default'/>
|
||||
</interface>
|
||||
<console type='pty' />
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The next example assumes there is a private root filesystem
|
||||
(perhaps hand-crafted using busybox, or installed from media,
|
||||
debootstrap, whatever) under /opt/vm-1-root:
|
||||
</p>
|
||||
<p></p>
|
||||
<pre>
|
||||
<domain type='lxc'>
|
||||
<name>vm1</name>
|
||||
<memory>32768</memory>
|
||||
<os>
|
||||
<type>exe</type>
|
||||
<init>/init</init>
|
||||
</os>
|
||||
<vcpu>1</vcpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
||||
<filesystem type='mount'>
|
||||
<source dir='/opt/vm-1-root'/>
|
||||
<target dir='/'/>
|
||||
</filesystem>
|
||||
<interface type='network'>
|
||||
<source network='default'/>
|
||||
</interface>
|
||||
<console type='pty' />
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
In both cases, you can define and start a container using:</p>
|
||||
<pre>
|
||||
virsh --connect lxc:/// define v1.xml
|
||||
virsh --connect lxc:/// start v1.xml
|
||||
</pre>
|
||||
and then get a console using:
|
||||
<pre>
|
||||
virsh --connect lxc:/// console v1
|
||||
</pre>
|
||||
<p>Now doing 'ps -ef' will only show processes in the container, for
|
||||
instance.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
234
docs/drvone.html
Normal file
234
docs/drvone.html
Normal file
@ -0,0 +1,234 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
This file is autogenerated from drvone.html.in
|
||||
Do not edit this file. Changes will be lost.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
||||
<title>libvirt: OpenNebula Virtual Infrastructure Manager driver</title>
|
||||
<meta name="description" content="libvirt, virtualization, virtualization API" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="headerLogo"></div>
|
||||
<div id="headerSearch">
|
||||
<form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><div>
|
||||
<input id="query" name="query" type="text" size="12" value="" />
|
||||
<input id="submit" name="submit" type="submit" value="Search" />
|
||||
</div></form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="menu">
|
||||
<ul class="l0"><li>
|
||||
<div>
|
||||
<a title="Front page of the libvirt website" class="inactive" href="index.html">Home</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Details of new features and bugs fixed in each release" class="inactive" href="news.html">News</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="downloads.html">Downloads</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Information for users, administrators and developers" class="active" href="docs.html">Documentation</a>
|
||||
<ul class="l1"><li>
|
||||
<div>
|
||||
<a title="Information about deploying and using libvirt" class="inactive" href="deployment.html">Deployment</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="intro.html">Architecture</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Description of the XML formats used in libvirt" class="inactive" href="format.html">XML format</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Hypervisor specific driver information" class="active" href="drivers.html">Drivers</a>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<span class="active">OpenNebula</span>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Frequently asked questions" class="inactive" href="FAQ.html">FAQ</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How and where to report bugs and request features" class="inactive" href="bugs.html">Bug reports</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How to contact the developers via email and IRC" class="inactive" href="contact.html">Contact</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Miscellaneous links of interest related to libvirt" class="inactive" href="relatedlinks.html">Related Links</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of all content on the website" class="inactive" href="sitemap.html">Sitemap</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>OpenNebula Virtual Infrastructure Manager driver</h1>
|
||||
<p><a name="toc" id="toc"></a><a href="http://opennebula.org/">OpenNebula</a>
|
||||
is a Virtual Infrastructure Manager that controls Virtual Machines (VM) in a pool of distributed resources
|
||||
by orchestrating network, storage and virtualization technologies. The OpenNebula driver lets you manage your private or hybrid (<a href="http://aws.amazon.com/ec2/">Amazon EC2</a> or <a href="http://www.elastichosts.com/">Elastic Hosts</a> based) cloud using a standard libvirt interface, including the API as well as the related
|
||||
tools and VM description files.</p>
|
||||
<h2>
|
||||
<a name="prereq" id="prereq"></a>Deployment pre-requisites</h2>
|
||||
<ul><li>
|
||||
<p style="margin-bottom: 0in">A working OpenNebula installation,
|
||||
version 1.2 or higher.
|
||||
</p>
|
||||
</li></ul>
|
||||
<h2>
|
||||
<a name="uris" id="uris"></a>Connections to OpenNebula driver</h2>
|
||||
<p>The Uri of the driver protocol is "one". Some example
|
||||
connection Uris for the driver are:
|
||||
</p>
|
||||
<pre> one:/// (local access)
|
||||
one+unix:/// (local access)
|
||||
one://example.com/ (remote access)
|
||||
one+tcp://example.com/ (remote access, SASl/Kerberos)
|
||||
one+ssh://user@example.com/ (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<h2>
|
||||
<a name="xmlconfig" id="xmlconfig"></a>Example domain XML config</h2>
|
||||
<p>There are some limitations on the XML attributes that may be
|
||||
specified when interfacing OpenNebula. The following xml example
|
||||
details the attributes and options supported by the OpenNebula
|
||||
driver:</p>
|
||||
<h3>Paravirtualized guest direct kernel boot
|
||||
</h3>
|
||||
<pre> <domain type='one'>
|
||||
<name>vm01</name>
|
||||
<memory>32768</memory>
|
||||
<vcpu>1</vcpu>
|
||||
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<kernel>/boot/vmlinuz-2.6.24-17-xen</kernel>
|
||||
<initrd>/boot/initrd.img-2.6.24-17-xen</initrd>
|
||||
<cmdline></cmdline>
|
||||
<root>sda1</root>
|
||||
</os>
|
||||
|
||||
<devices>
|
||||
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/images/sgehosts/01/disk.img'/>
|
||||
<target dev='sda1'/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/images/sgehosts/01/swap.img'/>
|
||||
<target dev='sda2'/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='cdrom'>
|
||||
<source file='/images/iso/cdrom.iso'/>
|
||||
<target dev='hdc'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
|
||||
|
||||
<!--BRIDGE-->
|
||||
<interface type='bridge'>
|
||||
<source bridge='eth0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
</interface>
|
||||
|
||||
<!--ONE Network-->
|
||||
<interface type='network'>
|
||||
<source network='onenetwork'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
<p>
|
||||
<b>Note:</b> The "<interface type='network'>" will
|
||||
attach the interface to a previously configured network (named
|
||||
<tt>onenetwork</tt>) within the <a href="http://opennebula.org/">OpenNebula</a> system, typically with the
|
||||
<tt>onevnet</tt> CLI command.</p>
|
||||
<p><b>Note</b>: OpenNebula supports the simultaneous use of different hypervisors, so you can specify any os type (linux or hvm) supported by your cluster.
|
||||
</p>
|
||||
<h2>Links</h2>
|
||||
<ul><li><a href="http://www.opennebula.org/doku.php?id=documentation">OpenNebula Documentation</a>
|
||||
</li><li><a href="http://www.opennebula.org/doku.php?id=documentation:rel1.2:ug">OpenNebula User Guide</a>
|
||||
</li></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p id="sponsor">
|
||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
107
docs/drvone.html.in
Normal file
107
docs/drvone.html.in
Normal file
@ -0,0 +1,107 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
|
||||
<title></title>
|
||||
<meta name="GENERATOR" content="OpenOffice.org 3.0 (Linux)">
|
||||
<meta name="CREATED" content="0;0">
|
||||
<meta name="CHANGED" content="20090701;13170700">
|
||||
</head>
|
||||
<body lang="en-US" dir="LTR">
|
||||
<h1>OpenNebula Virtual Infrastructure Manager driver</h1>
|
||||
<p><a name="toc"></a><a href="http://opennebula.org/">OpenNebula</a>
|
||||
is a Virtual Infrastructure Manager that controls Virtual Machines (VM) in a pool of distributed resources
|
||||
by orchestrating network, storage and virtualization technologies. The OpenNebula driver lets you manage your private or hybrid (<a href="http://aws.amazon.com/ec2/">Amazon EC2</a> or <a href="http://www.elastichosts.com/">Elastic Hosts</a> based) cloud using a standard libvirt interface, including the API as well as the related
|
||||
tools and VM description files.</p>
|
||||
<h2>
|
||||
<a name="prereq"></a>Deployment pre-requisites</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p style="margin-bottom: 0in">A working OpenNebula installation,
|
||||
version 1.2 or higher.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a name="uris"></a>Connections to OpenNebula driver</h2>
|
||||
<p>The Uri of the driver protocol is "one". Some example
|
||||
connection Uris for the driver are:
|
||||
</p>
|
||||
<pre> one:/// (local access)
|
||||
one+unix:/// (local access)
|
||||
one://example.com/ (remote access)
|
||||
one+tcp://example.com/ (remote access, SASl/Kerberos)
|
||||
one+ssh://user@example.com/ (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<h2>
|
||||
<a name="xmlconfig"></a>Example domain XML config</h2>
|
||||
<p>There are some limitations on the XML attributes that may be
|
||||
specified when interfacing OpenNebula. The following xml example
|
||||
details the attributes and options supported by the OpenNebula
|
||||
driver:</p>
|
||||
|
||||
<h3>Paravirtualized guest direct kernel boot
|
||||
</h3>
|
||||
<pre> <domain type='one'>
|
||||
<name>vm01</name>
|
||||
<memory>32768</memory>
|
||||
<vcpu>1</vcpu>
|
||||
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<kernel>/boot/vmlinuz-2.6.24-17-xen</kernel>
|
||||
<initrd>/boot/initrd.img-2.6.24-17-xen</initrd>
|
||||
<cmdline></cmdline>
|
||||
<root>sda1</root>
|
||||
</os>
|
||||
|
||||
<devices>
|
||||
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/images/sgehosts/01/disk.img'/>
|
||||
<target dev='sda1'/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/images/sgehosts/01/swap.img'/>
|
||||
<target dev='sda2'/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='cdrom'>
|
||||
<source file='/images/iso/cdrom.iso'/>
|
||||
<target dev='hdc'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
|
||||
|
||||
<!--BRIDGE-->
|
||||
<interface type='bridge'>
|
||||
<source bridge='eth0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
</interface>
|
||||
|
||||
<!--ONE Network-->
|
||||
<interface type='network'>
|
||||
<source network='onenetwork'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
<p>
|
||||
<b>Note:</b> The "<interface type='network'>" will
|
||||
attach the interface to a previously configured network (named
|
||||
<tt>onenetwork</tt>) within the <a href="http://opennebula.org/">OpenNebula</a> system, typically with the
|
||||
<tt>onevnet</tt> CLI command.</p>
|
||||
|
||||
<p><b>Note</b>: OpenNebula supports the simultaneous use of different hypervisors, so you can specify any os type (linux or hvm) supported by your cluster.
|
||||
</p>
|
||||
|
||||
<h2>Links</h2>
|
||||
<ul>
|
||||
<li><a href="http://www.opennebula.org/doku.php?id=documentation">OpenNebula Documentation</a>
|
||||
</li>
|
||||
<li><a href="http://www.opennebula.org/doku.php?id=documentation:rel1.2:ug">OpenNebula User Guide</a>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
@ -86,6 +86,14 @@
|
||||
<div>
|
||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -96,6 +104,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -86,6 +86,14 @@
|
||||
<div>
|
||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -96,6 +104,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -126,12 +138,28 @@
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>QEMU/KVM hypervisor driver</h1>
|
||||
<ul><li>
|
||||
<a href="#prereq">Deployment pre-requisites</a>
|
||||
</li><li>
|
||||
<a href="#uris">Connections to QEMU driver</a>
|
||||
</li><li>
|
||||
<a href="#imex">Import and export of libvirt domain XML configs</a>
|
||||
<ul><li>
|
||||
<a href="#xmlimport">Converting from QEMU args to domain XML</a>
|
||||
</li><li>
|
||||
<a href="#xmlexport">Converting from domain XML to QEMU args</a>
|
||||
</li></ul>
|
||||
</li><li>
|
||||
<a href="#xmlconfig">Example domain XML config</a>
|
||||
</li></ul>
|
||||
<p>
|
||||
The libvirt QEMU driver can manage any QEMU emulator from version 0.8.1
|
||||
or later. It can also manage anything that provides the same QEMU command
|
||||
line syntax and monitor interaction. This includes KVM, and Xenner.
|
||||
</p>
|
||||
<h2>Deployment pre-requisites</h2>
|
||||
<h2>
|
||||
<a name="prereq" id="prereq">Deployment pre-requisites</a>
|
||||
</h2>
|
||||
<ul><li>
|
||||
<strong>QEMU emulators</strong>: The driver will probe <code>/usr/bin</code>
|
||||
for the presence of <code>qemu</code>, <code>qemu-system-x86_64</code>,
|
||||
@ -149,7 +177,9 @@
|
||||
node. If both are found, then Xen paravirtualized guests can be run using
|
||||
the KVM hardware acceleration.
|
||||
</li></ul>
|
||||
<h2>Connections to QEMU driver</h2>
|
||||
<h2>
|
||||
<a name="uris" id="uris">Connections to QEMU driver</a>
|
||||
</h2>
|
||||
<p>
|
||||
The libvirt QEMU driver is a multi-instance driver, providing a single
|
||||
system wide privileged driver (the "system" instance), and per-user
|
||||
@ -165,6 +195,93 @@
|
||||
qemu://example.com/system (remote access, TLS/x509)
|
||||
qemu+tcp://example.com/system (remote access, SASl/Kerberos)
|
||||
qemu+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<h2>
|
||||
<a name="imex" id="imex">Import and export of libvirt domain XML configs</a>
|
||||
</h2>
|
||||
<p>The QEMU driver currently supports a single native
|
||||
config format known as <code>qemu-argv</code>. The data for this format
|
||||
is expected to be a single line first a list of environment variables,
|
||||
then the QEMu binary name, finally followed by the QEMU command line
|
||||
arguments</p>
|
||||
<h3>
|
||||
<a name="xmlimport" id="xmlimport">Converting from QEMU args to domain XML</a>
|
||||
</h3>
|
||||
<p>
|
||||
The <code>virsh domxml-from-native</code> provides a way to convert an
|
||||
existing set of QEMU args into a guest description using libvirt Domain XML
|
||||
that can then be used by libvirt.
|
||||
</p>
|
||||
<pre>$ cat > demo.args <<EOF
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test \
|
||||
LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 \
|
||||
-nographic -monitor pty -no-acpi -boot c -hda \
|
||||
/dev/HostVG/QEMUGuest1 -net none -serial none \
|
||||
-parallel none -usb
|
||||
EOF
|
||||
$ virsh domxml-from-native qemu-argv demo.args
|
||||
<domain type='qemu'>
|
||||
<uuid>00000000-0000-0000-0000-000000000000</uuid>
|
||||
<memory>219136</memory>
|
||||
<currentMemory>219136</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu</emulator>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
<p>NB, don't include the literral \ in the args, put everything on one line</p>
|
||||
<h3>
|
||||
<a name="xmlexport" id="xmlexport">Converting from domain XML to QEMU args</a>
|
||||
</h3>
|
||||
<p>
|
||||
The <code>virsh domxml-to-native</code> provides a way to convert a
|
||||
guest description using libvirt Domain XML, into a set of QEMU args
|
||||
that can be run manually.
|
||||
</p>
|
||||
<pre>$ cat > demo.xml <<EOF
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory>219200</memory>
|
||||
<currentMemory>219200</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu</emulator>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
||||
EOF
|
||||
$ virsh domxml-to-native qemu-argv demo.xml
|
||||
LC_ALL=C PATH=/usr/bin:/bin HOME=/home/test \
|
||||
USER=test LOGNAME=test /usr/bin/qemu -S -M pc \
|
||||
-no-kqemu -m 214 -smp 1 -name QEMUGuest1 -nographic \
|
||||
-monitor pty -no-acpi -boot c -drive \
|
||||
file=/dev/HostVG/QEMUGuest1,if=ide,index=0 -net none \
|
||||
-serial none -parallel none -usb
|
||||
</pre>
|
||||
<h2>
|
||||
<a name="xmlconfig" id="xmlconfig">Example domain XML config</a>
|
||||
|
@ -2,13 +2,15 @@
|
||||
<body>
|
||||
<h1>QEMU/KVM hypervisor driver</h1>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<p>
|
||||
The libvirt QEMU driver can manage any QEMU emulator from version 0.8.1
|
||||
or later. It can also manage anything that provides the same QEMU command
|
||||
line syntax and monitor interaction. This includes KVM, and Xenner.
|
||||
</p>
|
||||
|
||||
<h2>Deployment pre-requisites</h2>
|
||||
<h2><a name="prereq">Deployment pre-requisites</a></h2>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
@ -32,7 +34,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Connections to QEMU driver</h2>
|
||||
<h2><a name="uris">Connections to QEMU driver</a></h2>
|
||||
|
||||
<p>
|
||||
The libvirt QEMU driver is a multi-instance driver, providing a single
|
||||
@ -52,6 +54,96 @@
|
||||
qemu+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2><a name="imex">Import and export of libvirt domain XML configs</a></h2>
|
||||
|
||||
<p>The QEMU driver currently supports a single native
|
||||
config format known as <code>qemu-argv</code>. The data for this format
|
||||
is expected to be a single line first a list of environment variables,
|
||||
then the QEMu binary name, finally followed by the QEMU command line
|
||||
arguments</p>
|
||||
|
||||
<h3><a name="xmlimport">Converting from QEMU args to domain XML</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh domxml-from-native</code> provides a way to convert an
|
||||
existing set of QEMU args into a guest description using libvirt Domain XML
|
||||
that can then be used by libvirt.
|
||||
</p>
|
||||
|
||||
<pre>$ cat > demo.args <<EOF
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test \
|
||||
LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 \
|
||||
-nographic -monitor pty -no-acpi -boot c -hda \
|
||||
/dev/HostVG/QEMUGuest1 -net none -serial none \
|
||||
-parallel none -usb
|
||||
EOF
|
||||
$ virsh domxml-from-native qemu-argv demo.args
|
||||
<domain type='qemu'>
|
||||
<uuid>00000000-0000-0000-0000-000000000000</uuid>
|
||||
<memory>219136</memory>
|
||||
<currentMemory>219136</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu</emulator>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
<p>NB, don't include the literral \ in the args, put everything on one line</p>
|
||||
|
||||
<h3><a name="xmlexport">Converting from domain XML to QEMU args</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh domxml-to-native</code> provides a way to convert a
|
||||
guest description using libvirt Domain XML, into a set of QEMU args
|
||||
that can be run manually.
|
||||
</p>
|
||||
|
||||
<pre>$ cat > demo.xml <<EOF
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory>219200</memory>
|
||||
<currentMemory>219200</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu</emulator>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
||||
EOF
|
||||
$ virsh domxml-to-native qemu-argv demo.xml
|
||||
LC_ALL=C PATH=/usr/bin:/bin HOME=/home/test \
|
||||
USER=test LOGNAME=test /usr/bin/qemu -S -M pc \
|
||||
-no-kqemu -m 214 -smp 1 -name QEMUGuest1 -nographic \
|
||||
-monitor pty -no-acpi -boot c -drive \
|
||||
file=/dev/HostVG/QEMUGuest1,if=ide,index=0 -net none \
|
||||
-serial none -parallel none -usb
|
||||
</pre>
|
||||
|
||||
<h2><a name="xmlconfig">Example domain XML config</a></h2>
|
||||
|
||||
<h3>QEMU emulated guest on x86_64</h3>
|
||||
|
@ -86,6 +86,14 @@
|
||||
<div>
|
||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -96,6 +104,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -86,6 +86,14 @@
|
||||
<div>
|
||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -96,6 +104,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -86,6 +86,14 @@
|
||||
<div>
|
||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -96,6 +104,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
258
docs/drvvbox.html
Normal file
258
docs/drvvbox.html
Normal file
@ -0,0 +1,258 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
This file is autogenerated from drvvbox.html.in
|
||||
Do not edit this file. Changes will be lost.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
||||
<title>libvirt: VirtualBox hypervisor driver</title>
|
||||
<meta name="description" content="libvirt, virtualization, virtualization API" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="headerLogo"></div>
|
||||
<div id="headerSearch">
|
||||
<form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><div>
|
||||
<input id="query" name="query" type="text" size="12" value="" />
|
||||
<input id="submit" name="submit" type="submit" value="Search" />
|
||||
</div></form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="menu">
|
||||
<ul class="l0"><li>
|
||||
<div>
|
||||
<a title="Front page of the libvirt website" class="inactive" href="index.html">Home</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Details of new features and bugs fixed in each release" class="inactive" href="news.html">News</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="downloads.html">Downloads</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Information for users, administrators and developers" class="active" href="docs.html">Documentation</a>
|
||||
<ul class="l1"><li>
|
||||
<div>
|
||||
<a title="Information about deploying and using libvirt" class="inactive" href="deployment.html">Deployment</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="intro.html">Architecture</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Description of the XML formats used in libvirt" class="inactive" href="format.html">XML format</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Hypervisor specific driver information" class="active" href="drivers.html">Drivers</a>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<span class="active">VirtualBox</span>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Frequently asked questions" class="inactive" href="FAQ.html">FAQ</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How and where to report bugs and request features" class="inactive" href="bugs.html">Bug reports</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How to contact the developers via email and IRC" class="inactive" href="contact.html">Contact</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Miscellaneous links of interest related to libvirt" class="inactive" href="relatedlinks.html">Related Links</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of all content on the website" class="inactive" href="sitemap.html">Sitemap</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>VirtualBox hypervisor driver</h1>
|
||||
<p>
|
||||
The libvirt VirtualBox driver can manage any VirtualBox version
|
||||
from version 2.2 onwards.
|
||||
</p>
|
||||
<h2>Connections to VirtualBox driver</h2>
|
||||
<p>
|
||||
The libvirt VirtualBox driver provides per-user drivers (the "session" instance).
|
||||
The uri of the driver protocol is "vbox". Some example connection URIs for the driver are:
|
||||
</p>
|
||||
<pre>
|
||||
vbox:///session (local access to per-user instance)
|
||||
vbox+unix:///session (local access to per-user instance)
|
||||
vbox+tcp://user@example.com/session (remote access, SASl/Kerberos)
|
||||
vbox+ssh://user@example.com/session (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<h2>
|
||||
<a name="xmlconfig" id="xmlconfig">Example domain XML config</a>
|
||||
</h2>
|
||||
<pre>
|
||||
<domain type='vbox'>
|
||||
<name>vbox</name>
|
||||
<uuid>4dab22b31d52d8f32516782e98ab3fa0</uuid>
|
||||
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
<boot dev='cdrom'/>
|
||||
<boot dev='hd'/>
|
||||
<boot dev='fd'/>
|
||||
<boot dev='network'/>
|
||||
</os>
|
||||
|
||||
<memory>654321</memory>
|
||||
<vcpu>1</vcpu>
|
||||
|
||||
<features>
|
||||
<pae/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
</features>
|
||||
|
||||
<devices>
|
||||
<disk type='file' device='cdrom'>
|
||||
<source file='/home/user/Downloads/slax-6.0.9.iso'/>
|
||||
<target dev='hdc'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/home/user/tmp/vbox.vdi'/>
|
||||
<target dev='hdd'/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='floppy'>
|
||||
<source file='/home/user/tmp/WIN98C.IMG'/>
|
||||
<target dev='fda'/>
|
||||
</disk>
|
||||
|
||||
<!--BRIDGE-->
|
||||
<interface type='bridge'>
|
||||
<source bridge='eth0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
<model type='am79c973'/>
|
||||
</interface>
|
||||
|
||||
<!--NAT-->
|
||||
<interface type='user'>
|
||||
<mac address='56:16:3e:5d:c7:9e'/>
|
||||
<model type='82540eM'/>
|
||||
</interface>
|
||||
|
||||
<sound model='sb16'/>
|
||||
|
||||
<parallel type='dev'>
|
||||
<source path='/dev/pts/1'/>
|
||||
<target port='0'/>
|
||||
</parallel>
|
||||
|
||||
<parallel type='dev'>
|
||||
<source path='/dev/pts/2'/>
|
||||
<target port='1'/>
|
||||
</parallel>
|
||||
|
||||
<serial type="dev">
|
||||
<source path="/dev/ttyS0"/>
|
||||
<target port="0"/>
|
||||
</serial>
|
||||
|
||||
<serial type="pipe">
|
||||
<source path="/tmp/serial.txt"/>
|
||||
<target port="1"/>
|
||||
</serial>
|
||||
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<vendor id='0x1234'/>
|
||||
<product id='0xbeef'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<vendor id='0x4321'/>
|
||||
<product id='0xfeeb'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
|
||||
</devices>
|
||||
|
||||
</domain>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p id="sponsor">
|
||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
119
docs/drvvbox.html.in
Normal file
119
docs/drvvbox.html.in
Normal file
@ -0,0 +1,119 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>VirtualBox hypervisor driver</h1>
|
||||
<p>
|
||||
The libvirt VirtualBox driver can manage any VirtualBox version
|
||||
from version 2.2 onwards.
|
||||
</p>
|
||||
|
||||
<h2>Connections to VirtualBox driver</h2>
|
||||
|
||||
<p>
|
||||
The libvirt VirtualBox driver provides per-user drivers (the "session" instance).
|
||||
The uri of the driver protocol is "vbox". Some example connection URIs for the driver are:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
vbox:///session (local access to per-user instance)
|
||||
vbox+unix:///session (local access to per-user instance)
|
||||
vbox+tcp://user@example.com/session (remote access, SASl/Kerberos)
|
||||
vbox+ssh://user@example.com/session (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2><a name="xmlconfig">Example domain XML config</a></h2>
|
||||
|
||||
<pre>
|
||||
<domain type='vbox'>
|
||||
<name>vbox</name>
|
||||
<uuid>4dab22b31d52d8f32516782e98ab3fa0</uuid>
|
||||
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
<boot dev='cdrom'/>
|
||||
<boot dev='hd'/>
|
||||
<boot dev='fd'/>
|
||||
<boot dev='network'/>
|
||||
</os>
|
||||
|
||||
<memory>654321</memory>
|
||||
<vcpu>1</vcpu>
|
||||
|
||||
<features>
|
||||
<pae/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
</features>
|
||||
|
||||
<devices>
|
||||
<disk type='file' device='cdrom'>
|
||||
<source file='/home/user/Downloads/slax-6.0.9.iso'/>
|
||||
<target dev='hdc'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/home/user/tmp/vbox.vdi'/>
|
||||
<target dev='hdd'/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='floppy'>
|
||||
<source file='/home/user/tmp/WIN98C.IMG'/>
|
||||
<target dev='fda'/>
|
||||
</disk>
|
||||
|
||||
<!--BRIDGE-->
|
||||
<interface type='bridge'>
|
||||
<source bridge='eth0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
<model type='am79c973'/>
|
||||
</interface>
|
||||
|
||||
<!--NAT-->
|
||||
<interface type='user'>
|
||||
<mac address='56:16:3e:5d:c7:9e'/>
|
||||
<model type='82540eM'/>
|
||||
</interface>
|
||||
|
||||
<sound model='sb16'/>
|
||||
|
||||
<parallel type='dev'>
|
||||
<source path='/dev/pts/1'/>
|
||||
<target port='0'/>
|
||||
</parallel>
|
||||
|
||||
<parallel type='dev'>
|
||||
<source path='/dev/pts/2'/>
|
||||
<target port='1'/>
|
||||
</parallel>
|
||||
|
||||
<serial type="dev">
|
||||
<source path="/dev/ttyS0"/>
|
||||
<target port="0"/>
|
||||
</serial>
|
||||
|
||||
<serial type="pipe">
|
||||
<source path="/tmp/serial.txt"/>
|
||||
<target port="1"/>
|
||||
</serial>
|
||||
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<vendor id='0x1234'/>
|
||||
<product id='0xbeef'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<vendor id='0x4321'/>
|
||||
<product id='0xfeeb'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
|
||||
</devices>
|
||||
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
116
docs/drvxen.html
116
docs/drvxen.html
@ -86,6 +86,14 @@
|
||||
<div>
|
||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -96,6 +104,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -126,11 +138,27 @@
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Xen hypervisor driver</h1>
|
||||
<ul><li>
|
||||
<a href="#prereq">Deployment pre-requisites</a>
|
||||
</li><li>
|
||||
<a href="#uri">Connections to Xen driver</a>
|
||||
</li><li>
|
||||
<a href="#imex">Import and export of libvirt domain XML configs</a>
|
||||
<ul><li>
|
||||
<a href="#xmlimport">Converting from XM config files to domain XML</a>
|
||||
</li><li>
|
||||
<a href="#xmlexport">Converting from domain XML to XM config files</a>
|
||||
</li></ul>
|
||||
</li><li>
|
||||
<a href="#xmlconfig">Example domain XML config</a>
|
||||
</li></ul>
|
||||
<p>
|
||||
The libvirt Xen driver provides the ability to manage virtual machines
|
||||
on any Xen release from 3.0.1 onwards.
|
||||
</p>
|
||||
<h2>Deployment pre-requisites</h2>
|
||||
<h2>
|
||||
<a name="prereq" id="prereq">Deployment pre-requisites</a>
|
||||
</h2>
|
||||
<p>
|
||||
The libvirt Xen driver uses a combination of channels to manage Xen
|
||||
virtual machines.
|
||||
@ -159,7 +187,9 @@
|
||||
the <code>/etc/xen</code> directory. It is important not to place
|
||||
any other non-config files in this directory.
|
||||
</li></ul>
|
||||
<h2>Connections to Xen driver</h2>
|
||||
<h2>
|
||||
<a name="uri" id="uri">Connections to Xen driver</a>
|
||||
</h2>
|
||||
<p>
|
||||
The libvirt Xen driver is a single-instance privileged driver,
|
||||
with a driver name of 'xen'. Some example conection URIs for
|
||||
@ -171,6 +201,88 @@
|
||||
xen://example.com/ (remote access, TLS/x509)
|
||||
xen+tcp://example.com/ (remote access, SASl/Kerberos)
|
||||
xen+ssh://root@example.com/ (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<h2>
|
||||
<a name="imex" id="imex">Import and export of libvirt domain XML configs</a>
|
||||
</h2>
|
||||
<p>The Xen driver currently supports two native
|
||||
config formats. The first known as <code>xen-xm</code> is the format
|
||||
used by the XM tool for files in <code>/etc/xen</code>. The second
|
||||
known as <code>xen-sxpr</code>, is the format used for interacting
|
||||
with the XenD's legacy HTTP RPC service.</p>
|
||||
<h3>
|
||||
<a name="xmlimport" id="xmlimport">Converting from XM config files to domain XML</a>
|
||||
</h3>
|
||||
<p>
|
||||
The <code>virsh domxml-from-native</code> provides a way to convert an
|
||||
existing set of XM config files into a guest description using libvirt Domain XML
|
||||
that can then be used by libvirt.
|
||||
</p>
|
||||
<pre>$ virsh -c xen:/// domxml-from-native xen-xm rhel5.cfg
|
||||
<domain type='xen'>
|
||||
<name>rhel5pv</name>
|
||||
<uuid>8f07fe28-753f-2729-d76d-bdbd892f949a</uuid>
|
||||
<memory>2560000</memory>
|
||||
<currentMemory>307200</currentMemory>
|
||||
<vcpu>4</vcpu>
|
||||
<bootloader>/usr/bin/pygrub</bootloader>
|
||||
<os>
|
||||
<type arch='x86_64' machine='xenpv'>linux</type>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='tap' type='aio'/>
|
||||
<source file='/var/lib/xen/images/rhel5pv.img'/>
|
||||
<target dev='xvda' bus='xen'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='tap' type='qcow'/>
|
||||
<source file='/root/qcow1-xen.img'/>
|
||||
<target dev='xvdd' bus='xen'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<mac address='00:16:3e:60:36:ba'/>
|
||||
<source bridge='xenbr0'/>
|
||||
</interface>
|
||||
<console type='pty'>
|
||||
<target port='0'/>
|
||||
</console>
|
||||
<input type='mouse' bus='xen'/>
|
||||
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
<h3>
|
||||
<a name="xmlexport" id="xmlexport">Converting from domain XML to XM config files</a>
|
||||
</h3>
|
||||
<p>
|
||||
The <code>virsh domxml-to-native</code> provides a way to convert a
|
||||
guest description using libvirt Domain XML, into the XM config file
|
||||
format.
|
||||
</p>
|
||||
<pre># virsh -c xen:/// domxml-to-native xen-xm rhel5pv.xml
|
||||
name = "rhel5pv"
|
||||
uuid = "8f07fe28-753f-2729-d76d-bdbd892f949a"
|
||||
maxmem = 2500
|
||||
memory = 300
|
||||
vcpus = 4
|
||||
bootloader = "/usr/bin/pygrub"
|
||||
kernel = "/var/lib/xen/boot_kernel.0YK-cS"
|
||||
ramdisk = "/var/lib/xen/boot_ramdisk.vWgrxK"
|
||||
extra = "ro root=/dev/VolGroup00/LogVol00 rhgb quiet"
|
||||
on_poweroff = "destroy"
|
||||
on_reboot = "restart"
|
||||
on_crash = "restart"
|
||||
sdl = 0
|
||||
vnc = 1
|
||||
vncunused = 1
|
||||
vnclisten = "0.0.0.0"
|
||||
disk = [ "tap:aio:/var/lib/xen/images/rhel5pv.img,xvda,w", "tap:qcow:/root/qcow1-xen.img,xvdd,w" ]
|
||||
vif = [ "mac=00:16:3e:60:36:ba,bridge=virbr0,script=vif-bridge,vifname=vif5.0" ]
|
||||
</pre>
|
||||
<h2>
|
||||
<a name="xmlconfig" id="xmlconfig">Example domain XML config</a>
|
||||
|
@ -2,12 +2,14 @@
|
||||
<body>
|
||||
<h1>Xen hypervisor driver</h1>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<p>
|
||||
The libvirt Xen driver provides the ability to manage virtual machines
|
||||
on any Xen release from 3.0.1 onwards.
|
||||
</p>
|
||||
|
||||
<h2>Deployment pre-requisites</h2>
|
||||
<h2><a name="prereq">Deployment pre-requisites</a></h2>
|
||||
|
||||
<p>
|
||||
The libvirt Xen driver uses a combination of channels to manage Xen
|
||||
@ -44,7 +46,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Connections to Xen driver</h2>
|
||||
<h2><a name="uri">Connections to Xen driver</a></h2>
|
||||
|
||||
<p>
|
||||
The libvirt Xen driver is a single-instance privileged driver,
|
||||
@ -60,6 +62,89 @@
|
||||
xen+ssh://root@example.com/ (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2><a name="imex">Import and export of libvirt domain XML configs</a></h2>
|
||||
|
||||
<p>The Xen driver currently supports two native
|
||||
config formats. The first known as <code>xen-xm</code> is the format
|
||||
used by the XM tool for files in <code>/etc/xen</code>. The second
|
||||
known as <code>xen-sxpr</code>, is the format used for interacting
|
||||
with the XenD's legacy HTTP RPC service.</p>
|
||||
|
||||
<h3><a name="xmlimport">Converting from XM config files to domain XML</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh domxml-from-native</code> provides a way to convert an
|
||||
existing set of XM config files into a guest description using libvirt Domain XML
|
||||
that can then be used by libvirt.
|
||||
</p>
|
||||
|
||||
<pre>$ virsh -c xen:/// domxml-from-native xen-xm rhel5.cfg
|
||||
<domain type='xen'>
|
||||
<name>rhel5pv</name>
|
||||
<uuid>8f07fe28-753f-2729-d76d-bdbd892f949a</uuid>
|
||||
<memory>2560000</memory>
|
||||
<currentMemory>307200</currentMemory>
|
||||
<vcpu>4</vcpu>
|
||||
<bootloader>/usr/bin/pygrub</bootloader>
|
||||
<os>
|
||||
<type arch='x86_64' machine='xenpv'>linux</type>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='tap' type='aio'/>
|
||||
<source file='/var/lib/xen/images/rhel5pv.img'/>
|
||||
<target dev='xvda' bus='xen'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='tap' type='qcow'/>
|
||||
<source file='/root/qcow1-xen.img'/>
|
||||
<target dev='xvdd' bus='xen'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<mac address='00:16:3e:60:36:ba'/>
|
||||
<source bridge='xenbr0'/>
|
||||
</interface>
|
||||
<console type='pty'>
|
||||
<target port='0'/>
|
||||
</console>
|
||||
<input type='mouse' bus='xen'/>
|
||||
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
<h3><a name="xmlexport">Converting from domain XML to XM config files</a></h3>
|
||||
|
||||
<p>
|
||||
The <code>virsh domxml-to-native</code> provides a way to convert a
|
||||
guest description using libvirt Domain XML, into the XM config file
|
||||
format.
|
||||
</p>
|
||||
|
||||
<pre># virsh -c xen:/// domxml-to-native xen-xm rhel5pv.xml
|
||||
name = "rhel5pv"
|
||||
uuid = "8f07fe28-753f-2729-d76d-bdbd892f949a"
|
||||
maxmem = 2500
|
||||
memory = 300
|
||||
vcpus = 4
|
||||
bootloader = "/usr/bin/pygrub"
|
||||
kernel = "/var/lib/xen/boot_kernel.0YK-cS"
|
||||
ramdisk = "/var/lib/xen/boot_ramdisk.vWgrxK"
|
||||
extra = "ro root=/dev/VolGroup00/LogVol00 rhgb quiet"
|
||||
on_poweroff = "destroy"
|
||||
on_reboot = "restart"
|
||||
on_crash = "restart"
|
||||
sdl = 0
|
||||
vnc = 1
|
||||
vncunused = 1
|
||||
vnclisten = "0.0.0.0"
|
||||
disk = [ "tap:aio:/var/lib/xen/images/rhel5pv.img,xvda,w", "tap:qcow:/root/qcow1-xen.img,xvdd,w" ]
|
||||
vif = [ "mac=00:16:3e:60:36:ba,bridge=virbr0,script=vif-bridge,vifname=vif5.0" ]
|
||||
</pre>
|
||||
|
||||
<h2><a name="xmlconfig">Example domain XML config</a></h2>
|
||||
|
||||
|
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -183,6 +187,8 @@
|
||||
</li><li>
|
||||
<a href="#elementsCharUNIX">UNIX domain socket client/server</a>
|
||||
</li></ul>
|
||||
</li><li>
|
||||
<a href="#elementsSound">Sound devices</a>
|
||||
</li></ul>
|
||||
</li></ul>
|
||||
</li><li>
|
||||
@ -744,7 +750,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
auto-allocated). The <code>autoport</code> attribute is the new
|
||||
preferred syntax for indicating autoallocation of the TCP port to use.
|
||||
The <code>listen</code> attribute is an IP address for the server to
|
||||
listen on. The <code>password</code> attribute provides a VNC password
|
||||
listen on. The <code>passwd</code> attribute provides a VNC password
|
||||
in clear text. The <code>keymap</code> attribute specifies the keymap
|
||||
to use.</dd></dl>
|
||||
<h4>
|
||||
@ -916,6 +922,24 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<target port="1"/>
|
||||
</serial>
|
||||
...</pre>
|
||||
<h4>
|
||||
<a name="elementsSound" id="elementsSound">Sound devices</a>
|
||||
</h4>
|
||||
<p>
|
||||
A virtual sound card can be attached to the host via the
|
||||
<code>sound</code> element. <span class="since">Since 0.4.3</span>
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<sound model='es1370'/>
|
||||
...</pre>
|
||||
<dl><dt><code>sound</code></dt><dd>
|
||||
The <code>sound</code> element has one mandatory attribute,
|
||||
<code>model</code>, which specifies what real sound device is emulated.
|
||||
Valid values are specific to the underlying hypervisor, though typical
|
||||
choices are 'es1370', 'sb16', and 'ac97'
|
||||
(<span class="since">'ac97' only since 0.6.0</span>)
|
||||
</dd></dl>
|
||||
<h2>
|
||||
<a name="examples" id="examples">Example configs</a>
|
||||
</h2>
|
||||
|
@ -688,7 +688,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
auto-allocated). The <code>autoport</code> attribute is the new
|
||||
preferred syntax for indicating autoallocation of the TCP port to use.
|
||||
The <code>listen</code> attribute is an IP address for the server to
|
||||
listen on. The <code>password</code> attribute provides a VNC password
|
||||
listen on. The <code>passwd</code> attribute provides a VNC password
|
||||
in clear text. The <code>keymap</code> attribute specifies the keymap
|
||||
to use.</dd>
|
||||
</dl>
|
||||
@ -886,6 +886,30 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</serial>
|
||||
...</pre>
|
||||
|
||||
|
||||
<h4><a name="elementsSound">Sound devices</a></h4>
|
||||
|
||||
<p>
|
||||
A virtual sound card can be attached to the host via the
|
||||
<code>sound</code> element. <span class="since">Since 0.4.3</span>
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<sound model='es1370'/>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>sound</code></dt>
|
||||
<dd>
|
||||
The <code>sound</code> element has one mandatory attribute,
|
||||
<code>model</code>, which specifies what real sound device is emulated.
|
||||
Valid values are specific to the underlying hypervisor, though typical
|
||||
choices are 'es1370', 'sb16', and 'ac97'
|
||||
(<span class="since">'ac97' only since 0.6.0</span>)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a name="examples">Example configs</a></h2>
|
||||
|
||||
<p>
|
||||
|
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -294,7 +298,7 @@
|
||||
<a name="StorageVolFirst" id="StorageVolFirst">General metadata</a>
|
||||
</h3>
|
||||
<pre>
|
||||
<volume type="file">
|
||||
<volume>
|
||||
<name>sparse.img</name>
|
||||
<key>/var/lib/xen/images/sparse.img</key>
|
||||
<allocation>0</allocation>
|
||||
@ -330,7 +334,7 @@
|
||||
...
|
||||
<target>
|
||||
<path>/var/lib/virt/images/sparse.img</path>
|
||||
<format>qcow2</format>
|
||||
<format type='qcow2'/>
|
||||
<permissions>
|
||||
<owner>0744</owner>
|
||||
<group>0744</group>
|
||||
@ -346,8 +350,8 @@
|
||||
or directory pools it will provide the file format type, eg cow,
|
||||
qcow, vmdk, raw. If omitted when creating a volume, the pool's
|
||||
default format will be used. The actual format is specified via
|
||||
the <code>type</code>. Consult the pool-specific docs for the
|
||||
list of valid values. <span class="since">Since 0.4.1</span></dd><dt><code>permissions</code></dt><dd>Provides information about the default permissions to use
|
||||
the <code>type</code> attribute. Consult the pool-specific docs for
|
||||
the list of valid values. <span class="since">Since 0.4.1</span></dd><dt><code>permissions</code></dt><dd>Provides information about the default permissions to use
|
||||
when creating volumes. This is currently only useful for directory
|
||||
or filesystem based pools, where the volumes allocated are simple
|
||||
files. For pools where the volumes are device nodes, the hotplug
|
||||
@ -432,7 +436,7 @@
|
||||
<a name="exampleVol" id="exampleVol">Storage volume</a>
|
||||
</h3>
|
||||
<pre>
|
||||
<volume type="file">
|
||||
<volume>
|
||||
<name>sparse.img</name>
|
||||
<allocation>0</allocation>
|
||||
<capacity unit="T">1</capacity>
|
||||
|
@ -183,7 +183,7 @@
|
||||
<h3><a name="StorageVolFirst">General metadata</a></h3>
|
||||
|
||||
<pre>
|
||||
<volume type="file">
|
||||
<volume>
|
||||
<name>sparse.img</name>
|
||||
<key>/var/lib/xen/images/sparse.img</key>
|
||||
<allocation>0</allocation>
|
||||
@ -234,7 +234,7 @@
|
||||
...
|
||||
<target>
|
||||
<path>/var/lib/virt/images/sparse.img</path>
|
||||
<format>qcow2</format>
|
||||
<format type='qcow2'/>
|
||||
<permissions>
|
||||
<owner>0744</owner>
|
||||
<group>0744</group>
|
||||
@ -255,8 +255,8 @@
|
||||
or directory pools it will provide the file format type, eg cow,
|
||||
qcow, vmdk, raw. If omitted when creating a volume, the pool's
|
||||
default format will be used. The actual format is specified via
|
||||
the <code>type</code>. Consult the pool-specific docs for the
|
||||
list of valid values. <span class="since">Since 0.4.1</span></dd>
|
||||
the <code>type</code> attribute. Consult the pool-specific docs for
|
||||
the list of valid values. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>permissions</code></dt>
|
||||
<dd>Provides information about the default permissions to use
|
||||
when creating volumes. This is currently only useful for directory
|
||||
@ -353,7 +353,7 @@
|
||||
<h3><a name="exampleVol">Storage volume</a></h3>
|
||||
|
||||
<pre>
|
||||
<volume type="file">
|
||||
<volume>
|
||||
<name>sparse.img</name>
|
||||
<allocation>0</allocation>
|
||||
<capacity unit="T">1</capacity>
|
||||
|
165
docs/goals.html
Normal file
165
docs/goals.html
Normal file
@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
This file is autogenerated from goals.html.in
|
||||
Do not edit this file. Changes will be lost.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
||||
<title>libvirt: Terminology and goals</title>
|
||||
<meta name="description" content="libvirt, virtualization, virtualization API" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="headerLogo"></div>
|
||||
<div id="headerSearch">
|
||||
<form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><div>
|
||||
<input id="query" name="query" type="text" size="12" value="" />
|
||||
<input id="submit" name="submit" type="submit" value="Search" />
|
||||
</div></form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="menu">
|
||||
<ul class="l0"><li>
|
||||
<div>
|
||||
<a title="Front page of the libvirt website" class="inactive" href="index.html">Home</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Details of new features and bugs fixed in each release" class="inactive" href="news.html">News</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="downloads.html">Downloads</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Information for users, administrators and developers" class="active" href="docs.html">Documentation</a>
|
||||
<ul class="l1"><li>
|
||||
<div>
|
||||
<a title="Information about deploying and using libvirt" class="inactive" href="deployment.html">Deployment</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="active" href="intro.html">Architecture</a>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<span class="active">Goals</span>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Providing isolated networks and NAT based network connectivity" class="inactive" href="archnetwork.html">Network</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Managing storage pools and volumes" class="inactive" href="archstorage.html">Storage</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Enumerating host node devices" class="inactive" href="archnode.html">Node Devices</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Description of the XML formats used in libvirt" class="inactive" href="format.html">XML format</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Hypervisor specific driver information" class="inactive" href="drivers.html">Drivers</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Frequently asked questions" class="inactive" href="FAQ.html">FAQ</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How and where to report bugs and request features" class="inactive" href="bugs.html">Bug reports</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How to contact the developers via email and IRC" class="inactive" href="contact.html">Contact</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Miscellaneous links of interest related to libvirt" class="inactive" href="relatedlinks.html">Related Links</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of all content on the website" class="inactive" href="sitemap.html">Sitemap</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Terminology and goals</h1>
|
||||
<p>To avoid ambiguity about the terms used, here are the definitions
|
||||
for some of the specific concepts used in libvirt documentation:</p>
|
||||
<ul><li>a <strong>node</strong> is a single physical machine</li><li>an <strong>hypervisor</strong> is a layer of software allowing to
|
||||
virtualize a node in a set of virtual machines with possibly different
|
||||
configurations than the node itself</li><li>a <strong>domain</strong> is an instance of an operating system
|
||||
(or subsystem in the case of container virtualization) running on a
|
||||
virtualized machine provided by the hypervisor</li></ul>
|
||||
<p class="image">
|
||||
<img alt="Hypervisor and domains running on a node" src="node.gif" /></p>
|
||||
<p>Now we can define the goal of libvirt: to provide a common generic
|
||||
and stable layer to securely manage domains on a node. The node may be
|
||||
distant and libvirt should provide all APIs needed to provision, create,
|
||||
modify, monitor, control, migrate and stop the domains, within the limits
|
||||
of the support of the hypervisor for those operations. Multiple mode may
|
||||
be accessed with libvirt simultaneously but the APIs are limited to
|
||||
single node operations.</p>
|
||||
<p>This implies the following sub-goals:</p>
|
||||
<ul><li>the API should not be targeted to a single virtualization environment
|
||||
which also means that some very specific capabilities which are not generic
|
||||
enough may not be provided as libvirt APIs</li><li>the API should allow to do efficiently and cleanly all the operations
|
||||
needed to manage domains on a node</li><li>the API will not try to provide high level virtualization policies or
|
||||
multi-nodes management features like load balancing, but the API should be
|
||||
sufficient so they can be implemented on top of libvirt</li><li>stability of the API is a big concern, libvirt should isolate
|
||||
applications from the frequent changes expected at the lower level of the
|
||||
virtualization framework</li><li>the node being managed may be on a different physical machine than
|
||||
the management program using libvirt, to this effect libvirt supports
|
||||
remote access, but should only do so by using secure protocols.</li><li>libvirt will provide APIs to enumerate, monitor and use the resources
|
||||
available on the managed node, including CPUs, memory, storage, networking,
|
||||
and NUMA partitions.</li></ul>
|
||||
<p>So libvirt is intended to be a building block for higher level
|
||||
management tools and for applications focusing on virtualization of a
|
||||
single node (the only exception being domain migration between node
|
||||
capabilities which involves more than one node).</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p id="sponsor">
|
||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
51
docs/goals.html.in
Normal file
51
docs/goals.html.in
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Terminology and goals</h1>
|
||||
<p>To avoid ambiguity about the terms used, here are the definitions
|
||||
for some of the specific concepts used in libvirt documentation:</p>
|
||||
<ul>
|
||||
<li>a <strong>node</strong> is a single physical machine</li>
|
||||
<li>an <strong>hypervisor</strong> is a layer of software allowing to
|
||||
virtualize a node in a set of virtual machines with possibly different
|
||||
configurations than the node itself</li>
|
||||
<li>a <strong>domain</strong> is an instance of an operating system
|
||||
(or subsystem in the case of container virtualization) running on a
|
||||
virtualized machine provided by the hypervisor</li>
|
||||
</ul>
|
||||
<p class="image">
|
||||
<img alt="Hypervisor and domains running on a node" src="node.gif"/>
|
||||
</p>
|
||||
<p>Now we can define the goal of libvirt: to provide a common generic
|
||||
and stable layer to securely manage domains on a node. The node may be
|
||||
distant and libvirt should provide all APIs needed to provision, create,
|
||||
modify, monitor, control, migrate and stop the domains, within the limits
|
||||
of the support of the hypervisor for those operations. Multiple mode may
|
||||
be accessed with libvirt simultaneously but the APIs are limited to
|
||||
single node operations.</p>
|
||||
<p>This implies the following sub-goals:</p>
|
||||
<ul>
|
||||
<li>the API should not be targeted to a single virtualization environment
|
||||
which also means that some very specific capabilities which are not generic
|
||||
enough may not be provided as libvirt APIs</li>
|
||||
<li>the API should allow to do efficiently and cleanly all the operations
|
||||
needed to manage domains on a node</li>
|
||||
<li>the API will not try to provide high level virtualization policies or
|
||||
multi-nodes management features like load balancing, but the API should be
|
||||
sufficient so they can be implemented on top of libvirt</li>
|
||||
<li>stability of the API is a big concern, libvirt should isolate
|
||||
applications from the frequent changes expected at the lower level of the
|
||||
virtualization framework</li>
|
||||
<li>the node being managed may be on a different physical machine than
|
||||
the management program using libvirt, to this effect libvirt supports
|
||||
remote access, but should only do so by using secure protocols.</li>
|
||||
<li>libvirt will provide APIs to enumerate, monitor and use the resources
|
||||
available on the managed node, including CPUs, memory, storage, networking,
|
||||
and NUMA partitions.</li>
|
||||
</ul>
|
||||
<p>So libvirt is intended to be a building block for higher level
|
||||
management tools and for applications focusing on virtualization of a
|
||||
single node (the only exception being domain migration between node
|
||||
capabilities which involves more than one node).</p>
|
||||
</body>
|
||||
</html>
|
489
docs/hacking.html
Normal file
489
docs/hacking.html
Normal file
@ -0,0 +1,489 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
This file is autogenerated from hacking.html.in
|
||||
Do not edit this file. Changes will be lost.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
||||
<title>libvirt: Contributor guidelines</title>
|
||||
<meta name="description" content="libvirt, virtualization, virtualization API" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="headerLogo"></div>
|
||||
<div id="headerSearch">
|
||||
<form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><div>
|
||||
<input id="query" name="query" type="text" size="12" value="" />
|
||||
<input id="submit" name="submit" type="submit" value="Search" />
|
||||
</div></form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="menu">
|
||||
<ul class="l0"><li>
|
||||
<div>
|
||||
<a title="Front page of the libvirt website" class="inactive" href="index.html">Home</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Details of new features and bugs fixed in each release" class="inactive" href="news.html">News</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="downloads.html">Downloads</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Information for users, administrators and developers" class="active" href="docs.html">Documentation</a>
|
||||
<ul class="l1"><li>
|
||||
<div>
|
||||
<a title="Information about deploying and using libvirt" class="inactive" href="deployment.html">Deployment</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="intro.html">Architecture</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Description of the XML formats used in libvirt" class="inactive" href="format.html">XML format</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Hypervisor specific driver information" class="inactive" href="drivers.html">Drivers</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="active" href="internals.html">Internals</a>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<span class="active">Contributor guidelines</span>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Adding new public libvirt APIs" class="inactive" href="api_extension.html">API extensions</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Frequently asked questions" class="inactive" href="FAQ.html">FAQ</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How and where to report bugs and request features" class="inactive" href="bugs.html">Bug reports</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How to contact the developers via email and IRC" class="inactive" href="contact.html">Contact</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Miscellaneous links of interest related to libvirt" class="inactive" href="relatedlinks.html">Related Links</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of all content on the website" class="inactive" href="sitemap.html">Sitemap</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Contributor guidelines</h1>
|
||||
<ul><li>
|
||||
<a href="#patches">General tips for contributing patches</a>
|
||||
</li><li>
|
||||
<a href="#indent">Code indentation</a>
|
||||
</li><li>
|
||||
<a href="#formatting">Code formatting (especially for new code)</a>
|
||||
</li><li>
|
||||
<a href="#">C types</a>
|
||||
</li><li>
|
||||
<a href="#memalloc">Low level memory management</a>
|
||||
</li><li>
|
||||
<a href="#string">String comparisons</a>
|
||||
</li><li>
|
||||
<a href="#strbuf">Variable length string buffer</a>
|
||||
</li><li>
|
||||
<a href="#includes">Include files</a>
|
||||
</li><li>
|
||||
<a href="#printf">Printf-style functions</a>
|
||||
</li><li>
|
||||
<a href="#committers">Libvirt commiters guidelines</a>
|
||||
</li></ul>
|
||||
<h2>
|
||||
<a name="patches" id="patches">General tips for contributing patches</a>
|
||||
</h2>
|
||||
<ol><li>Discuss any large changes on the mailing list first. Post patches
|
||||
early and listen to feedback.</li><li><p>Post patches in unified diff format. A command similar to this
|
||||
should work:</p>
|
||||
<pre>
|
||||
diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
|
||||
</pre>
|
||||
<p>
|
||||
or:
|
||||
</p>
|
||||
<pre>
|
||||
cvs diff -up > libvirt-myfeature.patch
|
||||
</pre></li><li>Split large changes into a series of smaller patches, self-contained
|
||||
if possible, with an explanation of each patch and an explanation of how
|
||||
the sequence of patches fits together.</li><li>Make sure your patches apply against libvirt CVS. Developers
|
||||
only follow CVS and don't care much about released versions.</li><li><p>Run the automated tests on your code before submitting any changes.
|
||||
In particular, configure with compile warnings set to -Werror:</p>
|
||||
<pre>
|
||||
./configure --enable-compile-warnings=error
|
||||
</pre>
|
||||
<p>
|
||||
and run the tests:
|
||||
</p>
|
||||
<pre>
|
||||
make check
|
||||
make syntax-check
|
||||
make -C tests valgrind
|
||||
</pre>
|
||||
<p>
|
||||
The latter test checks for memory leaks.
|
||||
</p>
|
||||
|
||||
</li><li>Update tests and/or documentation, particularly if you are adding
|
||||
a new feature or changing the output of a program.</li></ol>
|
||||
<p>
|
||||
There is more on this subject, including lots of links to background
|
||||
reading on the subject, on
|
||||
<a href="http://et.redhat.com/~rjones/how-to-supply-code-to-open-source-projects/">
|
||||
Richard Jones' guide to working with open source projects</a>
|
||||
</p>
|
||||
<h2>
|
||||
<a name="indent" id="indent">Code indentation</a>
|
||||
</h2>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
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:
|
||||
</p>
|
||||
<pre>
|
||||
;;; 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))))
|
||||
</pre>
|
||||
<h2>
|
||||
<a name="formatting" id="formatting">Code formatting (especially for new code)</a>
|
||||
</h2>
|
||||
<p>
|
||||
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:
|
||||
</p>
|
||||
<pre>
|
||||
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 "$@"
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
Note that sometimes you'll have to postprocess 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.
|
||||
</p>
|
||||
<h2>
|
||||
<a href="types">C types</a>
|
||||
</h2>
|
||||
<p>
|
||||
Use the right type.
|
||||
</p>
|
||||
<h3>Scalars</h3>
|
||||
<ul><li>If you're using "int" or "long", odds are good that there's a better type.</li><li>If a variable is counting something, be sure to declare it with an
|
||||
unsigned type.</li><li>If it's memory-size-related, use size_t (use ssize_t only if required).</li><li>If it's file-size related, use uintmax_t, or maybe off_t.</li><li>If it's file-offset related (i.e., signed), use off_t.</li><li>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).</li><li>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.</li><li>In the unusual event that you require a specific width, use a
|
||||
standard type like int32_t, uint32_t, uint64_t, etc.</li><li>While using "bool" is good for readability, it comes with minor caveats:
|
||||
<ul><li>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.</li><li>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)...".</li></ul></li></ul>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<h3>Pointers</h3>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<h2>
|
||||
<a name="memalloc" id="memalloc">Low level memory management</a>
|
||||
</h2>
|
||||
<p>
|
||||
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 memory.h
|
||||
</p>
|
||||
<ul><li><p>eg to allocate a single object:</p>
|
||||
|
||||
<pre>
|
||||
virDomainPtr domain;
|
||||
|
||||
if (VIR_ALLOC(domain) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
}
|
||||
</pre></li><li><p>eg to allocate an array of objects</p>
|
||||
|
||||
<pre>
|
||||
virDomainPtr domains;
|
||||
int ndomains = 10;
|
||||
|
||||
if (VIR_ALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
}
|
||||
</pre></li><li><p>eg to allocate an array of object pointers</p>
|
||||
|
||||
<pre>
|
||||
virDomainPtr *domains;
|
||||
int ndomains = 10;
|
||||
|
||||
if (VIR_ALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
}
|
||||
</pre></li><li><p>eg to re-allocate the array of domains to be longer</p>
|
||||
|
||||
<pre>
|
||||
ndomains = 20
|
||||
|
||||
if (VIR_REALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
}
|
||||
</pre></li><li><p>eg to free the domain</p>
|
||||
|
||||
<pre>
|
||||
VIR_FREE(domain);
|
||||
</pre></li></ul>
|
||||
<h2>
|
||||
<a name="string" id="string">String comparisons</a>
|
||||
</h2>
|
||||
<p>
|
||||
Do not use the strcmp, strncmp, etc functions directly. Instead use
|
||||
one of the following semantically named macros
|
||||
</p>
|
||||
<ul><li><p>For strict equality:</p>
|
||||
<pre>
|
||||
STREQ(a,b)
|
||||
STRNEQ(a,b)
|
||||
</pre>
|
||||
</li><li><p>For case sensitive equality:</p>
|
||||
<pre>
|
||||
STRCASEEQ(a,b)
|
||||
STRCASENEQ(a,b)
|
||||
</pre>
|
||||
</li><li><p>For strict equality of a substring:</p>
|
||||
|
||||
<pre>
|
||||
STREQLEN(a,b,n)
|
||||
STRNEQLEN(a,b,n)
|
||||
</pre>
|
||||
</li><li><p>For case sensitive equality of a substring:</p>
|
||||
|
||||
<pre>
|
||||
STRCASEEQLEN(a,b,n)
|
||||
STRCASENEQLEN(a,b,n)
|
||||
</pre>
|
||||
</li><li><p>For strict equality of a prefix:</p>
|
||||
|
||||
<pre>
|
||||
STRPREFIX(a,b)
|
||||
</pre>
|
||||
</li></ul>
|
||||
<h2>
|
||||
<a name="strbuf" id="strbuf">Variable length string buffer</a>
|
||||
</h2>
|
||||
<p>
|
||||
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
|
||||
</p>
|
||||
<p>eg typical usage is as follows:</p>
|
||||
<pre>
|
||||
char *
|
||||
somefunction(...) {
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
...
|
||||
|
||||
virBufferAddLit(&buf, "<domain>\n");
|
||||
virBufferVSprint(&buf, " <memory>%d</memory>\n", memory);
|
||||
...
|
||||
virBufferAddLit(&buf, "</domain>\n");
|
||||
|
||||
....
|
||||
|
||||
if (virBufferError(&buf)) {
|
||||
__virRaiseError(...);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return virBufferContentAndReset(&buf);
|
||||
}
|
||||
</pre>
|
||||
<h2>
|
||||
<a name="includes" id="includes">Include files</a>
|
||||
</h2>
|
||||
<p>
|
||||
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:
|
||||
</p>
|
||||
<pre>
|
||||
/*
|
||||
* 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 HAVE_NUMACTL Some system includes aren't supported
|
||||
#include <numa.h> everywhere so need these #if defences.
|
||||
#endif
|
||||
|
||||
#include "internal.h" Include this first, after system includes.
|
||||
|
||||
#include "util.h" Any libvirt internal header files.
|
||||
#include "buf.h"
|
||||
|
||||
static myInternalFunc () The actual code.
|
||||
{
|
||||
...
|
||||
</pre>
|
||||
<p>
|
||||
Of particular note: *DO NOT* include libvirt/libvirt.h or
|
||||
libvirt/virterror.h. It is included by "internal.h" already and there
|
||||
are some special reasons why you cannot include these files
|
||||
explicitly.
|
||||
</p>
|
||||
<h2>
|
||||
<a name="printf" id="printf">Printf-style functions</a>
|
||||
</h2>
|
||||
<p>
|
||||
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:
|
||||
</p>
|
||||
<pre>
|
||||
int virAsprintf(char **strp, const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||
</pre>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<h2>
|
||||
<a name="committers" id="committers">Libvirt commiters guidelines</a>
|
||||
</h2>
|
||||
<p>
|
||||
The AUTHORS files indicates the list of people with commit acces right
|
||||
who can actually merge the patches.
|
||||
</p>
|
||||
<p>
|
||||
The general rule for commiting patches is to make sure it has been reviewed
|
||||
properly in the mailing-list first, usually if a couple of persons 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 not have a very clear idea of how things work, it's better
|
||||
to wait for a more authoritative feedback though. Before commiting please
|
||||
also rebuild locally and run 'make check syntax-check' and make sure they
|
||||
don't raise error. 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
|
||||
</p>
|
||||
<p>
|
||||
Exceptions to that 'review and approval on the list first' is fixing failures
|
||||
to build:
|
||||
</p>
|
||||
<ul><li>if a recently commited 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</li><li>if make check or make syntax-chek 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 commiting
|
||||
anything</li><li>
|
||||
fixes for documentation and code comments can be managed
|
||||
in the same way, but still make sure they get reviewed if non-trivial.
|
||||
</li></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p id="sponsor">
|
||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
432
docs/hacking.html.in
Normal file
432
docs/hacking.html.in
Normal file
@ -0,0 +1,432 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>Contributor guidelines</h1>
|
||||
|
||||
<ul id="toc"></ul>
|
||||
|
||||
<h2><a name="patches">General tips for contributing patches</a></h2>
|
||||
|
||||
<ol>
|
||||
<li>Discuss any large changes on the mailing list first. Post patches
|
||||
early and listen to feedback.</li>
|
||||
|
||||
<li><p>Post patches in unified diff format. A command similar to this
|
||||
should work:</p>
|
||||
<pre>
|
||||
diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
|
||||
</pre>
|
||||
<p>
|
||||
or:
|
||||
</p>
|
||||
<pre>
|
||||
cvs diff -up > libvirt-myfeature.patch
|
||||
</pre></li>
|
||||
<li>Split large changes into a series of smaller patches, self-contained
|
||||
if possible, with an explanation of each patch and an explanation of how
|
||||
the sequence of patches fits together.</li>
|
||||
<li>Make sure your patches apply against libvirt CVS. Developers
|
||||
only follow CVS and don't care much about released versions.</li>
|
||||
<li><p>Run the automated tests on your code before submitting any changes.
|
||||
In particular, configure with compile warnings set to -Werror:</p>
|
||||
<pre>
|
||||
./configure --enable-compile-warnings=error
|
||||
</pre>
|
||||
<p>
|
||||
and run the tests:
|
||||
</p>
|
||||
<pre>
|
||||
make check
|
||||
make syntax-check
|
||||
make -C tests valgrind
|
||||
</pre>
|
||||
<p>
|
||||
The latter test checks for memory leaks.
|
||||
</p>
|
||||
|
||||
<li>Update tests and/or documentation, particularly if you are adding
|
||||
a new feature or changing the output of a program.</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
There is more on this subject, including lots of links to background
|
||||
reading on the subject, on
|
||||
<a href="http://et.redhat.com/~rjones/how-to-supply-code-to-open-source-projects/">
|
||||
Richard Jones' guide to working with open source projects</a>
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="indent">Code indentation</a></h2>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
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:
|
||||
</p>
|
||||
<pre>
|
||||
;;; 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))))
|
||||
</pre>
|
||||
|
||||
<h2><a name="formatting">Code formatting (especially for new code)</a></h2>
|
||||
|
||||
<p>
|
||||
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:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
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 "$@"
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Note that sometimes you'll have to postprocess 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.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a href="types">C types</a></h2>
|
||||
|
||||
<p>
|
||||
Use the right type.
|
||||
</p>
|
||||
|
||||
<h3>Scalars</h3>
|
||||
|
||||
<ul>
|
||||
<li>If you're using "int" or "long", odds are good that there's a better type.</li>
|
||||
<li>If a variable is counting something, be sure to declare it with an
|
||||
unsigned type.</li>
|
||||
<li>If it's memory-size-related, use size_t (use ssize_t only if required).</li>
|
||||
<li>If it's file-size related, use uintmax_t, or maybe off_t.</li>
|
||||
<li>If it's file-offset related (i.e., signed), use off_t.</li>
|
||||
<li>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).</li>
|
||||
<li>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.</li>
|
||||
<li>In the unusual event that you require a specific width, use a
|
||||
standard type like int32_t, uint32_t, uint64_t, etc.</li>
|
||||
<li>While using "bool" is good for readability, it comes with minor caveats:
|
||||
<ul>
|
||||
<li>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.</li>
|
||||
<li>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)...".</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<h3>Pointers</h3>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<h2><a name="memalloc">Low level memory management</a></h2>
|
||||
|
||||
<p>
|
||||
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 memory.h
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><p>eg to allocate a single object:</p>
|
||||
|
||||
<pre>
|
||||
virDomainPtr domain;
|
||||
|
||||
if (VIR_ALLOC(domain) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
}
|
||||
</pre></li>
|
||||
|
||||
<li><p>eg to allocate an array of objects</p>
|
||||
|
||||
<pre>
|
||||
virDomainPtr domains;
|
||||
int ndomains = 10;
|
||||
|
||||
if (VIR_ALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
}
|
||||
</pre></li>
|
||||
|
||||
<li><p>eg to allocate an array of object pointers</p>
|
||||
|
||||
<pre>
|
||||
virDomainPtr *domains;
|
||||
int ndomains = 10;
|
||||
|
||||
if (VIR_ALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
}
|
||||
</pre></li>
|
||||
|
||||
<li><p>eg to re-allocate the array of domains to be longer</p>
|
||||
|
||||
<pre>
|
||||
ndomains = 20
|
||||
|
||||
if (VIR_REALLOC_N(domains, ndomains) < 0) {
|
||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
||||
return NULL;
|
||||
}
|
||||
</pre></li>
|
||||
|
||||
<li><p>eg to free the domain</p>
|
||||
|
||||
<pre>
|
||||
VIR_FREE(domain);
|
||||
</pre></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h2><a name="string">String comparisons</a></h2>
|
||||
|
||||
<p>
|
||||
Do not use the strcmp, strncmp, etc functions directly. Instead use
|
||||
one of the following semantically named macros
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><p>For strict equality:</p>
|
||||
<pre>
|
||||
STREQ(a,b)
|
||||
STRNEQ(a,b)
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li><p>For case sensitive equality:</p>
|
||||
<pre>
|
||||
STRCASEEQ(a,b)
|
||||
STRCASENEQ(a,b)
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li><p>For strict equality of a substring:</p>
|
||||
|
||||
<pre>
|
||||
STREQLEN(a,b,n)
|
||||
STRNEQLEN(a,b,n)
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li><p>For case sensitive equality of a substring:</p>
|
||||
|
||||
<pre>
|
||||
STRCASEEQLEN(a,b,n)
|
||||
STRCASENEQLEN(a,b,n)
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li><p>For strict equality of a prefix:</p>
|
||||
|
||||
<pre>
|
||||
STRPREFIX(a,b)
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a name="strbuf">Variable length string buffer</a></h2>
|
||||
|
||||
<p>
|
||||
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
|
||||
</p>
|
||||
|
||||
<p>eg typical usage is as follows:</p>
|
||||
|
||||
<pre>
|
||||
char *
|
||||
somefunction(...) {
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
...
|
||||
|
||||
virBufferAddLit(&buf, "<domain>\n");
|
||||
virBufferVSprint(&buf, " <memory>%d</memory>\n", memory);
|
||||
...
|
||||
virBufferAddLit(&buf, "</domain>\n");
|
||||
|
||||
....
|
||||
|
||||
if (virBufferError(&buf)) {
|
||||
__virRaiseError(...);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return virBufferContentAndReset(&buf);
|
||||
}
|
||||
</pre>
|
||||
|
||||
|
||||
<h2><a name="includes">Include files</a></h2>
|
||||
|
||||
<p>
|
||||
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:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
/*
|
||||
* 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 HAVE_NUMACTL Some system includes aren't supported
|
||||
#include <numa.h> everywhere so need these #if defences.
|
||||
#endif
|
||||
|
||||
#include "internal.h" Include this first, after system includes.
|
||||
|
||||
#include "util.h" Any libvirt internal header files.
|
||||
#include "buf.h"
|
||||
|
||||
static myInternalFunc () The actual code.
|
||||
{
|
||||
...
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Of particular note: *DO NOT* include libvirt/libvirt.h or
|
||||
libvirt/virterror.h. It is included by "internal.h" already and there
|
||||
are some special reasons why you cannot include these files
|
||||
explicitly.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="printf">Printf-style functions</a></h2>
|
||||
|
||||
<p>
|
||||
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:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
int virAsprintf(char **strp, const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h2><a name="committers">Libvirt commiters guidelines</a></h2>
|
||||
|
||||
<p>
|
||||
The AUTHORS files indicates the list of people with commit acces right
|
||||
who can actually merge the patches.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The general rule for commiting patches is to make sure it has been reviewed
|
||||
properly in the mailing-list first, usually if a couple of persons 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 not have a very clear idea of how things work, it's better
|
||||
to wait for a more authoritative feedback though. Before commiting please
|
||||
also rebuild locally and run 'make check syntax-check' and make sure they
|
||||
don't raise error. 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
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Exceptions to that 'review and approval on the list first' is fixing failures
|
||||
to build:
|
||||
</p>
|
||||
<ul>
|
||||
<li>if a recently commited 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</li>
|
||||
<li>if make check or make syntax-chek 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 commiting
|
||||
anything</li>
|
||||
<li>
|
||||
fixes for documentation and code comments can be managed
|
||||
in the same way, but still make sure they get reviewed if non-trivial.
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
@ -3,5 +3,5 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><!--
|
||||
This file is autogenerated from html/index.html.in
|
||||
Do not edit this file. Changes will be lost.
|
||||
--><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../main.css" /><link rel="SHORTCUT ICON" href="../32favicon.png" /><title>libvirt: Reference Manual for libvirt</title><meta name="description" content="libvirt, virtualization, virtualization API" /></head><body><div id="header"><div id="headerLogo"></div><div id="headerSearch"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><div><input id="query" name="query" type="text" size="12" value="" /><input id="submit" name="submit" type="submit" value="Search" /></div></form></div></div><div id="body"><div id="menu"><ul class="l0"><li><div><a title="Front page of the libvirt website" class="inactive" href="../index.html">Home</a></div></li><li><div><a title="Details of new features and bugs fixed in each release" class="inactive" href="../news.html">News</a></div></li><li><div><a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="../downloads.html">Downloads</a></div></li><li><div><a title="Information for users, administrators and developers" class="active" href="../docs.html">Documentation</a><ul class="l1"><li><div><a title="Information about deploying and using libvirt" class="inactive" href="../deployment.html">Deployment</a></div></li><li><div><a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="../intro.html">Architecture</a></div></li><li><div><a title="Description of the XML formats used in libvirt" class="inactive" href="../format.html">XML format</a></div></li><li><div><a title="Hypervisor specific driver information" class="inactive" href="../drivers.html">Drivers</a></div></li><li><div><span class="active">API reference</span><ul class="l2"><li><div><a title="core interfaces for the libvirt library" class="inactive" href="../html/libvirt-libvirt.html">libvirt</a></div></li><li><div><a title="error handling interfaces for the libvirt library" class="inactive" href="../html/libvirt-virterror.html">virterror</a></div></li><li><div><a title="matrix of API support per hypervisor per release" class="inactive" href="../hvsupport.html">Driver support</a></div></li></ul></div></li><li><div><a title="Bindings of the libvirt API for other languages" class="inactive" href="../bindings.html">Language bindings</a></div></li></ul></div></li><li><div><a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a></div></li><li><div><a title="Frequently asked questions" class="inactive" href="../FAQ.html">FAQ</a></div></li><li><div><a title="How and where to report bugs and request features" class="inactive" href="../bugs.html">Bug reports</a></div></li><li><div><a title="How to contact the developers via email and IRC" class="inactive" href="../contact.html">Contact</a></div></li><li><div><a title="Miscellaneous links of interest related to libvirt" class="inactive" href="../relatedlinks.html">Related Links</a></div></li><li><div><a title="Overview of all content on the website" class="inactive" href="../sitemap.html">Sitemap</a></div></li></ul></div><div id="content"><h1>Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li><li><a href="libvirt-virterror.html">virterror</a>: error handling interfaces for the libvirt library</li></ul></div></div><div id="footer"><p id="sponsor">
|
||||
--><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../main.css" /><link rel="SHORTCUT ICON" href="../32favicon.png" /><title>libvirt: Reference Manual for libvirt</title><meta name="description" content="libvirt, virtualization, virtualization API" /></head><body><div id="header"><div id="headerLogo"></div><div id="headerSearch"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><div><input id="query" name="query" type="text" size="12" value="" /><input id="submit" name="submit" type="submit" value="Search" /></div></form></div></div><div id="body"><div id="menu"><ul class="l0"><li><div><a title="Front page of the libvirt website" class="inactive" href="../index.html">Home</a></div></li><li><div><a title="Details of new features and bugs fixed in each release" class="inactive" href="../news.html">News</a></div></li><li><div><a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="../downloads.html">Downloads</a></div></li><li><div><a title="Information for users, administrators and developers" class="active" href="../docs.html">Documentation</a><ul class="l1"><li><div><a title="Information about deploying and using libvirt" class="inactive" href="../deployment.html">Deployment</a></div></li><li><div><a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="../intro.html">Architecture</a></div></li><li><div><a title="Description of the XML formats used in libvirt" class="inactive" href="../format.html">XML format</a></div></li><li><div><a title="Hypervisor specific driver information" class="inactive" href="../drivers.html">Drivers</a></div></li><li><div><span class="active">API reference</span><ul class="l2"><li><div><a title="core interfaces for the libvirt library" class="inactive" href="../html/libvirt-libvirt.html">libvirt</a></div></li><li><div><a title="error handling interfaces for the libvirt library" class="inactive" href="../html/libvirt-virterror.html">virterror</a></div></li><li><div><a title="matrix of API support per hypervisor per release" class="inactive" href="../hvsupport.html">Driver support</a></div></li></ul></div></li><li><div><a title="Bindings of the libvirt API for other languages" class="inactive" href="../bindings.html">Language bindings</a></div></li><li><div><a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="../internals.html">Internals</a></div></li></ul></div></li><li><div><a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a></div></li><li><div><a title="Frequently asked questions" class="inactive" href="../FAQ.html">FAQ</a></div></li><li><div><a title="How and where to report bugs and request features" class="inactive" href="../bugs.html">Bug reports</a></div></li><li><div><a title="How to contact the developers via email and IRC" class="inactive" href="../contact.html">Contact</a></div></li><li><div><a title="Miscellaneous links of interest related to libvirt" class="inactive" href="../relatedlinks.html">Related Links</a></div></li><li><div><a title="Overview of all content on the website" class="inactive" href="../sitemap.html">Sitemap</a></div></li></ul></div><div id="content"><h1>Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li><li><a href="libvirt-virterror.html">virterror</a>: error handling interfaces for the libvirt library</li></ul></div></div><div id="footer"><p id="sponsor">
|
||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="../et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p></div></body></html>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><!--
|
||||
This file is autogenerated from html/libvirt-libvirt.html.in
|
||||
Do not edit this file. Changes will be lost.
|
||||
--><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../main.css" /><link rel="SHORTCUT ICON" href="../32favicon.png" /><title>libvirt: Module libvirt from libvirt</title><meta name="description" content="libvirt, virtualization, virtualization API" /></head><body><div id="header"><div id="headerLogo"></div><div id="headerSearch"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><div><input id="query" name="query" type="text" size="12" value="" /><input id="submit" name="submit" type="submit" value="Search" /></div></form></div></div><div id="body"><div id="menu"><ul class="l0"><li><div><a title="Front page of the libvirt website" class="inactive" href="../index.html">Home</a></div></li><li><div><a title="Details of new features and bugs fixed in each release" class="inactive" href="../news.html">News</a></div></li><li><div><a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="../downloads.html">Downloads</a></div></li><li><div><a title="Information for users, administrators and developers" class="active" href="../docs.html">Documentation</a><ul class="l1"><li><div><a title="Information about deploying and using libvirt" class="inactive" href="../deployment.html">Deployment</a></div></li><li><div><a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="../intro.html">Architecture</a></div></li><li><div><a title="Description of the XML formats used in libvirt" class="inactive" href="../format.html">XML format</a></div></li><li><div><a title="Hypervisor specific driver information" class="inactive" href="../drivers.html">Drivers</a></div></li><li><div><a title="Reference manual for the C public API" class="active" href="../html/index.html">API reference</a><ul class="l2"><li><div><span class="active">libvirt</span></div></li><li><div><a title="error handling interfaces for the libvirt library" class="inactive" href="../html/libvirt-virterror.html">virterror</a></div></li><li><div><a title="matrix of API support per hypervisor per release" class="inactive" href="../hvsupport.html">Driver support</a></div></li></ul></div></li><li><div><a title="Bindings of the libvirt API for other languages" class="inactive" href="../bindings.html">Language bindings</a></div></li></ul></div></li><li><div><a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a></div></li><li><div><a title="Frequently asked questions" class="inactive" href="../FAQ.html">FAQ</a></div></li><li><div><a title="How and where to report bugs and request features" class="inactive" href="../bugs.html">Bug reports</a></div></li><li><div><a title="How to contact the developers via email and IRC" class="inactive" href="../contact.html">Contact</a></div></li><li><div><a title="Miscellaneous links of interest related to libvirt" class="inactive" href="../relatedlinks.html">Related Links</a></div></li><li><div><a title="Overview of all content on the website" class="inactive" href="../sitemap.html">Sitemap</a></div></li></ul></div><div id="content"><h1>Module libvirt from libvirt</h1><p>Provides the interfaces of the libvirt library to handle virtualized domains </p><h2>Table of Contents</h2><h3><a href="#macros">Macros</a></h3><pre>#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a>
|
||||
--><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../main.css" /><link rel="SHORTCUT ICON" href="../32favicon.png" /><title>libvirt: Module libvirt from libvirt</title><meta name="description" content="libvirt, virtualization, virtualization API" /></head><body><div id="header"><div id="headerLogo"></div><div id="headerSearch"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><div><input id="query" name="query" type="text" size="12" value="" /><input id="submit" name="submit" type="submit" value="Search" /></div></form></div></div><div id="body"><div id="menu"><ul class="l0"><li><div><a title="Front page of the libvirt website" class="inactive" href="../index.html">Home</a></div></li><li><div><a title="Details of new features and bugs fixed in each release" class="inactive" href="../news.html">News</a></div></li><li><div><a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="../downloads.html">Downloads</a></div></li><li><div><a title="Information for users, administrators and developers" class="active" href="../docs.html">Documentation</a><ul class="l1"><li><div><a title="Information about deploying and using libvirt" class="inactive" href="../deployment.html">Deployment</a></div></li><li><div><a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="../intro.html">Architecture</a></div></li><li><div><a title="Description of the XML formats used in libvirt" class="inactive" href="../format.html">XML format</a></div></li><li><div><a title="Hypervisor specific driver information" class="inactive" href="../drivers.html">Drivers</a></div></li><li><div><a title="Reference manual for the C public API" class="active" href="../html/index.html">API reference</a><ul class="l2"><li><div><span class="active">libvirt</span></div></li><li><div><a title="error handling interfaces for the libvirt library" class="inactive" href="../html/libvirt-virterror.html">virterror</a></div></li><li><div><a title="matrix of API support per hypervisor per release" class="inactive" href="../hvsupport.html">Driver support</a></div></li></ul></div></li><li><div><a title="Bindings of the libvirt API for other languages" class="inactive" href="../bindings.html">Language bindings</a></div></li><li><div><a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="../internals.html">Internals</a></div></li></ul></div></li><li><div><a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a></div></li><li><div><a title="Frequently asked questions" class="inactive" href="../FAQ.html">FAQ</a></div></li><li><div><a title="How and where to report bugs and request features" class="inactive" href="../bugs.html">Bug reports</a></div></li><li><div><a title="How to contact the developers via email and IRC" class="inactive" href="../contact.html">Contact</a></div></li><li><div><a title="Miscellaneous links of interest related to libvirt" class="inactive" href="../relatedlinks.html">Related Links</a></div></li><li><div><a title="Overview of all content on the website" class="inactive" href="../sitemap.html">Sitemap</a></div></li></ul></div><div id="content"><h1>Module libvirt from libvirt</h1><p>Provides the interfaces of the libvirt library to handle virtualized domains </p><h2>Table of Contents</h2><h3><a href="#macros">Macros</a></h3><pre>#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a>
|
||||
#define <a href="#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a>
|
||||
#define <a href="#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a>
|
||||
#define <a href="#VIR_CPU_USABLE">VIR_CPU_USABLE</a>
|
||||
@ -46,6 +46,8 @@ typedef <a href="libvirt-libvirt.html#virDomain">virDomain</a> * <a name="virDom
|
||||
typedef enum <a href="#virDomainState">virDomainState</a>
|
||||
typedef enum <a href="#virDomainXMLFlags">virDomainXMLFlags</a>
|
||||
typedef enum <a href="#virEventHandleType">virEventHandleType</a>
|
||||
typedef struct _virInterface <a href="#virInterface">virInterface</a>
|
||||
typedef <a href="libvirt-libvirt.html#virInterface">virInterface</a> * <a name="virInterfacePtr" id="virInterfacePtr">virInterfacePtr</a>
|
||||
typedef struct _virNetwork <a href="#virNetwork">virNetwork</a>
|
||||
typedef <a href="libvirt-libvirt.html#virNetwork">virNetwork</a> * <a name="virNetworkPtr" id="virNetworkPtr">virNetworkPtr</a>
|
||||
typedef struct _virNodeDevice <a href="#virNodeDevice">virNodeDevice</a>
|
||||
@ -84,6 +86,8 @@ int <a href="#virConnectDomainEventCallback">virConnectDomainEventCallback</a> (
|
||||
|
||||
int <a href="#virConnectDomainEventDeregister">virConnectDomainEventDeregister</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb)
|
||||
int <a href="#virConnectDomainEventRegister">virConnectDomainEventRegister</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb, <br /> void * opaque, <br /> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> freecb)
|
||||
char * <a href="#virConnectDomainXMLFromNative">virConnectDomainXMLFromNative</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * nativeFormat, <br /> const char * nativeConfig, <br /> unsigned int flags)
|
||||
char * <a href="#virConnectDomainXMLToNative">virConnectDomainXMLToNative</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * nativeFormat, <br /> const char * domainXml, <br /> unsigned int flags)
|
||||
char * <a href="#virConnectFindStoragePoolSources">virConnectFindStoragePoolSources</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * type, <br /> const char * srcSpec, <br /> unsigned int flags)
|
||||
char * <a href="#virConnectGetCapabilities">virConnectGetCapabilities</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
||||
char * <a href="#virConnectGetHostname">virConnectGetHostname</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
||||
@ -95,12 +99,14 @@ int <a href="#virConnectListDefinedDomains">virConnectListDefinedDomains</a> (<a
|
||||
int <a href="#virConnectListDefinedNetworks">virConnectListDefinedNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
||||
int <a href="#virConnectListDefinedStoragePools">virConnectListDefinedStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
||||
int <a href="#virConnectListDomains">virConnectListDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)
|
||||
int <a href="#virConnectListInterfaces">virConnectListInterfaces</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
||||
int <a href="#virConnectListNetworks">virConnectListNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
||||
int <a href="#virConnectListStoragePools">virConnectListStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
||||
int <a href="#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
||||
int <a href="#virConnectNumOfDefinedNetworks">virConnectNumOfDefinedNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
||||
int <a href="#virConnectNumOfDefinedStoragePools">virConnectNumOfDefinedStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
||||
int <a href="#virConnectNumOfDomains">virConnectNumOfDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
||||
int <a href="#virConnectNumOfInterfaces">virConnectNumOfInterfaces</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
||||
int <a href="#virConnectNumOfNetworks">virConnectNumOfNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
||||
int <a href="#virConnectNumOfStoragePools">virConnectNumOfStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpen">virConnectOpen</a> (const char * name)
|
||||
@ -184,6 +190,18 @@ void <a href="#virFreeCallback">virFreeCallback</a> (void * opaque)
|
||||
|
||||
int <a href="#virGetVersion">virGetVersion</a> (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)
|
||||
int <a href="#virInitialize">virInitialize</a> (void)
|
||||
int <a href="#virInterfaceCreate">virInterfaceCreate</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)
|
||||
<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> <a href="#virInterfaceDefineXML">virInterfaceDefineXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml, <br /> unsigned int flags)
|
||||
int <a href="#virInterfaceDestroy">virInterfaceDestroy</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)
|
||||
int <a href="#virInterfaceFree">virInterfaceFree</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virInterfaceGetConnect">virInterfaceGetConnect</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
||||
const char * <a href="#virInterfaceGetMACString">virInterfaceGetMACString</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
||||
const char * <a href="#virInterfaceGetName">virInterfaceGetName</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
||||
char * <a href="#virInterfaceGetXMLDesc">virInterfaceGetXMLDesc</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)
|
||||
<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> <a href="#virInterfaceLookupByMACString">virInterfaceLookupByMACString</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * macstr)
|
||||
<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> <a href="#virInterfaceLookupByName">virInterfaceLookupByName</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)
|
||||
int <a href="#virInterfaceRef">virInterfaceRef</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
||||
int <a href="#virInterfaceUndefine">virInterfaceUndefine</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
||||
int <a href="#virNetworkCreate">virNetworkCreate</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)
|
||||
<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> <a href="#virNetworkCreateXML">virNetworkCreateXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc)
|
||||
<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> <a href="#virNetworkDefineXML">virNetworkDefineXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml)
|
||||
@ -202,6 +220,8 @@ char * <a href="#virNetworkGetXMLDesc">virNetworkGetXMLDesc</a> (<a href="libvi
|
||||
int <a href="#virNetworkRef">virNetworkRef</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)
|
||||
int <a href="#virNetworkSetAutostart">virNetworkSetAutostart</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int autostart)
|
||||
int <a href="#virNetworkUndefine">virNetworkUndefine</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)
|
||||
<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> <a href="#virNodeDeviceCreateXML">virNodeDeviceCreateXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)
|
||||
int <a href="#virNodeDeviceDestroy">virNodeDeviceDestroy</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
||||
int <a href="#virNodeDeviceDettach">virNodeDeviceDettach</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
||||
int <a href="#virNodeDeviceFree">virNodeDeviceFree</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
||||
const char * <a href="#virNodeDeviceGetName">virNodeDeviceGetName</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
||||
@ -244,6 +264,7 @@ int <a href="#virStoragePoolRefresh">virStoragePoolRefresh</a> (<a href="libvir
|
||||
int <a href="#virStoragePoolSetAutostart">virStoragePoolSetAutostart</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> int autostart)
|
||||
int <a href="#virStoragePoolUndefine">virStoragePoolUndefine</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)
|
||||
<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolCreateXML">virStorageVolCreateXML</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> unsigned int flags)
|
||||
<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolCreateXMLFrom">virStorageVolCreateXMLFrom</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> <a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> clonevol, <br /> unsigned int flags)
|
||||
int <a href="#virStorageVolDelete">virStorageVolDelete</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)
|
||||
int <a href="#virStorageVolFree">virStorageVolFree</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virStorageVolGetConnect">virStorageVolGetConnect</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
||||
@ -307,6 +328,9 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><table><tr><td><a name="VIR_DOMAIN_XML_SECURE" id="VIR_DOMAIN_XML_SECURE">VIR_DOMAIN_XML_SECURE</a></td><td> = </td><td>1</td><td> : dump security sensitive information too</td></tr><tr><td><a name="VIR_DOMAIN_XML_INACTIVE" id="VIR_DOMAIN_XML_INACTIVE">VIR_DOMAIN_XML_INACTIVE</a></td><td> = </td><td>2</td><td> : dump inactive domain information</td></tr></table><pre>}
|
||||
</pre></div><h3><a name="virEventHandleType" id="virEventHandleType"><code>virEventHandleType</code></a></h3><div class="api"><pre>enum virEventHandleType {
|
||||
</pre><table><tr><td><a name="VIR_EVENT_HANDLE_READABLE" id="VIR_EVENT_HANDLE_READABLE">VIR_EVENT_HANDLE_READABLE</a></td><td> = </td><td>1</td></tr><tr><td><a name="VIR_EVENT_HANDLE_WRITABLE" id="VIR_EVENT_HANDLE_WRITABLE">VIR_EVENT_HANDLE_WRITABLE</a></td><td> = </td><td>2</td></tr><tr><td><a name="VIR_EVENT_HANDLE_ERROR" id="VIR_EVENT_HANDLE_ERROR">VIR_EVENT_HANDLE_ERROR</a></td><td> = </td><td>4</td></tr><tr><td><a name="VIR_EVENT_HANDLE_HANGUP" id="VIR_EVENT_HANDLE_HANGUP">VIR_EVENT_HANDLE_HANGUP</a></td><td> = </td><td>8</td></tr></table><pre>}
|
||||
</pre></div><h3><a name="virInterface" id="virInterface"><code>virInterface</code></a></h3><div class="api"><pre>struct virInterface{
|
||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
||||
}
|
||||
</pre></div><h3><a name="virNetwork" id="virNetwork"><code>virNetwork</code></a></h3><div class="api"><pre>struct virNetwork{
|
||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
||||
}
|
||||
@ -359,7 +383,9 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virConnectDomainEventCallback" id="virConnectDomainEventCallback"><code>virConnectDomainEventCallback</code></a></h3><pre class="programlisting">typedef int (*virConnectDomainEventCallback) (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> int event, <br /> int detail, <br /> void * opaque)
|
||||
</pre><p>A callback function to be registered, and called when a domain event occurs</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td><a href="libvirt-libvirt.html#virConnect">virConnect</a> connection</td></tr><tr><td><span class="term"><i><tt>dom</tt></i>:</span></td><td>The domain on which the event occured</td></tr><tr><td><span class="term"><i><tt>event</tt></i>:</span></td><td>The specfic <a href="libvirt-libvirt.html#virDomainEventType">virDomainEventType</a> which occured</td></tr><tr><td><span class="term"><i><tt>detail</tt></i>:</span></td><td>event specific detail information</td></tr><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td>opaque user data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><br /><h3><a name="virConnectDomainEventDeregister" id="virConnectDomainEventDeregister"><code>virConnectDomainEventDeregister</code></a></h3><pre class="programlisting">int virConnectDomainEventDeregister (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb)<br />
|
||||
</pre><p>Removes a Domain Event Callback. De-registering for a domain callback will disable delivery of this event type</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the connection</td></tr><tr><td><span class="term"><i><tt>cb</tt></i>:</span></td><td>callback to the function handling domain events</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on failure</td></tr></tbody></table></div><h3><a name="virConnectDomainEventRegister" id="virConnectDomainEventRegister"><code>virConnectDomainEventRegister</code></a></h3><pre class="programlisting">int virConnectDomainEventRegister (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb, <br /> void * opaque, <br /> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> freecb)<br />
|
||||
</pre><p>Adds a Domain Event Callback. Registering for a domain callback will enable delivery of the events The <a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> object handle passed into the callback upon delivery of an event is only valid for the duration of execution of the callback. If the callback wishes to keep the domain object after the callback</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the connection</td></tr><tr><td><span class="term"><i><tt>cb</tt></i>:</span></td><td>callback to the function handling domain events</td></tr><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td>opaque data to pass on to the callback</td></tr><tr><td><span class="term"><i><tt>freecb</tt></i>:</span></td><td>optional function to deallocate opaque when not used anymore</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>it shall take a reference to it, by calling virDomainRef. The reference can be released once the object is no longer required by calling virDomainFree. Returns 0 on success, -1 on failure</td></tr></tbody></table></div><h3><a name="virConnectFindStoragePoolSources" id="virConnectFindStoragePoolSources"><code>virConnectFindStoragePoolSources</code></a></h3><pre class="programlisting">char * virConnectFindStoragePoolSources (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * type, <br /> const char * srcSpec, <br /> unsigned int flags)<br />
|
||||
</pre><p>Adds a Domain Event Callback. Registering for a domain callback will enable delivery of the events The <a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> object handle passed into the callback upon delivery of an event is only valid for the duration of execution of the callback. If the callback wishes to keep the domain object after the callback</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the connection</td></tr><tr><td><span class="term"><i><tt>cb</tt></i>:</span></td><td>callback to the function handling domain events</td></tr><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td>opaque data to pass on to the callback</td></tr><tr><td><span class="term"><i><tt>freecb</tt></i>:</span></td><td>optional function to deallocate opaque when not used anymore</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>it shall take a reference to it, by calling virDomainRef. The reference can be released once the object is no longer required by calling virDomainFree. Returns 0 on success, -1 on failure</td></tr></tbody></table></div><h3><a name="virConnectDomainXMLFromNative" id="virConnectDomainXMLFromNative"><code>virConnectDomainXMLFromNative</code></a></h3><pre class="programlisting">char * virConnectDomainXMLFromNative (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * nativeFormat, <br /> const char * nativeConfig, <br /> unsigned int flags)<br />
|
||||
</pre><p>Reads native configuration data describing a domain, and generates libvirt domain XML. The format of the native data is hypervisor dependant.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>a connection object</td></tr><tr><td><span class="term"><i><tt>nativeFormat</tt></i>:</span></td><td>configuration format importing from</td></tr><tr><td><span class="term"><i><tt>nativeConfig</tt></i>:</span></td><td>the configuration data to import</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>currently unused, pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div><h3><a name="virConnectDomainXMLToNative" id="virConnectDomainXMLToNative"><code>virConnectDomainXMLToNative</code></a></h3><pre class="programlisting">char * virConnectDomainXMLToNative (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * nativeFormat, <br /> const char * domainXml, <br /> unsigned int flags)<br />
|
||||
</pre><p>Reads a domain XML configuration document, and generates generates a native configuration file describing the domain. The format of the native data is hypervisor dependant.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>a connection object</td></tr><tr><td><span class="term"><i><tt>nativeFormat</tt></i>:</span></td><td>configuration format exporting to</td></tr><tr><td><span class="term"><i><tt>domainXml</tt></i>:</span></td><td>the domain configuration to export</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>currently unused, pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded native config datafile, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div><h3><a name="virConnectFindStoragePoolSources" id="virConnectFindStoragePoolSources"><code>virConnectFindStoragePoolSources</code></a></h3><pre class="programlisting">char * virConnectFindStoragePoolSources (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * type, <br /> const char * srcSpec, <br /> unsigned int flags)<br />
|
||||
</pre><p>Talks to a storage backend and attempts to auto-discover the set of available storage pool sources. e.g. For iSCSI this would be a set of iSCSI targets. For NFS this would be a list of exported paths. The srcSpec (optional for some storage pool types, e.g. local ones) is an instance of the storage pool's source element specifying where to look for the pools. srcSpec is not required for some types (e.g., those querying local storage resources only)</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>type of storage pool sources to discover</td></tr><tr><td><span class="term"><i><tt>srcSpec</tt></i>:</span></td><td>XML document specifying discovery source</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for discovery (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an xml document consisting of a SourceList element containing a source document appropriate to the given pool type for each discovered source.</td></tr></tbody></table></div><h3><a name="virConnectGetCapabilities" id="virConnectGetCapabilities"><code>virConnectGetCapabilities</code></a></h3><pre class="programlisting">char * virConnectGetCapabilities (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides capabilities of the hypervisor / driver.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, or an XML string defining the capabilities. The client must free the returned string after use.</td></tr></tbody></table></div><h3><a name="virConnectGetHostname" id="virConnectGetHostname"><code>virConnectGetHostname</code></a></h3><pre class="programlisting">char * virConnectGetHostname (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>This returns the system hostname on which the hypervisor is running (the result of the gethostname(2) system call). If we are connected to a remote system, then this returns the hostname of the remote system.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to a hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the hostname which must be freed by the caller, or NULL if there was an error.</td></tr></tbody></table></div><h3><a name="virConnectGetMaxVcpus" id="virConnectGetMaxVcpus"><code>virConnectGetMaxVcpus</code></a></h3><pre class="programlisting">int virConnectGetMaxVcpus (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * type)<br />
|
||||
@ -370,19 +396,21 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>list the defined but inactive domains, stores the pointers to the names in @names</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>pointer to an array to store the names</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of names provided in the array or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListDefinedNetworks" id="virConnectListDefinedNetworks"><code>virConnectListDefinedNetworks</code></a></h3><pre class="programlisting">int virConnectListDefinedNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
|
||||
</pre><p>list the inactive networks, stores the pointers to the names in @names</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>pointer to an array to store the names</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of names provided in the array or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListDefinedStoragePools" id="virConnectListDefinedStoragePools"><code>virConnectListDefinedStoragePools</code></a></h3><pre class="programlisting">int virConnectListDefinedStoragePools (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
|
||||
</pre><p>Provides the list of names of inactive storage pools upto maxnames. If there are more than maxnames, the remaining names will be silently ignored.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array of char * to fill with pool names (allocated by caller)</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the names array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on error</td></tr></tbody></table></div><h3><a name="virConnectListDomains" id="virConnectListDomains"><code>virConnectListDomains</code></a></h3><pre class="programlisting">int virConnectListDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)<br />
|
||||
</pre><p>Collect the list of active domains, and store their ID in @maxids</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>ids</tt></i>:</span></td><td>array to collect the list of IDs of active domains</td></tr><tr><td><span class="term"><i><tt>maxids</tt></i>:</span></td><td>size of @ids</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListNetworks" id="virConnectListNetworks"><code>virConnectListNetworks</code></a></h3><pre class="programlisting">int virConnectListNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
|
||||
</pre><p>Collect the list of active domains, and store their ID in @maxids</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>ids</tt></i>:</span></td><td>array to collect the list of IDs of active domains</td></tr><tr><td><span class="term"><i><tt>maxids</tt></i>:</span></td><td>size of @ids</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListInterfaces" id="virConnectListInterfaces"><code>virConnectListInterfaces</code></a></h3><pre class="programlisting">int virConnectListInterfaces (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
|
||||
</pre><p>Collect the list of physical host interfaces, and store their names in @names</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array to collect the list of names of interfaces</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of @names</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of interfaces found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListNetworks" id="virConnectListNetworks"><code>virConnectListNetworks</code></a></h3><pre class="programlisting">int virConnectListNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
|
||||
</pre><p>Collect the list of active networks, and store their names in @names</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array to collect the list of names of active networks</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of @names</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of networks found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListStoragePools" id="virConnectListStoragePools"><code>virConnectListStoragePools</code></a></h3><pre class="programlisting">int virConnectListStoragePools (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
|
||||
</pre><p>Provides the list of names of active storage pools upto maxnames. If there are more than maxnames, the remaining names will be silently ignored.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array of char * to fill with pool names (allocated by caller)</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the names array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDefinedDomains" id="virConnectNumOfDefinedDomains"><code>virConnectNumOfDefinedDomains</code></a></h3><pre class="programlisting">int virConnectNumOfDefinedDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides the number of defined but inactive domains.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDefinedNetworks" id="virConnectNumOfDefinedNetworks"><code>virConnectNumOfDefinedNetworks</code></a></h3><pre class="programlisting">int virConnectNumOfDefinedNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides the number of inactive networks.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of networks found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDefinedStoragePools" id="virConnectNumOfDefinedStoragePools"><code>virConnectNumOfDefinedStoragePools</code></a></h3><pre class="programlisting">int virConnectNumOfDefinedStoragePools (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides the number of inactive storage pools</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of pools found, or -1 on error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDomains" id="virConnectNumOfDomains"><code>virConnectNumOfDomains</code></a></h3><pre class="programlisting">int virConnectNumOfDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides the number of active domains.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfNetworks" id="virConnectNumOfNetworks"><code>virConnectNumOfNetworks</code></a></h3><pre class="programlisting">int virConnectNumOfNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides the number of active domains.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfInterfaces" id="virConnectNumOfInterfaces"><code>virConnectNumOfInterfaces</code></a></h3><pre class="programlisting">int virConnectNumOfInterfaces (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides the number of interfaces on the physical host.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of interface found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfNetworks" id="virConnectNumOfNetworks"><code>virConnectNumOfNetworks</code></a></h3><pre class="programlisting">int virConnectNumOfNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides the number of active networks.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of network found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfStoragePools" id="virConnectNumOfStoragePools"><code>virConnectNumOfStoragePools</code></a></h3><pre class="programlisting">int virConnectNumOfStoragePools (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides the number of active storage pools</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of pools found, or -1 on error</td></tr></tbody></table></div><h3><a name="virConnectOpen" id="virConnectOpen"><code>virConnectOpen</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virConnectOpen (const char * name)<br />
|
||||
</pre><p>This function should be called first to get a connection to the Hypervisor and xen store</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>URI of the hypervisor</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html</td></tr></tbody></table></div><h3><a name="virConnectOpenAuth" id="virConnectOpenAuth"><code>virConnectOpenAuth</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virConnectOpenAuth (const char * name, <br /> <a href="libvirt-libvirt.html#virConnectAuthPtr">virConnectAuthPtr</a> auth, <br /> int flags)<br />
|
||||
</pre><p>This function should be called first to get a connection to the Hypervisor. If necessary, authentication will be performed fetching credentials via the callback</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>URI of the hypervisor</td></tr><tr><td><span class="term"><i><tt>auth</tt></i>:</span></td><td>Authenticate callback parameters</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>Open flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html</td></tr></tbody></table></div><h3><a name="virConnectOpenReadOnly" id="virConnectOpenReadOnly"><code>virConnectOpenReadOnly</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virConnectOpenReadOnly (const char * name)<br />
|
||||
</pre><p>This function should be called first to get a restricted connection to the library functionalities. The set of APIs usable are then restricted on the available methods to control the domains.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>URI of the hypervisor</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html</td></tr></tbody></table></div><h3><a name="virConnectRef" id="virConnectRef"><code>virConnectRef</code></a></h3><pre class="programlisting">int virConnectRef (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Increment the reference count on the connection. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virConnectClose">virConnectClose</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a connection would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>the connection to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="virDomainAttachDevice" id="virDomainAttachDevice"><code>virDomainAttachDevice</code></a></h3><pre class="programlisting">int virDomainAttachDevice (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * xml)<br />
|
||||
</pre><p>Increment the reference count on the connection. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virConnectClose">virConnectClose</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a connection would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>the connection to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure</td></tr></tbody></table></div><h3><a name="virDomainAttachDevice" id="virDomainAttachDevice"><code>virDomainAttachDevice</code></a></h3><pre class="programlisting">int virDomainAttachDevice (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * xml)<br />
|
||||
</pre><p>Create a virtual device attachment to backend.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>pointer to XML description of one device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainBlockPeek" id="virDomainBlockPeek"><code>virDomainBlockPeek</code></a></h3><pre class="programlisting">int virDomainBlockPeek (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> const char * path, <br /> unsigned long long offset, <br /> size_t size, <br /> void * buffer, <br /> unsigned int flags)<br />
|
||||
</pre><p>This function allows you to read the contents of a domain's disk device. Typical uses for this are to determine if the domain has written a Master Boot Record (indicating that the domain has completed installation), or to try to work out the state of the domain's filesystems. (Note that in the local case you might try to open the block device or file directly, but that won't work in the remote case, nor if you don't have sufficient permission. Hence the need for this call). 'path' must be a device or file corresponding to the domain. In other words it must be the precise string returned in a <disk><source dev='...'/></disk> from virDomainGetXMLDesc. 'offset' and 'size' represent an area which must lie entirely within the device or file. 'size' may be 0 to test if the call would succeed. 'buffer' is the return buffer and must be at least 'size' bytes. NB. The remote driver imposes a 64K byte limit on 'size'. For your program to be able to work reliably over a remote connection you should split large requests to <= 65536 bytes.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dom</tt></i>:</span></td><td>pointer to the domain object</td></tr><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>path to the block device</td></tr><tr><td><span class="term"><i><tt>offset</tt></i>:</span></td><td>offset within block device</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>size to read</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>return buffer (must be at least size bytes)</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>unused, always pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of failure. really 64 bits</td></tr></tbody></table></div><h3><a name="virDomainBlockStats" id="virDomainBlockStats"><code>virDomainBlockStats</code></a></h3><pre class="programlisting">int virDomainBlockStats (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> const char * path, <br /> <a href="libvirt-libvirt.html#virDomainBlockStatsPtr">virDomainBlockStatsPtr</a> stats, <br /> size_t size)<br />
|
||||
</pre><p>This function returns block device (disk) stats for block devices attached to the domain. The path parameter is the name of the block device. Get this by calling <a href="libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a> and finding the <target dev='...'> attribute within //domain/devices/disk. (For example, "xvda"). Domains may have more than one block device. To get stats for each you should make multiple calls to this function. Individual fields within the stats structure may be returned as -1, which indicates that the hypervisor does not support that particular statistic.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dom</tt></i>:</span></td><td>pointer to the domain object</td></tr><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>path to the block device</td></tr><tr><td><span class="term"><i><tt>stats</tt></i>:</span></td><td>block device stats (returned)</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>size of stats structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainCoreDump" id="virDomainCoreDump"><code>virDomainCoreDump</code></a></h3><pre class="programlisting">int virDomainCoreDump (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to, <br /> int flags)<br />
|
||||
@ -390,7 +418,7 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>launch a defined domain. If the call succeed the domain moves from the defined to the running domains pools.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to a defined domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virDomainCreateLinux" id="virDomainCreateLinux"><code>virDomainCreateLinux</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainCreateLinux (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)<br />
|
||||
</pre><p>Deprecated after 0.4.6. Renamed to virDomainCreateXML() providing identical functionality. This existing name will left indefinitely for API compatability.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xmlDesc</tt></i>:</span></td><td>string containing an XML description of the domain</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>callers should always pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainCreateXML" id="virDomainCreateXML"><code>virDomainCreateXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainCreateXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)<br />
|
||||
</pre><p>Launch a new guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires privileged access to the hypervisor. The domain is not persistent, so its definition will disappear when it is destroyed, or if the host is restarted (see virDomainDefineXML() to define persistent domains).</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xmlDesc</tt></i>:</span></td><td>string containing an XML description of the domain</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>callers should always pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainDefineXML" id="virDomainDefineXML"><code>virDomainDefineXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainDefineXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml)<br />
|
||||
</pre><p>Define a domain, but does not start it. This definition is persistent, until explicitly undefined with virDomainUndefine().</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>the XML description for the domain, preferably in UTF-8</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a pointer to the domain otherwise</td></tr></tbody></table></div><h3><a name="virDomainDestroy" id="virDomainDestroy"><code>virDomainDestroy</code></a></h3><pre class="programlisting">int virDomainDestroy (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Define a domain, but does not start it. This definition is persistent, until explicitly undefined with virDomainUndefine(). A previous definition for this domain would be overriden if it already exists.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>the XML description for the domain, preferably in UTF-8</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a pointer to the domain otherwise</td></tr></tbody></table></div><h3><a name="virDomainDestroy" id="virDomainDestroy"><code>virDomainDestroy</code></a></h3><pre class="programlisting">int virDomainDestroy (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. This does not free the associated <a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> object. This function may require privileged access</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainDetachDevice" id="virDomainDetachDevice"><code>virDomainDetachDevice</code></a></h3><pre class="programlisting">int virDomainDetachDevice (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * xml)<br />
|
||||
</pre><p>Destroy a virtual device attachment to backend.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>pointer to XML description of one device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainFree" id="virDomainFree"><code>virDomainFree</code></a></h3><pre class="programlisting">int virDomainFree (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetAutostart" id="virDomainGetAutostart"><code>virDomainGetAutostart</code></a></h3><pre class="programlisting">int virDomainGetAutostart (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int * autostart)<br />
|
||||
@ -404,7 +432,7 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>Get the type of domain operation system.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL in case of error, the string must be freed by the caller.</td></tr></tbody></table></div><h3><a name="virDomainGetSchedulerParameters" id="virDomainGetSchedulerParameters"><code>virDomainGetSchedulerParameters</code></a></h3><pre class="programlisting">int virDomainGetSchedulerParameters (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> params, <br /> int * nparams)<br />
|
||||
</pre><p>Get the scheduler parameters, the @params array will be filled with the values.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><span class="term"><i><tt>params</tt></i>:</span></td><td>pointer to scheduler parameter object (return value)</td></tr><tr><td><span class="term"><i><tt>nparams</tt></i>:</span></td><td>pointer to number of scheduler parameter (this value should be same than the returned value nparams of virDomainGetSchedulerType)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success.</td></tr></tbody></table></div><h3><a name="virDomainGetSchedulerType" id="virDomainGetSchedulerType"><code>virDomainGetSchedulerType</code></a></h3><pre class="programlisting">char * virDomainGetSchedulerType (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int * nparams)<br />
|
||||
</pre><p>Get the scheduler type.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><span class="term"><i><tt>nparams</tt></i>:</span></td><td>number of scheduler parameters(return value)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error. The caller must free the returned string.</td></tr></tbody></table></div><h3><a name="virDomainGetSecurityLabel" id="virDomainGetSecurityLabel"><code>virDomainGetSecurityLabel</code></a></h3><pre class="programlisting">int virDomainGetSecurityLabel (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virSecurityLabelPtr">virSecurityLabelPtr</a> seclabel)<br />
|
||||
</pre><p>Extract security label of an active domain.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>seclabel</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virSecurityLabel">virSecurityLabel</a> structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure, and -2 if the operation is not supported (caller decides if that's an error).</td></tr></tbody></table></div><h3><a name="virDomainGetUUID" id="virDomainGetUUID"><code>virDomainGetUUID</code></a></h3><pre class="programlisting">int virDomainGetUUID (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned char * uuid)<br />
|
||||
</pre><p>Extract security label of an active domain. The 'label' field in the @seclabel argument will be initialized to the empty string if the domain is not running under a security model.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>seclabel</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virSecurityLabel">virSecurityLabel</a> structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure</td></tr></tbody></table></div><h3><a name="virDomainGetUUID" id="virDomainGetUUID"><code>virDomainGetUUID</code></a></h3><pre class="programlisting">int virDomainGetUUID (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned char * uuid)<br />
|
||||
</pre><p>Get the UUID for a domain</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>uuid</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a> bytes array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div><h3><a name="virDomainGetUUIDString" id="virDomainGetUUIDString"><code>virDomainGetUUIDString</code></a></h3><pre class="programlisting">int virDomainGetUUIDString (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> char * buf)<br />
|
||||
</pre><p>Get the UUID for a domain as string. For more information about UUID see RFC4122.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a> bytes array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div><h3><a name="virDomainGetVcpus" id="virDomainGetVcpus"><code>virDomainGetVcpus</code></a></h3><pre class="programlisting">int virDomainGetVcpus (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a> info, <br /> int maxinfo, <br /> unsigned char * cpumaps, <br /> int maplen)<br />
|
||||
</pre><p>Extract information about virtual CPUs of domain, store it in info array and also in cpumaps if this pointer isn't NULL.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object, or NULL for Domain0</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to an array of <a href="libvirt-libvirt.html#virVcpuInfo">virVcpuInfo</a> structures (OUT)</td></tr><tr><td><span class="term"><i><tt>maxinfo</tt></i>:</span></td><td>number of structures in info array</td></tr><tr><td><span class="term"><i><tt>cpumaps</tt></i>:</span></td><td>pointer to an bit map of real CPUs for all vcpus of this domain (in 8-bit bytes) (OUT) If cpumaps is NULL, then no cpumap information is returned by the API. It's assumed there is <maxinfo> cpumap in cpumaps array. The memory allocated to cpumaps must be (maxinfo * maplen) bytes (ie: calloc(maxinfo, maplen)). One cpumap inside cpumaps has the format described in virDomainPinVcpu() API.</td></tr><tr><td><span class="term"><i><tt>maplen</tt></i>:</span></td><td>number of bytes in one cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of info filled in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetXMLDesc" id="virDomainGetXMLDesc"><code>virDomainGetXMLDesc</code></a></h3><pre class="programlisting">char * virDomainGetXMLDesc (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)<br />
|
||||
@ -418,7 +446,7 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>Migrate the domain object from its current host to the destination host given by dconn (a connection to the destination host). Flags may be one of more of the following: <a href="libvirt-libvirt.html#VIR_MIGRATE_LIVE">VIR_MIGRATE_LIVE</a> Attempt a live migration. If a hypervisor supports renaming domains during migration, then you may set the dname parameter to the new name (otherwise it keeps the same name). If this is not supported by the hypervisor, dname must be NULL or else you will get an error. Since typically the two hypervisors connect directly to each other in order to perform the migration, you may need to specify a path from the source to the destination. This is the purpose of the uri parameter. If uri is NULL, then libvirt will try to find the best method. Uri may specify the hostname or IP address of the destination host as seen from the source. Or uri may be a URI giving transport, hostname, user, port, etc. in the usual form. Refer to driver documentation for the particular URIs supported. The maximum bandwidth (in Mbps) that will be used to do migration can be specified with the bandwidth parameter. If set to 0, libvirt will choose a suitable default. Some hypervisors do not support this feature and will return an error if bandwidth is not 0. To see which features are supported by the current hypervisor, see virConnectGetCapabilities, /capabilities/host/migration_features. There are many limitations on migration imposed by the underlying technology - for example it may not be possible to migrate between different processors even with the same architecture, or between different types of hypervisor.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>dconn</tt></i>:</span></td><td>destination host (a connection object)</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags</td></tr><tr><td><span class="term"><i><tt>dname</tt></i>:</span></td><td>(optional) rename domain to this at destination</td></tr><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>(optional) dest hostname/URI as seen from the source host</td></tr><tr><td><span class="term"><i><tt>bandwidth</tt></i>:</span></td><td>(optional) specify migration bandwidth limit in Mbps</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new domain object if the migration was successful, or NULL in case of error. Note that the new domain object exists in the scope of the destination connection (dconn).</td></tr></tbody></table></div><h3><a name="virDomainPinVcpu" id="virDomainPinVcpu"><code>virDomainPinVcpu</code></a></h3><pre class="programlisting">int virDomainPinVcpu (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int vcpu, <br /> unsigned char * cpumap, <br /> int maplen)<br />
|
||||
</pre><p>Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires privileged access to the hypervisor.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object, or NULL for Domain0</td></tr><tr><td><span class="term"><i><tt>vcpu</tt></i>:</span></td><td>virtual CPU number</td></tr><tr><td><span class="term"><i><tt>cpumap</tt></i>:</span></td><td>pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.</td></tr><tr><td><span class="term"><i><tt>maplen</tt></i>:</span></td><td>number of bytes in cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...). If maplen < size, missing bytes are set to zero. If maplen > size, failure code is returned.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainReboot" id="virDomainReboot"><code>virDomainReboot</code></a></h3><pre class="programlisting">int virDomainReboot (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int flags)<br />
|
||||
</pre><p>Reboot a domain, the domain object is still usable there after but the domain OS is being stopped for a restart. Note that the guest OS may ignore the request.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>extra flags for the reboot operation, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainRef" id="virDomainRef"><code>virDomainRef</code></a></h3><pre class="programlisting">int virDomainRef (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Increment the reference count on the domain. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virDomainFree">virDomainFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a domain would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="virDomainRestore" id="virDomainRestore"><code>virDomainRestore</code></a></h3><pre class="programlisting">int virDomainRestore (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)<br />
|
||||
</pre><p>Increment the reference count on the domain. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virDomainFree">virDomainFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a domain would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>the domain to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainRestore" id="virDomainRestore"><code>virDomainRestore</code></a></h3><pre class="programlisting">int virDomainRestore (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)<br />
|
||||
</pre><p>This method will restore a domain saved to disk by virDomainSave().</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>path to the</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainResume" id="virDomainResume"><code>virDomainResume</code></a></h3><pre class="programlisting">int virDomainResume (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires privileged access</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSave" id="virDomainSave"><code>virDomainSave</code></a></h3><pre class="programlisting">int virDomainSave (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)<br />
|
||||
</pre><p>This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>path for the output file</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSetAutostart" id="virDomainSetAutostart"><code>virDomainSetAutostart</code></a></h3><pre class="programlisting">int virDomainSetAutostart (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int autostart)<br />
|
||||
@ -441,7 +469,19 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>Part of the EventImpl, this user-defined callback updates an event timeout.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>timer</tt></i>:</span></td><td>the timer to modify</td></tr><tr><td><span class="term"><i><tt>timeout</tt></i>:</span></td><td>the new timeout value</td></tr></tbody></table></div><br /><h3><a name="virFreeCallback" id="virFreeCallback"><code>virFreeCallback</code></a></h3><pre class="programlisting">typedef void (*virFreeCallback ) (void * opaque)
|
||||
</pre><p></p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td></td></tr></tbody></table></div><br /><h3><a name="virGetVersion" id="virGetVersion"><code>virGetVersion</code></a></h3><pre class="programlisting">int virGetVersion (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)<br />
|
||||
</pre><p>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not available, an error code will be returned and @typeVer will be 0.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>libVer</tt></i>:</span></td><td>return value for the library version (OUT)</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of connection/driver looked at</td></tr><tr><td><span class="term"><i><tt>typeVer</tt></i>:</span></td><td>return value for the version of the hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.</td></tr></tbody></table></div><h3><a name="virInitialize" id="virInitialize"><code>virInitialize</code></a></h3><pre class="programlisting">int virInitialize (void)<br />
|
||||
</pre><p>Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virNetworkCreate" id="virNetworkCreate"><code>virNetworkCreate</code></a></h3><pre class="programlisting">int virNetworkCreate (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
|
||||
</pre><p>Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virInterfaceCreate" id="virInterfaceCreate"><code>virInterfaceCreate</code></a></h3><pre class="programlisting">int virInterfaceCreate (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)<br />
|
||||
</pre><p>Activate an interface (ie call "ifup")</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>pointer to a defined interface</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virInterfaceDefineXML" id="virInterfaceDefineXML"><code>virInterfaceDefineXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> virInterfaceDefineXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml, <br /> unsigned int flags)<br />
|
||||
</pre><p>Define an interface (or modify existing interface configuration)</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>the XML description for the interface, preferably in UTF-8</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a pointer to the interface otherwise</td></tr></tbody></table></div><h3><a name="virInterfaceDestroy" id="virInterfaceDestroy"><code>virInterfaceDestroy</code></a></h3><pre class="programlisting">int virInterfaceDestroy (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)<br />
|
||||
</pre><p>deactivate an interface (ie call "ifdown") This does not remove the interface from the config, and does not free the associated <a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> object.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>an interface object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virInterfaceFree" id="virInterfaceFree"><code>virInterfaceFree</code></a></h3><pre class="programlisting">int virInterfaceFree (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
||||
</pre><p>Free the interface object. The interface itself is unaltered. The data structure is freed and should not be used thereafter.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>a interface object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virInterfaceGetConnect" id="virInterfaceGetConnect"><code>virInterfaceGetConnect</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virInterfaceGetConnect (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
||||
</pre><p>Provides the connection pointer associated with an interface. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the interface object together.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>pointer to a interface</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div><h3><a name="virInterfaceGetMACString" id="virInterfaceGetMACString"><code>virInterfaceGetMACString</code></a></h3><pre class="programlisting">const char * virInterfaceGetMACString (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
||||
</pre><p>Get the MAC for a interface as string. For more information about MAC see RFC4122.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>a interface object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the MAC address (in null-terminated ASCII format) or NULL, the string need not be deallocated its lifetime will be the same as the interface object.</td></tr></tbody></table></div><h3><a name="virInterfaceGetName" id="virInterfaceGetName"><code>virInterfaceGetName</code></a></h3><pre class="programlisting">const char * virInterfaceGetName (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
||||
</pre><p>Get the public name for that interface</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>a interface object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the interface object.</td></tr></tbody></table></div><h3><a name="virInterfaceGetXMLDesc" id="virInterfaceGetXMLDesc"><code>virInterfaceGetXMLDesc</code></a></h3><pre class="programlisting">char * virInterfaceGetXMLDesc (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)<br />
|
||||
</pre><p>Provide an XML description of the interface. The description may be reused later to recreate the interface with virInterfaceCreateXML().</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>a interface object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div><h3><a name="virInterfaceLookupByMACString" id="virInterfaceLookupByMACString"><code>virInterfaceLookupByMACString</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> virInterfaceLookupByMACString (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * macstr)<br />
|
||||
</pre><p>Try to lookup an interface on the given hypervisor based on its MAC.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>macstr</tt></i>:</span></td><td>the MAC for the interface (null-terminated ASCII format)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new interface object or NULL in case of failure. If the interface cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_INTERFACE">VIR_ERR_NO_INTERFACE</a> error is raised.</td></tr></tbody></table></div><h3><a name="virInterfaceLookupByName" id="virInterfaceLookupByName"><code>virInterfaceLookupByName</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> virInterfaceLookupByName (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
|
||||
</pre><p>Try to lookup an interface on the given hypervisor based on its name.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name for the interface</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new interface object or NULL in case of failure. If the interface cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_INTERFACE">VIR_ERR_NO_INTERFACE</a> error is raised.</td></tr></tbody></table></div><h3><a name="virInterfaceRef" id="virInterfaceRef"><code>virInterfaceRef</code></a></h3><pre class="programlisting">int virInterfaceRef (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
||||
</pre><p>Increment the reference count on the interface. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virInterfaceFree">virInterfaceFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a interface would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>the interface to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virInterfaceUndefine" id="virInterfaceUndefine"><code>virInterfaceUndefine</code></a></h3><pre class="programlisting">int virInterfaceUndefine (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
||||
</pre><p>Undefine an interface, ie remove it from the config. This does not free the associated <a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> object.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>pointer to a defined interface</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virNetworkCreate" id="virNetworkCreate"><code>virNetworkCreate</code></a></h3><pre class="programlisting">int virNetworkCreate (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
|
||||
</pre><p>Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>pointer to a defined network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virNetworkCreateXML" id="virNetworkCreateXML"><code>virNetworkCreateXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> virNetworkCreateXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc)<br />
|
||||
</pre><p>Create and start a new virtual network, based on an XML description similar to the one returned by virNetworkGetXMLDesc()</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xmlDesc</tt></i>:</span></td><td>an XML description of the network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virNetworkDefineXML" id="virNetworkDefineXML"><code>virNetworkDefineXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> virNetworkDefineXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml)<br />
|
||||
</pre><p>Define a network, but does not create it</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>the XML description for the network, preferably in UTF-8</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a pointer to the network otherwise</td></tr></tbody></table></div><h3><a name="virNetworkDestroy" id="virNetworkDestroy"><code>virNetworkDestroy</code></a></h3><pre class="programlisting">int virNetworkDestroy (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
|
||||
@ -457,10 +497,12 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>Try to lookup a network on the given hypervisor based on its name.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name for the network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure. If the network cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</td></tr></tbody></table></div><h3><a name="virNetworkLookupByUUID" id="virNetworkLookupByUUID"><code>virNetworkLookupByUUID</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> virNetworkLookupByUUID (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const unsigned char * uuid)<br />
|
||||
</pre><p>Try to lookup a network on the given hypervisor based on its UUID.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>uuid</tt></i>:</span></td><td>the raw UUID for the network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure. If the network cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</td></tr></tbody></table></div><h3><a name="virNetworkLookupByUUIDString" id="virNetworkLookupByUUIDString"><code>virNetworkLookupByUUIDString</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> virNetworkLookupByUUIDString (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * uuidstr)<br />
|
||||
</pre><p>Try to lookup a network on the given hypervisor based on its UUID.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>uuidstr</tt></i>:</span></td><td>the string UUID for the network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure. If the network cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</td></tr></tbody></table></div><h3><a name="virNetworkRef" id="virNetworkRef"><code>virNetworkRef</code></a></h3><pre class="programlisting">int virNetworkRef (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
|
||||
</pre><p>Increment the reference count on the network. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virNetworkFree">virNetworkFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a network would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="virNetworkSetAutostart" id="virNetworkSetAutostart"><code>virNetworkSetAutostart</code></a></h3><pre class="programlisting">int virNetworkSetAutostart (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int autostart)<br />
|
||||
</pre><p>Increment the reference count on the network. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virNetworkFree">virNetworkFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a network would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>the network to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virNetworkSetAutostart" id="virNetworkSetAutostart"><code>virNetworkSetAutostart</code></a></h3><pre class="programlisting">int virNetworkSetAutostart (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int autostart)<br />
|
||||
</pre><p>Configure the network to be automatically started when the host machine boots.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><span class="term"><i><tt>autostart</tt></i>:</span></td><td>whether the network should be automatically started 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div><h3><a name="virNetworkUndefine" id="virNetworkUndefine"><code>virNetworkUndefine</code></a></h3><pre class="programlisting">int virNetworkUndefine (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
|
||||
</pre><p>Undefine a network but does not stop it if it is running</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>pointer to a defined network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virNodeDeviceDettach" id="virNodeDeviceDettach"><code>virNodeDeviceDettach</code></a></h3><pre class="programlisting">int virNodeDeviceDettach (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p></p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="virNodeDeviceFree" id="virNodeDeviceFree"><code>virNodeDeviceFree</code></a></h3><pre class="programlisting">int virNodeDeviceFree (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Undefine a network but does not stop it if it is running</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>pointer to a defined network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virNodeDeviceCreateXML" id="virNodeDeviceCreateXML"><code>virNodeDeviceCreateXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> virNodeDeviceCreateXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)<br />
|
||||
</pre><p>Create a new device on the VM host machine, for example, virtual HBAs created using vport_create.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xmlDesc</tt></i>:</span></td><td>string containing an XML description of the device to be created</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>callers should always pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a node device object if successful, NULL in case of failure</td></tr></tbody></table></div><h3><a name="virNodeDeviceDestroy" id="virNodeDeviceDestroy"><code>virNodeDeviceDestroy</code></a></h3><pre class="programlisting">int virNodeDeviceDestroy (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Destroy the device object. The virtual device is removed from the host operating system. This function may require privileged access</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>a device object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virNodeDeviceDettach" id="virNodeDeviceDettach"><code>virNodeDeviceDettach</code></a></h3><pre class="programlisting">int virNodeDeviceDettach (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Dettach the node device from the node itself so that it may be assigned to a guest domain. Depending on the hypervisor, this may involve operations such as unbinding any device drivers from the device, binding the device to a dummy device driver and resetting the device. If the device is currently in use by the node, this method may fail. Once the device is not assigned to any guest, it may be re-attached to the node using the virNodeDeviceReattach() method.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virNodeDeviceFree" id="virNodeDeviceFree"><code>virNodeDeviceFree</code></a></h3><pre class="programlisting">int virNodeDeviceFree (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Drops a reference to the node device, freeing it if this was the last reference.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the 0 for success, -1 for error.</td></tr></tbody></table></div><h3><a name="virNodeDeviceGetName" id="virNodeDeviceGetName"><code>virNodeDeviceGetName</code></a></h3><pre class="programlisting">const char * virNodeDeviceGetName (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Just return the device name</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the device name or NULL in case of error</td></tr></tbody></table></div><h3><a name="virNodeDeviceGetParent" id="virNodeDeviceGetParent"><code>virNodeDeviceGetParent</code></a></h3><pre class="programlisting">const char * virNodeDeviceGetParent (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Accessor for the parent of the device</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the name of the device's parent, or NULL if the device has no parent.</td></tr></tbody></table></div><h3><a name="virNodeDeviceGetXMLDesc" id="virNodeDeviceGetXMLDesc"><code>virNodeDeviceGetXMLDesc</code></a></h3><pre class="programlisting">char * virNodeDeviceGetXMLDesc (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev, <br /> unsigned int flags)<br />
|
||||
@ -468,13 +510,13 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>Lists the names of the capabilities supported by the device.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the device</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array to collect the list of capability names</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of @names</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of capability names listed in @names.</td></tr></tbody></table></div><h3><a name="virNodeDeviceLookupByName" id="virNodeDeviceLookupByName"><code>virNodeDeviceLookupByName</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> virNodeDeviceLookupByName (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
|
||||
</pre><p>Lookup a node device by its name.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>unique device name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> if found, NULL otherwise.</td></tr></tbody></table></div><h3><a name="virNodeDeviceNumOfCaps" id="virNodeDeviceNumOfCaps"><code>virNodeDeviceNumOfCaps</code></a></h3><pre class="programlisting">int virNodeDeviceNumOfCaps (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Accessor for the number of capabilities supported by the device.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of capabilities supported by the device.</td></tr></tbody></table></div><h3><a name="virNodeDeviceReAttach" id="virNodeDeviceReAttach"><code>virNodeDeviceReAttach</code></a></h3><pre class="programlisting">int virNodeDeviceReAttach (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Re-attach a previously dettached node device to the node so that it may be used by the node again. Depending on the hypervisor, this may involve operations such as resetting the device, unbinding it from a dummy device driver and binding it to its appropriate driver. If the device is currently in use by a guest, this method may fail.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="virNodeDeviceRef" id="virNodeDeviceRef"><code>virNodeDeviceRef</code></a></h3><pre class="programlisting">int virNodeDeviceRef (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Increment the reference count on the dev. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virNodeDeviceFree">virNodeDeviceFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a dev would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="virNodeDeviceReset" id="virNodeDeviceReset"><code>virNodeDeviceReset</code></a></h3><pre class="programlisting">int virNodeDeviceReset (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Reset a previously dettached node device to the node before or after assigning it to a guest. The exact reset semantics depends on the hypervisor and device type but, for example, KVM will attempt to reset PCI devices with a Function Level Reset, Secondary Bus Reset or a Power Management D-State reset. If the reset will affect other devices which are currently in use, this function may fail.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="virNodeGetCellsFreeMemory" id="virNodeGetCellsFreeMemory"><code>virNodeGetCellsFreeMemory</code></a></h3><pre class="programlisting">int virNodeGetCellsFreeMemory (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long long * freeMems, <br /> int startCell, <br /> int maxCells)<br />
|
||||
</pre><p>Re-attach a previously dettached node device to the node so that it may be used by the node again. Depending on the hypervisor, this may involve operations such as resetting the device, unbinding it from a dummy device driver and binding it to its appropriate driver. If the device is currently in use by a guest, this method may fail.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virNodeDeviceRef" id="virNodeDeviceRef"><code>virNodeDeviceRef</code></a></h3><pre class="programlisting">int virNodeDeviceRef (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Increment the reference count on the dev. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virNodeDeviceFree">virNodeDeviceFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a dev would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the dev to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virNodeDeviceReset" id="virNodeDeviceReset"><code>virNodeDeviceReset</code></a></h3><pre class="programlisting">int virNodeDeviceReset (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
||||
</pre><p>Reset a previously dettached node device to the node before or after assigning it to a guest. The exact reset semantics depends on the hypervisor and device type but, for example, KVM will attempt to reset PCI devices with a Function Level Reset, Secondary Bus Reset or a Power Management D-State reset. If the reset will affect other devices which are currently in use, this function may fail.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virNodeGetCellsFreeMemory" id="virNodeGetCellsFreeMemory"><code>virNodeGetCellsFreeMemory</code></a></h3><pre class="programlisting">int virNodeGetCellsFreeMemory (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long long * freeMems, <br /> int startCell, <br /> int maxCells)<br />
|
||||
</pre><p>This call returns the amount of free memory in one or more NUMA cells. The @freeMems array must be allocated by the caller and will be filled with the amount of free memory in kilobytes for each cell requested, starting with startCell (in freeMems[0]), up to either (startCell + maxCells), or the number of additional cells in the node, whichever is smaller.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>freeMems</tt></i>:</span></td><td>pointer to the array of unsigned long long</td></tr><tr><td><span class="term"><i><tt>startCell</tt></i>:</span></td><td>index of first cell to return freeMems info on.</td></tr><tr><td><span class="term"><i><tt>maxCells</tt></i>:</span></td><td>Maximum number of cells for which freeMems information can be returned.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries filled in freeMems, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virNodeGetFreeMemory" id="virNodeGetFreeMemory"><code>virNodeGetFreeMemory</code></a></h3><pre class="programlisting">unsigned long long virNodeGetFreeMemory (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>provides the free memory available on the Node</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the available free memory in kilobytes or 0 in case of error</td></tr></tbody></table></div><h3><a name="virNodeGetInfo" id="virNodeGetInfo"><code>virNodeGetInfo</code></a></h3><pre class="programlisting">int virNodeGetInfo (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> info)<br />
|
||||
</pre><p>provides the free memory available on the Node Note: most libvirt APIs provide memory sizes in kilobytes, but in this function the returned value is in bytes. Divide by 1024 as necessary.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the available free memory in bytes or 0 in case of error</td></tr></tbody></table></div><h3><a name="virNodeGetInfo" id="virNodeGetInfo"><code>virNodeGetInfo</code></a></h3><pre class="programlisting">int virNodeGetInfo (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> info)<br />
|
||||
</pre><p>Extract hardware information about the node.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> structure allocated by the user</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virNodeGetSecurityModel" id="virNodeGetSecurityModel"><code>virNodeGetSecurityModel</code></a></h3><pre class="programlisting">int virNodeGetSecurityModel (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virSecurityModelPtr">virSecurityModelPtr</a> secmodel)<br />
|
||||
</pre><p>Extract the security model of a hypervisor.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>a connection object</td></tr><tr><td><span class="term"><i><tt>secmodel</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virSecurityModel">virSecurityModel</a> structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure, and -2 if the operation is not supported (caller decides if that's an error).</td></tr></tbody></table></div><h3><a name="virNodeListDevices" id="virNodeListDevices"><code>virNodeListDevices</code></a></h3><pre class="programlisting">int virNodeListDevices (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * cap, <br /> char ** const names, <br /> int maxnames, <br /> unsigned int flags)<br />
|
||||
</pre><p>Extract the security model of a hypervisor. The 'model' field in the @secmodel argument may be initialized to the empty string if the driver has not activated a security model.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>a connection object</td></tr><tr><td><span class="term"><i><tt>secmodel</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virSecurityModel">virSecurityModel</a> structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure</td></tr></tbody></table></div><h3><a name="virNodeListDevices" id="virNodeListDevices"><code>virNodeListDevices</code></a></h3><pre class="programlisting">int virNodeListDevices (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * cap, <br /> char ** const names, <br /> int maxnames, <br /> unsigned int flags)<br />
|
||||
</pre><p>Collect the list of node devices, and store their names in @names If the optional 'cap' argument is non-NULL, then the count will be restricted to devices with the specified capability</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>cap</tt></i>:</span></td><td>capability name</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array to collect the list of node device names</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of @names</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of node devices found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virNodeNumOfDevices" id="virNodeNumOfDevices"><code>virNodeNumOfDevices</code></a></h3><pre class="programlisting">int virNodeNumOfDevices (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * cap, <br /> unsigned int flags)<br />
|
||||
</pre><p>Provides the number of node devices. If the optional 'cap' argument is non-NULL, then the count will be restricted to devices with the specified capability</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>cap</tt></i>:</span></td><td>capability name</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of node devices or -1 in case of error</td></tr></tbody></table></div><h3><a name="virStoragePoolBuild" id="virStoragePoolBuild"><code>virStoragePoolBuild</code></a></h3><pre class="programlisting">int virStoragePoolBuild (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)<br />
|
||||
</pre><p>Build the underlying storage pool</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>future flags, use 0 for now</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 upon failure</td></tr></tbody></table></div><h3><a name="virStoragePoolCreate" id="virStoragePoolCreate"><code>virStoragePoolCreate</code></a></h3><pre class="programlisting">int virStoragePoolCreate (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)<br />
|
||||
@ -497,11 +539,12 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>Fetch a storage pool based on its globally unique id</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><span class="term"><i><tt>uuidstr</tt></i>:</span></td><td>globally unique id of pool to fetch</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if no matching pool is found</td></tr></tbody></table></div><h3><a name="virStoragePoolLookupByVolume" id="virStoragePoolLookupByVolume"><code>virStoragePoolLookupByVolume</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> virStoragePoolLookupByVolume (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
|
||||
</pre><p>Fetch a storage pool which contains a particular volume</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if no matching pool is found</td></tr></tbody></table></div><h3><a name="virStoragePoolNumOfVolumes" id="virStoragePoolNumOfVolumes"><code>virStoragePoolNumOfVolumes</code></a></h3><pre class="programlisting">int virStoragePoolNumOfVolumes (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
|
||||
</pre><p>Fetch the number of storage volumes within a pool</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of storage pools, or -1 on failure</td></tr></tbody></table></div><h3><a name="virStoragePoolRef" id="virStoragePoolRef"><code>virStoragePoolRef</code></a></h3><pre class="programlisting">int virStoragePoolRef (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
|
||||
</pre><p>Increment the reference count on the pool. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virStoragePoolFree">virStoragePoolFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a pool would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="virStoragePoolRefresh" id="virStoragePoolRefresh"><code>virStoragePoolRefresh</code></a></h3><pre class="programlisting">int virStoragePoolRefresh (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)<br />
|
||||
</pre><p>Increment the reference count on the pool. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virStoragePoolFree">virStoragePoolFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a pool would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>the pool to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virStoragePoolRefresh" id="virStoragePoolRefresh"><code>virStoragePoolRefresh</code></a></h3><pre class="programlisting">int virStoragePoolRefresh (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)<br />
|
||||
</pre><p>Request that the pool refresh its list of volumes. This may involve communicating with a remote server, and/or initializing new devices at the OS layer</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags to control refresh behaviour (currently unused, use 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the volume list was refreshed, -1 on failure</td></tr></tbody></table></div><h3><a name="virStoragePoolSetAutostart" id="virStoragePoolSetAutostart"><code>virStoragePoolSetAutostart</code></a></h3><pre class="programlisting">int virStoragePoolSetAutostart (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> int autostart)<br />
|
||||
</pre><p>Sets the autostart flag</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>autostart</tt></i>:</span></td><td>new flag setting</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on failure</td></tr></tbody></table></div><h3><a name="virStoragePoolUndefine" id="virStoragePoolUndefine"><code>virStoragePoolUndefine</code></a></h3><pre class="programlisting">int virStoragePoolUndefine (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
|
||||
</pre><p>Undefine an inactive storage pool</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if creation failed</td></tr></tbody></table></div><h3><a name="virStorageVolCreateXML" id="virStorageVolCreateXML"><code>virStorageVolCreateXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXML (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> unsigned int flags)<br />
|
||||
</pre><p>Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolDelete" id="virStorageVolDelete"><code>virStorageVolDelete</code></a></h3><pre class="programlisting">int virStorageVolDelete (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)<br />
|
||||
</pre><p>Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolCreateXMLFrom" id="virStorageVolCreateXMLFrom"><code>virStorageVolCreateXMLFrom</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXMLFrom (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> <a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> clonevol, <br /> unsigned int flags)<br />
|
||||
</pre><p>Create a storage volume in the parent pool, using the 'clonevol' volume as input. Information for the new volume (name, perms) are passed via a typical volume XML description.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to parent pool for the new volume</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>clonevol</tt></i>:</span></td><td>storage volume to use as input</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolDelete" id="virStorageVolDelete"><code>virStorageVolDelete</code></a></h3><pre class="programlisting">int virStorageVolDelete (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)<br />
|
||||
</pre><p>Delete the storage volume from the pool</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>future flags, use 0 for now</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error</td></tr></tbody></table></div><h3><a name="virStorageVolFree" id="virStorageVolFree"><code>virStorageVolFree</code></a></h3><pre class="programlisting">int virStorageVolFree (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
|
||||
</pre><p>Release the storage volume handle. The underlying storage volume continues to exist.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error</td></tr></tbody></table></div><h3><a name="virStorageVolGetConnect" id="virStorageVolGetConnect"><code>virStorageVolGetConnect</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virStorageVolGetConnect (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
|
||||
</pre><p>Provides the connection pointer associated with a storage volume. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the volume object together.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to a pool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div><h3><a name="virStorageVolGetInfo" id="virStorageVolGetInfo"><code>virStorageVolGetInfo</code></a></h3><pre class="programlisting">int virStorageVolGetInfo (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> <a href="libvirt-libvirt.html#virStorageVolInfoPtr">virStorageVolInfoPtr</a> info)<br />
|
||||
@ -513,5 +556,5 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>Fetch a pointer to a storage volume based on its globally unique key</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><span class="term"><i><tt>key</tt></i>:</span></td><td>globally unique key</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a storage volume, or NULL if not found / error</td></tr></tbody></table></div><h3><a name="virStorageVolLookupByName" id="virStorageVolLookupByName"><code>virStorageVolLookupByName</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolLookupByName (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * name)<br />
|
||||
</pre><p>Fetch a pointer to a storage volume based on its name within a pool</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of storage volume</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a storage volume, or NULL if not found / error</td></tr></tbody></table></div><h3><a name="virStorageVolLookupByPath" id="virStorageVolLookupByPath"><code>virStorageVolLookupByPath</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolLookupByPath (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * path)<br />
|
||||
</pre><p>Fetch a pointer to a storage volume based on its locally (host) unique path</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>locally unique path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a storage volume, or NULL if not found / error</td></tr></tbody></table></div><h3><a name="virStorageVolRef" id="virStorageVolRef"><code>virStorageVolRef</code></a></h3><pre class="programlisting">int virStorageVolRef (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
|
||||
</pre><p>Increment the reference count on the vol. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virStorageVolFree">virStorageVolFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a vol would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div></div></div><div id="footer"><p id="sponsor">
|
||||
</pre><p>Increment the reference count on the vol. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virStorageVolFree">virStorageVolFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a vol would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>the vol to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div></div><div id="footer"><p id="sponsor">
|
||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="../et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p></div></body></html>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -21,6 +21,8 @@ updated on <i>2008-06-05</i>.
|
||||
<th><a href="drvqemu.html">QEMU</a></th>
|
||||
<th><a href="drvkvm.html">KVM</a></th>
|
||||
<th><a href="remote.html">Remote</a></th>
|
||||
<th><a href="drvvbox.html">VirtualBox</a></th>
|
||||
<th><a href="drvone.html">ONE</a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectClose </td>
|
||||
@ -29,6 +31,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetCapabilities </td>
|
||||
@ -37,6 +41,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.1 </td>
|
||||
<td> ≥ 0.2.1 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetHostname </td>
|
||||
@ -45,6 +51,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.3 </td>
|
||||
<td> ≥ 0.3.3 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetMaxVcpus </td>
|
||||
@ -53,6 +61,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetType </td>
|
||||
@ -61,6 +71,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetURI </td>
|
||||
@ -69,6 +81,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetVersion </td>
|
||||
@ -77,6 +91,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectListDefinedDomains </td>
|
||||
@ -85,6 +101,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectListDomains </td>
|
||||
@ -93,6 +111,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectNumOfDefinedDomains </td>
|
||||
@ -101,6 +121,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectNumOfDomains </td>
|
||||
@ -109,6 +131,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectOpen </td>
|
||||
@ -117,6 +141,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectOpenAuth </td>
|
||||
@ -125,6 +151,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectOpenReadOnly </td>
|
||||
@ -133,6 +161,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainAttachDevice </td>
|
||||
@ -141,6 +171,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainBlockPeek </td>
|
||||
@ -149,6 +181,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> 0.4.3 </td>
|
||||
<td> 0.4.3 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainBlockStats </td>
|
||||
@ -157,6 +191,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.2 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainCoreDump </td>
|
||||
@ -165,6 +201,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainCreate </td>
|
||||
@ -173,6 +211,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainCreateLinux </td>
|
||||
@ -181,6 +221,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainDefineXML </td>
|
||||
@ -189,6 +231,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainDestroy </td>
|
||||
@ -197,6 +241,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainDetachDevice </td>
|
||||
@ -205,6 +251,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainFree </td>
|
||||
@ -213,6 +261,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetAutostart </td>
|
||||
@ -221,11 +271,13 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.1 </td>
|
||||
<td> ≥ 0.2.1 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetConnect </td>
|
||||
<td> 0.3.0 </td>
|
||||
<td colspan="4"> not a HV function </td>
|
||||
<td colspan="6"> not a HV function </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetID </td>
|
||||
@ -234,6 +286,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetInfo </td>
|
||||
@ -242,6 +296,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetMaxMemory </td>
|
||||
@ -250,6 +306,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetMaxVcpus </td>
|
||||
@ -258,6 +316,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetName </td>
|
||||
@ -266,6 +326,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetOSType </td>
|
||||
@ -274,6 +336,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetSchedulerParameters </td>
|
||||
@ -282,6 +346,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetSchedulerType </td>
|
||||
@ -290,6 +356,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetUUID </td>
|
||||
@ -298,6 +366,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetUUIDString </td>
|
||||
@ -306,6 +376,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetVcpus </td>
|
||||
@ -314,6 +386,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainInterfaceStats </td>
|
||||
@ -322,6 +396,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.2 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetXMLDesc </td>
|
||||
@ -330,6 +406,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainLookupByID </td>
|
||||
@ -338,6 +416,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainLookupByName </td>
|
||||
@ -346,6 +426,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainLookupByUUID </td>
|
||||
@ -354,6 +436,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainLookupByUUIDString </td>
|
||||
@ -362,6 +446,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainMigrate </td>
|
||||
@ -370,6 +456,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> 0.3.2 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainPinVcpu </td>
|
||||
@ -378,6 +466,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainReboot </td>
|
||||
@ -386,6 +476,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainRestore </td>
|
||||
@ -394,6 +486,9 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.2 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainResume </td>
|
||||
@ -402,6 +497,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSave </td>
|
||||
@ -410,6 +507,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.2 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSetAutostart </td>
|
||||
@ -418,6 +517,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.1 </td>
|
||||
<td> ≥ 0.2.1 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSetMaxMemory </td>
|
||||
@ -426,6 +527,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSetMemory </td>
|
||||
@ -434,6 +536,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSetSchedulerParameters </td>
|
||||
@ -442,6 +546,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSetVcpus </td>
|
||||
@ -450,6 +556,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainShutdown </td>
|
||||
@ -458,6 +566,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSuspend </td>
|
||||
@ -466,6 +576,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainUndefine </td>
|
||||
@ -474,17 +586,19 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virGetVersion </td>
|
||||
<td> All </td>
|
||||
<td> All </td>
|
||||
<td colspan="3"> Returns -1 if HV unsupported. </td>
|
||||
<td colspan="5"> Returns -1 if HV unsupported. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virInitialize </td>
|
||||
<td> 0.1.0 </td>
|
||||
<td colspan="4"> not a HV function </td>
|
||||
<td colspan="6"> not a HV function </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainMemoryPeek </td>
|
||||
@ -493,6 +607,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> 0.4.3 </td>
|
||||
<td> 0.4.3 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virNodeGetInfo </td>
|
||||
@ -501,6 +617,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.2.0 </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virNodeGetFreeMemory </td>
|
||||
@ -509,6 +627,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virNodeGetCellsFreeMemory </td>
|
||||
@ -517,6 +637,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Network functions</h3>
|
||||
|
@ -99,6 +99,8 @@
|
||||
The <a href="http://openvz.org/">OpenVZ</a> Linux container system
|
||||
</li><li>
|
||||
The <a href="http://user-mode-linux.sourceforge.net/">User Mode Linux</a> paravirtualized kernel
|
||||
</li><li>
|
||||
The <a href="http://www.virtualbox.org/">VirtualBox</a> hypervisor
|
||||
</li><li>
|
||||
Storage on IDE/SCSI/USB disks, FibreChannel, LVM, iSCSI, NFS and filesystems
|
||||
</li></ul>
|
||||
|
@ -52,6 +52,9 @@
|
||||
<li>
|
||||
The <a href="http://user-mode-linux.sourceforge.net/">User Mode Linux</a> paravirtualized kernel
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://www.virtualbox.org/">VirtualBox</a> hypervisor
|
||||
</li>
|
||||
<li>
|
||||
Storage on IDE/SCSI/USB disks, FibreChannel, LVM, iSCSI, NFS and filesystems
|
||||
</li>
|
||||
|
121
docs/internals.html
Normal file
121
docs/internals.html
Normal file
@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
This file is autogenerated from internals.html.in
|
||||
Do not edit this file. Changes will be lost.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
||||
<title>libvirt: libvirt internals</title>
|
||||
<meta name="description" content="libvirt, virtualization, virtualization API" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="headerLogo"></div>
|
||||
<div id="headerSearch">
|
||||
<form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><div>
|
||||
<input id="query" name="query" type="text" size="12" value="" />
|
||||
<input id="submit" name="submit" type="submit" value="Search" />
|
||||
</div></form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="menu">
|
||||
<ul class="l0"><li>
|
||||
<div>
|
||||
<a title="Front page of the libvirt website" class="inactive" href="index.html">Home</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Details of new features and bugs fixed in each release" class="inactive" href="news.html">News</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="downloads.html">Downloads</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Information for users, administrators and developers" class="active" href="docs.html">Documentation</a>
|
||||
<ul class="l1"><li>
|
||||
<div>
|
||||
<a title="Information about deploying and using libvirt" class="inactive" href="deployment.html">Deployment</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="intro.html">Architecture</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Description of the XML formats used in libvirt" class="inactive" href="format.html">XML format</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Hypervisor specific driver information" class="inactive" href="drivers.html">Drivers</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<span class="active">Internals</span>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<a title="General hacking guidelines for contributors" class="inactive" href="hacking.html">Contributor guidelines</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Adding new public libvirt APIs" class="inactive" href="api_extension.html">API extensions</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Frequently asked questions" class="inactive" href="FAQ.html">FAQ</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How and where to report bugs and request features" class="inactive" href="bugs.html">Bug reports</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="How to contact the developers via email and IRC" class="inactive" href="contact.html">Contact</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Miscellaneous links of interest related to libvirt" class="inactive" href="relatedlinks.html">Related Links</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Overview of all content on the website" class="inactive" href="sitemap.html">Sitemap</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>libvirt internals</h1>
|
||||
<p>
|
||||
This section provides documents useful to those working on the libvirt
|
||||
internals, adding new public APIs, new hypervisor drivers or extending
|
||||
the libvirtd daemon code.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p id="sponsor">
|
||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
11
docs/internals.html.in
Normal file
11
docs/internals.html.in
Normal file
@ -0,0 +1,11 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>libvirt internals</h1>
|
||||
|
||||
<p>
|
||||
This section provides documents useful to those working on the libvirt
|
||||
internals, adding new public APIs, new hypervisor drivers or extending
|
||||
the libvirtd daemon code.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
@ -47,6 +47,14 @@
|
||||
<div>
|
||||
<span class="active">Architecture</span>
|
||||
<ul class="l2"><li>
|
||||
<div>
|
||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
||||
</div>
|
||||
@ -80,6 +88,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -110,36 +122,12 @@
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Architecture</h1>
|
||||
<p>Libvirt is a C toolkit to interact with the virtualization capabilities of
|
||||
recent versions of Linux (and other OSes), but libvirt won't try to provide
|
||||
all possible interfaces for interacting with the virtualization features.</p>
|
||||
<p>To avoid ambiguity about the terms used here here are the definitions for
|
||||
some of the specific concepts used in libvirt documentation:</p>
|
||||
<ul><li>a <strong>node</strong> is a single physical machine</li><li>an <strong>hypervisor</strong> is a layer of software allowing to
|
||||
virtualize a node in a set of virtual machines with possibly different
|
||||
configurations than the node itself</li><li>a <strong>domain</strong> is an instance of an operating system running
|
||||
on a virtualized machine provided by the hypervisor</li></ul>
|
||||
<p class="image">
|
||||
<img alt="Hypervisor and domains running on a node" src="node.gif" /></p>
|
||||
<p>Now we can define the goal of libvirt: to provide the lowest possible
|
||||
generic and stable layer to manage domains on a node.</p>
|
||||
<p>This implies the following:</p>
|
||||
<ul><li>the API should not be targeted to a single virtualization environment
|
||||
though Xen is the current default, which also means that some very
|
||||
specific capabilities which are not generic enough may not be provided as
|
||||
libvirt APIs</li><li>the API should allow to do efficiently and cleanly all the operations
|
||||
needed to manage domains on a node</li><li>the API will not try to provide high level multi-nodes management
|
||||
features like load balancing, though they could be implemented on top of
|
||||
libvirt</li><li>stability of the API is a big concern, libvirt should isolate
|
||||
applications from the frequent changes expected at the lower level of the
|
||||
virtualization framework</li></ul>
|
||||
<p>So libvirt should be a building block for higher level management tools
|
||||
and for applications focusing on virtualization of a single node (the only
|
||||
exception being domain migration between node capabilities which may need to
|
||||
be added at the libvirt level). Where possible libvirt should be extendable
|
||||
to be able to provide the same API for remote nodes, however this is not the
|
||||
case at the moment, the code currently handle only local node accesses
|
||||
(extension for remote access support is being worked on, see <a href="bugs.html">the mailing list</a> discussions about it).</p>
|
||||
<p>Libvirt is a C toolkit manage the virtualization capabilities
|
||||
of recent versions of Linux (and other OSes).</p>
|
||||
<p>To avoid ambiguity about the goals, terms and specific concepts used
|
||||
in libvirt documentation please see the <a href="goals.html">Goal
|
||||
section</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
|
@ -2,45 +2,11 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>Architecture</h1>
|
||||
<p>Libvirt is a C toolkit to interact with the virtualization capabilities of
|
||||
recent versions of Linux (and other OSes), but libvirt won't try to provide
|
||||
all possible interfaces for interacting with the virtualization features.</p>
|
||||
<p>To avoid ambiguity about the terms used here here are the definitions for
|
||||
some of the specific concepts used in libvirt documentation:</p>
|
||||
<ul>
|
||||
<li>a <strong>node</strong> is a single physical machine</li>
|
||||
<li>an <strong>hypervisor</strong> is a layer of software allowing to
|
||||
virtualize a node in a set of virtual machines with possibly different
|
||||
configurations than the node itself</li>
|
||||
<li>a <strong>domain</strong> is an instance of an operating system running
|
||||
on a virtualized machine provided by the hypervisor</li>
|
||||
</ul>
|
||||
<p class="image">
|
||||
<img alt="Hypervisor and domains running on a node" src="node.gif"/>
|
||||
<p>Libvirt is a C toolkit manage the virtualization capabilities
|
||||
of recent versions of Linux (and other OSes).</p>
|
||||
<p>To avoid ambiguity about the goals, terms and specific concepts used
|
||||
in libvirt documentation please see the <a href="goals.html">Goal
|
||||
section</a>.
|
||||
</p>
|
||||
<p>Now we can define the goal of libvirt: to provide the lowest possible
|
||||
generic and stable layer to manage domains on a node.</p>
|
||||
<p>This implies the following:</p>
|
||||
<ul>
|
||||
<li>the API should not be targeted to a single virtualization environment
|
||||
though Xen is the current default, which also means that some very
|
||||
specific capabilities which are not generic enough may not be provided as
|
||||
libvirt APIs</li>
|
||||
<li>the API should allow to do efficiently and cleanly all the operations
|
||||
needed to manage domains on a node</li>
|
||||
<li>the API will not try to provide high level multi-nodes management
|
||||
features like load balancing, though they could be implemented on top of
|
||||
libvirt</li>
|
||||
<li>stability of the API is a big concern, libvirt should isolate
|
||||
applications from the frequent changes expected at the lower level of the
|
||||
virtualization framework</li>
|
||||
</ul>
|
||||
<p>So libvirt should be a building block for higher level management tools
|
||||
and for applications focusing on virtualization of a single node (the only
|
||||
exception being domain migration between node capabilities which may need to
|
||||
be added at the libvirt level). Where possible libvirt should be extendable
|
||||
to be able to provide the same API for remote nodes, however this is not the
|
||||
case at the moment, the code currently handle only local node accesses
|
||||
(extension for remote access support is being worked on, see <a href="bugs.html">the mailing list</a> discussions about it).</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -72,6 +72,10 @@
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -121,9 +121,11 @@
|
||||
<exports symbol='virConnectPtr' type='typedef'/>
|
||||
<exports symbol='virStorageVol' type='typedef'/>
|
||||
<exports symbol='virNodeDevicePtr' type='typedef'/>
|
||||
<exports symbol='virInterface' type='typedef'/>
|
||||
<exports symbol='virSchedParameter' type='typedef'/>
|
||||
<exports symbol='virConnectFlags' type='typedef'/>
|
||||
<exports symbol='virDomainEventDefinedDetailType' type='typedef'/>
|
||||
<exports symbol='virInterfacePtr' type='typedef'/>
|
||||
<exports symbol='virDomainMemoryFlags' type='typedef'/>
|
||||
<exports symbol='virDomainEventStoppedDetailType' type='typedef'/>
|
||||
<exports symbol='virStorageVolPtr' type='typedef'/>
|
||||
@ -172,6 +174,7 @@
|
||||
<exports symbol='virInitialize' type='function'/>
|
||||
<exports symbol='virNodeDeviceGetName' type='function'/>
|
||||
<exports symbol='virStoragePoolSetAutostart' type='function'/>
|
||||
<exports symbol='virConnectDomainXMLFromNative' type='function'/>
|
||||
<exports symbol='virNodeDeviceDettach' type='function'/>
|
||||
<exports symbol='virDomainGetSecurityLabel' type='function'/>
|
||||
<exports symbol='virConnectDomainEventDeregister' type='function'/>
|
||||
@ -180,6 +183,7 @@
|
||||
<exports symbol='virConnectNumOfDefinedNetworks' type='function'/>
|
||||
<exports symbol='virConnectNumOfDomains' type='function'/>
|
||||
<exports symbol='virNetworkGetUUID' type='function'/>
|
||||
<exports symbol='virInterfaceGetXMLDesc' type='function'/>
|
||||
<exports symbol='virStoragePoolGetConnect' type='function'/>
|
||||
<exports symbol='virConnectGetVersion' type='function'/>
|
||||
<exports symbol='virDomainFree' type='function'/>
|
||||
@ -192,6 +196,7 @@
|
||||
<exports symbol='virNetworkCreate' type='function'/>
|
||||
<exports symbol='virDomainSetMaxMemory' type='function'/>
|
||||
<exports symbol='virEventRegisterImpl' type='function'/>
|
||||
<exports symbol='virInterfaceDefineXML' type='function'/>
|
||||
<exports symbol='virDomainMigrate' type='function'/>
|
||||
<exports symbol='virDomainSuspend' type='function'/>
|
||||
<exports symbol='virDomainCreateLinux' type='function'/>
|
||||
@ -200,17 +205,20 @@
|
||||
<exports symbol='virDomainDestroy' type='function'/>
|
||||
<exports symbol='virConnectNumOfNetworks' type='function'/>
|
||||
<exports symbol='virStoragePoolLookupByUUIDString' type='function'/>
|
||||
<exports symbol='virInterfaceCreate' type='function'/>
|
||||
<exports symbol='virDomainGetXMLDesc' type='function'/>
|
||||
<exports symbol='virStoragePoolGetUUID' type='function'/>
|
||||
<exports symbol='virNodeDeviceFree' type='function'/>
|
||||
<exports symbol='virStorageVolGetInfo' type='function'/>
|
||||
<exports symbol='virDomainGetInfo' type='function'/>
|
||||
<exports symbol='virNodeDeviceCreateXML' type='function'/>
|
||||
<exports symbol='virNetworkDestroy' type='function'/>
|
||||
<exports symbol='virStoragePoolLookupByName' type='function'/>
|
||||
<exports symbol='virStoragePoolCreateXML' type='function'/>
|
||||
<exports symbol='virNetworkGetAutostart' type='function'/>
|
||||
<exports symbol='virNetworkGetBridgeName' type='function'/>
|
||||
<exports symbol='virStorageVolGetXMLDesc' type='function'/>
|
||||
<exports symbol='virConnectDomainXMLToNative' type='function'/>
|
||||
<exports symbol='virDomainSetSchedulerParameters' type='function'/>
|
||||
<exports symbol='virConnectGetType' type='function'/>
|
||||
<exports symbol='virStorageVolCreateXML' type='function'/>
|
||||
@ -219,6 +227,7 @@
|
||||
<exports symbol='virConnectListDomains' type='function'/>
|
||||
<exports symbol='virDomainCoreDump' type='function'/>
|
||||
<exports symbol='virDomainSetMemory' type='function'/>
|
||||
<exports symbol='virInterfaceGetName' type='function'/>
|
||||
<exports symbol='virStoragePoolCreate' type='function'/>
|
||||
<exports symbol='virNodeGetInfo' type='function'/>
|
||||
<exports symbol='virNetworkSetAutostart' type='function'/>
|
||||
@ -241,6 +250,7 @@
|
||||
<exports symbol='virStoragePoolRef' type='function'/>
|
||||
<exports symbol='virNetworkGetXMLDesc' type='function'/>
|
||||
<exports symbol='virConnectNumOfStoragePools' type='function'/>
|
||||
<exports symbol='virInterfaceGetConnect' type='function'/>
|
||||
<exports symbol='virNetworkGetName' type='function'/>
|
||||
<exports symbol='virConnectListDefinedDomains' type='function'/>
|
||||
<exports symbol='virConnectGetCapabilities' type='function'/>
|
||||
@ -249,27 +259,31 @@
|
||||
<exports symbol='virDomainPinVcpu' type='function'/>
|
||||
<exports symbol='virNodeGetSecurityModel' type='function'/>
|
||||
<exports symbol='virDomainRestore' type='function'/>
|
||||
<exports symbol='virNodeDeviceDestroy' type='function'/>
|
||||
<exports symbol='virStorageVolGetPath' type='function'/>
|
||||
<exports symbol='virNetworkLookupByUUIDString' type='function'/>
|
||||
<exports symbol='virConnectDomainEventCallback' type='function'/>
|
||||
<exports symbol='virDomainLookupByID' type='function'/>
|
||||
<exports symbol='virStorageVolDelete' type='function'/>
|
||||
<exports symbol='virStorageVolFree' type='function'/>
|
||||
<exports symbol='virConnectListInterfaces' type='function'/>
|
||||
<exports symbol='virDomainMemoryPeek' type='function'/>
|
||||
<exports symbol='virNetworkLookupByUUID' type='function'/>
|
||||
<exports symbol='virConnectListDefinedNetworks' type='function'/>
|
||||
<exports symbol='virConnectRef' type='function'/>
|
||||
<exports symbol='virDomainGetUUID' type='function'/>
|
||||
<exports symbol='virNetworkCreateXML' type='function'/>
|
||||
<exports symbol='virConnectDomainEventRegister' type='function'/>
|
||||
<exports symbol='virDomainGetVcpus' type='function'/>
|
||||
<exports symbol='virNodeDeviceLookupByName' type='function'/>
|
||||
<exports symbol='virStoragePoolGetInfo' type='function'/>
|
||||
<exports symbol='virDomainResume' type='function'/>
|
||||
<exports symbol='virNodeListDevices' type='function'/>
|
||||
<exports symbol='virInterfaceRef' type='function'/>
|
||||
<exports symbol='virInterfaceGetMACString' type='function'/>
|
||||
<exports symbol='virNetworkRef' type='function'/>
|
||||
<exports symbol='virStoragePoolRefresh' type='function'/>
|
||||
<exports symbol='virConnectNumOfDefinedDomains' type='function'/>
|
||||
<exports symbol='virStorageVolLookupByKey' type='function'/>
|
||||
<exports symbol='virStorageVolCreateXMLFrom' type='function'/>
|
||||
<exports symbol='virDomainUndefine' type='function'/>
|
||||
<exports symbol='virDomainReboot' type='function'/>
|
||||
<exports symbol='virNetworkGetUUIDString' type='function'/>
|
||||
@ -293,9 +307,12 @@
|
||||
<exports symbol='virNetworkUndefine' type='function'/>
|
||||
<exports symbol='virConnectListDefinedStoragePools' type='function'/>
|
||||
<exports symbol='virEventTimeoutCallback' type='function'/>
|
||||
<exports symbol='virInterfaceFree' type='function'/>
|
||||
<exports symbol='virNodeDeviceNumOfCaps' type='function'/>
|
||||
<exports symbol='virInterfaceLookupByMACString' type='function'/>
|
||||
<exports symbol='virNetworkGetConnect' type='function'/>
|
||||
<exports symbol='virNodeGetFreeMemory' type='function'/>
|
||||
<exports symbol='virInterfaceDestroy' type='function'/>
|
||||
<exports symbol='virStorageVolGetConnect' type='function'/>
|
||||
<exports symbol='virNodeNumOfDevices' type='function'/>
|
||||
<exports symbol='virStoragePoolDestroy' type='function'/>
|
||||
@ -307,106 +324,117 @@
|
||||
<exports symbol='virDomainGetUUIDString' type='function'/>
|
||||
<exports symbol='virDomainGetConnect' type='function'/>
|
||||
<exports symbol='virConnectNumOfDefinedStoragePools' type='function'/>
|
||||
<exports symbol='virNodeListDevices' type='function'/>
|
||||
<exports symbol='virNodeDeviceGetParent' type='function'/>
|
||||
<exports symbol='virConnectOpen' type='function'/>
|
||||
<exports symbol='virDomainCreateXML' type='function'/>
|
||||
<exports symbol='virNodeDeviceRef' type='function'/>
|
||||
<exports symbol='virInterfaceUndefine' type='function'/>
|
||||
<exports symbol='virDomainSetVcpus' type='function'/>
|
||||
<exports symbol='virDomainRef' type='function'/>
|
||||
<exports symbol='virConnectDomainEventRegister' type='function'/>
|
||||
<exports symbol='virConnectNumOfInterfaces' type='function'/>
|
||||
<exports symbol='virDomainGetID' type='function'/>
|
||||
<exports symbol='virDomainBlockPeek' type='function'/>
|
||||
<exports symbol='virEventAddTimeoutFunc' type='function'/>
|
||||
<exports symbol='virInterfaceLookupByName' type='function'/>
|
||||
<exports symbol='virDomainInterfaceStats' type='function'/>
|
||||
<exports symbol='virConnectListNetworks' type='function'/>
|
||||
<exports symbol='virStorageVolLookupByKey' type='function'/>
|
||||
</file>
|
||||
<file name='virterror'>
|
||||
<summary>error handling interfaces for the libvirt library</summary>
|
||||
<description>Provides the interfaces of the libvirt library to handle errors raised while using the library. </description>
|
||||
<author>Daniel Veillard <veillard@redhat.com> </author>
|
||||
<exports symbol='VIR_ERR_XML_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_RPC' type='enum'/>
|
||||
<exports symbol='VIR_ERR_SYSTEM_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_FROM_TEST' type='enum'/>
|
||||
<exports symbol='VIR_ERR_WARNING' type='enum'/>
|
||||
<exports symbol='VIR_FROM_OPENVZ' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_XEN' type='enum'/>
|
||||
<exports symbol='VIR_FROM_STATS_LINUX' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_ARG' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XEN_INOTIFY' type='enum'/>
|
||||
<exports symbol='VIR_ERR_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_OS' type='enum'/>
|
||||
<exports symbol='VIR_FROM_ONE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_NETWORK' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_NODE_DEVICE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_DEVICE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_MEMORY' type='enum'/>
|
||||
<exports symbol='VIR_FROM_SEXPR' type='enum'/>
|
||||
<exports symbol='VIR_WAR_NO_NODE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_RPC' type='enum'/>
|
||||
<exports symbol='VIR_FROM_UML' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_MAC' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_STORAGE_VOL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_NONE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_DOM_EXIST' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_XENSTORE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_DOM' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_DOMAIN' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_STORAGE_POOL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_CONF' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_NETWORK' type='enum'/>
|
||||
<exports symbol='VIR_ERR_AUTH_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XML' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OPERATION_DENIED' type='enum'/>
|
||||
<exports symbol='VIR_FROM_STORAGE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_KERNEL' type='enum'/>
|
||||
<exports symbol='VIR_WAR_NO_STORAGE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_GNUTLS_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_PARSE_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_POST_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OS_TYPE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XENSTORE' type='enum'/>
|
||||
<exports symbol='VIR_WAR_NO_NETWORK' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_CONN' type='enum'/>
|
||||
<exports symbol='VIR_ERR_GET_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_SOURCE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NETWORK_EXIST' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NONE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OK' type='enum'/>
|
||||
<exports symbol='VIR_FROM_NETWORK' type='enum'/>
|
||||
<exports symbol='VIR_ERR_XML_DETAIL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_NET' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XENXM' type='enum'/>
|
||||
<exports symbol='VIR_FROM_REMOTE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XEN_INOTIFY' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_NETWORK' type='enum'/>
|
||||
<exports symbol='VIR_ERR_READ_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_FROM_INTERFACE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_CONNECT' type='enum'/>
|
||||
<exports symbol='VIR_ERR_CALL_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_FROM_VBOX' type='enum'/>
|
||||
<exports symbol='VIR_FROM_TEST' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_DEVICE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_SEXPR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_MAC' type='enum'/>
|
||||
<exports symbol='VIR_ERR_HTTP_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_XENSTORE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XEND' type='enum'/>
|
||||
<exports symbol='VIR_FROM_STATS_LINUX' type='enum'/>
|
||||
<exports symbol='VIR_FROM_OPENVZ' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OS_TYPE' type='enum'/>
|
||||
<exports symbol='VIR_WAR_NO_NETWORK' type='enum'/>
|
||||
<exports symbol='VIR_FROM_UML' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_NAME' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_ROOT' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OPERATION_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_GET_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_FROM_NODEDEV' type='enum'/>
|
||||
<exports symbol='VIR_ERR_DRIVER_FULL' type='enum'/>
|
||||
<exports symbol='VIR_ERR_HTTP_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_NODE_DEVICE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_PARSE_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_SOURCE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_DOMAIN' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_TARGET' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NETWORK_EXIST' type='enum'/>
|
||||
<exports symbol='VIR_FROM_SECURITY' type='enum'/>
|
||||
<exports symbol='VIR_ERR_WRITE_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INTERNAL_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_CONF_SYNTAX' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_STORAGE_POOL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_REMOTE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_SUPPORT' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_SECURITY_MODEL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_QEMU' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XEND' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_STORAGE_VOL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_PROXY' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_NETWORK' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_DOMAIN' type='enum'/>
|
||||
<exports symbol='VIR_ERR_READ_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_SEXPR_SERIAL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_LXC' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XEN' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XENSTORE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OPEN_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_OS' type='enum'/>
|
||||
<exports symbol='VIR_FROM_RPC' type='enum'/>
|
||||
<exports symbol='VIR_FROM_NONE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_DOM' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_DOMAIN' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OPERATION_INVALID' type='enum'/>
|
||||
<exports symbol='VIR_WAR_NO_STORAGE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_GNUTLS_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_XML_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OK' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_INTERFACE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_STORAGE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_PROXY' type='enum'/>
|
||||
<exports symbol='VIR_ERR_DRIVER_FULL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_DOMAIN' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XML' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OPERATION_DENIED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_STORAGE_POOL' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_DOMAIN' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XEN' type='enum'/>
|
||||
<exports symbol='VIR_ERR_RPC' type='enum'/>
|
||||
<exports symbol='VIR_ERR_WARNING' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_ARG' type='enum'/>
|
||||
<exports symbol='VIR_ERR_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_WAR_NO_INTERFACE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_DOM_EXIST' type='enum'/>
|
||||
<exports symbol='VIR_FROM_LXC' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_STORAGE_POOL' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_KERNEL' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_INTERFACE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_XML_DETAIL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_NET' type='enum'/>
|
||||
<exports symbol='VIR_ERR_AUTH_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_NODE_DEVICE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_SYSTEM_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_FROM_QEMU' type='enum'/>
|
||||
<exports symbol='VIR_ERR_WRITE_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INTERNAL_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XENXM' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_STORAGE_VOL' type='enum'/>
|
||||
<exports symbol='VIR_ERR_XEN_CALL' type='enum'/>
|
||||
<exports symbol='VIR_ERR_UNKNOWN_HOST' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_CONNECT' type='enum'/>
|
||||
<exports symbol='VIR_ERR_CALL_FAILED' type='enum'/>
|
||||
<exports symbol='virErrorPtr' type='typedef'/>
|
||||
<exports symbol='virErrorLevel' type='typedef'/>
|
||||
<exports symbol='virErrorDomain' type='typedef'/>
|
||||
@ -549,6 +577,7 @@
|
||||
<enum name='VIR_ERR_INVALID_ARG' file='virterror' value='8' type='virErrorNumber' info='invalid function argument'/>
|
||||
<enum name='VIR_ERR_INVALID_CONN' file='virterror' value='6' type='virErrorNumber' info='invalid connection object'/>
|
||||
<enum name='VIR_ERR_INVALID_DOMAIN' file='virterror' value='7' type='virErrorNumber' info='invalid domain object'/>
|
||||
<enum name='VIR_ERR_INVALID_INTERFACE' file='virterror' value='58' type='virErrorNumber' info=' invalid interface object'/>
|
||||
<enum name='VIR_ERR_INVALID_MAC' file='virterror' value='44' type='virErrorNumber' info='invalid MAC address'/>
|
||||
<enum name='VIR_ERR_INVALID_NETWORK' file='virterror' value='36' type='virErrorNumber' info='invalid network object'/>
|
||||
<enum name='VIR_ERR_INVALID_NODE_DEVICE' file='virterror' value='52' type='virErrorNumber' info='invalid node device object'/>
|
||||
@ -559,6 +588,7 @@
|
||||
<enum name='VIR_ERR_NO_CONNECT' file='virterror' value='5' type='virErrorNumber' info='can't connect to hypervisor'/>
|
||||
<enum name='VIR_ERR_NO_DEVICE' file='virterror' value='23' type='virErrorNumber' info='missing domain devices information'/>
|
||||
<enum name='VIR_ERR_NO_DOMAIN' file='virterror' value='42' type='virErrorNumber' info='domain not found or unexpectedly disappeared'/>
|
||||
<enum name='VIR_ERR_NO_INTERFACE' file='virterror' value='57' type='virErrorNumber' info='interface driver not running'/>
|
||||
<enum name='VIR_ERR_NO_KERNEL' file='virterror' value='17' type='virErrorNumber' info='missing kernel information'/>
|
||||
<enum name='VIR_ERR_NO_MEMORY' file='virterror' value='2' type='virErrorNumber' info='memory allocation failure'/>
|
||||
<enum name='VIR_ERR_NO_NAME' file='virterror' value='21' type='virErrorNumber' info='missing domain name information'/>
|
||||
@ -566,7 +596,7 @@
|
||||
<enum name='VIR_ERR_NO_NODE_DEVICE' file='virterror' value='53' type='virErrorNumber' info='node device not found'/>
|
||||
<enum name='VIR_ERR_NO_OS' file='virterror' value='22' type='virErrorNumber' info='missing domain OS information'/>
|
||||
<enum name='VIR_ERR_NO_ROOT' file='virterror' value='18' type='virErrorNumber' info='missing root device information'/>
|
||||
<enum name='VIR_ERR_NO_SECURITY_MODEL' file='virterror' value='54' type='virErrorNumber' info=' security model not found'/>
|
||||
<enum name='VIR_ERR_NO_SECURITY_MODEL' file='virterror' value='54' type='virErrorNumber' info='security model not found'/>
|
||||
<enum name='VIR_ERR_NO_SOURCE' file='virterror' value='19' type='virErrorNumber' info='missing source device information'/>
|
||||
<enum name='VIR_ERR_NO_STORAGE_POOL' file='virterror' value='49' type='virErrorNumber' info='storage pool not found'/>
|
||||
<enum name='VIR_ERR_NO_STORAGE_VOL' file='virterror' value='50' type='virErrorNumber' info='storage pool not found'/>
|
||||
@ -578,6 +608,7 @@
|
||||
<enum name='VIR_ERR_OPEN_FAILED' file='virterror' value='30' type='virErrorNumber' info='failed to open a conf file'/>
|
||||
<enum name='VIR_ERR_OPERATION_DENIED' file='virterror' value='29' type='virErrorNumber' info='operation forbidden on read-only connections'/>
|
||||
<enum name='VIR_ERR_OPERATION_FAILED' file='virterror' value='9' type='virErrorNumber' info='a command to hypervisor failed'/>
|
||||
<enum name='VIR_ERR_OPERATION_INVALID' file='virterror' value='55' type='virErrorNumber' info='operation is not applicable at this time'/>
|
||||
<enum name='VIR_ERR_OS_TYPE' file='virterror' value='16' type='virErrorNumber' info='unknown OS type'/>
|
||||
<enum name='VIR_ERR_PARSE_FAILED' file='virterror' value='32' type='virErrorNumber' info='failed to parse a conf file'/>
|
||||
<enum name='VIR_ERR_POST_FAILED' file='virterror' value='11' type='virErrorNumber' info='a HTTP POST command to failed'/>
|
||||
@ -598,22 +629,25 @@
|
||||
<enum name='VIR_FROM_CONF' file='virterror' value='9' type='virErrorDomain' info='Error in the configuration file handling'/>
|
||||
<enum name='VIR_FROM_DOM' file='virterror' value='6' type='virErrorDomain' info='Error when operating on a domain'/>
|
||||
<enum name='VIR_FROM_DOMAIN' file='virterror' value='20' type='virErrorDomain' info='Error from domain config'/>
|
||||
<enum name='VIR_FROM_INTERFACE' file='virterror' value='26' type='virErrorDomain' info='Error when operating on an interface'/>
|
||||
<enum name='VIR_FROM_LXC' file='virterror' value='17' type='virErrorDomain' info='Error from Linux Container driver'/>
|
||||
<enum name='VIR_FROM_NET' file='virterror' value='11' type='virErrorDomain' info='Error when operating on a network'/>
|
||||
<enum name='VIR_FROM_NETWORK' file='virterror' value='19' type='virErrorDomain' info='Error from network config'/>
|
||||
<enum name='VIR_FROM_NODEDEV' file='virterror' value='22' type='virErrorDomain' info='Error from node device monitor'/>
|
||||
<enum name='VIR_FROM_NONE' file='virterror' value='0' type='virErrorDomain'/>
|
||||
<enum name='VIR_FROM_ONE' file='virterror' value='27' type='virErrorDomain' info=' Error from OpenNebula driver'/>
|
||||
<enum name='VIR_FROM_OPENVZ' file='virterror' value='14' type='virErrorDomain' info='Error from OpenVZ driver'/>
|
||||
<enum name='VIR_FROM_PROXY' file='virterror' value='8' type='virErrorDomain' info='Error in the proxy code'/>
|
||||
<enum name='VIR_FROM_QEMU' file='virterror' value='10' type='virErrorDomain' info='Error at the QEMU daemon'/>
|
||||
<enum name='VIR_FROM_REMOTE' file='virterror' value='13' type='virErrorDomain' info='Error from remote driver'/>
|
||||
<enum name='VIR_FROM_RPC' file='virterror' value='7' type='virErrorDomain' info='Error in the XML-RPC code'/>
|
||||
<enum name='VIR_FROM_SECURITY' file='virterror' value='24' type='virErrorDomain' info=' Error from security framework'/>
|
||||
<enum name='VIR_FROM_SECURITY' file='virterror' value='24' type='virErrorDomain' info='Error from security framework'/>
|
||||
<enum name='VIR_FROM_SEXPR' file='virterror' value='4' type='virErrorDomain' info='Error in the S-Expression code'/>
|
||||
<enum name='VIR_FROM_STATS_LINUX' file='virterror' value='16' type='virErrorDomain' info='Error in the Linux Stats code'/>
|
||||
<enum name='VIR_FROM_STORAGE' file='virterror' value='18' type='virErrorDomain' info='Error from storage driver'/>
|
||||
<enum name='VIR_FROM_TEST' file='virterror' value='12' type='virErrorDomain' info='Error from test driver'/>
|
||||
<enum name='VIR_FROM_UML' file='virterror' value='21' type='virErrorDomain' info='Error at the UML driver'/>
|
||||
<enum name='VIR_FROM_VBOX' file='virterror' value='25' type='virErrorDomain' info='Error from VirtualBox driver'/>
|
||||
<enum name='VIR_FROM_XEN' file='virterror' value='1' type='virErrorDomain' info='Error at Xen hypervisor layer'/>
|
||||
<enum name='VIR_FROM_XEND' file='virterror' value='2' type='virErrorDomain' info='Error at connection with xend daemon'/>
|
||||
<enum name='VIR_FROM_XENSTORE' file='virterror' value='3' type='virErrorDomain' info='Error at connection with xen store'/>
|
||||
@ -638,6 +672,7 @@
|
||||
<enum name='VIR_VCPU_BLOCKED' file='libvirt' value='2' type='virVcpuState' info=' the virtual CPU is blocked on resource'/>
|
||||
<enum name='VIR_VCPU_OFFLINE' file='libvirt' value='0' type='virVcpuState' info='the virtual CPU is offline'/>
|
||||
<enum name='VIR_VCPU_RUNNING' file='libvirt' value='1' type='virVcpuState' info='the virtual CPU is running'/>
|
||||
<enum name='VIR_WAR_NO_INTERFACE' file='virterror' value='56' type='virErrorNumber' info='failed to start interface driver'/>
|
||||
<enum name='VIR_WAR_NO_NETWORK' file='virterror' value='41' type='virErrorNumber' info='failed to start network'/>
|
||||
<enum name='VIR_WAR_NO_NODE' file='virterror' value='51' type='virErrorNumber' info='failed to start node driver'/>
|
||||
<enum name='VIR_WAR_NO_STORAGE' file='virterror' value='48' type='virErrorNumber' info='failed to start storage'/>
|
||||
@ -734,6 +769,10 @@ see note above'/>
|
||||
<typedef name='virErrorNumber' file='virterror' type='enum'/>
|
||||
<typedef name='virErrorPtr' file='virterror' type='virError *'/>
|
||||
<typedef name='virEventHandleType' file='libvirt' type='enum'/>
|
||||
<struct name='virInterface' file='libvirt' type='struct _virInterface'/>
|
||||
<typedef name='virInterfacePtr' file='libvirt' type='virInterface *'>
|
||||
<info>a virInterfacePtr is pointer to a virInterface private structure, this is the type used to reference a virtual interface in the API.</info>
|
||||
</typedef>
|
||||
<struct name='virNetwork' file='libvirt' type='struct _virNetwork'/>
|
||||
<typedef name='virNetworkPtr' file='libvirt' type='virNetwork *'>
|
||||
<info>a virNetworkPtr is pointer to a virNetwork private structure, this is the type used to reference a virtual network in the API.</info>
|
||||
@ -864,6 +903,22 @@ see note above'/>
|
||||
<arg name='opaque' type='void *' info='opaque data to pass on to the callback'/>
|
||||
<arg name='freecb' type='virFreeCallback' info='optional function to deallocate opaque when not used anymore'/>
|
||||
</function>
|
||||
<function name='virConnectDomainXMLFromNative' file='libvirt' module='libvirt'>
|
||||
<info>Reads native configuration data describing a domain, and generates libvirt domain XML. The format of the native data is hypervisor dependant.</info>
|
||||
<return type='char *' info='a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.'/>
|
||||
<arg name='conn' type='virConnectPtr' info='a connection object'/>
|
||||
<arg name='nativeFormat' type='const char *' info='configuration format importing from'/>
|
||||
<arg name='nativeConfig' type='const char *' info='the configuration data to import'/>
|
||||
<arg name='flags' type='unsigned int' info='currently unused, pass 0'/>
|
||||
</function>
|
||||
<function name='virConnectDomainXMLToNative' file='libvirt' module='libvirt'>
|
||||
<info>Reads a domain XML configuration document, and generates generates a native configuration file describing the domain. The format of the native data is hypervisor dependant.</info>
|
||||
<return type='char *' info='a 0 terminated UTF-8 encoded native config datafile, or NULL in case of error. the caller must free() the returned value.'/>
|
||||
<arg name='conn' type='virConnectPtr' info='a connection object'/>
|
||||
<arg name='nativeFormat' type='const char *' info='configuration format exporting to'/>
|
||||
<arg name='domainXml' type='const char *' info='the domain configuration to export'/>
|
||||
<arg name='flags' type='unsigned int' info='currently unused, pass 0'/>
|
||||
</function>
|
||||
<function name='virConnectFindStoragePoolSources' file='libvirt' module='libvirt'>
|
||||
<info>Talks to a storage backend and attempts to auto-discover the set of available storage pool sources. e.g. For iSCSI this would be a set of iSCSI targets. For NFS this would be a list of exported paths. The srcSpec (optional for some storage pool types, e.g. local ones) is an instance of the storage pool's source element specifying where to look for the pools. srcSpec is not required for some types (e.g., those querying local storage resources only)</info>
|
||||
<return type='char *' info='an xml document consisting of a SourceList element containing a source document appropriate to the given pool type for each discovered source.'/>
|
||||
@ -932,6 +987,13 @@ see note above'/>
|
||||
<arg name='ids' type='int *' info='array to collect the list of IDs of active domains'/>
|
||||
<arg name='maxids' type='int' info='size of @ids'/>
|
||||
</function>
|
||||
<function name='virConnectListInterfaces' file='libvirt' module='libvirt'>
|
||||
<info>Collect the list of physical host interfaces, and store their names in @names</info>
|
||||
<return type='int' info='the number of interfaces found or -1 in case of error'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='names' type='char ** const' info='array to collect the list of names of interfaces'/>
|
||||
<arg name='maxnames' type='int' info='size of @names'/>
|
||||
</function>
|
||||
<function name='virConnectListNetworks' file='libvirt' module='libvirt'>
|
||||
<info>Collect the list of active networks, and store their names in @names</info>
|
||||
<return type='int' info='the number of networks found or -1 in case of error'/>
|
||||
@ -966,6 +1028,11 @@ see note above'/>
|
||||
<return type='int' info='the number of domain found or -1 in case of error'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
</function>
|
||||
<function name='virConnectNumOfInterfaces' file='libvirt' module='libvirt'>
|
||||
<info>Provides the number of interfaces on the physical host.</info>
|
||||
<return type='int' info='the number of interface found or -1 in case of error'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
</function>
|
||||
<function name='virConnectNumOfNetworks' file='libvirt' module='libvirt'>
|
||||
<info>Provides the number of active networks.</info>
|
||||
<return type='int' info='the number of network found or -1 in case of error'/>
|
||||
@ -995,7 +1062,7 @@ see note above'/>
|
||||
</function>
|
||||
<function name='virConnectRef' file='libvirt' module='libvirt'>
|
||||
<info>Increment the reference count on the connection. For each additional call to this method, there shall be a corresponding call to virConnectClose to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a connection would increment the reference count.</info>
|
||||
<return type='int' info=''/>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure'/>
|
||||
<arg name='conn' type='virConnectPtr' info='the connection to hold a reference on'/>
|
||||
</function>
|
||||
<function name='virCopyLastError' file='virterror' module='virterror'>
|
||||
@ -1059,7 +1126,7 @@ see note above'/>
|
||||
<arg name='flags' type='unsigned int' info='callers should always pass 0'/>
|
||||
</function>
|
||||
<function name='virDomainDefineXML' file='libvirt' module='libvirt'>
|
||||
<info>Define a domain, but does not start it. This definition is persistent, until explicitly undefined with virDomainUndefine().</info>
|
||||
<info>Define a domain, but does not start it. This definition is persistent, until explicitly undefined with virDomainUndefine(). A previous definition for this domain would be overriden if it already exists.</info>
|
||||
<return type='virDomainPtr' info='NULL in case of error, a pointer to the domain otherwise'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='xml' type='const char *' info='the XML description for the domain, preferably in UTF-8'/>
|
||||
@ -1136,8 +1203,8 @@ see note above'/>
|
||||
<arg name='nparams' type='int *' info='number of scheduler parameters(return value)'/>
|
||||
</function>
|
||||
<function name='virDomainGetSecurityLabel' file='libvirt' module='libvirt'>
|
||||
<info>Extract security label of an active domain.</info>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure, and -2 if the operation is not supported (caller decides if that's an error).'/>
|
||||
<info>Extract security label of an active domain. The 'label' field in the @seclabel argument will be initialized to the empty string if the domain is not running under a security model.</info>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
<arg name='seclabel' type='virSecurityLabelPtr' info='pointer to a virSecurityLabel structure'/>
|
||||
</function>
|
||||
@ -1235,8 +1302,8 @@ see note above'/>
|
||||
</function>
|
||||
<function name='virDomainRef' file='libvirt' module='libvirt'>
|
||||
<info>Increment the reference count on the domain. For each additional call to this method, there shall be a corresponding call to virDomainFree to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a domain would increment the reference count.</info>
|
||||
<return type='int' info=''/>
|
||||
<arg name='domain' type='virDomainPtr' info=''/>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='the domain to hold a reference on'/>
|
||||
</function>
|
||||
<function name='virDomainRestore' file='libvirt' module='libvirt'>
|
||||
<info>This method will restore a domain saved to disk by virDomainSave().</info>
|
||||
@ -1395,6 +1462,73 @@ see note above'/>
|
||||
<info>Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</info>
|
||||
<return type='int' info='0 in case of success, -1 in case of error'/>
|
||||
</function>
|
||||
<function name='virInterfaceCreate' file='libvirt' module='libvirt'>
|
||||
<info>Activate an interface (ie call "ifup")</info>
|
||||
<return type='int' info='0 in case of success, -1 in case of error'/>
|
||||
<arg name='iface' type='virInterfacePtr' info='pointer to a defined interface'/>
|
||||
<arg name='flags' type='unsigned int' info='and OR'ed set of extraction flags, not used yet'/>
|
||||
</function>
|
||||
<function name='virInterfaceDefineXML' file='libvirt' module='libvirt'>
|
||||
<info>Define an interface (or modify existing interface configuration)</info>
|
||||
<return type='virInterfacePtr' info='NULL in case of error, a pointer to the interface otherwise'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='xml' type='const char *' info='the XML description for the interface, preferably in UTF-8'/>
|
||||
<arg name='flags' type='unsigned int' info='and OR'ed set of extraction flags, not used yet'/>
|
||||
</function>
|
||||
<function name='virInterfaceDestroy' file='libvirt' module='libvirt'>
|
||||
<info>deactivate an interface (ie call "ifdown") This does not remove the interface from the config, and does not free the associated virInterfacePtr object.</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='iface' type='virInterfacePtr' info='an interface object'/>
|
||||
<arg name='flags' type='unsigned int' info='and OR'ed set of extraction flags, not used yet'/>
|
||||
</function>
|
||||
<function name='virInterfaceFree' file='libvirt' module='libvirt'>
|
||||
<info>Free the interface object. The interface itself is unaltered. The data structure is freed and should not be used thereafter.</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='iface' type='virInterfacePtr' info='a interface object'/>
|
||||
</function>
|
||||
<function name='virInterfaceGetConnect' file='libvirt' module='libvirt'>
|
||||
<info>Provides the connection pointer associated with an interface. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the interface object together.</info>
|
||||
<return type='virConnectPtr' info='the virConnectPtr or NULL in case of failure.'/>
|
||||
<arg name='iface' type='virInterfacePtr' info='pointer to a interface'/>
|
||||
</function>
|
||||
<function name='virInterfaceGetMACString' file='libvirt' module='libvirt'>
|
||||
<info>Get the MAC for a interface as string. For more information about MAC see RFC4122.</info>
|
||||
<return type='const char *' info='a pointer to the MAC address (in null-terminated ASCII format) or NULL, the string need not be deallocated its lifetime will be the same as the interface object.'/>
|
||||
<arg name='iface' type='virInterfacePtr' info='a interface object'/>
|
||||
</function>
|
||||
<function name='virInterfaceGetName' file='libvirt' module='libvirt'>
|
||||
<info>Get the public name for that interface</info>
|
||||
<return type='const char *' info='a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the interface object.'/>
|
||||
<arg name='iface' type='virInterfacePtr' info='a interface object'/>
|
||||
</function>
|
||||
<function name='virInterfaceGetXMLDesc' file='libvirt' module='libvirt'>
|
||||
<info>Provide an XML description of the interface. The description may be reused later to recreate the interface with virInterfaceCreateXML().</info>
|
||||
<return type='char *' info='a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.'/>
|
||||
<arg name='iface' type='virInterfacePtr' info='a interface object'/>
|
||||
<arg name='flags' type='unsigned int' info='and OR'ed set of extraction flags, not used yet'/>
|
||||
</function>
|
||||
<function name='virInterfaceLookupByMACString' file='libvirt' module='libvirt'>
|
||||
<info>Try to lookup an interface on the given hypervisor based on its MAC.</info>
|
||||
<return type='virInterfacePtr' info='a new interface object or NULL in case of failure. If the interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised.'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='macstr' type='const char *' info='the MAC for the interface (null-terminated ASCII format)'/>
|
||||
</function>
|
||||
<function name='virInterfaceLookupByName' file='libvirt' module='libvirt'>
|
||||
<info>Try to lookup an interface on the given hypervisor based on its name.</info>
|
||||
<return type='virInterfacePtr' info='a new interface object or NULL in case of failure. If the interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised.'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='name' type='const char *' info='name for the interface'/>
|
||||
</function>
|
||||
<function name='virInterfaceRef' file='libvirt' module='libvirt'>
|
||||
<info>Increment the reference count on the interface. For each additional call to this method, there shall be a corresponding call to virInterfaceFree to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a interface would increment the reference count.</info>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure.'/>
|
||||
<arg name='iface' type='virInterfacePtr' info='the interface to hold a reference on'/>
|
||||
</function>
|
||||
<function name='virInterfaceUndefine' file='libvirt' module='libvirt'>
|
||||
<info>Undefine an interface, ie remove it from the config. This does not free the associated virInterfacePtr object.</info>
|
||||
<return type='int' info='0 in case of success, -1 in case of error'/>
|
||||
<arg name='iface' type='virInterfacePtr' info='pointer to a defined interface'/>
|
||||
</function>
|
||||
<function name='virNetworkCreate' file='libvirt' module='libvirt'>
|
||||
<info>Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.</info>
|
||||
<return type='int' info='0 in case of success, -1 in case of error'/>
|
||||
@ -1481,8 +1615,8 @@ see note above'/>
|
||||
</function>
|
||||
<function name='virNetworkRef' file='libvirt' module='libvirt'>
|
||||
<info>Increment the reference count on the network. For each additional call to this method, there shall be a corresponding call to virNetworkFree to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a network would increment the reference count.</info>
|
||||
<return type='int' info=''/>
|
||||
<arg name='network' type='virNetworkPtr' info=''/>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure.'/>
|
||||
<arg name='network' type='virNetworkPtr' info='the network to hold a reference on'/>
|
||||
</function>
|
||||
<function name='virNetworkSetAutostart' file='libvirt' module='libvirt'>
|
||||
<info>Configure the network to be automatically started when the host machine boots.</info>
|
||||
@ -1495,10 +1629,22 @@ see note above'/>
|
||||
<return type='int' info='0 in case of success, -1 in case of error'/>
|
||||
<arg name='network' type='virNetworkPtr' info='pointer to a defined network'/>
|
||||
</function>
|
||||
<function name='virNodeDeviceCreateXML' file='libvirt' module='libvirt'>
|
||||
<info>Create a new device on the VM host machine, for example, virtual HBAs created using vport_create.</info>
|
||||
<return type='virNodeDevicePtr' info='a node device object if successful, NULL in case of failure'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='xmlDesc' type='const char *' info='string containing an XML description of the device to be created'/>
|
||||
<arg name='flags' type='unsigned int' info='callers should always pass 0'/>
|
||||
</function>
|
||||
<function name='virNodeDeviceDestroy' file='libvirt' module='libvirt'>
|
||||
<info>Destroy the device object. The virtual device is removed from the host operating system. This function may require privileged access</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='dev' type='virNodeDevicePtr' info='a device object'/>
|
||||
</function>
|
||||
<function name='virNodeDeviceDettach' file='libvirt' module='libvirt'>
|
||||
<info></info>
|
||||
<return type='int' info=''/>
|
||||
<arg name='dev' type='virNodeDevicePtr' info=''/>
|
||||
<info>Dettach the node device from the node itself so that it may be assigned to a guest domain. Depending on the hypervisor, this may involve operations such as unbinding any device drivers from the device, binding the device to a dummy device driver and resetting the device. If the device is currently in use by the node, this method may fail. Once the device is not assigned to any guest, it may be re-attached to the node using the virNodeDeviceReattach() method.</info>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure.'/>
|
||||
<arg name='dev' type='virNodeDevicePtr' info='pointer to the node device'/>
|
||||
</function>
|
||||
<function name='virNodeDeviceFree' file='libvirt' module='libvirt'>
|
||||
<info>Drops a reference to the node device, freeing it if this was the last reference.</info>
|
||||
@ -1541,17 +1687,17 @@ see note above'/>
|
||||
</function>
|
||||
<function name='virNodeDeviceReAttach' file='libvirt' module='libvirt'>
|
||||
<info>Re-attach a previously dettached node device to the node so that it may be used by the node again. Depending on the hypervisor, this may involve operations such as resetting the device, unbinding it from a dummy device driver and binding it to its appropriate driver. If the device is currently in use by a guest, this method may fail.</info>
|
||||
<return type='int' info=''/>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure.'/>
|
||||
<arg name='dev' type='virNodeDevicePtr' info='pointer to the node device'/>
|
||||
</function>
|
||||
<function name='virNodeDeviceRef' file='libvirt' module='libvirt'>
|
||||
<info>Increment the reference count on the dev. For each additional call to this method, there shall be a corresponding call to virNodeDeviceFree to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a dev would increment the reference count.</info>
|
||||
<return type='int' info=''/>
|
||||
<arg name='dev' type='virNodeDevicePtr' info=''/>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure.'/>
|
||||
<arg name='dev' type='virNodeDevicePtr' info='the dev to hold a reference on'/>
|
||||
</function>
|
||||
<function name='virNodeDeviceReset' file='libvirt' module='libvirt'>
|
||||
<info>Reset a previously dettached node device to the node before or after assigning it to a guest. The exact reset semantics depends on the hypervisor and device type but, for example, KVM will attempt to reset PCI devices with a Function Level Reset, Secondary Bus Reset or a Power Management D-State reset. If the reset will affect other devices which are currently in use, this function may fail.</info>
|
||||
<return type='int' info=''/>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure.'/>
|
||||
<arg name='dev' type='virNodeDevicePtr' info='pointer to the node device'/>
|
||||
</function>
|
||||
<function name='virNodeGetCellsFreeMemory' file='libvirt' module='libvirt'>
|
||||
@ -1563,8 +1709,8 @@ see note above'/>
|
||||
<arg name='maxCells' type='int' info='Maximum number of cells for which freeMems information can be returned.'/>
|
||||
</function>
|
||||
<function name='virNodeGetFreeMemory' file='libvirt' module='libvirt'>
|
||||
<info>provides the free memory available on the Node</info>
|
||||
<return type='unsigned long long' info='the available free memory in kilobytes or 0 in case of error'/>
|
||||
<info>provides the free memory available on the Node Note: most libvirt APIs provide memory sizes in kilobytes, but in this function the returned value is in bytes. Divide by 1024 as necessary.</info>
|
||||
<return type='unsigned long long' info='the available free memory in bytes or 0 in case of error'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
</function>
|
||||
<function name='virNodeGetInfo' file='libvirt' module='libvirt'>
|
||||
@ -1574,8 +1720,8 @@ see note above'/>
|
||||
<arg name='info' type='virNodeInfoPtr' info='pointer to a virNodeInfo structure allocated by the user'/>
|
||||
</function>
|
||||
<function name='virNodeGetSecurityModel' file='libvirt' module='libvirt'>
|
||||
<info>Extract the security model of a hypervisor.</info>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure, and -2 if the operation is not supported (caller decides if that's an error).'/>
|
||||
<info>Extract the security model of a hypervisor. The 'model' field in the @secmodel argument may be initialized to the empty string if the driver has not activated a security model.</info>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure'/>
|
||||
<arg name='conn' type='virConnectPtr' info='a connection object'/>
|
||||
<arg name='secmodel' type='virSecurityModelPtr' info='pointer to a virSecurityModel structure'/>
|
||||
</function>
|
||||
@ -1733,8 +1879,8 @@ see note above'/>
|
||||
</function>
|
||||
<function name='virStoragePoolRef' file='libvirt' module='libvirt'>
|
||||
<info>Increment the reference count on the pool. For each additional call to this method, there shall be a corresponding call to virStoragePoolFree to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a pool would increment the reference count.</info>
|
||||
<return type='int' info=''/>
|
||||
<arg name='pool' type='virStoragePoolPtr' info=''/>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure.'/>
|
||||
<arg name='pool' type='virStoragePoolPtr' info='the pool to hold a reference on'/>
|
||||
</function>
|
||||
<function name='virStoragePoolRefresh' file='libvirt' module='libvirt'>
|
||||
<info>Request that the pool refresh its list of volumes. This may involve communicating with a remote server, and/or initializing new devices at the OS layer</info>
|
||||
@ -1760,6 +1906,14 @@ see note above'/>
|
||||
<arg name='xmldesc' type='const char *' info='description of volume to create'/>
|
||||
<arg name='flags' type='unsigned int' info='flags for creation (unused, pass 0)'/>
|
||||
</function>
|
||||
<function name='virStorageVolCreateXMLFrom' file='libvirt' module='libvirt'>
|
||||
<info>Create a storage volume in the parent pool, using the 'clonevol' volume as input. Information for the new volume (name, perms) are passed via a typical volume XML description.</info>
|
||||
<return type='virStorageVolPtr' info='the storage volume, or NULL on error'/>
|
||||
<arg name='pool' type='virStoragePoolPtr' info='pointer to parent pool for the new volume'/>
|
||||
<arg name='xmldesc' type='const char *' info='description of volume to create'/>
|
||||
<arg name='clonevol' type='virStorageVolPtr' info='storage volume to use as input'/>
|
||||
<arg name='flags' type='unsigned int' info='flags for creation (unused, pass 0)'/>
|
||||
</function>
|
||||
<function name='virStorageVolDelete' file='libvirt' module='libvirt'>
|
||||
<info>Delete the storage volume from the pool</info>
|
||||
<return type='int' info='0 on success, or -1 on error'/>
|
||||
@ -1823,8 +1977,8 @@ see note above'/>
|
||||
</function>
|
||||
<function name='virStorageVolRef' file='libvirt' module='libvirt'>
|
||||
<info>Increment the reference count on the vol. For each additional call to this method, there shall be a corresponding call to virStorageVolFree to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a vol would increment the reference count.</info>
|
||||
<return type='int' info=''/>
|
||||
<arg name='vol' type='virStorageVolPtr' info=''/>
|
||||
<return type='int' info='0 in case of success, -1 in case of failure.'/>
|
||||
<arg name='vol' type='virStorageVolPtr' info='the vol to hold a reference on'/>
|
||||
</function>
|
||||
</symbols>
|
||||
</api>
|
||||
|
114
docs/libvirt-daemon-arch.fig
Normal file
114
docs/libvirt-daemon-arch.fig
Normal file
@ -0,0 +1,114 @@
|
||||
#FIG 3.2 Produced by xfig version 3.2.5
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
6 75 150 13050 5100
|
||||
6 4425 764 5938 1150
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
4425 764 5938 764 5938 1150 4425 1150 4425 764
|
||||
4 0 0 50 -1 16 15 0.0000 4 131 415 4519 1053 xen\001
|
||||
-6
|
||||
6 4425 1246 5938 1631
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
4425 1246 5938 1246 5938 1631 4425 1631 4425 1246
|
||||
4 0 0 50 -1 16 15 0.0000 4 178 640 4519 1535 qemu\001
|
||||
-6
|
||||
6 4425 1728 5938 2113
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
4425 1728 5938 1728 5938 2113 4425 2113 4425 1728
|
||||
4 0 0 50 -1 16 15 0.0000 4 178 829 4519 2017 openvz\001
|
||||
-6
|
||||
6 4425 2210 5938 2595
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
4425 2210 5938 2210 5938 2595 4425 2595 4425 2210
|
||||
4 0 0 50 -1 16 15 0.0000 4 178 320 4519 2499 lxc\001
|
||||
-6
|
||||
6 4425 2691 5938 3077
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
4425 2691 5938 2691 5938 3077 4425 3077 4425 2691
|
||||
4 0 0 50 -1 16 15 0.0000 4 166 415 4519 2980 test\001
|
||||
-6
|
||||
6 4425 3173 5938 3559
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
4425 3173 5938 3173 5938 3559 4425 3559 4425 3173
|
||||
4 0 0 50 -1 16 15 0.0000 4 166 794 4519 3462 remote\001
|
||||
-6
|
||||
6 11328 764 12842 1150
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
11328 764 12842 764 12842 1150 11328 1150 11328 764
|
||||
4 0 0 50 -1 16 15 0.0000 4 131 415 11423 1053 xen\001
|
||||
-6
|
||||
6 11328 1246 12842 1631
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
11328 1246 12842 1246 12842 1631 11328 1631 11328 1246
|
||||
4 0 0 50 -1 16 15 0.0000 4 178 640 11423 1535 qemu\001
|
||||
-6
|
||||
6 11328 1728 12842 2113
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
11328 1728 12842 1728 12842 2113 11328 2113 11328 1728
|
||||
4 0 0 50 -1 16 15 0.0000 4 178 829 11423 2017 openvz\001
|
||||
-6
|
||||
6 11328 2210 12842 2595
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
11328 2210 12842 2210 12842 2595 11328 2595 11328 2210
|
||||
4 0 0 50 -1 16 15 0.0000 4 178 320 11423 2499 lxc\001
|
||||
-6
|
||||
6 11328 2691 12842 3077
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
11328 2691 12842 2691 12842 3077 11328 3077 11328 2691
|
||||
4 0 0 50 -1 16 15 0.0000 4 166 415 11423 2980 test\001
|
||||
-6
|
||||
6 11328 3173 12842 3559
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
11328 3173 12842 3173 12842 3559 11328 3559 11328 3173
|
||||
4 0 0 50 -1 16 15 0.0000 4 166 794 11423 3462 remote\001
|
||||
-6
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
75 1342 1587 1342 1587 2113 75 2113 75 1342
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
0 0 1.00 76.37 152.74
|
||||
1587 1728 3101 1728
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
|
||||
0 0 1.00 76.37 152.74
|
||||
5938 3365 6883 3365 7262 1728 7640 1728
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
|
||||
0 0 1.00 76.37 152.74
|
||||
3101 1728 3858 1728 4141 3365 4425 3365
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
3101 572 6127 572 6127 3751 3101 3751 3101 572
|
||||
2 1 0 5 0 7 50 -1 -1 12.000 0 0 -1 0 0 2
|
||||
3101 572 3101 3751
|
||||
2 1 2 5 0 7 50 -1 -1 3.000 0 0 -1 0 0 2
|
||||
3858 572 3858 3751
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
0 0 1.00 76.37 152.74
|
||||
9154 1728 10004 1728
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
7640 1342 9154 1342 9154 2113 7640 2113 7640 1342
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
|
||||
0 0 1.00 76.37 152.74
|
||||
10004 1728 10760 1728 10950 2402 11328 2402
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
10004 572 13030 572 13030 3751 10004 3751 10004 572
|
||||
2 1 0 5 0 7 50 -1 -1 12.000 0 0 -1 0 0 2
|
||||
10004 572 10004 3751
|
||||
2 1 2 5 0 7 50 -1 -1 3.000 0 0 -1 0 0 2
|
||||
10760 572 10760 3751
|
||||
4 0 0 50 -1 16 15 0.0000 4 225 1256 170 1728 Application\001
|
||||
4 0 0 50 -1 16 13 0.0000 4 154 367 1966 1631 URI\001
|
||||
4 0 0 50 -1 16 15 5.3233 4 178 1149 3763 4040 Driver API\001
|
||||
4 0 0 50 -1 16 15 5.3233 4 178 1173 3101 4040 Public API\001
|
||||
4 0 0 50 -1 16 15 5.3233 4 225 1233 4992 4040 Driver Impl\001
|
||||
4 0 0 50 -1 16 18 0.0000 4 213 652 3763 379 libvirt\001
|
||||
4 0 0 50 -1 16 13 0.0000 4 154 901 1966 2017 lxc://host/\001
|
||||
4 0 0 50 -1 16 15 0.0000 4 178 747 7734 1728 libvirtd\001
|
||||
4 0 0 50 -1 16 15 5.3233 4 178 1149 10666 4040 Driver API\001
|
||||
4 0 0 50 -1 16 15 5.3233 4 178 1173 10004 4040 Public API\001
|
||||
4 0 0 50 -1 16 15 5.3233 4 225 1233 11896 4040 Driver Impl\001
|
||||
4 0 0 50 -1 16 18 0.0000 4 213 652 10666 379 libvirt\001
|
||||
-6
|
BIN
docs/libvirt-daemon-arch.png
Normal file
BIN
docs/libvirt-daemon-arch.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
62
docs/libvirt-driver-arch.fig
Normal file
62
docs/libvirt-driver-arch.fig
Normal file
@ -0,0 +1,62 @@
|
||||
#FIG 3.2 Produced by xfig version 3.2.5
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
6 1200 225 10950 8147
|
||||
6 8208 1291 10646 1900
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
8208 1291 10646 1291 10646 1900 8208 1900 8208 1291
|
||||
4 0 0 50 -1 16 24 0.0000 4 214 639 8360 1748 xen\001
|
||||
-6
|
||||
6 8208 2054 10646 2662
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
8208 2054 10646 2054 10646 2662 8208 2662 8208 2054
|
||||
4 0 0 50 -1 16 24 0.0000 4 305 975 8360 2510 qemu\001
|
||||
-6
|
||||
6 8208 2815 10646 3424
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
8208 2815 10646 2815 10646 3424 8208 3424 8208 2815
|
||||
4 0 0 50 -1 16 24 0.0000 4 305 1280 8360 3272 openvz\001
|
||||
-6
|
||||
6 8208 3577 10646 4187
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
8208 3577 10646 3577 10646 4187 8208 4187 8208 3577
|
||||
4 0 0 50 -1 16 24 0.0000 4 304 518 8360 4033 lxc\001
|
||||
-6
|
||||
6 8208 4339 10646 4948
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
8208 4339 10646 4339 10646 4948 8208 4948 8208 4339
|
||||
4 0 0 50 -1 16 24 0.0000 4 274 670 8360 4795 test\001
|
||||
-6
|
||||
6 8208 5100 10646 5710
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
8208 5100 10646 5100 10646 5710 8208 5710 8208 5100
|
||||
4 0 0 50 -1 16 24 0.0000 4 274 1219 8360 5557 remote\001
|
||||
-6
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
1200 2206 3637 2206 3637 3424 1200 3424 1200 2206
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
0 0 1.00 121.88 243.75
|
||||
3637 2815 6075 2815
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
|
||||
0 0 1.00 121.88 243.75
|
||||
6075 2815 7294 2815 7598 3881 8208 3881
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
6075 987 10950 987 10950 6014 6075 6014 6075 987
|
||||
2 1 0 5 0 7 50 -1 -1 12.000 0 0 -1 0 0 2
|
||||
6075 987 6075 6014
|
||||
2 1 2 5 0 7 50 -1 -1 3.000 0 0 -1 0 0 2
|
||||
7294 987 7294 6014
|
||||
4 0 0 50 -1 16 24 0.0000 4 395 1950 1352 2815 Application\001
|
||||
4 0 0 50 -1 16 20 0.0000 4 244 579 4246 2662 URI\001
|
||||
4 0 0 50 -1 16 20 0.0000 4 244 792 4246 3272 lxc:///\001
|
||||
4 0 0 50 -1 16 24 5.3233 4 304 1828 7142 6472 Driver API\001
|
||||
4 0 0 50 -1 16 24 5.3233 4 304 1889 6075 6472 Public API\001
|
||||
4 0 0 50 -1 16 24 5.3233 4 395 1920 9121 6472 Driver Impl\001
|
||||
4 0 0 50 -1 16 28 0.0000 4 366 1157 7142 682 libvirt\001
|
||||
-6
|
BIN
docs/libvirt-driver-arch.png
Normal file
BIN
docs/libvirt-driver-arch.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
61
docs/libvirt-object-model.fig
Normal file
61
docs/libvirt-object-model.fig
Normal file
@ -0,0 +1,61 @@
|
||||
#FIG 3.2 Produced by xfig version 3.2.5
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
6 1200 1200 10274 6975
|
||||
6 4500 1200 6974 2025
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
4500 1200 6974 1200 6974 2025 4500 2025 4500 1200
|
||||
4 0 0 50 -1 16 17 0.0000 4 202 1679 4603 1613 virConnectPtr\001
|
||||
-6
|
||||
6 1200 3675 3675 4500
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
1200 3675 3675 3675 3675 4500 1200 4500 1200 3675
|
||||
4 0 0 50 -1 16 17 0.0000 4 202 1595 1303 4087 virDomainPtr\001
|
||||
-6
|
||||
6 1200 6150 3675 6975
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
1200 6150 3675 6150 3675 6975 1200 6975 1200 6150
|
||||
4 0 0 50 -1 16 17 0.0000 4 202 1667 1303 6562 virNetworkPtr\001
|
||||
-6
|
||||
6 7799 3675 10274 4500
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
7799 3675 10274 3675 10274 4500 7799 4500 7799 3675
|
||||
4 0 0 50 -1 16 17 0.0000 4 262 2155 7902 4087 virStoragePoolPtr\001
|
||||
-6
|
||||
6 7799 6150 10274 6975
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
7799 6150 10274 6150 10274 6975 7799 6975 7799 6150
|
||||
4 0 0 50 -1 16 17 0.0000 4 262 2000 7902 6562 virStorageVolPtr\001
|
||||
-6
|
||||
3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3
|
||||
0 0 1.00 82.50 164.99
|
||||
4706 2025 4706 4087 3675 4087
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3
|
||||
0 0 1.00 82.50 164.99
|
||||
6768 2025 6768 4087 7799 4087
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3
|
||||
0 0 1.00 82.50 164.99
|
||||
6562 2025 6562 6562 7799 6562
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3
|
||||
0 0 1.00 82.50 164.99
|
||||
4912 2025 4912 6562 3675 6562
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2
|
||||
0 0 1.00 82.50 164.99
|
||||
8933 4500 8933 6150
|
||||
0.000 0.000
|
||||
4 0 0 50 -1 16 17 0.0000 4 143 155 3881 3985 n\001
|
||||
4 0 0 50 -1 16 17 0.0000 4 143 155 3881 6459 n\001
|
||||
4 0 0 50 -1 16 17 0.0000 4 143 155 7387 6459 n\001
|
||||
4 0 0 50 -1 16 17 0.0000 4 143 155 7387 3985 n\001
|
||||
4 0 0 50 -1 16 17 0.0000 4 143 155 8727 5944 n\001
|
||||
-6
|
BIN
docs/libvirt-object-model.png
Normal file
BIN
docs/libvirt-object-model.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
File diff suppressed because it is too large
Load Diff
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -147,7 +151,7 @@
|
||||
variables, stored in the configuration file:
|
||||
</p>
|
||||
<ul><li>log_level: accepts the following values:
|
||||
<ul><li>0: no logging at all</li><li>4: only errors</li><li>3: warnings and errors</li><li>2: informations, warnings and errors</li><li>1: debug and everything</li></ul></li><li>log_filters: allow to define logging filters</li><li>log_outputs: allow to define logging outputs</li></ul>
|
||||
<ul><li>4: only errors</li><li>3: warnings and errors</li><li>2: informations, warnings and errors</li><li>1: debug and everything</li></ul></li><li>log_filters: allow to define logging filters</li><li>log_outputs: allow to define logging outputs</li></ul>
|
||||
<p>In both case the syntax for filters and outputs is similar.</p>
|
||||
<p>The format for a filter is:</p>
|
||||
<pre>x:name</pre>
|
||||
@ -166,15 +170,15 @@
|
||||
given <code>name</code> as the ident</li><li><code>x:file:file_path</code>output to a file, with the given
|
||||
filepath</li></ul>
|
||||
<p>In all cases the x prefix is the minimal level, acting as a filter:</p>
|
||||
<ul><li>0: everything</li><li>1: DEBUG</li><li>2: INFO</li><li>3: WARNING</li><li>4: ERROR</li></ul>
|
||||
<ul><li>1: DEBUG</li><li>2: INFO</li><li>3: WARNING</li><li>4: ERROR</li></ul>
|
||||
<p>Multiple output can be defined , they just need to be separated by
|
||||
spaces, e.g.: <code>"3:syslog:libvirtd 0:file:/tmp/libvirt.log"</code>
|
||||
spaces, e.g.: <code>"3:syslog:libvirtd 1:file:/tmp/libvirt.log"</code>
|
||||
will log all warnings and errors to syslog under the libvirtd ident
|
||||
but also log everything debugging and informations included in the
|
||||
file <code>/tmp/libvirt.log</code></p>
|
||||
<p>For example setting up the following:</p>
|
||||
<pre>export LIBVIRT_DEBUG=1
|
||||
export LIBVIRT_LOG_OUTPUTS="0:file:virsh.log"</pre>
|
||||
export LIBVIRT_LOG_OUTPUTS="1:file:virsh.log"</pre>
|
||||
<p>and then running virsh will accumulate the logs in the
|
||||
<code>virsh.log</code> file in a way similar to:</p>
|
||||
<pre>14:29:04.771: debug : virInitialize:278 : register drivers
|
||||
|
@ -49,7 +49,6 @@
|
||||
<ul>
|
||||
<li>log_level: accepts the following values:
|
||||
<ul>
|
||||
<li>0: no logging at all</li>
|
||||
<li>4: only errors</li>
|
||||
<li>3: warnings and errors</li>
|
||||
<li>2: informations, warnings and errors</li>
|
||||
@ -84,20 +83,19 @@
|
||||
</ul>
|
||||
<p>In all cases the x prefix is the minimal level, acting as a filter:</p>
|
||||
<ul>
|
||||
<li>0: everything</li>
|
||||
<li>1: DEBUG</li>
|
||||
<li>2: INFO</li>
|
||||
<li>3: WARNING</li>
|
||||
<li>4: ERROR</li>
|
||||
</ul>
|
||||
<p>Multiple output can be defined , they just need to be separated by
|
||||
spaces, e.g.: <code>"3:syslog:libvirtd 0:file:/tmp/libvirt.log"</code>
|
||||
spaces, e.g.: <code>"3:syslog:libvirtd 1:file:/tmp/libvirt.log"</code>
|
||||
will log all warnings and errors to syslog under the libvirtd ident
|
||||
but also log everything debugging and informations included in the
|
||||
file <code>/tmp/libvirt.log</code></p>
|
||||
<p>For example setting up the following:</p>
|
||||
<pre>export LIBVIRT_DEBUG=1
|
||||
export LIBVIRT_LOG_OUTPUTS="0:file:virsh.log"</pre>
|
||||
export LIBVIRT_LOG_OUTPUTS="1:file:virsh.log"</pre>
|
||||
<p>and then running virsh will accumulate the logs in the
|
||||
<code>virsh.log</code> file in a way similar to:</p>
|
||||
<pre>14:29:04.771: debug : virInitialize:278 : register drivers
|
||||
|
160
docs/news.html
160
docs/news.html
@ -76,6 +76,166 @@
|
||||
<p>Here is the list of official releases, however since it is early on in the
|
||||
development of libvirt, it is preferable when possible to just use the <a href="downloads.html">CVS version or snapshot</a>, contact the mailing list
|
||||
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
|
||||
<h3>0.6.5: Jul 3 2009</h3>
|
||||
<ul><li>New features: create storage columes on disk backend (Henrik Persson),
|
||||
drop of capabilities based on libcap-ng when possible (Daniel
|
||||
Berrange)</li><li>Portability: fix build on non-Linux targets (Daniel Berrange)</li><li>Documentation: typo and english fixes (Runa Bhattacharjee and
|
||||
Garry Dolley), Docs on extending APIs (Dave Allan), cleanup
|
||||
of debug and logging documentation (Amy Griffis), add
|
||||
HACKING doc to the website (Daniel Berrange),
|
||||
documentation for OpenNebula driver (Abel Miguez Rodriguez)</li><li>Bug fixes: forbid autostart on transcient networks,
|
||||
xen device removal crash (Daniel Berrange), re-detection of
|
||||
transient VMs after libvirtd restart(Daniel Berrange),
|
||||
bug in virFindFileInPath (Daniel Berrange), handle new
|
||||
availheap sysctl in Xen (Daniel Berrange), allow USB hostdev
|
||||
product 0 (Cole Robinson), cleanup when creating a storage pool
|
||||
fails (Henrik Persson), domain id fix on redefinition in
|
||||
test driver (Cole Robinson), fix raw storage allocation (Cole
|
||||
Robinson), memory reporting for inactive qemu drivers (Cole
|
||||
Robinson), segfault if storage pool has no type attribute (Cole
|
||||
Robinson), OpenNebula compilation issues (Javier Fontan),
|
||||
dominfo command without security driver (Daniel Berrange),
|
||||
domain state problems after migration or destroy (Federico
|
||||
Simoncelli), leak in node device parsing (Dave Allan),
|
||||
storage pool definitions reading at startup (Cole Robinson),
|
||||
bogus WWN in NPIV support (David Allan), avoid a segfault with
|
||||
recent Xen (Sascha), cope with libnuma failures on weird
|
||||
topologies (Dan Berrange), crash in QEMU driver with bad capabilities
|
||||
data (Dan Berrange), trying to re-create a pool should not destroy
|
||||
it (Dave Allan), endless loop in node device XML dump (Cole Robinson),
|
||||
Re-label shared and readonly images (Dan Berrange)</li><li>Improvements: create and destroy NPIV support (David Allan),
|
||||
networking in UML driver (Daniel Berrange), HAL driver restart
|
||||
thread safety (Daniel Berrange), capabilities and nodeinfo
|
||||
APIs for LXC (Daniel Berrange), iNUMA API for VBox (Daniel Berrange),
|
||||
dynamically search and use kvm-img qemu-img or qcow-create (Doug
|
||||
Goldstein), fix qemu and kvm version parsing (Mark McLoughlin),
|
||||
serial number for HAL storage (Dave Allan), improve error reporting
|
||||
for virConnectOpen URIs (Daniel Berrange), include OS driver name
|
||||
in device XML (Daniel Berrange), fix qemu command flags fetching
|
||||
(Cole Robinson), check that qemu support -drive format= (Cole
|
||||
Robinson), improve emulator detection (Cole Robinson), changes
|
||||
to config parser to accomodate VMX syntax (Matthias Bolte),
|
||||
update network schemas and driver for missing elements (Satoru SATOH),
|
||||
avoid changing file context if not needed (Tim Waugh),
|
||||
skip labelling if no src path (Cole Robinson), add arm emulation
|
||||
if qemu-system-arm is present (C.J. Adams-Collier)</li><li>Cleanups: daemon check logging env variables (Daniel Berrange),
|
||||
User Mode Linux start and stop cleanups (Daniel Berrange),
|
||||
share the NUMA api implementations (Daniel Berrange), storage
|
||||
module dependancies (Dave Allan), refactor storage XML parsing
|
||||
(Cole Robinson), big cleanup of logging code (Amy Griffis),
|
||||
superfluous % on format (Matthias Bolte), cleanups and updates
|
||||
on OpenNebula driver (Daniel Berrange and Abel Miguez Rodriguez)</li></ul>
|
||||
<h3>0.6.4: May 29 2009</h3>
|
||||
<ul><li>New features: new API virStorageVolCreateXMLFrom (Cole Robinson),
|
||||
full VBox graphic capabilities (Pritesh Kothari), Interface config
|
||||
APIs (Laine Stump), APIs for domain XML conversions (Daniel
|
||||
Berrange), initial version of OpenNebula driver (Abel Miguez
|
||||
Rodriguez)</li><li>Portability: better compiler warning selection (Daniel Berrange),
|
||||
Win32 portability fixes (Daniel Berrange)</li><li>Documentation: documentation for <sound> device XML format (Cole
|
||||
Robinson), storage format documentation fixes (Ryota Ozaki),
|
||||
docs for XML conversion APIs (Daniel Berrange), inconsistencies
|
||||
in storage volume docs and schemas (Ryota Ozaki)</li><li>Bug fixes: fix hostdev managed handling (Mark McLoughlin),
|
||||
lxc_controller should not cash without args (Guido Gunther),
|
||||
bug fixes in I/O routines (Guido Gunther), fix migrationsave/restore
|
||||
for QEmu 0.10.0 (Daniel Berrange), avoid crash on VBox init
|
||||
(Guido Gunther), fix dev and cgroup init in LXC (Ryota Ozaki),
|
||||
QEmu startup fix (Cole Robinson), block node reboots from LXCs (Ryota
|
||||
Ozaki), QEmu argv detection fix for recent kvm (Daniel Berrange),
|
||||
fix watch/timer event deletion (Daniel Berrange), fix XML escaping
|
||||
bug, various locking bugs (Daniel Berrange), avoid a deadlock in
|
||||
HAL nodedev driver (Cole Robinson), detection of node device media
|
||||
insert/eject (Cole Robinson), broken networking with new QEMU/KVM
|
||||
>= 86 (Daniel Berrange), various fixes in domain and network
|
||||
startup error report (Cole Robinson), double free on unexpected
|
||||
client disconnect (Daniel Berrange)</li><li>Improvements: cleanups and doc on virExec (Cole Robinson), error
|
||||
reporting in QEmu migrations (Cole Robinson), better path and driver
|
||||
detection in VBox (Pritesh Kothari), avoid caching QEMU driver
|
||||
capabilities(Cole Robinson), multiple graphics elements definitions
|
||||
(Pritesh Kothari), LSB init header init.d improvements (Frederik
|
||||
Himpe), special erro code for invalid operations (Daniel Berrange),
|
||||
dlopen error logging (Daniel Berrange), fix UUID and name uniqueness
|
||||
(Daniel Berrange), improvement on VBox initialization (Pritesh
|
||||
Kothari and Dan Berrange), "Host only" and "Internal" network in VBox
|
||||
(Pritesh Kothari), add utility virExecDaemonize (Cole Robinson),
|
||||
enable bridges without IP (Ludwig Nussel), 'make -s' silencing
|
||||
(Daniel Berrange), test case for exercising the event loop (Daniel
|
||||
Berrange), virsh commands vol-clone and vol-create-from (Cole
|
||||
Robinson), new xend don't use [] around cpumaps (Tatsuro Enokura),
|
||||
add the CIL mutex lock checker (Daniel Berrange), fix some LXC
|
||||
error code (Amy Griffis), virInterface python bindings (Daniel
|
||||
Berrange), fix to the example code for event handling (Pritesh
|
||||
Kothari), always add location informations to logging (Daniel
|
||||
Berrange), python domain events example and binding (Daniel
|
||||
Berrange), PPC Qemu Machine Type update (Thomas Baker)</li><li>Cleanups: strings bug in virsh (Daniel Berrange), various cleanups
|
||||
in storage code (Cole Robinson), rpm spec cleanups, destructors
|
||||
data cleanups (Laine Stump), some QEmu code refactoring (Daniel
|
||||
Berrange), avoid dependancy on libcap (Daniel Berrange), python
|
||||
import cleanup (Cole Robinson), virAsprintf based cleanups in
|
||||
storage code (Cole Robinson), fix some direct stderr logging,
|
||||
OpenNebula driver cleanups (Daniel Berrange)</li></ul>
|
||||
<h3>0.6.3: Apr 24 2009</h3>
|
||||
<ul><li>New features: VirtualBox driver support (Pritesh Kothari),
|
||||
virt-xml-validate new command (Daniel Berrange)</li><li>Portability: patch to build on Centos (Joseph Shraibman),
|
||||
build breakage (Anton Protopopov), </li><li>Documentation: Linux Containers documentation (Serge Hallyn),
|
||||
improvement and updates of architecture pages, fix
|
||||
virNodeGetFreeMemory documentation to reflect reality,
|
||||
man page cleanups (Daniel Berrange), man page typo
|
||||
(Robert P. J. Day), VirtualBox Documentation (Pritesh Kothari),
|
||||
</li><li>Bug fixes: veth off-by-one error (Dan Smith), vcpupin to inactive
|
||||
Xen crash (Takahashi Tomohiro), virsh ttyconsole return value,
|
||||
use format= not fmt= on QEmu commandline (Mark McLoughlin),
|
||||
use UUID for internal domain lookups (Daniel Berrange), remote
|
||||
domain ID related bugs (Daniel Berrange), QEmu pidfile handling
|
||||
bugs (Daniel Berrange), network config handling on old Xen (Daniel
|
||||
Berrange)</li><li>Improvements: add SCSI storage rescan (David Allan), rootless
|
||||
LXC containers support improvements (Serge Hallyn), getHostname
|
||||
support for LXC (Dan Smith), cleanup and logging output of some
|
||||
domain functions (Guido G<>nther), drop pool lock when allocating
|
||||
volumes (Cole Robinson), LXC handle kernel without CLONE_NEWUSER
|
||||
support (Serge Hallyn), cpu pinning on defined Xen domains (Takahashi
|
||||
Tomohiro), dynamic bridge names support (Soren Hansen), LXC use
|
||||
of private /dev/pts when available (Daniel Berrange),
|
||||
virNodeDeviceCreateXML and virNodeDeviceDestroy entry points
|
||||
(Dave Allan)</li><li>Cleanups: don't hardcode getgrnam_r buffer to 1024 bytes (Guido
|
||||
G<>nther), qemudBuildCommandLine API cleanup (Daniel Berrange),
|
||||
</li></ul>
|
||||
<h3>0.6.2: Apr 3 2009</h3>
|
||||
<ul><li>New features: support SASL auth for VNC server (Daniel Berrange),
|
||||
memory ballooning in QEMU (Daniel Berrange), SCSI HBA storage pool
|
||||
support (Dave Allan), PCI passthrough in Xen driver (Daniel
|
||||
Berrange)</li><li>Portability: be more flexible in QEmu binaries paths (Daniel
|
||||
Berrange), Mingw portability fixes (Daniel Berrange),</li><li>Documentation: add security attributes in RNG schemas, cleanup
|
||||
of architecture docs, missing disk bus values in RNG schemas,</li><li>Bug fixes: tap vs vbd type on block detach (Cole Robinson and
|
||||
Takahashi Tomohiro), bad free on storage volume error (Daniel
|
||||
Berrange), maplenght computations in remote driver (Daniel Berrange),
|
||||
event dispatching in the daemon (Daniel Berrange), virDomainSetVcpus
|
||||
deadlock (Daniel Berrange), save deadlock in test driver (Cole
|
||||
Robinson), fix timing of security driver init (Cole Robinson),
|
||||
forbid readonly connections from dumping the XML safe info (Cole
|
||||
Robinson), file descriptor leak on remote access,
|
||||
fix labelling of shared/readonly devices (Dan Walsh),
|
||||
virsh missing auth on shell commands (Matthias Bolte),
|
||||
avoid zombie on exec pipe errors (Ryota Ozaki),
|
||||
memory leak in virNodeDeviceGetParent (Daniel Berrange),
|
||||
URI check in migration (Daniel Berrange), various memory bug fixes
|
||||
(Daniel Berrange), python bindings generator fix (Daniel Berrange),
|
||||
NUMA memory fixes (Daniel Berrange), various svirt fixes (Daniel
|
||||
Berrange), fix sparse volume allocation reporting (Cole Robinson),
|
||||
test driver domain restore return value (Cole Robinson),
|
||||
do not lose file format info on volume refresh (Cole Robinson)</li><li>Improvements: get CPU usage info for LXC (Ryota Ozaki), fix domain
|
||||
RNG to add ac97 and tests (Pritesh Kothari), OpenVZ support for
|
||||
non-template filesystem root (Florian Vichot), improve arch
|
||||
capabilities generation (Daniel Berrange), modularization of spec
|
||||
file (Ryota Ozaki), better error reports in SEXPR generation (Daniel
|
||||
Berrange), support for vifname parameter in VIF config (Daniel
|
||||
Berrange), localtime handling for new xen (Daniel Berrange),
|
||||
error reporting/ verification of security labels (Dan Walsh),
|
||||
add --console arg for create and start virsh commands (Daniel
|
||||
Berrange), refresh volume alloc/capacity when dumping XML (Cole
|
||||
Robinson)</li><li>Cleanups: FILE * leaks removal, unused parameters flagging
|
||||
(Maximilian Wilhelm), switch to pre-C99 struct initialization
|
||||
for drivers (Chris Lalancette), symlinks resolving cleanup (Daniel
|
||||
Berrange)</li></ul>
|
||||
<h3>0.6.1: Mar 3 2009</h3>
|
||||
<ul><li>New features: new APIs for Node device detach reattach and reset
|
||||
(Mark McLoughlin), sVirt mandatory access control support (James
|
||||
|
@ -5,6 +5,194 @@
|
||||
<p>Here is the list of official releases, however since it is early on in the
|
||||
development of libvirt, it is preferable when possible to just use the <a href="downloads.html">CVS version or snapshot</a>, contact the mailing list
|
||||
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
|
||||
<h3>0.6.5: Jul 3 2009</h3>
|
||||
<ul>
|
||||
<li>New features: create storage columes on disk backend (Henrik Persson),
|
||||
drop of capabilities based on libcap-ng when possible (Daniel
|
||||
Berrange)</li>
|
||||
<li>Portability: fix build on non-Linux targets (Daniel Berrange)</li>
|
||||
<li>Documentation: typo and english fixes (Runa Bhattacharjee and
|
||||
Garry Dolley), Docs on extending APIs (Dave Allan), cleanup
|
||||
of debug and logging documentation (Amy Griffis), add
|
||||
HACKING doc to the website (Daniel Berrange),
|
||||
documentation for OpenNebula driver (Abel Miguez Rodriguez)</li>
|
||||
<li>Bug fixes: forbid autostart on transcient networks,
|
||||
xen device removal crash (Daniel Berrange), re-detection of
|
||||
transient VMs after libvirtd restart(Daniel Berrange),
|
||||
bug in virFindFileInPath (Daniel Berrange), handle new
|
||||
availheap sysctl in Xen (Daniel Berrange), allow USB hostdev
|
||||
product 0 (Cole Robinson), cleanup when creating a storage pool
|
||||
fails (Henrik Persson), domain id fix on redefinition in
|
||||
test driver (Cole Robinson), fix raw storage allocation (Cole
|
||||
Robinson), memory reporting for inactive qemu drivers (Cole
|
||||
Robinson), segfault if storage pool has no type attribute (Cole
|
||||
Robinson), OpenNebula compilation issues (Javier Fontan),
|
||||
dominfo command without security driver (Daniel Berrange),
|
||||
domain state problems after migration or destroy (Federico
|
||||
Simoncelli), leak in node device parsing (Dave Allan),
|
||||
storage pool definitions reading at startup (Cole Robinson),
|
||||
bogus WWN in NPIV support (David Allan), avoid a segfault with
|
||||
recent Xen (Sascha), cope with libnuma failures on weird
|
||||
topologies (Dan Berrange), crash in QEMU driver with bad capabilities
|
||||
data (Dan Berrange), trying to re-create a pool should not destroy
|
||||
it (Dave Allan), endless loop in node device XML dump (Cole Robinson),
|
||||
Re-label shared and readonly images (Dan Berrange)</li>
|
||||
<li>Improvements: create and destroy NPIV support (David Allan),
|
||||
networking in UML driver (Daniel Berrange), HAL driver restart
|
||||
thread safety (Daniel Berrange), capabilities and nodeinfo
|
||||
APIs for LXC (Daniel Berrange), iNUMA API for VBox (Daniel Berrange),
|
||||
dynamically search and use kvm-img qemu-img or qcow-create (Doug
|
||||
Goldstein), fix qemu and kvm version parsing (Mark McLoughlin),
|
||||
serial number for HAL storage (Dave Allan), improve error reporting
|
||||
for virConnectOpen URIs (Daniel Berrange), include OS driver name
|
||||
in device XML (Daniel Berrange), fix qemu command flags fetching
|
||||
(Cole Robinson), check that qemu support -drive format= (Cole
|
||||
Robinson), improve emulator detection (Cole Robinson), changes
|
||||
to config parser to accomodate VMX syntax (Matthias Bolte),
|
||||
update network schemas and driver for missing elements (Satoru SATOH),
|
||||
avoid changing file context if not needed (Tim Waugh),
|
||||
skip labelling if no src path (Cole Robinson), add arm emulation
|
||||
if qemu-system-arm is present (C.J. Adams-Collier)</li>
|
||||
<li>Cleanups: daemon check logging env variables (Daniel Berrange),
|
||||
User Mode Linux start and stop cleanups (Daniel Berrange),
|
||||
share the NUMA api implementations (Daniel Berrange), storage
|
||||
module dependancies (Dave Allan), refactor storage XML parsing
|
||||
(Cole Robinson), big cleanup of logging code (Amy Griffis),
|
||||
superfluous % on format (Matthias Bolte), cleanups and updates
|
||||
on OpenNebula driver (Daniel Berrange and Abel Miguez Rodriguez)</li>
|
||||
</ul>
|
||||
<h3>0.6.4: May 29 2009</h3>
|
||||
<ul>
|
||||
<li>New features: new API virStorageVolCreateXMLFrom (Cole Robinson),
|
||||
full VBox graphic capabilities (Pritesh Kothari), Interface config
|
||||
APIs (Laine Stump), APIs for domain XML conversions (Daniel
|
||||
Berrange), initial version of OpenNebula driver (Abel Miguez
|
||||
Rodriguez)</li>
|
||||
<li>Portability: better compiler warning selection (Daniel Berrange),
|
||||
Win32 portability fixes (Daniel Berrange)</li>
|
||||
<li>Documentation: documentation for <sound> device XML format (Cole
|
||||
Robinson), storage format documentation fixes (Ryota Ozaki),
|
||||
docs for XML conversion APIs (Daniel Berrange), inconsistencies
|
||||
in storage volume docs and schemas (Ryota Ozaki)</li>
|
||||
<li>Bug fixes: fix hostdev managed handling (Mark McLoughlin),
|
||||
lxc_controller should not cash without args (Guido Gunther),
|
||||
bug fixes in I/O routines (Guido Gunther), fix migrationsave/restore
|
||||
for QEmu 0.10.0 (Daniel Berrange), avoid crash on VBox init
|
||||
(Guido Gunther), fix dev and cgroup init in LXC (Ryota Ozaki),
|
||||
QEmu startup fix (Cole Robinson), block node reboots from LXCs (Ryota
|
||||
Ozaki), QEmu argv detection fix for recent kvm (Daniel Berrange),
|
||||
fix watch/timer event deletion (Daniel Berrange), fix XML escaping
|
||||
bug, various locking bugs (Daniel Berrange), avoid a deadlock in
|
||||
HAL nodedev driver (Cole Robinson), detection of node device media
|
||||
insert/eject (Cole Robinson), broken networking with new QEMU/KVM
|
||||
>= 86 (Daniel Berrange), various fixes in domain and network
|
||||
startup error report (Cole Robinson), double free on unexpected
|
||||
client disconnect (Daniel Berrange)</li>
|
||||
<li>Improvements: cleanups and doc on virExec (Cole Robinson), error
|
||||
reporting in QEmu migrations (Cole Robinson), better path and driver
|
||||
detection in VBox (Pritesh Kothari), avoid caching QEMU driver
|
||||
capabilities(Cole Robinson), multiple graphics elements definitions
|
||||
(Pritesh Kothari), LSB init header init.d improvements (Frederik
|
||||
Himpe), special erro code for invalid operations (Daniel Berrange),
|
||||
dlopen error logging (Daniel Berrange), fix UUID and name uniqueness
|
||||
(Daniel Berrange), improvement on VBox initialization (Pritesh
|
||||
Kothari and Dan Berrange), "Host only" and "Internal" network in VBox
|
||||
(Pritesh Kothari), add utility virExecDaemonize (Cole Robinson),
|
||||
enable bridges without IP (Ludwig Nussel), 'make -s' silencing
|
||||
(Daniel Berrange), test case for exercising the event loop (Daniel
|
||||
Berrange), virsh commands vol-clone and vol-create-from (Cole
|
||||
Robinson), new xend don't use [] around cpumaps (Tatsuro Enokura),
|
||||
add the CIL mutex lock checker (Daniel Berrange), fix some LXC
|
||||
error code (Amy Griffis), virInterface python bindings (Daniel
|
||||
Berrange), fix to the example code for event handling (Pritesh
|
||||
Kothari), always add location informations to logging (Daniel
|
||||
Berrange), python domain events example and binding (Daniel
|
||||
Berrange), PPC Qemu Machine Type update (Thomas Baker)</li>
|
||||
<li>Cleanups: strings bug in virsh (Daniel Berrange), various cleanups
|
||||
in storage code (Cole Robinson), rpm spec cleanups, destructors
|
||||
data cleanups (Laine Stump), some QEmu code refactoring (Daniel
|
||||
Berrange), avoid dependancy on libcap (Daniel Berrange), python
|
||||
import cleanup (Cole Robinson), virAsprintf based cleanups in
|
||||
storage code (Cole Robinson), fix some direct stderr logging,
|
||||
OpenNebula driver cleanups (Daniel Berrange)</li>
|
||||
</ul>
|
||||
<h3>0.6.3: Apr 24 2009</h3>
|
||||
<ul>
|
||||
<li>New features: VirtualBox driver support (Pritesh Kothari),
|
||||
virt-xml-validate new command (Daniel Berrange)</li>
|
||||
<li>Portability: patch to build on Centos (Joseph Shraibman),
|
||||
build breakage (Anton Protopopov), </li>
|
||||
<li>Documentation: Linux Containers documentation (Serge Hallyn),
|
||||
improvement and updates of architecture pages, fix
|
||||
virNodeGetFreeMemory documentation to reflect reality,
|
||||
man page cleanups (Daniel Berrange), man page typo
|
||||
(Robert P. J. Day), VirtualBox Documentation (Pritesh Kothari),
|
||||
</li>
|
||||
<li>Bug fixes: veth off-by-one error (Dan Smith), vcpupin to inactive
|
||||
Xen crash (Takahashi Tomohiro), virsh ttyconsole return value,
|
||||
use format= not fmt= on QEmu commandline (Mark McLoughlin),
|
||||
use UUID for internal domain lookups (Daniel Berrange), remote
|
||||
domain ID related bugs (Daniel Berrange), QEmu pidfile handling
|
||||
bugs (Daniel Berrange), network config handling on old Xen (Daniel
|
||||
Berrange)</li>
|
||||
<li>Improvements: add SCSI storage rescan (David Allan), rootless
|
||||
LXC containers support improvements (Serge Hallyn), getHostname
|
||||
support for LXC (Dan Smith), cleanup and logging output of some
|
||||
domain functions (Guido Günther), drop pool lock when allocating
|
||||
volumes (Cole Robinson), LXC handle kernel without CLONE_NEWUSER
|
||||
support (Serge Hallyn), cpu pinning on defined Xen domains (Takahashi
|
||||
Tomohiro), dynamic bridge names support (Soren Hansen), LXC use
|
||||
of private /dev/pts when available (Daniel Berrange),
|
||||
virNodeDeviceCreateXML and virNodeDeviceDestroy entry points
|
||||
(Dave Allan)</li>
|
||||
<li>Cleanups: don't hardcode getgrnam_r buffer to 1024 bytes (Guido
|
||||
Günther), qemudBuildCommandLine API cleanup (Daniel Berrange),
|
||||
</li>
|
||||
</ul>
|
||||
<h3>0.6.2: Apr 3 2009</h3>
|
||||
<ul>
|
||||
<li>New features: support SASL auth for VNC server (Daniel Berrange),
|
||||
memory ballooning in QEMU (Daniel Berrange), SCSI HBA storage pool
|
||||
support (Dave Allan), PCI passthrough in Xen driver (Daniel
|
||||
Berrange)</li>
|
||||
<li>Portability: be more flexible in QEmu binaries paths (Daniel
|
||||
Berrange), Mingw portability fixes (Daniel Berrange),</li>
|
||||
<li>Documentation: add security attributes in RNG schemas, cleanup
|
||||
of architecture docs, missing disk bus values in RNG schemas,</li>
|
||||
<li>Bug fixes: tap vs vbd type on block detach (Cole Robinson and
|
||||
Takahashi Tomohiro), bad free on storage volume error (Daniel
|
||||
Berrange), maplenght computations in remote driver (Daniel Berrange),
|
||||
event dispatching in the daemon (Daniel Berrange), virDomainSetVcpus
|
||||
deadlock (Daniel Berrange), save deadlock in test driver (Cole
|
||||
Robinson), fix timing of security driver init (Cole Robinson),
|
||||
forbid readonly connections from dumping the XML safe info (Cole
|
||||
Robinson), file descriptor leak on remote access,
|
||||
fix labelling of shared/readonly devices (Dan Walsh),
|
||||
virsh missing auth on shell commands (Matthias Bolte),
|
||||
avoid zombie on exec pipe errors (Ryota Ozaki),
|
||||
memory leak in virNodeDeviceGetParent (Daniel Berrange),
|
||||
URI check in migration (Daniel Berrange), various memory bug fixes
|
||||
(Daniel Berrange), python bindings generator fix (Daniel Berrange),
|
||||
NUMA memory fixes (Daniel Berrange), various svirt fixes (Daniel
|
||||
Berrange), fix sparse volume allocation reporting (Cole Robinson),
|
||||
test driver domain restore return value (Cole Robinson),
|
||||
do not lose file format info on volume refresh (Cole Robinson)</li>
|
||||
<li>Improvements: get CPU usage info for LXC (Ryota Ozaki), fix domain
|
||||
RNG to add ac97 and tests (Pritesh Kothari), OpenVZ support for
|
||||
non-template filesystem root (Florian Vichot), improve arch
|
||||
capabilities generation (Daniel Berrange), modularization of spec
|
||||
file (Ryota Ozaki), better error reports in SEXPR generation (Daniel
|
||||
Berrange), support for vifname parameter in VIF config (Daniel
|
||||
Berrange), localtime handling for new xen (Daniel Berrange),
|
||||
error reporting/ verification of security labels (Dan Walsh),
|
||||
add --console arg for create and start virsh commands (Daniel
|
||||
Berrange), refresh volume alloc/capacity when dumping XML (Cole
|
||||
Robinson)</li>
|
||||
<li>Cleanups: FILE * leaks removal, unused parameters flagging
|
||||
(Maximilian Wilhelm), switch to pre-C99 struct initialization
|
||||
for drivers (Chris Lalancette), symlinks resolving cleanup (Daniel
|
||||
Berrange)</li>
|
||||
</ul>
|
||||
<h3>0.6.1: Mar 3 2009</h3>
|
||||
<ul>
|
||||
<li>New features: new APIs for Node device detach reattach and reset
|
||||
|
@ -8,6 +8,22 @@
|
||||
<!-- The sitemap.html.in page contains the master navigation structure -->
|
||||
<xsl:variable name="sitemap" select="document('sitemap.html.in')/html/body/div[@id='sitemap']"/>
|
||||
|
||||
<xsl:template match="code[@class='docref']" mode="content">
|
||||
<xsl:variable name="name"><xsl:value-of select="."/></xsl:variable>
|
||||
<a href="html/libvirt-libvirt.html#{$name}"><code><xsl:value-of select="$name"/></code></a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="node() | @*" mode="content">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="node() | @*" mode="content"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="ul[@id='toc']" mode="content">
|
||||
<xsl:call-template name="toc"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- This processes the sitemap to form a context sensitive
|
||||
navigation menu for the current page -->
|
||||
<xsl:template match="ul" mode="menu">
|
||||
@ -143,16 +159,7 @@
|
||||
</xsl:apply-templates>
|
||||
</div>
|
||||
<div id="content">
|
||||
<xsl:for-each select="html/body/*">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name() = 'ul' and @id = 'toc'">
|
||||
<xsl:call-template name="toc"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates select="/html/body/*" mode="content"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
|
@ -72,6 +72,10 @@
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
||||
<!-- A Relax NG schema for the libvirt network XML format -->
|
||||
<element name="network" xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
<interleave>
|
||||
<!-- The name of the network, used to refer to it through the API
|
||||
and in virsh -->
|
||||
<element name="name"><text/></element>
|
||||
@ -42,6 +43,11 @@
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="domain">
|
||||
<attribute name="name"><text/></attribute>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<!-- The IP element sets up NAT'ing and an optional DHCP server
|
||||
local to the host. -->
|
||||
@ -63,7 +69,15 @@
|
||||
<attribute name="end"><text/></attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<zeroOrMore>
|
||||
<element name="host">
|
||||
<attribute name="mac"><text/></attribute>
|
||||
<attribute name="name"><text/></attribute>
|
||||
<attribute name="ip"><text/></attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
|
@ -283,6 +283,11 @@
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='serial'>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<choice>
|
||||
<ref name='capstorageremoveable'/>
|
||||
|
@ -29,6 +29,11 @@
|
||||
<define name='sizing'>
|
||||
<optional>
|
||||
<element name='capacity'>
|
||||
<optional>
|
||||
<attribute name='unit'>
|
||||
<ref name='unit'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
</optional>
|
||||
@ -183,5 +188,11 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='unit'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[kKmMgGtTpPyYzZ]</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
|
||||
</grammar>
|
||||
|
@ -106,6 +106,12 @@
|
||||
<a href="intro.html">Architecture</a>
|
||||
<span>Overview of the logical subsystems in the libvirt API</span>
|
||||
<ul><li>
|
||||
<a href="goals.html">Goals</a>
|
||||
<span>Terminology and goals of libvirt API</span>
|
||||
</li><li>
|
||||
<a href="api.html">API concepts</a>
|
||||
<span>The libvirt API concepts</span>
|
||||
</li><li>
|
||||
<a href="archdomain.html">Domains</a>
|
||||
<span>Managing virtual machines</span>
|
||||
</li><li>
|
||||
@ -162,6 +168,12 @@
|
||||
</li><li>
|
||||
<a href="storage.html">Storage</a>
|
||||
<span>Driver for the storage management APIs</span>
|
||||
</li><li>
|
||||
<a href="drvvbox.html">VirtualBox</a>
|
||||
<span>Driver for VirtualBox</span>
|
||||
</li><li>
|
||||
<a href="drvone.html">OpenNebula</a>
|
||||
<span>Driver for OpenNebula</span>
|
||||
</li></ul></li><li>
|
||||
<a href="html/index.html">API reference</a>
|
||||
<span>Reference manual for the C public API</span>
|
||||
@ -211,6 +223,15 @@
|
||||
</li><li>
|
||||
<a href="java.html">Java</a>
|
||||
<span>overview of the Java API bindings</span>
|
||||
</li></ul></li><li>
|
||||
<a href="internals.html">Internals</a>
|
||||
<span>Working on the internals of libvirt API, driver and daemon code</span>
|
||||
<ul><li>
|
||||
<a href="hacking.html">Contributor guidelines</a>
|
||||
<span>General hacking guidelines for contributors</span>
|
||||
</li><li>
|
||||
<a href="api_extension.html">API extensions</a>
|
||||
<span>Adding new public libvirt APIs</span>
|
||||
</li></ul></li></ul></li><li>
|
||||
<a href="http://wiki.libvirt.org">Wiki</a>
|
||||
<span>User contributed content</span>
|
||||
|
@ -56,6 +56,14 @@
|
||||
<a href="intro.html">Architecture</a>
|
||||
<span>Overview of the logical subsystems in the libvirt API</span>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="goals.html">Goals</a>
|
||||
<span>Terminology and goals of libvirt API</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="api.html">API concepts</a>
|
||||
<span>The libvirt API concepts</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="archdomain.html">Domains</a>
|
||||
<span>Managing virtual machines</span>
|
||||
@ -136,6 +144,14 @@
|
||||
<a href="storage.html">Storage</a>
|
||||
<span>Driver for the storage management APIs</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="drvvbox.html">VirtualBox</a>
|
||||
<span>Driver for VirtualBox</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="drvone.html">OpenNebula</a>
|
||||
<span>Driver for OpenNebula</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
@ -198,6 +214,20 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="internals.html">Internals</a>
|
||||
<span>Working on the internals of libvirt API, driver and daemon code</span>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="hacking.html">Contributor guidelines</a>
|
||||
<span>General hacking guidelines for contributors</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="api_extension.html">API extensions</a>
|
||||
<span>Adding new public libvirt APIs</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -86,6 +86,14 @@
|
||||
<div>
|
||||
<span class="active">Storage</span>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
@ -96,6 +104,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -11,6 +11,9 @@
|
||||
<domain file="testdomfc4.xml"/>
|
||||
<network file="testnetpriv.xml"/>
|
||||
<network file="testnetdef.xml"/>
|
||||
<pool file="testpool.xml">
|
||||
<volume file="testvol.xml"/>
|
||||
</pool>
|
||||
|
||||
<cpu>
|
||||
<mhz>6000</mhz>
|
||||
|
15
docs/testpool.xml
Normal file
15
docs/testpool.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<pool type='dir'>
|
||||
<name>default-pool</name>
|
||||
<uuid>35bb2ad9-388a-cdfe-461a-b8907f6e53fe</uuid>
|
||||
<capacity>107374182400</capacity>
|
||||
<allocation>0</allocation>
|
||||
<available>107374182400</available>
|
||||
<target>
|
||||
<path>/default-pool</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>10736</owner>
|
||||
<group>10736</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</pool>
|
6
docs/testvol.xml
Normal file
6
docs/testvol.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<volume>
|
||||
<name>default-vol</name>
|
||||
<capacity>1000000</capacity>
|
||||
<allocation>50000</allocation>
|
||||
<target/>
|
||||
</volume>
|
@ -84,6 +84,10 @@
|
||||
<div>
|
||||
<a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
|
||||
</div>
|
||||
</li><li>
|
||||
<div>
|
||||
<a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="internals.html">Internals</a>
|
||||
</div>
|
||||
</li></ul>
|
||||
</div>
|
||||
</li><li>
|
||||
|
@ -34,7 +34,7 @@ the program.
|
||||
|
||||
All B<virsh> operations rely upon the libvirt library.
|
||||
For any virsh commands to run xend/qemu, or what ever virtual library that libvirt supports. For this reason you should start xend/qemu as a service when your system first boots using xen/qemu. This can usually be done using the command
|
||||
B<service start libvirtd> .
|
||||
B<service libvirtd start> .
|
||||
|
||||
Most B<virsh> commands require root privileges to run due to the
|
||||
communications channels used to talk to the hypervisor. Running as
|
||||
@ -150,13 +150,13 @@ B<virsh> list
|
||||
Name is the name of the domain. ID the domain numeric id.
|
||||
State is the run state (see below).
|
||||
|
||||
=over 4
|
||||
|
||||
B<STATES>
|
||||
|
||||
The State field lists 6 states for a domain, and which ones the
|
||||
current domain is in.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<running>
|
||||
|
||||
The domain is currently running on a CPU
|
||||
@ -198,12 +198,16 @@ crashed.
|
||||
Prints the available amount of memory on the machine or within a
|
||||
NUMA cell if I<cellno> is provided.
|
||||
|
||||
=back
|
||||
|
||||
=head1 DOMAIN COMMANDS
|
||||
|
||||
The following commands manipulate domains directly, as stated
|
||||
previously most commands take domain-id as the first parameter. The
|
||||
I<domain-id> can be specified as an short integer, a name or a full UUID.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<autostart> optional I<--disable> I<domain-id>
|
||||
|
||||
Configure a domain to be automatically started at boot.
|
||||
@ -401,7 +405,9 @@ and I<cpulist> is a comma separated list of physical CPU numbers.
|
||||
Output the IP address and port number for the VNC display. If the information
|
||||
is not available the processes will provide an exit code of 1.
|
||||
|
||||
=head1 DEVICES COMMANDS
|
||||
=back
|
||||
|
||||
=head1 DEVICE COMMANDS
|
||||
|
||||
The following commands manipulate devices associated to domains.
|
||||
The domain-id can be specified as an short integer, a name or a full UUID.
|
||||
@ -409,6 +415,8 @@ To better understand the values allowed as options for the command
|
||||
reading the documentation at L<http://libvirt.org/format.html> on the
|
||||
format of the device sections to get the most accurate set of accepted values.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<attach-device> I<domain-id> I<FILE>
|
||||
|
||||
Attach a device to the domain, using a device definition in an XML file.
|
||||
@ -449,7 +457,9 @@ I<type> can be either I<network> to indicate a physical network device or I<brid
|
||||
It is recommended to use the I<mac> option to distinguish between the interfaces
|
||||
if more than one are present on the domain.
|
||||
|
||||
=head1 VIRTUAL NETWORKS COMMANDS
|
||||
=back
|
||||
|
||||
=head1 VIRTUAL NETWORK COMMANDS
|
||||
|
||||
The following commands manipulate networks. Libvirt has the capability to
|
||||
define virtual networks which can then be used by domains and linked to
|
||||
@ -458,6 +468,8 @@ see the documentation at L<http://libvirt.org/format.html#Net1> . A lot
|
||||
of the command for virtual networks are similar to the one used for domains,
|
||||
but the way to name a virtual network is either by its name or UUID.
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<net-autostart> I<network> optional I<--disable>
|
||||
|
||||
Configure a virtual network to be automatically started at boot.
|
||||
@ -517,18 +529,55 @@ Undefine the configuration for an inactive network.
|
||||
|
||||
Convert a network name to network UUID.
|
||||
|
||||
=back
|
||||
|
||||
=head1 ENVIRONMENT
|
||||
|
||||
The following environment variables can be set to alter the behaviour
|
||||
of C<virsh>
|
||||
|
||||
=over 4
|
||||
|
||||
=item VIRSH_DEFAULT_CONNECT_URI
|
||||
|
||||
The hypervisor to connect to by default. Set this to a URI, in the same
|
||||
format as accepted by the B<connect> option.
|
||||
|
||||
=head1 SEE ALSO
|
||||
=item LIBVIRT_DEBUG=LEVEL
|
||||
|
||||
L<virt-install(1)>, L<xm(1)>, L<virt-top(1)>, L<virt-mem(1)>, L<virt-df(1)>, L<http://www.libvirt.org/>
|
||||
Turn on verbose debugging of all libvirt API calls. Valid levels are
|
||||
|
||||
=head1 AUTHOR
|
||||
=over 4
|
||||
|
||||
=item * LIBVIRT_DEBUG=1
|
||||
|
||||
Messages at level DEBUG or above
|
||||
|
||||
=item * LIBVIRT_DEBUG=2
|
||||
|
||||
Messages at level INFO or above
|
||||
|
||||
=item * LIBVIRT_DEBUG=3
|
||||
|
||||
Messages at level WARNING or above
|
||||
|
||||
=item * LIBVIRT_DEBUG=4
|
||||
|
||||
Messages at level ERROR or above
|
||||
|
||||
=back
|
||||
|
||||
For further information about debugging options consult C<http://libvirt.org/logging.html>
|
||||
|
||||
=back
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
Report any bugs discovered to the libvirt community via the mailing
|
||||
list C<http://libvirt.org/contact.html> or bug tracker C<http://libvirt.org/bugs.html>.
|
||||
Alternatively report bugs to your software distributor / vendor.
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Andrew Puch <apuch @ redhat.com>
|
||||
Daniel Veillard <veillard @ redhat.com>
|
||||
@ -537,12 +586,19 @@ L<virt-install(1)>, L<xm(1)>, L<virt-top(1)>, L<virt-mem(1)>, L<virt-df(1)>, L<h
|
||||
Sean Dague <sean at dague dot net>
|
||||
Daniel Stekloff <dsteklof at us dot ibm dot com>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
=head1 BUGS
|
||||
Copyright (C) 2005, 2007-2009 Red Hat, Inc.
|
||||
|
||||
Bugs can be filed in Red Hat bugzilla under the Virtualization Tools/libvirt
|
||||
L<https://bugzilla.redhat.com/>
|
||||
=head1 LICENSE
|
||||
|
||||
L<https://bugzilla.redhat.com/buglist.cgi?product=Virtualization+Tools&component=libvirt&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED>
|
||||
virsh is distributed under the terms of the GNU LGPL v2+.
|
||||
This is free software; see the source for copying conditions. There
|
||||
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE
|
||||
|
||||
=end
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<virt-install(1)>, L<virt-xml-validate(1)>, L<virt-top(1)>, L<virt-mem(1)>, L<virt-df(1)>, L<http://www.libvirt.org/>
|
||||
|
||||
=cut
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user