1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-09-23 17:45:17 +03:00

Compare commits

..

26 Commits

Author SHA1 Message Date
Jiri Denemark
05d238be99 qemu: Let empty default VNC password work as documented
CVE-2016-5008

Setting an empty graphics password is documented as a way to disable
VNC/SPICE access, but QEMU does not always behaves like that. VNC would
happily accept the empty password. Let's enforce the behavior by setting
password expiration to "now".

https://bugzilla.redhat.com/show_bug.cgi?id=1180092

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit bb848feec0)
2016-06-30 13:23:33 +01:00
Eric Blake
54be99a717 CVE-2015-5313: storage: don't allow '/' in filesystem volume names
The libvirt file system storage driver determines what file to
act on by concatenating the pool location with the volume name.
If a user is able to pick names like "../../../etc/passwd", then
they can escape the bounds of the pool.  For that matter,
virStoragePoolListVolumes() doesn't descend into subdirectories,
so a user really shouldn't use a name with a slash.

Normally, only privileged users can coerce libvirt into creating
or opening existing files using the virStorageVol APIs; and such
users already have full privilege to create any domain XML (so it
is not an escalation of privilege).  But in the case of
fine-grained ACLs, it is feasible that a user can be granted
storage_vol:create but not domain:write, and it violates
assumptions if such a user can abuse libvirt to access files
outside of the storage pool.

Therefore, prevent all use of volume names that contain "/",
whether or not such a name is actually attempting to escape the
pool.

This changes things from:

$ virsh vol-create-as default ../../../../../../etc/haha --capacity 128
Vol ../../../../../../etc/haha created
$ rm /etc/haha

to:

$ virsh vol-create-as default ../../../../../../etc/haha --capacity 128
error: Failed to create vol ../../../../../../etc/haha
error: Requested operation is not valid: volume name '../../../../../../etc/haha' cannot contain '/'

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 034e47c338)
2015-12-15 17:11:53 -07:00
Martin Kletzander
dc4df80f99 util: Prepare URI formatting for libxml2 >= 2.9.2
Since commit 8eb55d782a2b9afacc7938694891cc6fad7b42a5 libxml2 removes
two slashes from the URI when there is no server part.  This is fixed
with beb7281055dbf0ed4d041022a67c6c5cfd126f25, but only if the calling
application calls xmlSaveUri() on URI that xmlURIParse() parsed.  And
that is not the case in virURIFormat().  virURIFormat() accepts
virURIPtr that can be created without parsing it and we do that when we
format network storage paths for gluster for example.  Even though
virStorageSourceParseBackingURI() uses virURIParse(), it throws that data
structure right away.

Since we want to format URIs as URIs and not absolute URIs or opaque
URIs (see RFC 3986), we can specify that with a special hack thanks to
commit beb7281055dbf0ed4d041022a67c6c5cfd126f25, by setting port to -1.

This fixes qemuxml2argvtest test where the disk-drive-network-gluster
case was failing.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 8f17d0eaae)
2015-12-15 17:08:58 -07:00
Daniel P. Berrange
e3b43a952a avoid using deprecated udev logging functions
In systemd >= 218, the udev_set_log_fn method has been marked
deprecated and turned into a no-op. Nothing in the udev client
library will print to stderr by default anymore, so we can
just stop installing a logging hook for new enough udev.

(cherry picked from commit a93a3b975c)
2015-12-15 16:58:23 -07:00
Michal Privoznik
dab6bd975e remoteClientCloseFunc: Don't mangle connection object refcount
Well, in 8ad126e6 we tried to fix a memory corruption problem.
However, the fix was not as good as it could be. I mean, the
commit has one line more than it should. I've noticed this output
just recently:

  # ./run valgrind --leak-check=full --show-reachable=yes ./tools/virsh domblklist gentoo
  ==17019== Memcheck, a memory error detector
  ==17019== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
  ==17019== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
  ==17019== Command: /home/zippy/work/libvirt/libvirt.git/tools/.libs/virsh domblklist gentoo
  ==17019==
  Target     Source
  ------------------------------------------------
  fda        /var/lib/libvirt/images/fd.img
  vda        /var/lib/libvirt/images/gentoo.qcow2
  hdc        /home/zippy/tmp/install-amd64-minimal-20150402.iso

  ==17019== Thread 2:
  ==17019== Invalid read of size 4
  ==17019==    at 0x4EFF5B4: virObjectUnref (virobject.c:258)
  ==17019==    by 0x5038CFF: remoteClientCloseFunc (remote_driver.c:552)
  ==17019==    by 0x5069D57: virNetClientCloseLocked (virnetclient.c:685)
  ==17019==    by 0x506C848: virNetClientIncomingEvent (virnetclient.c:1852)
  ==17019==    by 0x5082136: virNetSocketEventHandle (virnetsocket.c:1913)
  ==17019==    by 0x4ECD64E: virEventPollDispatchHandles (vireventpoll.c:509)
  ==17019==    by 0x4ECDE02: virEventPollRunOnce (vireventpoll.c:658)
  ==17019==    by 0x4ECBF00: virEventRunDefaultImpl (virevent.c:308)
  ==17019==    by 0x130386: vshEventLoop (vsh.c:1864)
  ==17019==    by 0x4F1EB07: virThreadHelper (virthread.c:206)
  ==17019==    by 0xA8462D3: start_thread (in /lib64/libpthread-2.20.so)
  ==17019==    by 0xAB441FC: clone (in /lib64/libc-2.20.so)
  ==17019==  Address 0x139023f4 is 4 bytes inside a block of size 240 free'd
  ==17019==    at 0x4C2B1F0: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
  ==17019==    by 0x4EA8949: virFree (viralloc.c:582)
  ==17019==    by 0x4EFF6D0: virObjectUnref (virobject.c:273)
  ==17019==    by 0x4FE74D6: virConnectClose (libvirt.c:1390)
  ==17019==    by 0x13342A: virshDeinit (virsh.c:406)
  ==17019==    by 0x134A37: main (virsh.c:950)

The problem is, when registering remoteClientCloseFunc(), it's
conn->closeCallback which is ref'd. But in the function itself
it's conn->closeCallback->conn what is unref'd. This is causing
imbalance in reference counting. Moreover, there's no need for
the remote driver to increase/decrease conn refcount since it's
not used anywhere. It's just merely passed to client registered
callback. And for that purpose it's correctly ref'd in
virConnectRegisterCloseCallback() and then unref'd in
virConnectUnregisterCloseCallback().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit e689300770)
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-09-03 17:45:57 +02:00
Jim Fehlig
0107209104 Revert "LXC: show used memory as 0 when domain is not active"
This reverts commit 1ce7c1d20c,
which introduced a significant semantic change to the
virDomainGetInfo() API. Additionally, the change was only
made to 2 of the 15 virt drivers.

Conflicts:
	src/qemu/qemu_driver.c

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
(cherry picked from commit 60acb38abb)
2015-08-28 10:24:06 -06:00
Eric W. Biederman
4ecffe773d lxc: set nosuid+nodev+noexec flags on /proc/sys mount
Future kernels will mandate the use of nosuid+nodev+noexec
flags when mounting the /proc/sys filesystem. Unconditionally
add them now since they don't harm things regardless and could
mitigate future security attacks.

(cherry picked from commit 24710414d4)

Conflicts:
    src/lxc/lxc_container.c
2015-06-16 17:21:59 +01:00
Eric Blake
4fc4f669eb daemon: avoid memleak when ListAll returns nothing
Commit 4f25146 (v1.2.8) managed to silence Coverity, but at the
cost of a memory leak detected by valgrind:
==24129== 40 bytes in 5 blocks are definitely lost in loss record 355 of 637
==24129==    at 0x4A08B1C: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24129==    by 0x5084B8E: virReallocN (viralloc.c:245)
==24129==    by 0x514D5AA: virDomainObjListExport (domain_conf.c:22200)
==24129==    by 0x201227DB: qemuConnectListAllDomains (qemu_driver.c:18042)
==24129==    by 0x51CC1B6: virConnectListAllDomains (libvirt-domain.c:6797)
==24129==    by 0x14173D: remoteDispatchConnectListAllDomains (remote.c:1580)
==24129==    by 0x121BE1: remoteDispatchConnectListAllDomainsHelper (remote_dispatch.h:1072)

In short, every time a client calls a ListAll variant and asks
for the resulting list, but there are 0 elements to return, we
end up leaking the 1-entry array that holds the NULL terminator.

What's worse, a read-only client can access these functions in a
tight loop to cause libvirtd to eventually run out of memory; and
this can be considered a denial of service attack against more
privileged clients.  Thankfully, the leak is so small (8 bytes per
call) that you would already have some other denial of service with
any guest calling the API that frequently, so an out-of-memory
crash is unlikely enough that this did not warrant a CVE.

* daemon/remote.c (remoteDispatchConnectListAllDomains)
(remoteDispatchDomainListAllSnapshots)
(remoteDispatchDomainSnapshotListAllChildren)
(remoteDispatchConnectListAllStoragePools)
(remoteDispatchStoragePoolListAllVolumes)
(remoteDispatchConnectListAllNetworks)
(remoteDispatchConnectListAllInterfaces)
(remoteDispatchConnectListAllNodeDevices)
(remoteDispatchConnectListAllNWFilters)
(remoteDispatchConnectListAllSecrets)
(remoteDispatchNetworkGetDHCPLeases): Plug leak.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 3c2ff5029b)
Signed-off-by: Eric Blake <eblake@redhat.com>

Conflicts:
	daemon/remote.c - context with older cleanup styles
2015-03-16 16:31:30 -06:00
Michal Privoznik
394b31f0e3 xend: Don't crash in virDomainXMLDevID
The function is called from all {Attach,Update,Detach}Device APIs to
create config strings that are later passed to the xend to perform the
desired action. The function is intended to handle all supported
devices. However, as of 5b05358aba we
are trying to get disk driver of the device without checking if the
device really is a disk. This leads to an segmentation fault:

  #0 0x00007ffff7571815 in virDomainDiskGetDriver () from /usr/lib/libvirt.so.0
  #1 0x00007fffeb9ad471 in ?? () from /usr/lib/libvirt/connection-driver/libvirt_driver_xen.so
  #2 0x00007fffeb9b1062 in xenDaemonAttachDeviceFlags () from /usr/lib/libvirt/connection-driver/libvirt_driver_xen.so
  #3 0x00007fffeb9a8a86 in ?? () from /usr/lib/libvirt/connection-driver/libvirt_driver_xen.so
  #4 0x00007ffff7609266 in virDomainAttachDevice () from /usr/lib/libvirt.so.0
  #5 0x0000555555593c9d in ?? ()
  #6 0x00007ffff76743c9 in virNetServerProgramDispatch () from /usr/lib/libvirt.so.0
  #7 0x00005555555a678d in ?? ()
  #8 0x00007ffff755460e in ?? () from /usr/lib/libvirt.so.0
  #9 0x00007ffff7553b06 in ?? () from /usr/lib/libvirt.so.0
  #10 0x00007ffff4998b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
  #11 0x00007ffff46e30ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
  #12 0x0000000000000000 in ?? ()

Reported-by: Xiaolin Su <linxxnil@126.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit cd7702d456)
2015-01-30 14:18:58 +01:00
Peter Krempa
cef411296b CVE-2015-0236: qemu: Check ACLs when dumping security info from snapshots
The ACL check didn't check the VIR_DOMAIN_XML_SECURE flag and the
appropriate permission for it. Found via code inspection while fixing
permissions for save images.

(cherry picked from commit b347c0c2a3)
2015-01-22 09:39:17 -07:00
Peter Krempa
c0f3e664a6 CVE-2015-0236: qemu: Check ACLs when dumping security info from save image
The ACL check didn't check the VIR_DOMAIN_XML_SECURE flag and the
appropriate permission for it.

(cherry picked from commit 03c3c0c874)
2015-01-22 09:39:17 -07:00
Peter Krempa
372bfe63b5 qemu: migration: Unlock vm on failed ACL check in protocol v2 APIs
Avoid leaving the domain locked on a failed ACL check in
qemuDomainMigratePerform() and qemuDomainMigrateFinish2().

Introduced in commit abf75aea24 (Add ACL checks into the QEMU driver).

(cherry picked from commit 2bdcd29c71)
2014-12-22 16:41:24 -07:00
Luyao Huang
05ba8c50b1 storage: fix crash caused by no check return before set close
https://bugzilla.redhat.com/show_bug.cgi?id=1087104#c5

When trying to use an invalid offset to virStorageVolUpload(), libvirt
fails in virFDStreamOpenFileInternal(), although it seems libvirt does
not check the return in storageVolUpload(), and calls
virFDStreamSetInternalCloseCb() right after.  But stream doesn't have a
privateData (is NULL) yet, and the daemon crashes then.

0  0x00007f09429a9c10 in pthread_mutex_lock () from /lib64/libpthread.so.0
1  0x00007f094514dbf5 in virMutexLock (m=<optimized out>) at util/virthread.c:88
2  0x00007f09451cb211 in virFDStreamSetInternalCloseCb at fdstream.c:795
3  0x00007f092ff2c9eb in storageVolUpload at storage/storage_driver.c:2098
4  0x00007f09451f46e0 in virStorageVolUpload at libvirt.c:14000
5  0x00007f0945c78fa1 in remoteDispatchStorageVolUpload at remote_dispatch.h:14339
6  remoteDispatchStorageVolUploadHelper at remote_dispatch.h:14309
7  0x00007f094524a192 in virNetServerProgramDispatchCall at rpc/virnetserverprogram.c:437

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit 87b9437f89)
2014-12-22 16:40:54 -07:00
Martin Kletzander
27431ec96e CVE-2014-8131: Fix possible deadlock and segfault in qemuConnectGetAllDomainStats()
When user doesn't have read access on one of the domains he requested,
the for loop could exit abruptly or continue and override pointer which
pointed to locked object.

This patch fixed two issues at once.  One is that domflags might have
had QEMU_DOMAIN_STATS_HAVE_JOB even when there was no job started (this
is fixed by doing domflags |= QEMU_DOMAIN_STATS_HAVE_JOB only when the
job was acquired and cleaning domflags on every start of the loop.
Second one is that the domain is kept locked when
virConnectGetAllDomainStatsCheckACL() fails and continues the loop when
it didn't end.  Adding a simple virObjectUnlock() and clearing the
pointer ought to do.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 57023c0a3a)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>

Conflicts:
	src/qemu/qemu_driver.c -- GetAllDomainStats did not use jobs
                                  before 1f4831ee
2014-12-10 09:37:37 +01:00
Laine Stump
6842f1480a util: eliminate "use after free" in callers of virNetDevLinkDump
virNetDevLinkDump() gets a message from netlink into "resp", then
calls nlmsg_parse() to fill the table "tb" with pointers into resp. It
then returns tb to its caller, but not before freeing the buffer at
resp. That means that all the callers of virNetDevLinkDump() are
examining memory that has already been freed. This can be verified by
filling the buffer at resp with garbage prior to freeing it (or, I
suppose, just running libvirtd under valgrind) then performing some
operation that calls virNetDevLinkDump().

The upstream commit log incorrectly states that the code has been like
this ever since virNetDevLinkDump() was written. In reality, the
problem was introduced with commit e95de74d, first in libvirt-1.0.5,
which was attempting to eliminate a typecast that caused compiler
warnings. It has only been pure luck (or maybe a lack of heavy load,
and/or maybe an allocation algorithm in malloc() that delays re-use of
just-freed memory) that has kept this from causing errors, for example
when configuring a PCI passthrough or macvtap passthrough network
interface.

The solution taken in this patch is the simplest - just return resp to
the caller along with tb, then have the caller free it after they are
finished using the data (pointers) in tb. I alternately could have
made a cleaner interface by creating a new struct that put tb and resp
together along with a vir*Free() function for it, but this function is
only used in a couple places, and I'm not sure there will be
additional new uses of virNetDevLinkDump(), so the value of adding a
new type, extra APIs, etc. is dubious.

(cherry picked from commit f9f9699f40)
2014-11-12 14:07:56 -05:00
Eric Blake
c7500ce36f CVE-2014-7823: dumpxml: security hole with migratable flag
Commit 28f8dfd (v1.0.0) introduced a security hole: in at least
the qemu implementation of virDomainGetXMLDesc, the use of the
flag VIR_DOMAIN_XML_MIGRATABLE (which is usable from a read-only
connection) triggers the implicit use of VIR_DOMAIN_XML_SECURE
prior to calling qemuDomainFormatXML.  However, the use of
VIR_DOMAIN_XML_SECURE is supposed to be restricted to read-write
clients only.  This patch treats the migratable flag as requiring
the same permissions, rather than analyzing what might break if
migratable xml no longer includes secret information.

Fortunately, the information leak is low-risk: all that is gated
by the VIR_DOMAIN_XML_SECURE flag is the VNC connection password;
but VNC passwords are already weak (FIPS forbids their use, and
on a non-FIPS machine, anyone stupid enough to trust a max-8-byte
password sent in plaintext over the network deserves what they
get).  SPICE offers better security than VNC, and all other
secrets are properly protected by use of virSecret associations
rather than direct output in domain XML.

* src/remote/remote_protocol.x (REMOTE_PROC_DOMAIN_GET_XML_DESC):
Tighten rules on use of migratable flag.
* src/libvirt-domain.c (virDomainGetXMLDesc): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit b1674ad5a9)

Conflicts:
	src/libvirt-domain.c - file split from older src/libvirt.c
Signed-off-by: Eric Blake <eblake@redhat.com>
2014-11-06 23:00:17 +01:00
Pavel Hrdina
c074b4044e domain_conf: fix domain deadlock
If you use public api virConnectListAllDomains() with second parameter
set to NULL to get only the number of domains you will lock out all
other operations with domains.

Introduced by commit 2c680804.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit fc22b2e748)
2014-10-01 08:28:20 -06:00
Martin Kletzander
9281ca9901 rpc: make daemon spawning a bit more intelligent
This way it behaves more like the daemon itself does (acquiring a
pidfile, deleting the socket before binding, etc.).

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=927369
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1138604

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit bd9ad91a40)
2014-09-17 13:40:54 -06:00
Martin Kletzander
818c5c6b83 util: get rid of unnecessary umask() call
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit d00c6fd258)
2014-09-17 13:29:00 -06:00
Martin Kletzander
a34ec87d2d util: fix potential leak in error codepath
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit aaaa2d56bd)

Conflicts:
	src/util/virpidfile.c - undo temporary bisection fix in previous patch
2014-09-17 13:24:43 -06:00
Martin Kletzander
5ddbe2511a remove redundant pidfile path constructions
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 8035f2e6f2)

Conflicts:
	src/util/virpidfile.c - fix compilation error to avoid broken bisect
2014-09-17 13:18:10 -06:00
Martin Kletzander
aef963f1ac rpc: reformat the flow to make a bit more sense
Just remove useless "else".  Best viewed with '-w'.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 3951d4a6d3)
2014-09-17 11:40:54 -06:00
Laine Stump
f6f9edf13c network: detect conflicting route even if it is the final entry
This is a folloup to commit 5f719596, which checks for a route
conflicting with the standard libvirt default network subnet
(192.168.122.0/24). It turns out that $() strips the trailing newline
from the output of "ip route show", so there would be no match if the
route we were looking for was the final line of output. This can be
solved by adding ${nl} to the end of the output (just as we were
already adding it at the beginning of the output).

(cherry picked from commit 22048ae61d)
2014-09-17 11:40:44 -06:00
Laine Stump
78503276c1 network: try to eliminate default network conflict during package install
Sometimes libvirt is installed on a host that is already using the
network 192.168.122.0/24. If the libvirt-daemon-config-network package
is installed, this creates a conflict, since that package has been
hard-coded to create a virtual network that also uses
192.168.122.0/24. In the past libvirt has attempted to warn of /
remediate this situation by checking for conflicting routes when the
network is started, but it turns out that isn't always useful (for
example in the case that the *other* interface/network creating the
conflict hasn't yet been started at the time libvirtd start its own
networks).

This patch attempts to catch the problem earlier - at install
time. During the %post install script for
libvirt-daemon-config-network, we use a case statement to look through
the output of "ip route show" for a route that exactly matches
192.168.122.0/24, and if found we search for a similar route that
*doesn't* match (e.g. 192.168.124.0/24) (note that the search starts
with "124" instead of 123 because of reports of people already
modifying their L1 host's network to 192.168.123.0/24 in an attempt to
solve exactly the problem we are also trying to solve).  When we find
an available route, we just replace all occurrences of "122" in the
default.xml that is being created with the newly found 192.168
subnet. This could obviously be made more complicated - examine the
template defaul.xml to automatically determine the existing network
address and mask rather than hard coding it in the specfile, etc, but
this scripting is simpler and gets the job done as long as we continue
to use 192.168.122.0/24 in the template. (If anyone with mad bash
skillz wants to suggest something to do that, by all means please do).

This is intended to at least "further reduce" occurrence of the
problems detailed in:

  https://bugzilla.redhat.com/show_bug.cgi?id=811967

(cherry picked from commit 5f71959667)
2014-09-17 11:40:15 -06:00
Peter Krempa
6bdf14150e CVE-2014-3633: qemu: blkiotune: Use correct definition when looking up disk
Live definition was used to look up the disk index while persistent one
was indexed leading to a crash in qemuDomainGetBlockIoTune. Use the
correct def and report a nice error.

Unfortunately it's accessible via read-only connection, though it can
only crash libvirtd in the cases where the guest is hot-plugging disks
without reflecting those changes to the persistent definition.  So
avoiding hotplug, or doing hotplug where persistent is always modified
alongside live definition, will avoid the out-of-bounds access.

Introduced in: eca96694a7 (v0.9.8)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140724
Reported-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>

(cherry picked from commit 3e745e8f77)
2014-09-17 11:35:12 -06:00
Jiri Denemark
4537f84b4b spec: Fix preun script for daemon
%systemd_preun macro cannot be split into several lines.

https://bugzilla.redhat.com/show_bug.cgi?id=1136736

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit 6209454d5b)
2014-09-16 10:22:46 -06:00
4881 changed files with 1411148 additions and 1387222 deletions

21
.gitignore vendored
View File

@@ -18,7 +18,6 @@
*.pyc
*.rej
*.s
*.swp
*~
.#*
.deps
@@ -41,7 +40,6 @@
/build-aux
/build-aux/
/build/
/confdefs.h
/config.cache
/config.guess
/config.h
@@ -52,7 +50,6 @@
/config.sub
/configure
/configure.lineno
/conftest.*
/daemon/*_dispatch.h
/daemon/libvirt_qemud
/daemon/libvirtd
@@ -63,12 +60,12 @@
/daemon/libvirtd.pod
/daemon/libvirtd.policy
/daemon/libvirtd.service
/daemon/libvirtd.socket
/daemon/test_libvirtd.aug
/docs/aclperms.htmlinc
/docs/apibuild.py.stamp
/docs/devhelp/libvirt.devhelp
/docs/hvsupport.html.in
/docs/libvirt-admin-*.xml
/docs/libvirt-api.xml
/docs/libvirt-lxc-*.xml
/docs/libvirt-qemu-*.xml
@@ -82,11 +79,10 @@
/examples/domtop/domtop
/examples/hellolibvirt/hellolibvirt
/examples/openauth/openauth
/examples/rename/rename
/gnulib/lib/*
/gnulib/m4/*
/gnulib/tests/*
/include/libvirt/libvirt-common.h
/include/libvirt/libvirt.h
/libtool
/libvirt-*.tar.gz
/libvirt-[0-9]*
@@ -112,8 +108,6 @@
/src/access/viraccessapichecklxc.h
/src/access/viraccessapicheckqemu.c
/src/access/viraccessapicheckqemu.h
/src/admin/admin_client.h
/src/admin/admin_protocol.[ch]
/src/esx/*.generated.*
/src/hyperv/*.generated.*
/src/libvirt*.def
@@ -124,20 +118,15 @@
/src/libvirt_access_lxc.xml
/src/libvirt_access_qemu.syms
/src/libvirt_access_qemu.xml
/src/libvirt_admin.syms
/src/libvirt_*.stp
/src/libvirt_*helper
/src/libvirt_*probes.h
/src/libvirt_lxc
/src/locking/libxl-lockd.conf
/src/locking/libxl-sanlock.conf
/src/locking/lock_daemon_dispatch_stubs.h
/src/locking/lock_protocol.[ch]
/src/locking/qemu-lockd.conf
/src/locking/qemu-sanlock.conf
/src/locking/test_libvirt_sanlock.aug
/src/logging/log_daemon_dispatch_stubs.h
/src/logging/log_protocol.[ch]
/src/lxc/lxc_controller_dispatch.h
/src/lxc/lxc_monitor_dispatch.h
/src/lxc/lxc_monitor_protocol.c
@@ -151,17 +140,12 @@
/src/rpc/virnetprotocol.[ch]
/src/test_libvirt*.aug
/src/test_virtlockd.aug
/src/test_virtlogd.aug
/src/util/virkeymaps.h
/src/virt-aa-helper
/src/virtlockd
/src/virtlockd.8
/src/virtlockd.8.in
/src/virtlockd.init
/src/virtlogd
/src/virtlogd.8
/src/virtlogd.8.in
/src/virtlogd.init
/tests/*.log
/tests/*.pid
/tests/*.trs
@@ -182,7 +166,6 @@
/tools/virt-login-shell
/tools/virsh
/tools/virsh-*-edit.c
/tools/virt-admin
/tools/virt-*-validate
/tools/virt-sanlock-cleanup
/tools/wireshark/src/plugin.c

Submodule .gnulib updated: 6cc32c63e8...2d280742a9

View File

@@ -5,10 +5,7 @@
<bozzolan@gmail.com> <redshift@gmx.com>
<charles_duffy@messageone.com> <charles@dyfis.net>
<claudio.bley@gmail.com> <cbley@av-test.de>
<dfj@redhat.com> <dfj@dfj.bne.redhat.com>
<dpkshetty@gmail.com> <deepakcs@linux.vnet.ibm.com>
<dpkshetty@gmail.com> <deepakcs@redhat.com>
<eblake@redhat.com> <ebb9@byu.net>
<gdolley@arpnetworks.com> <gdolley@ucla.edu>
<gerhard.stenzel@de.ibm.com> <gstenzel@linux.vnet.ibm.com>
@@ -59,5 +56,3 @@ Philipp Hahn <hahn@univention.de>
Marco Bozzolan <bozzolan@gmail.com>
Marco Bozzolan <redshift@gmx.com>
Pritesh Kothari <pritesh.kothari@sun.com>
Wang Yufei (James) <james.wangyufei@huawei.com>
Deepak C Shetty <dpkshetty@gmail.com>

View File

@@ -8,28 +8,32 @@ Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
The primary maintainers and people with commit access rights:
Alex Jia <ajia@redhat.com>
Andrea Bolognani <abologna@redhat.com>
Anthony Liguori <aliguori@us.ibm.com>
Cédric Bosdonnat <cbosdonnat@suse.com>
Chris Lalancette <clalance@redhat.com>
Christophe Fergeau <cfergeau@redhat.com>
Claudio Bley <claudio.bley@gmail.com>
Claudio Bley <cbley@av-test.de>
Cole Robinson <crobinso@redhat.com>
Daniel Berrange <berrange@redhat.com>
Daniel Veillard <veillard@redhat.com>
Dave Allan <dallan@redhat.com>
Doug Goldstein <cardoe@gentoo.org>
Eric Blake <eblake@redhat.com>
Erik Skultety <eskultet@redhat.com>
Gao Feng <gaofeng@cn.fujitsu.com>
Guannan Ren <gren@redhat.com>
Guido Günther <agx@sigxcpu.org>
Ján Tomko <jtomko@redhat.com>
Jim Fehlig <jfehlig@suse.com>
Jim Meyering <meyering@redhat.com>
Jiří Denemark <jdenemar@redhat.com>
John Ferlan <jferlan@redhat.com>
John Levon <john.levon@sun.com>
Laine Stump <laine@redhat.com>
Mark McLoughlin <markmc@redhat.com>
Martin Kletzander <mkletzan@redhat.com>
Matthias Bolte <matthias.bolte@googlemail.com>
Maxim Nestratov <mnestratov@virtuozzo.com>
Michal Prívozník <mprivozn@redhat.com>
Osier Yang <jyang@redhat.com>
Pavel Hrdina <phrdina@redhat.com>
Peter Krempa <pkrempa@redhat.com>
Richard W.M. Jones <rjones@redhat.com>
@@ -39,19 +43,11 @@ Wen Congyang <wency@cn.fujitsu.com>
Previous maintainers:
Anthony Liguori <aliguori@us.ibm.com>
Atsushi SAKAI <sakaia@jp.fujitsu.com>
Chris Lalancette <clalance@redhat.com>
Dan Smith <danms@us.ibm.com>
Dave Allan <dallan@redhat.com>
Dave Leskovec <dlesko@linux.vnet.ibm.com>
Dmitry Guryanov <dguryanov@parallels.com>
Guannan Ren <gren@redhat.com>
Jim Meyering <meyering@redhat.com>
John Levon <john.levon@sun.com>
Justin Clift <jclift@redhat.com>
Karel Zak <kzak@redhat.com>
Osier Yang <jyang@redhat.com>
Patches have also been contributed by:

View File

@@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
@@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -158,7 +158,7 @@ Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
@@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
@@ -267,7 +267,7 @@ Library will still fall under Section 6.)
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
@@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
@@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
@@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
@@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest

90
HACKING
View File

@@ -14,16 +14,7 @@ General tips for contributing patches
(1) Discuss any large changes on the mailing list first. Post patches early and
listen to feedback.
(2) Official upstream repository is kept in git ("git://libvirt.org/libvirt.git")
and is browsable along with other libvirt-related repositories (e.g.
libvirt-python) online <http://libvirt.org/git/>.
(3) Patches to translations are maintained via the zanata project
<https://fedora.zanata.org/>. If you want to fix a translation in a .po file,
join the appropriate language team. The libvirt release process automatically
pulls the latest version of each translation file from zanata.
(4) Post patches in unified diff format, with git rename detection enabled. You
(2) Post patches in unified diff format, with git rename detection enabled. You
need a one-time setup of:
git config diff.renames true
@@ -66,16 +57,16 @@ Please follow this as close as you can, especially the rebase and git
send-email part, as it makes life easier for other developers to review your
patch set. One should avoid sending patches as attachments, but rather send
them in email body along with commit message. If a developer is sending
another version of the patch (e.g. to address review comments), they are
advised to note differences to previous versions after the "---" line in the
patch so that it helps reviewers but doesn't become part of git history.
Moreover, such patch needs to be prefixed correctly with
"--subject-prefix=PATCHv2" appended to "git send-email" (substitute "v2" with
the correct version if needed though).
another version of the patch (e.g. to address review comments), he is advised
to note differences to previous versions after the "---" line in the patch so
that it helps reviewers but doesn't become part of git history. Moreover, such
patch needs to be prefixed correctly with "--subject-prefix=PATCHv2" appended
to "git send-email" (substitute "v2" with the correct version if needed
though).
(5) In your commit message, make the summary line reasonably short (60 characters
(3) In your commit message, make the summary line reasonably short (60 characters
is typical), followed by a blank line, followed by any longer description of
why your patch makes sense. If the patch fixes a regression, and you know what
commit introduced the problem, mentioning that is useful. If the patch
@@ -87,7 +78,7 @@ is up to you if you want to include or omit them in the commit message.
(6) Split large changes into a series of smaller patches, self-contained if
(4) Split large changes into a series of smaller patches, self-contained if
possible, with an explanation of each patch and an explanation of how the
sequence of patches fits together. Moreover, please keep in mind that it's
required to be able to compile cleanly (*including* "make check" and "make
@@ -98,10 +89,10 @@ things).
(7) Make sure your patches apply against libvirt GIT. Developers only follow GIT
(5) Make sure your patches apply against libvirt GIT. Developers only follow GIT
and don't care much about released versions.
(8) Run the automated tests on your code before submitting any changes. In
(6) Run the automated tests on your code before submitting any changes. In
particular, configure with compile warnings set to -Werror. This is done
automatically for a git checkout; from a tarball, use:
@@ -141,20 +132,13 @@ Also, individual tests can be run from inside the "tests/" directory, like:
./qemuxml2xmltest
If you are adding new test cases, or making changes that alter existing test
output, you can use the environment variable VIR_TEST_REGENERATE_OUTPUT to
quickly update the saved test data. Of course you still need to review the
changes VERY CAREFULLY to ensure they are correct.
VIR_TEST_REGENERATE_OUTPUT=1 ./qemuxml2argvtest
There is also a "./run" script at the top level, to make it easier to run
programs that have not yet been installed, as well as to wrap invocations of
various tests under gdb or Valgrind.
(9) The Valgrind test should produce similar output to "make check". If the output
(7) The Valgrind test should produce similar output to "make check". If the output
has traces within libvirt API's, then investigation is required in order to
determine the cause of the issue. Output such as the following indicates some
sort of leak:
@@ -230,7 +214,7 @@ to "tests/.valgrind.supp" in order to suppress the warning:
(10) Update tests and/or documentation, particularly if you are adding a new
(8) Update tests and/or documentation, particularly if you are adding a new
feature or changing the output of a program.
@@ -382,23 +366,16 @@ although use of a semicolon is not currently rejected.
Curly braces
============
Omit the curly braces around an "if", "while", "for" etc. body only when both
that body and the condition itself occupy a single line. In every other case
we require the braces. This ensures that it is trivially easy to identify a
single-'statement' loop: each has only one 'line' in its body.
Omit the curly braces around an "if", "while", "for" etc. body only when that
body occupies a single line. In every other case we require the braces. This
ensures that it is trivially easy to identify a single-'statement' loop: each
has only one 'line' in its body.
while (expr) // single line body; {} is forbidden
Omitting braces with a single-line body is fine:
while (expr) // one-line body -> omitting curly braces is ok
single_line_stmt();
while (expr(arg1,
arg2)) // indentation makes it obvious it is single line,
single_line_stmt(); // {} is optional (not enforced either way)
while (expr1 &&
expr2) { // multi-line, at same indentation, {} required
single_line_stmt();
}
However, the moment your loop/if/else body extends on to a second line, for
whatever reason (even if it's just an added comment), then you should add
braces. Otherwise, it would be too easy to insert a statement just before that
@@ -484,33 +461,6 @@ But if negating a complex condition is too ugly, then at least add braces:
x = y;
}
Use hanging braces for compound statements: the opening brace of a compound
statement should be on the same line as the condition being tested. Only
top-level function bodies, nested scopes, and compound structure declarations
should ever have { on a line by itself.
void
foo(int a, int b)
{ // correct - function body
int 2d[][] = {
{ // correct - complex initialization
1, 2,
},
};
if (a)
{ // BAD: compound brace on its own line
do_stuff();
}
{ // correct - nested scope
int tmp;
if (a < b) { // correct - hanging brace
tmp = b;
b = a;
a = tmp;
}
}
}
Preprocessor
============

View File

@@ -20,10 +20,18 @@ LCOV = lcov
GENHTML = genhtml
SUBDIRS = . gnulib/lib include src daemon tools docs gnulib/tests \
tests po examples
tests po examples/object-events examples/hellolibvirt \
examples/dominfo examples/domsuspend examples/apparmor \
examples/xml/nwfilter examples/openauth examples/systemtap \
tools/wireshark examples/dommigrate \
examples/lxcconvert examples/domtop
ACLOCAL_AMFLAGS = -I m4
XML_EXAMPLES = \
$(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/examples/xml/, \
test/*.xml storage/*.xml)))
EXTRA_DIST = \
config-post.h \
ChangeLog-old \
@@ -32,13 +40,13 @@ EXTRA_DIST = \
libvirt.pc.in \
libvirt-qemu.pc.in \
libvirt-lxc.pc.in \
libvirt-admin.pc.in \
autobuild.sh \
Makefile.nonreentrant \
autogen.sh \
cfg.mk \
run.in \
AUTHORS.in
AUTHORS.in \
$(XML_EXAMPLES)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libvirt.pc libvirt-qemu.pc libvirt-lxc.pc

View File

@@ -20,10 +20,6 @@ no_git=
if test "x$1" = "x--no-git"; then
no_git=" $1"
shift
case "$1 $2" in
--gnulib-srcdir=*) no_git="$no_git $1"; shift ;;
--gnulib-srcdir\ *) no_git="$no_git $1=$2"; shift; shift;;
esac
fi
if test -z "$NOCONFIGURE" ; then
if test "x$1" = "x--system"; then

View File

@@ -1,10 +1,10 @@
#! /bin/sh
# Print a version string.
scriptversion=2014-12-08.12; # UTC
scriptversion=2013-12-05.23; # UTC
# Bootstrap this package from checked-out sources.
# Copyright (C) 2003-2016 Free Software Foundation, Inc.
# Copyright (C) 2003-2014 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,9 +42,6 @@ export LC_ALL
local_gl_dir=gl
# Honour $PERL, but work even if there is none
PERL="${PERL-perl}"
me=$0
usage() {
@@ -213,17 +210,7 @@ bootstrap_sync=false
use_git=true
check_exists() {
if test "$1" = "--verbose"; then
($2 --version </dev/null) >/dev/null 2>&1
if test $? -ge 126; then
# If not found, run with diagnostics as one may be
# presented with env variables to set to find the right version
($2 --version </dev/null)
fi
else
($1 --version </dev/null) >/dev/null 2>&1
fi
($1 --version </dev/null) >/dev/null 2>&1
test $? -lt 126
}
@@ -421,7 +408,7 @@ sort_ver() { # sort -V is not generally available
get_version() {
app=$1
$app --version >/dev/null 2>&1 || { $app --version; return 1; }
$app --version >/dev/null 2>&1 || return 1
$app --version 2>&1 |
sed -n '# Move version to start of line.
@@ -459,7 +446,6 @@ check_versions() {
test "$appvar" = TAR && appvar=AMTAR
case $appvar in
GZIP) ;; # Do not use $GZIP: it contains gzip options.
PERL::*) ;; # Keep perl modules as-is
*) eval "app=\${$appvar-$app}" ;;
esac
@@ -477,22 +463,11 @@ check_versions() {
ret=1
continue
} ;;
# Another check is for perl modules. These can be written as
# e.g. perl::XML::XPath in case of XML::XPath module, etc.
perl::*)
# Extract module name
app="${app#perl::}"
if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then
warn_ "Error: perl module '$app' not found"
ret=1
fi
continue
;;
esac
if [ "$req_ver" = "-" ]; then
# Merely require app to exist; not all prereq apps are well-behaved
# so we have to rely on $? rather than get_version.
if ! check_exists --verbose $app; then
if ! check_exists $app; then
warn_ "Error: '$app' not found"
ret=1
fi
@@ -623,8 +598,8 @@ case ${GNULIB_SRCDIR--} in
# Note that $use_git is necessarily true in this case.
if git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
git submodule init -- "$gnulib_path" || exit $?
git submodule update -- "$gnulib_path" || exit $?
git submodule init || exit $?
git submodule update || exit $?
elif [ ! -d "$gnulib_path" ]; then
echo "$0: getting gnulib files..."
@@ -653,14 +628,13 @@ case ${GNULIB_SRCDIR--} in
# This fallback allows at least git 1.5.5.
if test -f "$gnulib_path"/gnulib-tool; then
# Since file already exists, assume submodule init already complete.
git submodule update -- "$gnulib_path" || exit $?
git submodule update || exit $?
else
# Older git can't clone into an empty directory.
rmdir "$gnulib_path" 2>/dev/null
git clone --reference "$GNULIB_SRCDIR" \
"$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
&& git submodule init -- "$gnulib_path" \
&& git submodule update -- "$gnulib_path" \
&& git submodule init && git submodule update \
|| exit $?
fi
fi
@@ -915,8 +889,7 @@ if test $use_libtool = 1; then
esac
fi
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
|| die "gnulib-tool failed"
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
for file in $gnulib_files; do
symlink_to_dir "$GNULIB_SRCDIR" $file \

View File

@@ -1,6 +1,6 @@
# Bootstrap configuration.
# Copyright (C) 2010-2014 Red Hat, Inc.
# Copyright (C) 2010-2013 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -35,7 +35,6 @@ clock-time
close
connect
configmake
count-leading-zeros
count-one-bits
crypto/md5
crypto/sha256
@@ -196,7 +195,10 @@ local_gl_dir=gnulib/local
# Build prerequisites
# Note that some of these programs are only required for 'make dist' to
# succeed from a fresh git checkout; not all of these programs are
# required to run 'make dist' on a tarball.
# required to run 'make dist' on a tarball. As a special case, we want
# to require the equivalent of the Fedora python-devel package, but
# RHEL 5 lacks the witness python-config package; we hack around that
# old environment below.
buildreq="\
autoconf 2.59
automake 1.9.6
@@ -207,13 +209,20 @@ gzip -
libtool -
patch -
perl 5.5
perl::XML::XPath -
pkg-config -
python-config -
rpcgen -
tar -
xmllint -
xsltproc -
"
# Use rpm as a fallback to bypass the bootstrap probe for python-config,
# for the sake of RHEL 5; without requiring it on newer systems that
# have python-config to begin with.
if `(${PYTHON_CONFIG-python-config} --version;
test $? -lt 126 || rpm -q python-devel) >/dev/null 2>&1`; then
PYTHON_CONFIG=true
fi
# Automake requires that ChangeLog and AUTHORS exist.
touch AUTHORS ChangeLog || exit 1

View File

@@ -27,17 +27,10 @@ my $ret = 0;
my $incomment = 0;
foreach my $file (@ARGV) {
# Per-file variables for multiline Curly Bracket (cb_) check
my $cb_linenum = 0;
my $cb_code = "";
my $cb_scolon = 0;
open FILE, $file;
while (defined (my $line = <FILE>)) {
my $data = $line;
# For temporary modifications
my $tmpdata;
# Kill any quoted , ; = or "
$data =~ s/'[";,=]'/'X'/g;
@@ -84,17 +77,13 @@ foreach my $file (@ARGV) {
#
# foo (*bar, wizz);
#
# We also don't want to spoil the $data so it can be used
# later on.
$tmpdata = $data;
while ($tmpdata =~ /(\w+)\s\((?!\*)/) {
while ($data =~ /(\w+)\s\((?!\*)/) {
my $kw = $1;
# Allow space after keywords only
if ($kw =~ /^(if|for|while|switch|return)$/) {
$tmpdata =~ s/($kw\s\()/XXX(/;
$data =~ s/($kw\s\()/XXX(/;
} else {
print "Whitespace after non-keyword:\n";
print "$file:$.: $line";
$ret = 1;
last;
@@ -103,26 +92,26 @@ foreach my $file (@ARGV) {
# Require whitespace immediately after keywords,
# but none after the opening bracket
if ($data =~ /\b(if|for|while|switch|return)\(/ ||
$data =~ /\b(if|for|while|switch|return)\s+\(\s/) {
print "No whitespace after keyword:\n";
while ($data =~ /\b(if|for|while|switch|return)\(/ ||
$data =~ /\b(if|for|while|switch|return)\s+\(\s/) {
print "$file:$.: $line";
$ret = 1;
last;
}
# Forbid whitespace between )( of a function typedef
if ($data =~ /\(\*\w+\)\s+\(/) {
print "Whitespace between ')' and '(':\n";
while ($data =~ /\(\*\w+\)\s+\(/) {
print "$file:$.: $line";
$ret = 1;
last;
}
# Forbid whitespace following ( or prior to )
if ($data =~ /\S\s+\)/ ||
$data =~ /\(\s+\S/) {
print "Whitespace after '(' or before ')':\n";
while ($data =~ /\S\s+\)/ ||
$data =~ /\(\s+\S/) {
print "$file:$.: $line";
$ret = 1;
last;
}
# Forbid whitespace before ";" or ",". Things like below are allowed:
@@ -135,67 +124,35 @@ foreach my $file (@ARGV) {
# errno == EINTR)
# ;
#
if ($data =~ /[^;\s]\s+[;,]/) {
print "Whitespace before (semi)colon:\n";
while ($data =~ /[^;\s]\s+[;,]/) {
print "$file:$.: $line";
$ret = 1;
last;
}
# Require EOL, macro line continuation, or whitespace after ";".
# Allow "for (;;)" as an exception.
if ($data =~ /;[^ \\\n;)]/) {
print "Invalid character after semicolon:\n";
while ($data =~ /;[^ \\\n;)]/) {
print "$file:$.: $line";
$ret = 1;
last;
}
# Require EOL, space, or enum/struct end after comma.
if ($data =~ /,[^ \\\n)}]/) {
print "Invalid character after comma:\n";
while ($data =~ /,[^ \\\n)}]/) {
print "$file:$.: $line";
$ret = 1;
last;
}
# Require spaces around assignment '=', compounds and '=='
# with the exception of virAssertCmpInt()
$tmpdata = $data;
$tmpdata =~ s/(virAssertCmpInt\(.* ).?=,/$1op,/;
if ($tmpdata =~ /[^ ]\b[!<>&|\-+*\/%\^=]?=[^=]/ ||
$tmpdata =~ /=[^= \\\n]/) {
print "Spacing around '=' or '==':\n";
$data =~ s/(virAssertCmpInt\(.* ).?=,/$1op,/;
while ($data =~ /[^ ]\b[!<>&|\-+*\/%\^=]?=[^=]/ ||
$data =~ /=[^= \\\n]/) {
print "$file:$.: $line";
$ret = 1;
}
# One line conditional statements with one line bodies should
# not use curly brackets.
if ($data =~ /^\s*(if|while|for)\b.*\{$/) {
$cb_linenum = $.;
$cb_code = $line;
$cb_scolon = 0;
}
# We need to check for exactly one semicolon inside the body,
# because empty statements (e.g. with comment only) are
# allowed
if ($cb_linenum == $. - 1 && $data =~ /^[^;]*;[^;]*$/) {
$cb_code .= $line;
$cb_scolon = 1;
}
if ($data =~ /^\s*}\s*$/ &&
$cb_linenum == $. - 2 &&
$cb_scolon) {
print "Curly brackets around single-line body:\n";
print "$file:$cb_linenum-$.:\n$cb_code$line";
$ret = 1;
# There _should_ be no need to reset the values; but to
# keep my inner peace...
$cb_linenum = 0;
$cb_scolon = 0;
$cb_code = "";
last;
}
}
close FILE;

198
cfg.mk
View File

@@ -1,5 +1,5 @@
# Customize Makefile.maint. -*- makefile -*-
# Copyright (C) 2008-2015 Red Hat, Inc.
# Copyright (C) 2008-2014 Red Hat, Inc.
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -90,7 +90,7 @@ endif
# Files that should never cause syntax check failures.
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
(^(HACKING|docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$
(^(HACKING|docs/(news\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$
# Functions like free() that are no-ops on NULL arguments.
useless_free_options = \
@@ -160,6 +160,7 @@ useless_free_options = \
--name=virNWFilterRuleDefFree \
--name=virNWFilterRuleInstFree \
--name=virNetworkDefFree \
--name=virNetworkObjFree \
--name=virNodeDeviceDefFree \
--name=virNodeDeviceObjFree \
--name=virObjectUnref \
@@ -248,6 +249,8 @@ useless_free_options = \
# y virNetworkDefFree
# n virNetworkFree (returns int)
# n virNetworkFreeName (returns int)
# y virNetworkObjFree
# n virNetworkObjListFree FIXME
# n virNodeDevCapsDefFree FIXME
# y virNodeDeviceDefFree
# n virNodeDeviceFree (returns int)
@@ -300,11 +303,10 @@ sc_flags_debug:
# than d). The existence of long long, and of documentation about
# flags, makes the regex in the third test slightly harder.
sc_flags_usage:
@test "$$(cat $(srcdir)/include/libvirt/libvirt-domain.h \
@test "$$(cat $(srcdir)/include/libvirt/libvirt.h.in \
$(srcdir)/include/libvirt/virterror.h \
$(srcdir)/include/libvirt/libvirt-qemu.h \
$(srcdir)/include/libvirt/libvirt-lxc.h \
$(srcdir)/include/libvirt/libvirt-admin.h \
| grep -c '\(long\|unsigned\) flags')" != 4 && \
{ echo '$(ME): new API should use "unsigned int flags"' 1>&2; \
exit 1; } || :
@@ -565,14 +567,8 @@ sc_avoid_attribute_unused_in_header:
halt='use ATTRIBUTE_UNUSED in .c rather than .h files' \
$(_sc_search_regexp)
sc_prohibit_int_index:
@prohibit='\<(int|unsigned)\s*\*?index\>(\s|,|;)' \
halt='use different name than 'index' for declaration' \
$(_sc_search_regexp)
sc_prohibit_int_ijk:
@prohibit='\<(int|unsigned) ([^(=]* )*(i|j|k)\>(\s|,|;)' \
exclude='exempt from syntax-check' \
halt='use size_t, not int/unsigned int for loop vars i, j, k' \
$(_sc_search_regexp)
@@ -588,12 +584,6 @@ sc_prohibit_loop_var_decl:
halt='declare loop iterators outside the for statement' \
$(_sc_search_regexp)
# Use 'bool', not 'int', when assigning true or false
sc_prohibit_int_assign_bool:
@prohibit='\<int\>.*= *(true|false)' \
halt='use bool type for boolean values' \
$(_sc_search_regexp)
# Many of the function names below came from this filter:
# git grep -B2 '\<_('|grep -E '\.c- *[[:alpha:]_][[:alnum:]_]* ?\(.*[,;]$' \
# |sed 's/.*\.c- *//'|perl -pe 's/ ?\(.*//'|sort -u \
@@ -690,7 +680,7 @@ sc_require_whitespace_in_translation:
# Enforce recommended preprocessor indentation style.
sc_preprocessor_indentation:
@if cppi --version >/dev/null 2>&1; then \
$(VC_LIST_EXCEPT) | grep -E '\.[ch](\.in)?$$' | xargs cppi -a -c \
$(VC_LIST_EXCEPT) | grep '\.[ch]$$' | xargs cppi -a -c \
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
exit 1; }; \
else \
@@ -776,7 +766,7 @@ sc_prohibit_gettext_markup:
# lower-level code must not include higher-level headers.
cross_dirs=$(patsubst $(srcdir)/src/%.,%,$(wildcard $(srcdir)/src/*/.))
cross_dirs_re=($(subst / ,/|,$(cross_dirs)))
mid_dirs=access|conf|cpu|locking|logging|network|node_device|rpc|security|storage
mid_dirs=access|conf|cpu|locking|network|node_device|rpc|security|storage
sc_prohibit_cross_inclusion:
@for dir in $(cross_dirs); do \
case $$dir in \
@@ -920,35 +910,13 @@ sc_require_space_before_label:
halt="Top-level labels should be indented by one space" \
$(_sc_search_regexp)
# Allow for up to three spaces before the label: this is to avoid running
# into situations where neither this rule nor require_space_before_label
# would apply, eg. a line matching ^[a-zA-Z0-9]+ :$
sc_prohibit_space_in_label:
@prohibit='^ {0,3}[_a-zA-Z0-9]+ +:$$' \
in_vc_files='\.[ch]$$' \
halt="There should be no space between label name and colon" \
$(_sc_search_regexp)
# Doesn't catch all cases of mismatched braces across if-else, but it helps
sc_require_if_else_matching_braces:
@prohibit='( else( if .*\))? {|} else( if .*\))?$$)' \
in_vc_files='\.[chx]$$' \
halt="if one side of if-else uses {}, both sides must use it" \
$(_sc_search_regexp)
sc_curly_braces_style:
@files=$$($(VC_LIST_EXCEPT) | grep '\.[ch]$$'); \
if $(GREP) -nHP \
'^\s*(?!([a-zA-Z_]*for_?each[a-zA-Z_]*) ?\()([_a-zA-Z0-9]+( [_a-zA-Z0-9]+)* ?\()?(\*?[_a-zA-Z0-9]+(,? \*?[_a-zA-Z0-9\[\]]+)+|void)\) ?\{' \
$$files; then \
echo '$(ME): Non-K&R style used for curly braces around' \
'function body, see HACKING' 1>&2; exit 1; \
fi; \
if $(GREP) -A1 -En ' ((if|for|while|switch) \(|(else|do)\b)[^{]*$$'\
$$files | $(GREP) '^[^ ]*- *{'; then \
echo '$(ME): Use hanging braces for compound statements,' \
'see HACKING' 1>&2; exit 1; \
fi
@files=$$($(VC_LIST_EXCEPT) | grep '\.[ch]$$'); \
$(GREP) -nHP \
'^\s*(?!([a-zA-Z_]*for_?each[a-zA-Z_]*) ?\()([_a-zA-Z0-9]+( [_a-zA-Z0-9]+)* ?\()?(\*?[_a-zA-Z0-9]+(,? \*?[_a-zA-Z0-9\[\]]+)+|void)\) ?\{' \
$$files && { echo '$(ME): Non-K&R style used for curly' \
'braces around function body, see' \
'HACKING' 1>&2; exit 1; } || :
sc_prohibit_windows_special_chars_in_filename:
@files=$$($(VC_LIST_EXCEPT) | grep '[:*?"<>|]'); \
@@ -981,71 +949,6 @@ sc_prohibit_paren_brace:
halt='Put space between closing parenthesis and opening brace' \
$(_sc_search_regexp)
# C guarantees that static variables are zero initialized, and some compilers
# waste space by sticking explicit initializers in .data instead of .bss
sc_prohibit_static_zero_init:
@prohibit='\bstatic\b.*= *(0[^xX0-9]|NULL|false)' \
in_vc_files='\.[chx](\.in)?$$' \
halt='static variables do not need explicit zero initialization'\
$(_sc_search_regexp)
# FreeBSD exports the "devname" symbol which produces a warning.
sc_prohibit_devname:
@prohibit='\bdevname\b' \
exclude='sc_prohibit_devname' \
halt='avoid using 'devname' as FreeBSD exports the symbol' \
$(_sc_search_regexp)
sc_prohibit_system_error_with_vir_err:
@prohibit='\bvirReportSystemError *\(VIR_ERR_' \
halt='do not use virReportSystemError with VIR_ERR_* error codes' \
$(_sc_search_regexp)
# Rule to prohibit usage of virXXXFree within library, daemon, remote, etc.
# functions. There's a corresponding exclude to allow usage within tests,
# docs, examples, tools, src/libvirt-*.c, and include/libvirt/libvirt-*.h
sc_prohibit_virXXXFree:
@prohibit='\bvir(Domain|Network|NodeDevice|StorageVol|StoragePool|Stream|Secret|NWFilter|Interface|DomainSnapshot)Free\b' \
exclude='sc_prohibit_virXXXFree' \
halt='avoid using 'virXXXFree', use 'virObjectUnref' instead' \
$(_sc_search_regexp)
sc_prohibit_sysconf_pagesize:
@prohibit='sysconf\(_SC_PAGESIZE' \
halt='use virGetSystemPageSize[KB] instead of sysconf(_SC_PAGESIZE)' \
$(_sc_search_regexp)
sc_prohibit_pthread_create:
@prohibit='\bpthread_create\b' \
exclude='sc_prohibit_pthread_create' \
halt="avoid using 'pthread_create', use 'virThreadCreate' instead" \
$(_sc_search_regexp)
sc_prohibit_not_streq:
@prohibit='! *STREQ *\(.*\)' \
halt='Use STRNEQ instead of !STREQ' \
$(_sc_search_regexp)
sc_prohibit_not_strneq:
@prohibit='! *STRNEQ *\(.*\)' \
halt='Use STREQ instead of !STRNEQ' \
$(_sc_search_regexp)
sc_prohibit_verbose_strcat:
@prohibit='strncat\([^,]*,\s+([^,]*),\s+strlen\(\1\)\)' \
in_vc_files='\.[ch]$$' \
halt='Use strcat(a, b) instead of strncat(a, b, strlen(b))' \
$(_sc_search_regexp)
# Ensure that each .c file containing a "main" function also
# calls virGettextInitialize
sc_gettext_init:
@require='virGettextInitialize *\(' \
in_vc_files='\.c$$' \
containing='\<main *(' \
halt='the above files do not call virGettextInitialize' \
$(_sc_search_regexp)
# We don't use this feature of maint.mk.
prev_version_file = /dev/null
@@ -1093,64 +996,42 @@ _autogen:
# regenerate HACKING as part of the syntax-check
ifneq ($(_gl-Makefile),)
syntax-check: $(top_srcdir)/HACKING bracket-spacing-check test-wrap-argv
syntax-check: $(top_srcdir)/HACKING bracket-spacing-check
endif
bracket-spacing-check:
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.c$$'`; \
$(PERL) $(top_srcdir)/build-aux/bracket-spacing.pl $$files || \
{ echo '$(ME): incorrect formatting, see HACKING for rules' 1>&2; \
{ echo '$(ME): incorrect whitespace, see HACKING for rules' 1>&2; \
exit 1; }
test-wrap-argv:
$(AM_V_GEN)files=`$(VC_LIST) | grep -E '\.(ldargs|args)'`; \
for file in $$files ; \
do \
$(PERL) $(top_srcdir)/tests/test-wrap-argv.pl $$file > $${file}-t ; \
diff $$file $${file}-t; \
res=$$? ; \
rm $${file}-t ; \
test $$res == 0 || { \
echo "$(ME): Incorrect line wrapping in $$file" 1>&2; \
echo "$(ME): Use test-wrap-argv.pl to wrap test data files" 1>&2; \
exit 1; } \
done
# sc_po_check can fail if generated files are not built first
sc_po_check: \
$(srcdir)/daemon/remote_dispatch.h \
$(srcdir)/daemon/qemu_dispatch.h \
$(srcdir)/src/remote/remote_client_bodies.h \
$(srcdir)/daemon/admin_dispatch.h \
$(srcdir)/src/admin/admin_client.h
$(srcdir)/src/remote/remote_client_bodies.h
$(srcdir)/daemon/remote_dispatch.h: $(srcdir)/src/remote/remote_protocol.x
$(MAKE) -C daemon remote_dispatch.h
$(srcdir)/daemon/qemu_dispatch.h: $(srcdir)/src/remote/qemu_protocol.x
$(MAKE) -C daemon qemu_dispatch.h
$(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protocol.x
$(MAKE) -C src remote/remote_client_bodies.h
$(srcdir)/daemon/admin_dispatch.h: $(srcdir)/src/admin/admin_protocol.x
$(MAKE) -C daemon admin_dispatch.h
$(srcdir)/src/admin/admin_client.h: $(srcdir)/src/admin/admin_protocol.x
$(MAKE) -C src admin/admin_client.h
# List all syntax-check exemptions:
exclude_file_name_regexp--sc_avoid_strcase = ^tools/vsh\.h$$
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.h$$
_src1=libvirt-stream|fdstream|qemu/qemu_monitor|util/(vircommand|virfile)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon|logging/log_daemon
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(vircommand|virfile)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon
_test1=shunloadtest|virnettlscontexttest|virnettlssessiontest|vircgroupmock
exclude_file_name_regexp--sc_avoid_write = \
^(src/($(_src1))|daemon/libvirtd|tools/virsh-console|tests/($(_test1)))\.c$$
exclude_file_name_regexp--sc_bindtextdomain = .*
exclude_file_name_regexp--sc_gettext_init = ^(tests|examples)/
exclude_file_name_regexp--sc_bindtextdomain = ^(tests|examples)/
exclude_file_name_regexp--sc_copyright_usage = \
^COPYING(|\.LESSER)$$
exclude_file_name_regexp--sc_flags_usage = \
^(docs/|src/util/virnetdevtap\.c$$|tests/(vir(cgroup|pci|usb)|nss|qemuxml2argv)mock\.c$$)
^(docs/|src/util/virnetdevtap\.c$$|tests/vir(cgroup|pci|usb)mock\.c$$)
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
^(src/rpc/gendispatch\.pl$$|tests/)
@@ -1166,15 +1047,15 @@ exclude_file_name_regexp--sc_prohibit_asprintf = \
^(bootstrap.conf$$|src/util/virstring\.[ch]$$|tests/vircgroupmock\.c$$)
exclude_file_name_regexp--sc_prohibit_strdup = \
^(docs/|examples/|src/util/virstring\.c|tests/vir(netserverclient|cgroup)mock.c$$)
^(docs/|examples/|src/util/virstring\.c|tests/virnetserverclientmock.c$$)
exclude_file_name_regexp--sc_prohibit_close = \
(\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir.+mock\.c)$$)
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c|tests/vir(cgroup|pci)mock\.c)$$)
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
(^tests/(qemuhelp|nodeinfo|virpcitest)data/|\.diff|tests/confdata/no-newline\.conf$$)
(^tests/(qemuhelp|nodeinfo|virpcitest)data/|\.diff$$)
_src2=src/(util/vircommand|libvirt|lxc/lxc_controller|locking/lock_daemon|logging/log_daemon)
_src2=src/(util/vircommand|libvirt|lxc/lxc_controller|locking/lock_daemon)
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
(^($(_src2)|tests/testutils|daemon/libvirtd)\.c$$)
@@ -1204,8 +1085,6 @@ exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virstring\.c$$
exclude_file_name_regexp--sc_prohibit_strtol = ^examples/dom.*/.*\.c$$
exclude_file_name_regexp--sc_prohibit_gethostby = ^docs/nss.html.in$$
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/virxml\.c$$
exclude_file_name_regexp--sc_prohibit_xmlURI = ^src/util/viruri\.c$$
@@ -1235,7 +1114,7 @@ exclude_file_name_regexp--sc_prohibit_include_public_headers_quote = \
^(src/internal\.h$$|tools/wireshark/src/packet-libvirt.h$$)
exclude_file_name_regexp--sc_prohibit_include_public_headers_brackets = \
^(tools/|examples/|include/libvirt/(virterror|libvirt(-(admin|qemu|lxc))?)\.h$$)
^(tools/|examples/|include/libvirt/(virterror|libvirt-(qemu|lxc))\.h$$)
exclude_file_name_regexp--sc_prohibit_int_ijk = \
^(src/remote_protocol-structs|src/remote/remote_protocol.x|cfg.mk|include/)$
@@ -1244,31 +1123,10 @@ exclude_file_name_regexp--sc_prohibit_getenv = \
^tests/.*\.[ch]$$
exclude_file_name_regexp--sc_avoid_attribute_unused_in_header = \
^(src/util/virlog\.h|src/network/bridge_driver\.h)$$
^src/util/virlog\.h$$
exclude_file_name_regexp--sc_prohibit_mixed_case_abbreviations = \
^src/(vbox/vbox_CAPI.*.h|esx/esx_vi.(c|h)|esx/esx_storage_backend_iscsi.c)$$
exclude_file_name_regexp--sc_prohibit_empty_first_line = \
^(README|daemon/THREADS\.txt|src/esx/README|docs/library.xen|tests/(vmwarever|nodeinfo)data/.*)$$
exclude_file_name_regexp--sc_prohibit_useless_translation = \
^tests/virpolkittest.c
exclude_file_name_regexp--sc_prohibit_devname = \
^(tools/virsh.pod|cfg.mk|docs/.*)$$
exclude_file_name_regexp--sc_prohibit_virXXXFree = \
^(docs/|tests/|examples/|tools/|cfg.mk|src/test/test_driver.c|src/libvirt_public.syms|include/libvirt/libvirt-(domain|network|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).h|src/libvirt-(domain|qemu|network|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).c$$)
exclude_file_name_regexp--sc_prohibit_sysconf_pagesize = \
^(cfg\.mk|src/util/virutil\.c)$$
exclude_file_name_regexp--sc_prohibit_pthread_create = \
^(cfg\.mk|src/util/virthread\.c|tests/.*)$$
exclude_file_name_regexp--sc_prohibit_not_streq = \
^tests/.*\.[ch]$$
exclude_file_name_regexp--sc_prohibit_not_strneq = \
^tests/.*\.[ch]$$
^(README|daemon/THREADS\.txt|src/esx/README|docs/library.xen|tests/vmwareverdata/fusion-5.0.3.txt|tests/nodeinfodata/linux-raspberrypi/cpu/offline)$$

View File

@@ -43,27 +43,3 @@
# undef WITH_YAJL
# undef WITH_YAJL2
#endif
/*
* With the NSS module it's the same story as virt-login-shell. See the
* explanation above.
*/
#ifdef LIBVIRT_NSS
# undef HAVE_LIBDEVMAPPER_H
# undef HAVE_LIBNL
# undef HAVE_LIBNL3
# undef HAVE_LIBSASL2
# undef WITH_CAPNG
# undef WITH_CURL
# undef WITH_DTRACE_PROBES
# undef WITH_GNUTLS
# undef WITH_GNUTLS_GCRYPT
# undef WITH_MACVTAP
# undef WITH_NUMACTL
# undef WITH_SASL
# undef WITH_SSH2
# undef WITH_VIRTUALPORT
# undef WITH_SECDRIVER_SELINUX
# undef WITH_SECDRIVER_APPARMOR
# undef WITH_CAPNG
#endif /* LIBVIRT_NSS */

View File

@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
dnl Copyright (C) 2005-2015 Red Hat, Inc.
dnl Copyright (C) 2005-2014 Red Hat, Inc.
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.
AC_INIT([libvirt], [1.3.3.2], [libvir-list@redhat.com], [], [http://libvirt.org])
AC_INIT([libvirt], [1.2.8], [libvir-list@redhat.com], [], [http://libvirt.org])
AC_CONFIG_SRCDIR([src/libvirt.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
@@ -25,10 +25,6 @@ AC_CONFIG_MACRO_DIR([m4])
dnl Make automake keep quiet about wildcards & other GNUmake-isms; also keep
dnl quiet about the fact that we intentionally cater to automake 1.9
AM_INIT_AUTOMAKE([-Wno-portability -Wno-obsolete tar-ustar subdir-objects])
dnl older automake's default of ARFLAGS=cru is noisy on newer binutils;
dnl we don't really need the 'u' even in older toolchains. Then there is
dnl older libtool, which spelled it AR_FLAGS
m4_divert_text([DEFAULTS], [: "${ARFLAGS=cr} ${AR_FLAGS=cr}"])
# Maintainer note - comment this line out if you plan to rerun
# GNULIB_POSIXCHECK testing to see if libvirt should be using more modules.
@@ -123,7 +119,6 @@ PARTED_REQUIRED="1.8.0"
DEVMAPPER_REQUIRED=1.0.0
LIBPCAP_REQUIRED="1.0.0"
LIBNL_REQUIRED="1.1"
PARALLELS_SDK_REQUIRED="7.0.22"
dnl Checks for C compiler.
AC_PROG_CC
@@ -175,13 +170,12 @@ dnl are also linux specific. The "network" and storage_fs drivers are known
dnl to not work on MacOS X presently, so we also make a note if compiling
dnl for that
with_linux=no with_osx=no with_freebsd=no with_win=no with_cygwin=no
with_linux=no with_osx=no with_freebsd=no
case $host in
*-*-linux*) with_linux=yes ;;
*-*-darwin*) with_osx=yes ;;
*-*-freebsd*) with_freebsd=yes ;;
*-*-mingw* | *-*-msvc* ) with_win=yes ;;
*-*-cygwin*) with_cygwin=yes ;;
esac
if test $with_linux = no; then
@@ -193,12 +187,9 @@ if test $with_linux = no; then
fi
if test $with_freebsd = yes; then
want_ifconfig=yes
with_firewalld=no
fi
want_ifconfig=yes
if test $with_cygwin = yes; then
with_vbox=no
with_firewalld=no
fi
AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" = "yes"])
@@ -256,8 +247,6 @@ LIBVIRT_CHECK_SELINUX
LIBVIRT_CHECK_SSH2
LIBVIRT_CHECK_SYSTEMD_DAEMON
LIBVIRT_CHECK_UDEV
LIBVIRT_CHECK_WIRESHARK
LIBVIRT_CHECK_NSS
LIBVIRT_CHECK_YAJL
AC_MSG_CHECKING([for CPUID instruction])
@@ -284,9 +273,9 @@ AC_CHECK_SIZEOF([long])
dnl Availability of various common functions (non-fatal if missing),
dnl and various less common threadsafe functions
AC_CHECK_FUNCS_ONCE([cfmakeraw fallocate geteuid getgid getgrnam_r \
getmntent_r getpwuid_r getrlimit getuid kill mmap newlocale posix_fallocate \
getmntent_r getpwuid_r getuid kill mmap newlocale posix_fallocate \
posix_memalign prlimit regexec sched_getaffinity setgroups setns \
setrlimit symlink sysctlbyname getifaddrs sched_setscheduler])
setrlimit symlink sysctlbyname getifaddrs])
dnl Availability of pthread functions. Because of $LIB_PTHREAD, we
dnl cannot use AC_CHECK_FUNCS_ONCE. LIB_PTHREAD and LIBMULTITHREAD
@@ -324,7 +313,7 @@ fi
LIBS=$old_libs
dnl Availability of various common headers (non-fatal if missing).
AC_CHECK_HEADERS([pwd.h regex.h sys/un.h \
AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/un.h \
sys/poll.h syslog.h mntent.h net/ethernet.h linux/magic.h \
sys/un.h sys/syscall.h sys/sysctl.h netinet/tcp.h ifaddrs.h \
libtasn1.h sys/ucred.h sys/mount.h])
@@ -394,17 +383,6 @@ AC_CHECK_TYPE([struct ifreq],
#include <net/if.h>
]])
AC_CHECK_TYPE([struct sockpeercred],
[AC_DEFINE([HAVE_STRUCT_SOCKPEERCRED], [1],
[Defined if struct sockpeercred is available])],
[], [[#include <sys/socket.h>
]])
AC_CHECK_DECLS([ETH_FLAG_TXVLAN, ETH_FLAG_NTUPLE, ETH_FLAG_RXHASH, ETH_FLAG_LRO,
ETHTOOL_GGSO, ETHTOOL_GGRO, ETHTOOL_GFLAGS, ETHTOOL_GFEATURES],
[], [], [[#include <linux/ethtool.h>
]])
dnl Our only use of libtasn1.h is in the testsuite, and can be skipped
dnl if the header is not present. Assume -ltasn1 is present if the
dnl header could be found.
@@ -413,7 +391,7 @@ AM_CONDITIONAL([HAVE_LIBTASN1], [test "x$ac_cv_header_libtasn1_h" = "xyes"])
AC_CHECK_LIB([intl],[gettext],[])
dnl Do we have rpcgen?
AC_PATH_PROGS([RPCGEN], [rpcgen portable-rpcgen], [no])
AC_PATH_PROG([RPCGEN], [rpcgen], [no])
AM_CONDITIONAL([HAVE_RPCGEN], [test "x$ac_cv_path_RPCGEN" != "xno"])
dnl Is this GLIBC's buggy rpcgen?
AM_CONDITIONAL([HAVE_GLIBC_RPCGEN],
@@ -447,8 +425,6 @@ AC_PATH_PROG([MODPROBE], [modprobe], [modprobe],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([RMMOD], [rmmod], [rmmod],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([MMCTL], [mm-ctl], [mm-ctl],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([OVSVSCTL], [ovs-vsctl], [ovs-vsctl],
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
AC_PATH_PROG([SCRUB], [scrub], [scrub],
@@ -464,8 +440,6 @@ AC_DEFINE_UNQUOTED([RADVD],["$RADVD"],
[Location or name of the radvd program])
AC_DEFINE_UNQUOTED([TC],["$TC"],
[Location or name of the tc program (see iproute2)])
AC_DEFINE_UNQUOTED([MMCTL],["$MMCTL"],
[Location or name of the mm-ctl program])
AC_DEFINE_UNQUOTED([OVSVSCTL],["$OVSVSCTL"],
[Location or name of the ovs-vsctl program])
@@ -574,6 +548,10 @@ AC_ARG_WITH([hyperv],
[AS_HELP_STRING([--with-hyperv],
[add Hyper-V support @<:@default=check@:>@])])
m4_divert_text([DEFAULTS], [with_hyperv=check])
AC_ARG_WITH([parallels],
[AS_HELP_STRING([--with-parallels],
[add Parallels Cloud Server support @<:@default=check@:>@])])
m4_divert_text([DEFAULTS], [with_parallels=check])
AC_ARG_WITH([test],
[AS_HELP_STRING([--with-test],
[add test driver support @<:@default=yes@:>@])])
@@ -833,6 +811,7 @@ if test "$with_libvirtd" = "yes" ; then
fi
AM_CONDITIONAL([WITH_LIBVIRTD], [test "$with_libvirtd" = "yes"])
old_LIBS="$LIBS"
old_CFLAGS="$CFLAGS"
LIBXENSERVER_LIBS=""
@@ -884,42 +863,26 @@ old_LIBS="$LIBS"
old_CFLAGS="$CFLAGS"
LIBXL_LIBS=""
LIBXL_CFLAGS=""
LIBXL_FIRMWARE_DIR=""
LIBXL_EXECBIN_DIR=""
dnl search for libxl, aka libxenlight
dnl Xen > 4.5 introduced a pkgconfig file, check for it first
fail=0
if test "$with_libxl" != "no" ; then
PKG_CHECK_MODULES([LIBXL], [xenlight], [
LIBXL_FIRMWARE_DIR=`$PKG_CONFIG --variable xenfirmwaredir xenlight`
LIBXL_EXECBIN_DIR=`$PKG_CONFIG --variable libexec_bin xenlight`
with_libxl=yes
], [LIBXL_FOUND=no])
if test "$LIBXL_FOUND" = "no"; then
dnl No xenlight pkg-config file
if test "$with_libxl" != "yes" && test "$with_libxl" != "check" ; then
LIBXL_CFLAGS="-I$with_libxl/include"
LIBXL_LIBS="-L$with_libxl"
fi
CFLAGS="$CFLAGS $LIBXL_CFLAGS"
LIBS="$LIBS $LIBXL_LIBS"
AC_CHECK_LIB([xenlight], [libxl_ctx_alloc], [
with_libxl=yes
LIBXL_LIBS="$LIBXL_LIBS -lxenlight"
],[
if test "$with_libxl" = "yes"; then
fail=1
fi
with_libxl=no
])
if test "$with_libxl" != "yes" && test "$with_libxl" != "check" ; then
LIBXL_CFLAGS="-I$with_libxl/include"
LIBXL_LIBS="-L$with_libxl"
fi
CFLAGS="$CFLAGS $LIBXL_CFLAGS"
LIBS="$LIBS $LIBXL_LIBS"
AC_CHECK_LIB([xenlight], [libxl_ctx_alloc], [
with_libxl=yes
LIBXL_LIBS="$LIBXL_LIBS -lxenlight -lxenctrl"
],[
if test "$with_libxl" = "yes"; then
fail=1
fi
with_libxl=no
])
fi
# Until there is a need to use enhancements of libxl APIs such as
# libxl_domain_create_restore and libxl_set_vcpuaffinity, stick with
# the APIs as defined in libxl API version 4.2.0.
LIBXL_CFLAGS="$LIBXL_CFLAGS -DLIBXL_API_VERSION=0x040200"
LIBS="$old_LIBS"
CFLAGS="$old_CFLAGS"
@@ -928,24 +891,7 @@ if test $fail = 1; then
fi
if test "$with_libxl" = "yes"; then
dnl If building with libxl, use the libxl utility header and lib too
AC_CHECK_HEADERS([libxlutil.h])
LIBXL_LIBS="$LIBXL_LIBS -lxlutil"
AC_DEFINE_UNQUOTED([WITH_LIBXL], 1, [whether libxenlight driver is enabled])
if test "x$LIBXL_FIRMWARE_DIR" != "x"; then
AC_DEFINE_UNQUOTED([LIBXL_FIRMWARE_DIR], ["$LIBXL_FIRMWARE_DIR"], [directory containing Xen firmware blobs])
fi
if test "x$LIBXL_EXECBIN_DIR" != "x"; then
AC_DEFINE_UNQUOTED([LIBXL_EXECBIN_DIR], ["$LIBXL_EXECBIN_DIR"], [directory containing Xen libexec binaries])
fi
dnl Check if the xtl_* infrastructure is in libxentoollog
dnl (since Xen 4.7) if not then assume it is in libxenctrl
dnl (as it was for 4.6 and earler)
AC_CHECK_LIB([xentoollog], [xtl_createlogger_stdiostream], [
LIBXL_LIBS="$LIBXL_LIBS -lxentoollog"
],[
LIBXL_LIBS="$LIBXL_LIBS -lxenctrl"
])
fi
AM_CONDITIONAL([WITH_LIBXL], [test "$with_libxl" = "yes"])
@@ -1096,19 +1042,25 @@ if test "$with_lxc" = "yes" ; then
fi
AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
dnl
dnl Check for virt-login-shell
dnl
LIBVIRT_CHECK_LOGIN_SHELL
AM_CONDITIONAL([WITH_SETUID_RPC_CLIENT], [test "$with_lxc$with_login_shell" != "nono"])
dnl
dnl Checks for the Parallels driver
dnl
LIBVIRT_DRIVER_CHECK_VZ
if test "$with_parallels" = "check"; then
with_parallels=$with_linux
if test ! $host_cpu = 'x86_64'; then
with_parallels=no
fi
fi
if test "$with_parallels" = "yes" && test "$with_linux" = "no"; then
AC_MSG_ERROR([The Parallels driver can be enabled on Linux only.])
fi
if test "$with_parallels" = "yes"; then
AC_DEFINE_UNQUOTED([WITH_PARALLELS], 1, [whether Parallels driver is enabled])
fi
AM_CONDITIONAL([WITH_PARALLELS], [test "$with_parallels" = "yes"])
dnl
dnl Checks for bhyve driver
@@ -1116,6 +1068,56 @@ dnl
LIBVIRT_DRIVER_CHECK_BHYVE
dnl
dnl check for shell that understands <> redirection without truncation,
dnl needed by src/qemu/qemu_monitor_{text,json}.c.
dnl
if test "$with_qemu" = yes; then
lv_wrapper_shell=
AC_CACHE_CHECK([for shell that supports <> redirection],
[lv_cv_wrapper_shell],
[
# If cross-compiling, guess that /bin/sh is good enough except for
# Linux, where it might be dash 0.5.5 which is known broken; and on
# Linux, we have a good chance that /bin/bash will exist.
# If we guess wrong, a user can override the cache variable.
# Going through /bin/bash is a slight slowdown if /bin/sh works.
if test "$cross_compiling" = yes; then
case $host_os in
linux*) lv_cv_wrapper_shell=/bin/bash ;;
*) lv_cv_wrapper_shell=/bin/sh ;;
esac
else
for lv_cv_wrapper_shell in /bin/sh bash ksh zsh none; do
test $lv_cv_wrapper_shell = none &&
AC_MSG_ERROR([could not find decent shell])
echo a > conftest.a
($lv_cv_wrapper_shell -c ': 1<>conftest.a') 2>/dev/null &&
case `cat conftest.a`.$lv_cv_wrapper_shell in
a./*) break;; dnl /bin/sh is good enough
a.*) dnl bash, ksh, and zsh all understand 'command', use that
dnl to determine the absolute path of the shell
lv_cv_wrapper_shell=`$lv_cv_wrapper_shell -c \
"command -v $lv_cv_wrapper_shell"`
case $lv_cv_wrapper_shell in
/*) break;;
esac
;;
esac
done
rm -f conftest.a
fi
])
if test "x$lv_cv_wrapper_shell" != x/bin/sh; then
lv_wrapper_shell=$lv_cv_wrapper_shell
fi
if test "x$lv_wrapper_shell" != x; then
AC_DEFINE_UNQUOTED([VIR_WRAPPER_SHELL], ["$lv_wrapper_shell"],
[Define to the absolute path of a shell that does not truncate on
<> redirection, if /bin/sh does not fit the bill])
fi
fi
dnl
dnl check for kernel headers required by src/bridge.c
@@ -1319,28 +1321,24 @@ AC_ARG_WITH([polkit],
with_polkit0=no
with_polkit1=no
if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
dnl Check for new polkit first. We directly talk over DBus
dnl but we use existence of pkcheck binary as a sign that
dnl we should prefer polkit-1 over polkit-0, so we check
dnl for it even though we don't ultimately use it
dnl Check for new polkit first - just a binary
AC_PATH_PROG([PKCHECK_PATH],[pkcheck], [], [/usr/sbin:$PATH])
if test "x$PKCHECK_PATH" != "x" ; then
dnl Found pkcheck, so ensure dbus-devel is present
if test "x$with_dbus" = "xyes" ; then
AC_DEFINE_UNQUOTED([WITH_POLKIT], 1,
[use PolicyKit for UNIX socket access checks])
AC_DEFINE_UNQUOTED([WITH_POLKIT1], 1,
[use PolicyKit for UNIX socket access checks])
with_polkit="yes"
with_polkit1="yes"
AC_DEFINE_UNQUOTED([PKCHECK_PATH],["$PKCHECK_PATH"],[Location of pkcheck program])
AC_MSG_CHECKING([whether pkcheck supports uid value])
pkcheck_supports_uid=`$PKG_CONFIG --variable pkcheck_supports_uid polkit-gobject-1`
if test "x$pkcheck_supports_uid" = "xtrue"; then
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([PKCHECK_SUPPORTS_UID], 1, [Pass uid to pkcheck])
else
if test "x$with_polkit" = "xcheck" ; then
with_polkit=no
else
AC_MSG_ERROR(
[You must install dbus to compile libvirt with polkit-1])
fi
AC_MSG_RESULT([no])
fi
AC_DEFINE_UNQUOTED([WITH_POLKIT], 1,
[use PolicyKit for UNIX socket access checks])
AC_DEFINE_UNQUOTED([WITH_POLKIT1], 1,
[use PolicyKit for UNIX socket access checks])
with_polkit="yes"
with_polkit1="yes"
else
dnl Check for old polkit second - library + binary
PKG_CHECK_MODULES(POLKIT, polkit-dbus >= $POLKIT_REQUIRED,
@@ -1389,7 +1387,7 @@ AC_ARG_WITH([firewalld],
if test "x$with_firewalld" = "xcheck" ; then
with_firewalld=$with_dbus
fi
if test "x$with_firewalld" = "xyes" ; then
if test "x$with_firewalld" == "xyes" ; then
if test "x$with_dbus" != "xyes" ; then
AC_MSG_ERROR([You must have dbus enabled for firewalld support])
fi
@@ -1650,6 +1648,10 @@ if test "$with_pm_utils" = "yes"; then
fi
AM_CONDITIONAL([WITH_PM_UTILS], [test "$with_pm_utils" = "yes"])
dnl virsh libraries
VIRSH_LIBS="$VIRSH_LIBS $READLINE_LIBS"
AC_SUBST([VIRSH_LIBS])
dnl check if the network driver should be compiled
AC_ARG_WITH([network],
@@ -1929,14 +1931,14 @@ AC_SUBST([LIBRBD_LIBS])
if test "$with_storage_sheepdog" = "yes" ||
test "$with_storage_sheepdog" = "check"; then
AC_PATH_PROGS([SHEEPDOGCLI], [collie dog], [], [$PATH:/sbin:/usr/sbin])
AC_PATH_PROG([COLLIE], [collie], [], [$PATH:/sbin:/usr/sbin])
if test "$with_storage_sheepdog" = "yes"; then
if test -z "$SHEEPDOGCLI"; then
AC_MSG_ERROR([We need sheepdog client for Sheepdog storage driver])
if test -z "$COLLIE"; then
AC_MSG_ERROR([We need collie for Sheepdog storage driver])
fi
else
if test -z "$SHEEPDOGCLI"; then
if test -z "$COLLIE"; then
with_storage_sheepdog=no
fi
@@ -1948,7 +1950,7 @@ if test "$with_storage_sheepdog" = "yes" ||
if test "$with_storage_sheepdog" = "yes"; then
AC_DEFINE_UNQUOTED([WITH_STORAGE_SHEEPDOG], 1,
[whether Sheepdog backend for storage driver is enabled])
AC_DEFINE_UNQUOTED([SHEEPDOGCLI],["$SHEEPDOGCLI"],[Location of sheepdog client program])
AC_DEFINE_UNQUOTED([COLLIE],["$COLLIE"],[Location of collie program])
fi
fi
AM_CONDITIONAL([WITH_STORAGE_SHEEPDOG],
@@ -1966,6 +1968,14 @@ if test "$with_storage_gluster" = "yes"; then
fi
AM_CONDITIONAL([WITH_STORAGE_GLUSTER], [test "$with_storage_gluster" = "yes"])
if test "$with_storage_zfs" = "check"; then
with_storage_zfs=$with_freebsd
fi
if test "$with_storage_zfs" = "yes" && test "$with_freebsd" = "no"; then
AC_MSG_ERROR([The ZFS storage driver can be enabled on FreeBSD only.])
fi
if test "$with_storage_zfs" = "yes" ||
test "$with_storage_zfs" = "check"; then
AC_PATH_PROG([ZFS], [zfs], [], [$PATH:/sbin:/usr/sbin])
@@ -2160,13 +2170,6 @@ fi
AM_CONDITIONAL([WITH_HYPERV], [test "$with_hyperv" = "yes"])
dnl
dnl check for kernel headers required by btrfs ioctl
dnl
if test "$with_linux" = "yes"; then
AC_CHECK_HEADERS([linux/btrfs.h])
fi
dnl Allow perl/python overrides
AC_PATH_PROGS([PYTHON], [python2 python])
AC_PATH_PROG([PERL], [perl])
@@ -2314,7 +2317,6 @@ WIN32_EXTRA_CFLAGS=
dnl libvirt.syms is generated in builddir, but libvirt_qemu.syms is in git;
dnl hence the asymmetric naming of these two symbol files.
LIBVIRT_SYMBOL_FILE=libvirt.syms
LIBVIRT_ADMIN_SYMBOL_FILE=libvirt_admin.syms
LIBVIRT_LXC_SYMBOL_FILE='$(srcdir)/libvirt_lxc.syms'
LIBVIRT_QEMU_SYMBOL_FILE='$(srcdir)/libvirt_qemu.syms'
MSCOM_LIBS=
@@ -2345,7 +2347,6 @@ case "$host" in
# Also set the symbol file to .def, so src/Makefile generates libvirt.def
# from libvirt.syms and passes libvirt.def instead of libvirt.syms to the linker
LIBVIRT_SYMBOL_FILE=libvirt.def
LIBVIRT_ADMIN_SYMBOL_FILE=libvirt_admin.def
LIBVIRT_LXC_SYMBOL_FILE=libvirt_lxc.def
LIBVIRT_QEMU_SYMBOL_FILE=libvirt_qemu.def
# mingw's ld has the --version-script parameter, but it requires a .def file
@@ -2361,7 +2362,6 @@ AC_SUBST([CYGWIN_EXTRA_LIBADD])
AC_SUBST([MINGW_EXTRA_LDFLAGS])
AC_SUBST([WIN32_EXTRA_CFLAGS])
AC_SUBST([LIBVIRT_SYMBOL_FILE])
AC_SUBST([LIBVIRT_ADMIN_SYMBOL_FILE])
AC_SUBST([LIBVIRT_LXC_SYMBOL_FILE])
AC_SUBST([LIBVIRT_QEMU_SYMBOL_FILE])
AC_SUBST([VERSION_SCRIPT_FLAGS])
@@ -2491,9 +2491,6 @@ AC_ARG_WITH([qemu-group],
AC_DEFINE_UNQUOTED([QEMU_USER], ["$QEMU_USER"], [QEMU user account])
AC_DEFINE_UNQUOTED([QEMU_GROUP], ["$QEMU_GROUP"], [QEMU group account])
AC_PATH_PROG([QEMU_BRIDGE_HELPER], [qemu-bridge-helper], [/usr/libexec/qemu-bridge-helper],
[/usr/libexec:/usr/lib/qemu:/usr/lib])
AC_DEFINE_UNQUOTED([QEMU_BRIDGE_HELPER], ["$QEMU_BRIDGE_HELPER"], [QEMU bridge helper])
AC_ARG_WITH([macvtap],
[AS_HELP_STRING([--with-macvtap],
@@ -2614,11 +2611,7 @@ if test "$with_linux" = "yes"; then
[whether the netlink v1 library is available])
], [
if test "$with_macvtap" = "yes"; then
if test "$LIBNL_REQUIRED" = "3.0";then
AC_MSG_ERROR([libnl3-devel >= $LIBNL_REQUIRED is required for macvtap support])
else
AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support])
fi
AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support])
fi
])
fi
@@ -2628,11 +2621,74 @@ AM_CONDITIONAL([HAVE_LIBNL], [test "$have_libnl" = "yes"])
AC_SUBST([LIBNL_CFLAGS])
AC_SUBST([LIBNL_LIBS])
dnl wireshark dissector
AC_ARG_WITH([wireshark-dissector],
[AS_HELP_STRING([--with-wireshark-dissector],
[enable wireshark dissector plugin support @<:@default=check@:>@])],
[ with_wireshark_dissector=$withval ],
[ with_wireshark_dissector=check ])
AC_DEFUN([LIBVIRT_WS_HANDLE_ERROR], [
if test "$with_wireshark_dissector" = "yes"; then
AC_MSG_ERROR([$1])
else
with_wireshark_dissector=no
fi
])
if test "$with_wireshark_dissector" != "no"; then
dnl Check for XDR headers existence
AC_CHECK_HEADERS([rpc/types.h])
dnl Check for glib-2.0 existence
PKG_CHECK_MODULES([GLIB], [glib-2.0], [
WS_DISSECTOR_CPPFLAGS="$WS_DISSECTOR_CPPFLAGS `$PKG_CONFIG --cflags glib-2.0`"
], [
LIBVIRT_WS_HANDLE_ERROR([pkg-config 'glib-2.0' is required for wireshark-dissector support])
])
dnl Search for wireshark(or tshark) command
AC_PATH_PROG([WIRESHARK], [wireshark])
AC_PATH_PROG([WIRESHARK], [tshark])
if test -z "$WIRESHARK"; then
LIBVIRT_WS_HANDLE_ERROR([command not found wireshark or tshark])
else
dnl Check for wireshark headers
save_CPPFLAGS="$CPPFLAGS"
WS_DISSECTOR_CPPFLAGS="$WS_DISSECTOR_CPPFLAGS -I`dirname $WIRESHARK`/../include/wireshark"
CPPFLAGS="$CPPFLAGS $WS_DISSECTOR_CPPFLAGS"
AC_CHECK_HEADERS([wireshark/config.h],, [
LIBVIRT_WS_HANDLE_ERROR([wireshark/config.h is required for wireshark-dissector support])
])
AC_CHECK_HEADERS([wireshark/epan/packet.h wireshark/epan/dissectors/packet-tcp.h],, [
LIBVIRT_WS_HANDLE_ERROR([wireshark/epan/{packet,packet-tcp}.h are required for wireshark-dissector support])
], [
#include <wireshark/config.h>
])
CPPFLAGS="$save_CPPFLAGS"
fi
if test "$with_wireshark_dissector" != "no"; then
with_wireshark_dissector=yes
fi
fi
AC_SUBST([WS_DISSECTOR_CPPFLAGS])
AM_CONDITIONAL([WITH_WIRESHARK_DISSECTOR], [test "$with_wireshark_dissector" = "yes"])
AC_ARG_WITH([ws-plugindir],
[AS_HELP_STRING([--with-ws-plugindir],
[wireshark plugins directory for use when installing wireshark plugin])],
[ws_plugindir=$withval])
if test "$with_wireshark_dissector" != "no" && test -z "$ws_plugindir"; then
ws_version=`$WIRESHARK -v | head -1 | cut -f 2 -d' '`
ws_plugindir="$libdir/wireshark/plugins/$ws_version"
fi
AC_SUBST([ws_plugindir])
# Check for Linux vs. BSD ifreq members
AC_CHECK_MEMBERS([struct ifreq.ifr_newname,
struct ifreq.ifr_ifindex,
struct ifreq.ifr_index,
struct ifreq.ifr_hwaddr],
struct ifreq.ifr_index],
[], [],
[#include <sys/socket.h>
#include <net/if.h>
@@ -2715,31 +2771,6 @@ test "x$lv_cv_static_analysis" = xyes && t=1
AC_DEFINE_UNQUOTED([STATIC_ANALYSIS], [$t],
[Define to 1 when performing static analysis.])
AC_ARG_WITH([default-editor],
[AS_HELP_STRING([--with-default-editor],
[Editor to use for interactive commands
@<:@default=vi@:>@])],
[DEFAULT_EDITOR=${withval}],
[DEFAULT_EDITOR=vi])
AC_DEFINE_UNQUOTED([DEFAULT_EDITOR], ["$DEFAULT_EDITOR"], [Default editor to use])
AC_ARG_WITH([loader-nvram],
[AS_HELP_STRING([--with-loader-nvram],
[Pass list of pairs of <loader>:<nvram> paths. Both
pairs and list items are separated by a colon.
@<:default=paths to OVMF and its clones@:>@])],
[if test "$withval" = "no"; then
withval=""
else
l=`echo $withval | tr ':' '\n' | wc -l`
if test "`expr $l % 2`" -ne 0; then
AC_MSG_ERROR([Malformed --with-loader-nvram argument])
fi
fi
AC_DEFINE_UNQUOTED([DEFAULT_LOADER_NVRAM],
["$withval"],
[List of loader:nvram pairs])])
# Some GNULIB base64 symbols clash with a kerberos library
AC_DEFINE_UNQUOTED([isbase64],[libvirt_gl_isbase64],[Hack to avoid symbol clash])
AC_DEFINE_UNQUOTED([base64_encode],[libvirt_gl_base64_encode],[Hack to avoid symbol clash])
@@ -2749,22 +2780,34 @@ AC_CONFIG_FILES([run],
[chmod +x,-w run])
AC_CONFIG_FILES([\
Makefile src/Makefile include/Makefile docs/Makefile \
docs/schemas/Makefile \
gnulib/lib/Makefile \
gnulib/tests/Makefile \
libvirt.pc \
libvirt-qemu.pc \
libvirt-lxc.pc \
libvirt-admin.pc \
src/libvirt.pc \
src/libvirt-qemu.pc \
src/libvirt-lxc.pc \
libvirt.spec mingw-libvirt.spec \
po/Makefile.in \
include/libvirt/libvirt-common.h \
include/libvirt/Makefile include/libvirt/libvirt.h \
daemon/Makefile \
examples/Makefile \
tools/Makefile \
tests/Makefile \
tools/Makefile])
examples/apparmor/Makefile \
examples/object-events/Makefile \
examples/domsuspend/Makefile \
examples/dominfo/Makefile \
examples/dommigrate/Makefile \
examples/domtop/Makefile \
examples/openauth/Makefile \
examples/hellolibvirt/Makefile \
examples/systemtap/Makefile \
examples/xml/nwfilter/Makefile \
examples/lxcconvert/Makefile \
tools/wireshark/Makefile \
tools/wireshark/src/Makefile])
AC_OUTPUT
AC_MSG_NOTICE([])
@@ -2785,7 +2828,7 @@ AC_MSG_NOTICE([ LXC: $with_lxc])
AC_MSG_NOTICE([ PHYP: $with_phyp])
AC_MSG_NOTICE([ ESX: $with_esx])
AC_MSG_NOTICE([ Hyper-V: $with_hyperv])
LIBVIRT_DRIVER_RESULT_VZ
AC_MSG_NOTICE([Parallels: $with_parallels])
LIBVIRT_DRIVER_RESULT_BHYVE
AC_MSG_NOTICE([ Test: $with_test])
AC_MSG_NOTICE([ Remote: $with_remote])
@@ -2847,8 +2890,6 @@ LIBVIRT_RESULT_SELINUX
LIBVIRT_RESULT_SSH2
LIBVIRT_RESULT_SYSTEMD_DAEMON
LIBVIRT_RESULT_UDEV
LIBVIRT_RESULT_WIRESHARK
LIBVIRT_RESULT_NSS
LIBVIRT_RESULT_YAJL
AC_MSG_NOTICE([ libxml: $LIBXML_CFLAGS $LIBXML_LIBS])
AC_MSG_NOTICE([ dlopen: $DLOPEN_LIBS])
@@ -2917,8 +2958,8 @@ AC_MSG_NOTICE([pm-utils: $with_pm_utils])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Test suite])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([ Coverage: $enable_coverage])
AC_MSG_NOTICE([ Alloc OOM: $enable_oom])
AC_MSG_NOTICE([ Coverage: $enable_coverage])
AC_MSG_NOTICE([ Alloc OOM: $enable_oom])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Miscellaneous])
AC_MSG_NOTICE([])
@@ -2930,9 +2971,6 @@ AC_MSG_NOTICE([ numad: $with_numad])
AC_MSG_NOTICE([ XML Catalog: $XML_CATALOG_FILE])
AC_MSG_NOTICE([ Init script: $with_init_script])
AC_MSG_NOTICE([Char device locks: $with_chrdev_lock_files])
AC_MSG_NOTICE([ Default Editor: $DEFAULT_EDITOR])
AC_MSG_NOTICE([ Loader/NVRAM: $with_loader_nvram])
AC_MSG_NOTICE([ virt-login-shell: $with_login_shell])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Developer Tools])
AC_MSG_NOTICE([])

View File

@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2015 Red Hat, Inc.
## Copyright (C) 2005-2014 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
@@ -25,7 +25,6 @@ INCLUDES = \
-I$(top_srcdir)/src/conf \
-I$(top_srcdir)/src/rpc \
-I$(top_srcdir)/src/remote \
-I$(top_srcdir)/src/admin \
-I$(top_srcdir)/src/access \
$(GETTEXT_CPPFLAGS)
@@ -35,7 +34,6 @@ DAEMON_GENERATED = \
remote_dispatch.h \
lxc_dispatch.h \
qemu_dispatch.h \
admin_dispatch.h \
$(NULL)
DAEMON_SOURCES = \
@@ -51,21 +49,19 @@ EXTRA_DIST = \
remote_dispatch.h \
lxc_dispatch.h \
qemu_dispatch.h \
admin_dispatch.h \
libvirtd.conf \
libvirtd.init.in \
libvirtd.upstart \
libvirtd.policy.in \
libvirt.rules \
libvirtd.sasl \
libvirtd.service.in \
libvirtd.socket.in \
libvirtd.sysconf \
libvirtd.sysctl \
libvirtd.aug \
libvirtd.logrotate.in \
libvirtd.qemu.logrotate.in \
libvirtd.lxc.logrotate.in \
libvirtd.libxl.logrotate.in \
libvirtd.uml.logrotate.in \
test_libvirtd.aug.in \
THREADS.txt \
@@ -80,32 +76,25 @@ BUILT_SOURCES =
REMOTE_PROTOCOL = $(top_srcdir)/src/remote/remote_protocol.x
LXC_PROTOCOL = $(top_srcdir)/src/remote/lxc_protocol.x
QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
ADMIN_PROTOCOL = $(top_srcdir)/src/admin/admin_protocol.x
remote_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
$(REMOTE_PROTOCOL)
$(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
--mode=server remote REMOTE $(REMOTE_PROTOCOL) \
> $(srcdir)/remote_dispatch.h
lxc_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
lxc_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
$(LXC_PROTOCOL)
$(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
--mode=server lxc LXC $(LXC_PROTOCOL) \
> $(srcdir)/lxc_dispatch.h
qemu_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
$(QEMU_PROTOCOL)
$(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
--mode=server qemu QEMU $(QEMU_PROTOCOL) \
> $(srcdir)/qemu_dispatch.h
admin_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
$(ADMIN_PROTOCOL)
$(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
--mode=server admin ADMIN $(ADMIN_PROTOCOL) \
> $(srcdir)/admin_dispatch.h
if WITH_LIBVIRTD
# Build a convenience library, for reuse in tests/libvirtdconftest
@@ -125,27 +114,6 @@ libvirtd_conf_la_LDFLAGS = \
$(NULL)
libvirtd_conf_la_LIBADD = $(LIBXML_LIBS)
noinst_LTLIBRARIES += libvirtd_admin.la
libvirtd_admin_la_SOURCES = \
admin.c admin.h admin_server.c admin_server.h
libvirtd_admin_la_CFLAGS = \
$(AM_CFLAGS) \
$(XDR_CFLAGS) \
$(PIE_CFLAGS) \
$(WARN_CFLAGS) \
$(LIBXML_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(NULL)
libvirtd_admin_la_LDFLAGS = \
$(PIE_LDFLAGS) \
$(RELRO_LDFLAGS) \
$(COVERAGE_LDFLAGS) \
$(NO_INDIRECT_LDFLAGS) \
$(NULL)
libvirtd_admin_la_LIBADD = \
../src/libvirt-admin.la
man8_MANS = libvirtd.8
sbin_PROGRAMS = libvirtd
@@ -173,7 +141,7 @@ libvirtd_SOURCES = $(DAEMON_SOURCES)
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
libvirtd_CFLAGS = \
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
$(XDR_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \
$(XDR_CFLAGS) $(POLKIT_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \
$(WARN_CFLAGS) $(PIE_CFLAGS) \
$(COVERAGE_CFLAGS) \
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
@@ -190,6 +158,7 @@ libvirtd_LDADD = \
$(GNUTLS_LIBS) \
$(SASL_LIBS) \
$(DBUS_LIBS) \
$(POLKIT_LIBS) \
$(LIBNL_LIBS)
if WITH_DTRACE_PROBES
@@ -198,7 +167,6 @@ endif WITH_DTRACE_PROBES
libvirtd_LDADD += \
libvirtd_conf.la \
libvirtd_admin.la \
../src/libvirt-lxc.la \
../src/libvirt-qemu.la \
../src/libvirt_driver_remote.la \
@@ -266,8 +234,6 @@ policyauth = auth_admin_keep_session
else ! WITH_POLKIT0
policydir = $(datadir)/polkit-1/actions
policyauth = auth_admin_keep
rulesdir = $(datadir)/polkit-1/rules.d
rulesfile = libvirt.rules
endif ! WITH_POLKIT0
endif WITH_POLKIT
@@ -298,19 +264,9 @@ if WITH_POLKIT
install-data-polkit::
$(MKDIR_P) $(DESTDIR)$(policydir)
$(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.policy
if ! WITH_POLKIT0
$(MKDIR_P) $(DESTDIR)$(rulesdir)
$(INSTALL_DATA) $(srcdir)/$(rulesfile) $(DESTDIR)$(rulesdir)/50-libvirt.rules
endif ! WITH_POLKIT0
uninstall-data-polkit::
rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
rmdir $(DESTDIR)$(policydir) || :
if ! WITH_POLKIT0
rm -f $(DESTDIR)$(rulesdir)/50-libvirt.rules
rmdir $(DESTDIR)$(rulesdir) || :
endif ! WITH_POLKIT0
else ! WITH_POLKIT
install-data-polkit::
uninstall-data-polkit::
@@ -318,12 +274,9 @@ endif ! WITH_POLKIT
remote.c: $(DAEMON_GENERATED)
remote.h: $(DAEMON_GENERATED)
admin.c: $(DAEMON_GENERATED)
admin.h: $(DAEMON_GENERATED)
LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
libvirtd.libxl.logrotate libvirtd.uml.logrotate \
libvirtd.logrotate
libvirtd.uml.logrotate libvirtd.logrotate
BUILT_SOURCES += $(LOGROTATE_CONFS)
@@ -345,12 +298,6 @@ libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
< $< > $@-t && \
mv $@-t $@
libvirtd.libxl.logrotate: libvirtd.libxl.logrotate.in
$(AM_V_GEN)sed \
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
< $< > $@-t && \
mv $@-t $@
libvirtd.uml.logrotate: libvirtd.uml.logrotate.in
$(AM_V_GEN)sed \
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
@@ -368,8 +315,6 @@ install-logrotate: $(LOGROTATE_CONFS)
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu
$(INSTALL_DATA) libvirtd.lxc.logrotate \
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc
$(INSTALL_DATA) libvirtd.libxl.logrotate \
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.libxl
$(INSTALL_DATA) libvirtd.uml.logrotate \
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
@@ -377,7 +322,6 @@ uninstall-logrotate:
rm -f $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd \
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu \
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc \
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.libxl \
$(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/lxc || :
@@ -398,10 +342,10 @@ if WITH_SYSCTL
install-sysctl:
$(MKDIR_P) $(DESTDIR)$(prefix)/lib/sysctl.d
$(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
$(DESTDIR)$(prefix)/lib/sysctl.d/60-libvirtd.conf
$(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
uninstall-sysctl:
rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/60-libvirtd.conf
rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
rmdir $(DESTDIR)$(prefix)/lib/sysctl.d || :
else ! WITH_SYSCTL
install-sysctl:
@@ -445,15 +389,18 @@ endif ! LIBVIRT_INIT_SCRIPT_UPSTART
if LIBVIRT_INIT_SCRIPT_SYSTEMD
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
BUILT_SOURCES += libvirtd.service
BUILT_SOURCES += libvirtd.service libvirtd.socket
install-init-systemd: install-sysconfig libvirtd.service
install-init-systemd: install-sysconfig libvirtd.service libvirtd.socket
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
$(INSTALL_DATA) libvirtd.service \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
$(INSTALL_DATA) libvirtd.socket \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.socket
uninstall-init-systemd: uninstall-sysconfig
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.socket
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
install-init-systemd:
@@ -477,6 +424,12 @@ libvirtd.service: libvirtd.service.in $(top_builddir)/config.status
< $< > $@-t && \
mv $@-t $@
libvirtd.socket: libvirtd.socket.in $(top_builddir)/config.status
$(AM_V_GEN)sed \
-e 's|[@]runstatedir[@]|$(runstatedir)|g' \
< $< > $@-t && \
mv $@-t $@
check-local: check-augeas

View File

@@ -1,136 +0,0 @@
/*
* admin.c: handlers for admin RPC method calls
*
* Copyright (C) 2014-2016 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Author: Martin Kletzander <mkletzan@redhat.com>
*/
#include <config.h>
#include "internal.h"
#include "libvirtd.h"
#include "libvirt_internal.h"
#include "admin_protocol.h"
#include "admin.h"
#include "admin_server.h"
#include "datatypes.h"
#include "viralloc.h"
#include "virerror.h"
#include "virlog.h"
#include "virnetdaemon.h"
#include "virnetserver.h"
#include "virstring.h"
#include "virthreadjob.h"
#define VIR_FROM_THIS VIR_FROM_ADMIN
VIR_LOG_INIT("daemon.admin");
void
remoteAdmClientFreeFunc(void *data)
{
struct daemonAdmClientPrivate *priv = data;
virMutexDestroy(&priv->lock);
virObjectUnref(priv->dmn);
VIR_FREE(priv);
}
void *
remoteAdmClientInitHook(virNetServerClientPtr client ATTRIBUTE_UNUSED,
void *opaque)
{
struct daemonAdmClientPrivate *priv;
if (VIR_ALLOC(priv) < 0)
return NULL;
if (virMutexInit(&priv->lock) < 0) {
VIR_FREE(priv);
virReportSystemError(errno, "%s", _("unable to init mutex"));
return NULL;
}
/*
* We don't necessarily need to ref this object right now as there
* must be one ref being held throughout the life of the daemon,
* but let's just be safe for future.
*/
priv->dmn = virObjectRef(opaque);
return priv;
}
/* Helpers */
static void
make_nonnull_server(admin_nonnull_server *srv_dst,
virNetServerPtr srv_src)
{
ignore_value(VIR_STRDUP_QUIET(srv_dst->name, virNetServerGetName(srv_src)));
}
/* Functions */
static int
adminDispatchConnectOpen(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientPtr client,
virNetMessagePtr msg ATTRIBUTE_UNUSED,
virNetMessageErrorPtr rerr,
struct admin_connect_open_args *args)
{
unsigned int flags;
struct daemonAdmClientPrivate *priv =
virNetServerClientGetPrivateData(client);
int ret = -1;
VIR_DEBUG("priv=%p dmn=%p", priv, priv->dmn);
virMutexLock(&priv->lock);
flags = args->flags;
virCheckFlagsGoto(0, cleanup);
ret = 0;
cleanup:
if (ret < 0)
virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock);
return ret;
}
static int
adminDispatchConnectClose(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientPtr client,
virNetMessagePtr msg ATTRIBUTE_UNUSED,
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED)
{
virNetServerClientDelayedClose(client);
return 0;
}
static int
adminConnectGetLibVersion(virNetDaemonPtr dmn ATTRIBUTE_UNUSED,
unsigned long long *libVer)
{
if (libVer)
*libVer = LIBVIR_VERSION_NUMBER;
return 0;
}
#include "admin_dispatch.h"

View File

@@ -1,36 +0,0 @@
/*
* admin.h: handlers for admin RPC method calls
*
* Copyright (C) 2014-2016 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Author: Martin Kletzander <mkletzan@redhat.com>
*/
#ifndef __LIBVIRTD_ADMIN_H__
# define __LIBVIRTD_ADMIN_H__
# include "rpc/virnetserverprogram.h"
# include "rpc/virnetserverclient.h"
extern virNetServerProgramProc adminProcs[];
extern size_t adminNProcs;
void remoteAdmClientFreeFunc(void *data);
void *remoteAdmClientInitHook(virNetServerClientPtr client, void *opaque);
#endif /* __ADMIN_REMOTE_H__ */

View File

@@ -1,70 +0,0 @@
/*
* admin_server.c: admin methods to manage daemons and clients
*
* Copyright (C) 2016 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Authors: Erik Skultety <eskultet@redhat.com>
* Martin Kletzander <mkletzan@redhat.com>
*/
#include <config.h>
#include "admin_server.h"
#include "datatypes.h"
#include "viralloc.h"
#include "virerror.h"
#include "virlog.h"
#include "virnetdaemon.h"
#include "virnetserver.h"
#include "virstring.h"
#define VIR_FROM_THIS VIR_FROM_ADMIN
VIR_LOG_INIT("daemon.admin_server");
int
adminConnectListServers(virNetDaemonPtr dmn,
virNetServerPtr **servers,
unsigned int flags)
{
int ret = -1;
virNetServerPtr *srvs = NULL;
virCheckFlags(0, -1);
if ((ret = virNetDaemonGetServers(dmn, &srvs)) < 0)
goto cleanup;
if (servers) {
*servers = srvs;
srvs = NULL;
}
cleanup:
if (ret > 0)
virObjectListFreeCount(srvs, ret);
return ret;
}
virNetServerPtr
adminConnectLookupServer(virNetDaemonPtr dmn,
const char *name,
unsigned int flags)
{
virCheckFlags(flags, NULL);
return virNetDaemonGetServer(dmn, name);
}

View File

@@ -1,38 +0,0 @@
/*
* admin_server.h: admin methods to manage daemons and clients
*
* Copyright (C) 2016 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Authors: Erik Skultety <eskultet@redhat.com>
* Martin Kletzander <mkletzan@redhat.com>
*/
#ifndef __LIBVIRTD_ADMIN_SERVER_H__
# define __LIBVIRTD_ADMIN_SERVER_H__
# include "rpc/virnetdaemon.h"
# include "rpc/virnetserver.h"
int adminConnectListServers(virNetDaemonPtr dmn,
virNetServerPtr **servers,
unsigned int flags);
virNetServerPtr adminConnectLookupServer(virNetDaemonPtr dmn,
const char *name,
unsigned int flags);
#endif /* __LIBVIRTD_ADMIN_SERVER_H__ */

View File

@@ -1,9 +0,0 @@
// Allow any user in the 'libvirt' group to connect to system libvirtd
// without entering a password.
polkit.addRule(function(action, subject) {
if (action.id == "org.libvirt.unix.manage" &&
subject.isInGroup("libvirt")) {
return polkit.Result.YES;
}
});

View File

@@ -1,7 +1,7 @@
/*
* libvirtd-config.c: daemon start of day, guest process & i/o management
*
* Copyright (C) 2006-2012, 2014, 2015 Red Hat, Inc.
* Copyright (C) 2006-2012, 2014 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -123,8 +123,8 @@ checkType(virConfValuePtr p, const char *filename,
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("remoteReadConfigFile: %s: %s: invalid type:"
" got %s; expected %s"), filename, key,
virConfTypeToString(p->type),
virConfTypeToString(required_type));
virConfTypeName(p->type),
virConfTypeName(required_type));
return -1;
}
return 0;
@@ -146,30 +146,17 @@ checkType(virConfValuePtr p, const char *filename,
} \
} while (0)
/* Like GET_CONF_STR, but for signed integral values. */
/* Like GET_CONF_STR, but for integral values. */
#define GET_CONF_INT(conf, filename, var_name) \
do { \
virConfValuePtr p = virConfGetValue(conf, #var_name); \
if (p) { \
if (p->type != VIR_CONF_ULONG && \
checkType(p, filename, #var_name, VIR_CONF_LONG) < 0) \
if (checkType(p, filename, #var_name, VIR_CONF_LONG) < 0) \
goto error; \
data->var_name = p->l; \
} \
} while (0)
/* Like GET_CONF_STR, but for unsigned integral values. */
#define GET_CONF_UINT(conf, filename, var_name) \
do { \
virConfValuePtr p = virConfGetValue(conf, #var_name); \
if (p) { \
if (checkType(p, filename, #var_name, VIR_CONF_ULONG) < 0) \
goto error; \
data->var_name = p->l; \
} \
} while (0)
static int
remoteConfigGetAuth(virConfPtr conf,
@@ -264,8 +251,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
if (VIR_STRDUP(data->unix_sock_rw_perms,
data->auth_unix_rw == REMOTE_AUTH_POLKIT ? "0777" : "0700") < 0 ||
VIR_STRDUP(data->unix_sock_ro_perms, "0777") < 0 ||
VIR_STRDUP(data->unix_sock_admin_perms, "0700") < 0)
VIR_STRDUP(data->unix_sock_ro_perms, "0777") < 0)
goto error;
#if WITH_SASL
@@ -280,7 +266,6 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
data->min_workers = 5;
data->max_workers = 20;
data->max_clients = 5000;
data->max_queued_clients = 1000;
data->max_anonymous_clients = 20;
data->prio_workers = 5;
@@ -293,15 +278,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
data->keepalive_interval = 5;
data->keepalive_count = 5;
data->admin_min_workers = 5;
data->admin_max_workers = 20;
data->admin_max_clients = 5000;
data->admin_max_queued_clients = 20;
data->admin_max_client_requests = 5;
data->admin_keepalive_interval = 5;
data->admin_keepalive_count = 5;
data->keepalive_required = 0;
localhost = virGetHostname();
if (localhost == NULL) {
@@ -347,7 +324,6 @@ daemonConfigFree(struct daemonConfig *data)
}
VIR_FREE(data->access_drivers);
VIR_FREE(data->unix_sock_admin_perms);
VIR_FREE(data->unix_sock_ro_perms);
VIR_FREE(data->unix_sock_rw_perms);
VIR_FREE(data->unix_sock_group);
@@ -385,8 +361,8 @@ daemonConfigLoadOptions(struct daemonConfig *data,
const char *filename,
virConfPtr conf)
{
GET_CONF_UINT(conf, filename, listen_tcp);
GET_CONF_UINT(conf, filename, listen_tls);
GET_CONF_INT(conf, filename, listen_tcp);
GET_CONF_INT(conf, filename, listen_tls);
GET_CONF_STR(conf, filename, tls_port);
GET_CONF_STR(conf, filename, tcp_port);
GET_CONF_STR(conf, filename, listen_addr);
@@ -415,17 +391,16 @@ daemonConfigLoadOptions(struct daemonConfig *data,
goto error;
GET_CONF_STR(conf, filename, unix_sock_group);
GET_CONF_STR(conf, filename, unix_sock_admin_perms);
GET_CONF_STR(conf, filename, unix_sock_ro_perms);
GET_CONF_STR(conf, filename, unix_sock_rw_perms);
GET_CONF_STR(conf, filename, unix_sock_dir);
GET_CONF_UINT(conf, filename, mdns_adv);
GET_CONF_INT(conf, filename, mdns_adv);
GET_CONF_STR(conf, filename, mdns_name);
GET_CONF_UINT(conf, filename, tls_no_sanity_certificate);
GET_CONF_UINT(conf, filename, tls_no_verify_certificate);
GET_CONF_INT(conf, filename, tls_no_sanity_certificate);
GET_CONF_INT(conf, filename, tls_no_verify_certificate);
GET_CONF_STR(conf, filename, key_file);
GET_CONF_STR(conf, filename, cert_file);
@@ -442,37 +417,29 @@ daemonConfigLoadOptions(struct daemonConfig *data,
goto error;
GET_CONF_UINT(conf, filename, min_workers);
GET_CONF_UINT(conf, filename, max_workers);
GET_CONF_UINT(conf, filename, max_clients);
GET_CONF_UINT(conf, filename, max_queued_clients);
GET_CONF_UINT(conf, filename, max_anonymous_clients);
GET_CONF_INT(conf, filename, min_workers);
GET_CONF_INT(conf, filename, max_workers);
GET_CONF_INT(conf, filename, max_clients);
GET_CONF_INT(conf, filename, max_queued_clients);
GET_CONF_INT(conf, filename, max_anonymous_clients);
GET_CONF_UINT(conf, filename, prio_workers);
GET_CONF_INT(conf, filename, prio_workers);
GET_CONF_INT(conf, filename, max_requests);
GET_CONF_UINT(conf, filename, max_client_requests);
GET_CONF_INT(conf, filename, max_client_requests);
GET_CONF_UINT(conf, filename, admin_min_workers);
GET_CONF_UINT(conf, filename, admin_max_workers);
GET_CONF_UINT(conf, filename, admin_max_clients);
GET_CONF_UINT(conf, filename, admin_max_queued_clients);
GET_CONF_UINT(conf, filename, admin_max_client_requests);
GET_CONF_UINT(conf, filename, audit_level);
GET_CONF_UINT(conf, filename, audit_logging);
GET_CONF_INT(conf, filename, audit_level);
GET_CONF_INT(conf, filename, audit_logging);
GET_CONF_STR(conf, filename, host_uuid);
GET_CONF_UINT(conf, filename, log_level);
GET_CONF_INT(conf, filename, log_level);
GET_CONF_STR(conf, filename, log_filters);
GET_CONF_STR(conf, filename, log_outputs);
GET_CONF_INT(conf, filename, keepalive_interval);
GET_CONF_UINT(conf, filename, keepalive_count);
GET_CONF_INT(conf, filename, admin_keepalive_interval);
GET_CONF_UINT(conf, filename, admin_keepalive_count);
GET_CONF_INT(conf, filename, keepalive_count);
GET_CONF_INT(conf, filename, keepalive_required);
return 0;

View File

@@ -1,7 +1,7 @@
/*
* libvirtd-config.h: daemon start of day, guest process & i/o management
*
* Copyright (C) 2006-2012, 2015 Red Hat, Inc.
* Copyright (C) 2006-2012 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -35,7 +35,6 @@ struct daemonConfig {
char *tls_port;
char *tcp_port;
char *unix_sock_admin_perms;
char *unix_sock_ro_perms;
char *unix_sock_rw_perms;
char *unix_sock_group;
@@ -81,15 +80,7 @@ struct daemonConfig {
int keepalive_interval;
unsigned int keepalive_count;
int admin_min_workers;
int admin_max_workers;
int admin_max_clients;
int admin_max_queued_clients;
int admin_max_client_requests;
int admin_keepalive_interval;
unsigned int admin_keepalive_count;
int keepalive_required;
};

View File

@@ -35,7 +35,6 @@ module Libvirtd =
let sock_acl_entry = str_entry "unix_sock_group"
| str_entry "unix_sock_ro_perms"
| str_entry "unix_sock_rw_perms"
| str_entry "unix_sock_admin_perms"
| str_entry "unix_sock_dir"
let authentication_entry = str_entry "auth_unix_ro"
@@ -63,12 +62,6 @@ module Libvirtd =
| int_entry "max_client_requests"
| int_entry "prio_workers"
let admin_processing_entry = int_entry "admin_min_workers"
| int_entry "admin_max_workers"
| int_entry "admin_max_clients"
| int_entry "admin_max_queued_clients"
| int_entry "admin_max_client_requests"
let logging_entry = int_entry "log_level"
| str_entry "log_filters"
| str_entry "log_outputs"
@@ -81,10 +74,6 @@ module Libvirtd =
| int_entry "keepalive_count"
| bool_entry "keepalive_required"
let admin_keepalive_entry = int_entry "admin_keepalive_interval"
| int_entry "admin_keepalive_count"
| bool_entry "admin_keepalive_required"
let misc_entry = str_entry "host_uuid"
(* Each enty in the config is one of the following three ... *)
@@ -94,11 +83,9 @@ module Libvirtd =
| certificate_entry
| authorization_entry
| processing_entry
| admin_processing_entry
| logging_entry
| auditing_entry
| keepalive_entry
| admin_keepalive_entry
| misc_entry
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]

View File

@@ -1,7 +1,7 @@
/*
* libvirtd.c: daemon start of day, guest process & i/o management
*
* Copyright (C) 2006-2015 Red Hat, Inc.
* Copyright (C) 2006-2014 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -30,6 +30,7 @@
#include <getopt.h>
#include <stdlib.h>
#include <grp.h>
#include <locale.h>
#include "libvirt_internal.h"
#include "virerror.h"
@@ -43,13 +44,12 @@
#include "libvirtd.h"
#include "libvirtd-config.h"
#include "admin.h"
#include "viruuid.h"
#include "remote_driver.h"
#include "viralloc.h"
#include "virconf.h"
#include "virnetlink.h"
#include "virnetdaemon.h"
#include "virnetserver.h"
#include "remote.h"
#include "virhook.h"
#include "viraudit.h"
@@ -57,7 +57,6 @@
#include "locking/lock_manager.h"
#include "viraccessmanager.h"
#include "virutil.h"
#include "virgettext.h"
#ifdef WITH_DRIVER_MODULES
# include "driver.h"
@@ -106,6 +105,7 @@
#include "configmake.h"
#include "virdbus.h"
#include "cpu/cpu_map.h"
VIR_LOG_INIT("daemon.libvirtd");
@@ -113,7 +113,6 @@ VIR_LOG_INIT("daemon.libvirtd");
virNetSASLContextPtr saslCtxt = NULL;
#endif
virNetServerProgramPtr remoteProgram = NULL;
virNetServerProgramPtr adminProgram = NULL;
virNetServerProgramPtr qemuProgram = NULL;
virNetServerProgramPtr lxcProgram = NULL;
@@ -164,9 +163,9 @@ static int daemonForkIntoBackground(const char *argv0)
VIR_FORCE_CLOSE(statuspipe[0]);
if ((stdinfd = open("/dev/null", O_RDONLY)) <= STDERR_FILENO)
if ((stdinfd = open("/dev/null", O_RDONLY)) < 0)
goto cleanup;
if ((stdoutfd = open("/dev/null", O_WRONLY)) <= STDERR_FILENO)
if ((stdoutfd = open("/dev/null", O_WRONLY)) < 0)
goto cleanup;
if (dup2(stdinfd, STDIN_FILENO) != STDIN_FILENO)
goto cleanup;
@@ -174,9 +173,9 @@ static int daemonForkIntoBackground(const char *argv0)
goto cleanup;
if (dup2(stdoutfd, STDERR_FILENO) != STDERR_FILENO)
goto cleanup;
if (VIR_CLOSE(stdinfd) < 0)
if (stdinfd > STDERR_FILENO && VIR_CLOSE(stdinfd) < 0)
goto cleanup;
if (VIR_CLOSE(stdoutfd) < 0)
if (stdoutfd > STDERR_FILENO && VIR_CLOSE(stdoutfd) < 0)
goto cleanup;
if (setsid() < 0)
@@ -255,24 +254,18 @@ static int
daemonUnixSocketPaths(struct daemonConfig *config,
bool privileged,
char **sockfile,
char **rosockfile,
char **admsockfile)
char **rosockfile)
{
if (config->unix_sock_dir) {
if (virAsprintf(sockfile, "%s/libvirt-sock", config->unix_sock_dir) < 0)
goto error;
if (privileged) {
if (virAsprintf(rosockfile, "%s/libvirt-sock-ro", config->unix_sock_dir) < 0)
goto error;
if (virAsprintf(admsockfile, "%s/libvirt-admin-sock", config->unix_sock_dir) < 0)
goto error;
}
if (privileged &&
virAsprintf(rosockfile, "%s/libvirt-sock-ro", config->unix_sock_dir) < 0)
goto error;
} else {
if (privileged) {
if (VIR_STRDUP(*sockfile, LOCALSTATEDIR "/run/libvirt/libvirt-sock") < 0 ||
VIR_STRDUP(*rosockfile, LOCALSTATEDIR "/run/libvirt/libvirt-sock-ro") < 0 ||
VIR_STRDUP(*admsockfile, LOCALSTATEDIR "/run/libvirt/libvirt-admin-sock") < 0)
VIR_STRDUP(*rosockfile, LOCALSTATEDIR "/run/libvirt/libvirt-sock-ro") < 0)
goto error;
} else {
char *rundir = NULL;
@@ -288,8 +281,7 @@ daemonUnixSocketPaths(struct daemonConfig *config,
}
umask(old_umask);
if (virAsprintf(sockfile, "%s/libvirt-sock", rundir) < 0 ||
virAsprintf(admsockfile, "%s/libvirt-admin-sock", rundir) < 0) {
if (virAsprintf(sockfile, "%s/libvirt-sock", rundir) < 0) {
VIR_FREE(rundir);
goto error;
}
@@ -329,7 +321,6 @@ static int daemonErrorLogFilter(virErrorPtr err, int priority)
case VIR_ERR_NO_SECRET:
case VIR_ERR_NO_DOMAIN_SNAPSHOT:
case VIR_ERR_OPERATION_INVALID:
case VIR_ERR_NO_DOMAIN_METADATA:
return VIR_LOG_DEBUG;
}
@@ -343,7 +334,12 @@ static void daemonInitialize(void)
* priority when calling virStateInitialize. We must register the
* network, storage and nodedev drivers before any stateful domain
* driver, since their resources must be auto-started before any
* domains can be auto-started.
* domains can be auto-started. Moreover, some stateless drivers
* implement their own subdrivers (e.g. the vbox driver has its
* own network and storage subdriers) which need to have higher
* priority. Otherwise, when connecting to such driver the generic
* subdriver may be opened instead of the one corresponding to the
* stateless driver.
*/
#ifdef WITH_DRIVER_MODULES
/* We don't care if any of these fail, because the whole point
@@ -351,12 +347,18 @@ static void daemonInitialize(void)
* If they try to open a connection for a module that
* is not loaded they'll get a suitable error at that point
*/
# ifdef WITH_VBOX
virDriverLoadModule("vbox_network");
# endif
# ifdef WITH_NETWORK
virDriverLoadModule("network");
# endif
# ifdef WITH_INTERFACE
virDriverLoadModule("interface");
# endif
# ifdef WITH_VBOX
virDriverLoadModule("vbox_storage");
# endif
# ifdef WITH_STORAGE
virDriverLoadModule("storage");
# endif
@@ -391,12 +393,18 @@ static void daemonInitialize(void)
virDriverLoadModule("bhyve");
# endif
#else
# ifdef WITH_VBOX
vboxNetworkRegister();
# endif
# ifdef WITH_NETWORK
networkRegister();
# endif
# ifdef WITH_INTERFACE
interfaceRegister();
# endif
# ifdef WITH_VBOX
vboxStorageRegister();
# endif
# ifdef WITH_STORAGE
storageRegister();
# endif
@@ -434,18 +442,14 @@ static void daemonInitialize(void)
}
static int ATTRIBUTE_NONNULL(3)
daemonSetupNetworking(virNetServerPtr srv,
virNetServerPtr srvAdm,
struct daemonConfig *config,
const char *sock_path,
const char *sock_path_ro,
const char *sock_path_adm,
bool ipsock,
bool privileged)
static int daemonSetupNetworking(virNetServerPtr srv,
struct daemonConfig *config,
const char *sock_path,
const char *sock_path_ro,
bool ipsock,
bool privileged)
{
virNetServerServicePtr svc = NULL;
virNetServerServicePtr svcAdm = NULL;
virNetServerServicePtr svcRO = NULL;
virNetServerServicePtr svcTCP = NULL;
#if WITH_GNUTLS
@@ -454,35 +458,28 @@ daemonSetupNetworking(virNetServerPtr srv,
gid_t unix_sock_gid = 0;
int unix_sock_ro_mask = 0;
int unix_sock_rw_mask = 0;
int unix_sock_adm_mask = 0;
int ret = -1;
unsigned int cur_fd = STDERR_FILENO + 1;
unsigned int nfds = virGetListenFDs();
if (config->unix_sock_group) {
if (virGetGroupID(config->unix_sock_group, &unix_sock_gid) < 0)
return ret;
return -1;
}
if (nfds > (sock_path_ro ? 2 : 1)) {
if (nfds && nfds > ((int)!!sock_path + (int)!!sock_path_ro)) {
VIR_ERROR(_("Too many (%u) FDs passed from caller"), nfds);
return ret;
return -1;
}
if (virStrToLong_i(config->unix_sock_ro_perms, NULL, 8, &unix_sock_ro_mask) != 0) {
VIR_ERROR(_("Failed to parse mode '%s'"), config->unix_sock_ro_perms);
goto cleanup;
}
if (virStrToLong_i(config->unix_sock_admin_perms, NULL, 8, &unix_sock_adm_mask) != 0) {
VIR_ERROR(_("Failed to parse mode '%s'"), config->unix_sock_admin_perms);
goto cleanup;
goto error;
}
if (virStrToLong_i(config->unix_sock_rw_perms, NULL, 8, &unix_sock_rw_mask) != 0) {
VIR_ERROR(_("Failed to parse mode '%s'"), config->unix_sock_rw_perms);
goto cleanup;
goto error;
}
if (!(svc = virNetServerServiceNewFDOrUNIX(sock_path,
@@ -496,7 +493,7 @@ daemonSetupNetworking(virNetServerPtr srv,
config->max_queued_clients,
config->max_client_requests,
nfds, &cur_fd)))
goto cleanup;
goto error;
if (sock_path_ro) {
if (!(svcRO = virNetServerServiceNewFDOrUNIX(sock_path_ro,
unix_sock_ro_mask,
@@ -509,37 +506,18 @@ daemonSetupNetworking(virNetServerPtr srv,
config->max_queued_clients,
config->max_client_requests,
nfds, &cur_fd)))
goto cleanup;
goto error;
}
if (virNetServerAddService(srv, svc,
config->mdns_adv && !ipsock ?
"_libvirt._tcp" :
NULL) < 0)
goto cleanup;
goto error;
if (svcRO &&
virNetServerAddService(srv, svcRO, NULL) < 0)
goto cleanup;
/* Temporarily disabled */
if (sock_path_adm && false) {
VIR_DEBUG("Registering unix socket %s", sock_path_adm);
if (!(svcAdm = virNetServerServiceNewUNIX(sock_path_adm,
unix_sock_adm_mask,
unix_sock_gid,
REMOTE_AUTH_NONE,
#if WITH_GNUTLS
NULL,
#endif
true,
config->admin_max_queued_clients,
config->admin_max_client_requests)))
goto cleanup;
if (virNetServerAddService(srvAdm, svcAdm, NULL) < 0)
goto cleanup;
}
goto error;
if (ipsock) {
if (config->listen_tcp) {
@@ -547,7 +525,6 @@ daemonSetupNetworking(virNetServerPtr srv,
config->listen_addr, config->tcp_port);
if (!(svcTCP = virNetServerServiceNewTCP(config->listen_addr,
config->tcp_port,
AF_UNSPEC,
config->auth_tcp,
#if WITH_GNUTLS
NULL,
@@ -555,11 +532,11 @@ daemonSetupNetworking(virNetServerPtr srv,
false,
config->max_queued_clients,
config->max_client_requests)))
goto cleanup;
goto error;
if (virNetServerAddService(srv, svcTCP,
config->mdns_adv ? "_libvirt._tcp" : NULL) < 0)
goto cleanup;
goto error;
}
#if WITH_GNUTLS
@@ -576,14 +553,14 @@ daemonSetupNetworking(virNetServerPtr srv,
(const char *const*)config->tls_allowed_dn_list,
config->tls_no_sanity_certificate ? false : true,
config->tls_no_verify_certificate ? false : true)))
goto cleanup;
goto error;
} else {
if (!(ctxt = virNetTLSContextNewServerPath(NULL,
!privileged,
(const char *const*)config->tls_allowed_dn_list,
config->tls_no_sanity_certificate ? false : true,
config->tls_no_verify_certificate ? false : true)))
goto cleanup;
goto error;
}
VIR_DEBUG("Registering TLS socket %s:%s",
@@ -591,19 +568,18 @@ daemonSetupNetworking(virNetServerPtr srv,
if (!(svcTLS =
virNetServerServiceNewTCP(config->listen_addr,
config->tls_port,
AF_UNSPEC,
config->auth_tls,
ctxt,
false,
config->max_queued_clients,
config->max_client_requests))) {
virObjectUnref(ctxt);
goto cleanup;
goto error;
}
if (virNetServerAddService(srv, svcTLS,
config->mdns_adv &&
!config->listen_tcp ? "_libvirt._tcp" : NULL) < 0)
goto cleanup;
goto error;
virObjectUnref(ctxt);
}
@@ -612,7 +588,7 @@ daemonSetupNetworking(virNetServerPtr srv,
if (config->listen_tls) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("This libvirtd build does not support TLS"));
goto cleanup;
goto error;
}
#endif
}
@@ -627,21 +603,20 @@ daemonSetupNetworking(virNetServerPtr srv,
saslCtxt = virNetSASLContextNewServer(
(const char *const*)config->sasl_allowed_username_list);
if (!saslCtxt)
goto cleanup;
goto error;
}
#endif
ret = 0;
return 0;
cleanup:
error:
#if WITH_GNUTLS
virObjectUnref(svcTLS);
#endif
virObjectUnref(svcTCP);
virObjectUnref(svcRO);
virObjectUnref(svcAdm);
virObjectUnref(svc);
return ret;
virObjectUnref(svcRO);
return -1;
}
@@ -768,13 +743,13 @@ daemonSetupAccessManager(struct daemonConfig *config)
{
virAccessManagerPtr mgr;
const char *none[] = { "none", NULL };
const char **drv = (const char **)config->access_drivers;
const char **driver = (const char **)config->access_drivers;
if (!drv ||
!drv[0])
drv = none;
if (!driver ||
!driver[0])
driver = none;
if (!(mgr = virAccessManagerNewStack(drv)))
if (!(mgr = virAccessManagerNewStack(driver)))
return -1;
virAccessManagerSetDefault(mgr);
@@ -815,22 +790,17 @@ daemonSetupPrivs(void)
#endif
static void daemonShutdownHandler(virNetDaemonPtr dmn,
static void daemonShutdownHandler(virNetServerPtr srv,
siginfo_t *sig ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
virNetDaemonQuit(dmn);
virNetServerQuit(srv);
}
static void daemonReloadHandler(virNetDaemonPtr dmn ATTRIBUTE_UNUSED,
static void daemonReloadHandler(virNetServerPtr srv ATTRIBUTE_UNUSED,
siginfo_t *sig ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
if (!driversInitialized) {
VIR_WARN("Drivers are not initialized, reload ignored");
return;
}
VIR_INFO("Reloading configuration on SIGHUP");
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-",
VIR_HOOK_DAEMON_OP_RELOAD, SIGHUP, "SIGHUP", NULL, NULL);
@@ -838,15 +808,15 @@ static void daemonReloadHandler(virNetDaemonPtr dmn ATTRIBUTE_UNUSED,
VIR_WARN("Error while reloading drivers");
}
static int daemonSetupSignals(virNetDaemonPtr dmn)
static int daemonSetupSignals(virNetServerPtr srv)
{
if (virNetDaemonAddSignalHandler(dmn, SIGINT, daemonShutdownHandler, NULL) < 0)
if (virNetServerAddSignalHandler(srv, SIGINT, daemonShutdownHandler, NULL) < 0)
return -1;
if (virNetDaemonAddSignalHandler(dmn, SIGQUIT, daemonShutdownHandler, NULL) < 0)
if (virNetServerAddSignalHandler(srv, SIGQUIT, daemonShutdownHandler, NULL) < 0)
return -1;
if (virNetDaemonAddSignalHandler(dmn, SIGTERM, daemonShutdownHandler, NULL) < 0)
if (virNetServerAddSignalHandler(srv, SIGTERM, daemonShutdownHandler, NULL) < 0)
return -1;
if (virNetDaemonAddSignalHandler(dmn, SIGHUP, daemonReloadHandler, NULL) < 0)
if (virNetServerAddSignalHandler(srv, SIGHUP, daemonReloadHandler, NULL) < 0)
return -1;
return 0;
}
@@ -854,12 +824,12 @@ static int daemonSetupSignals(virNetDaemonPtr dmn)
static void daemonInhibitCallback(bool inhibit, void *opaque)
{
virNetDaemonPtr dmn = opaque;
virNetServerPtr srv = opaque;
if (inhibit)
virNetDaemonAddShutdownInhibition(dmn);
virNetServerAddShutdownInhibition(srv);
else
virNetDaemonRemoveShutdownInhibition(dmn);
virNetServerRemoveShutdownInhibition(srv);
}
@@ -869,26 +839,26 @@ static DBusConnection *systemBus;
static void daemonStopWorker(void *opaque)
{
virNetDaemonPtr dmn = opaque;
virNetServerPtr srv = opaque;
VIR_DEBUG("Begin stop dmn=%p", dmn);
VIR_DEBUG("Begin stop srv=%p", srv);
ignore_value(virStateStop());
VIR_DEBUG("Completed stop dmn=%p", dmn);
VIR_DEBUG("Completed stop srv=%p", srv);
/* Exit libvirtd cleanly */
virNetDaemonQuit(dmn);
virNetServerQuit(srv);
}
/* We do this in a thread to not block the main loop */
static void daemonStop(virNetDaemonPtr dmn)
static void daemonStop(virNetServerPtr srv)
{
virThread thr;
virObjectRef(dmn);
if (virThreadCreate(&thr, false, daemonStopWorker, dmn) < 0)
virObjectUnref(dmn);
virObjectRef(srv);
if (virThreadCreate(&thr, false, daemonStopWorker, srv) < 0)
virObjectUnref(srv);
}
@@ -897,14 +867,14 @@ handleSessionMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED,
DBusMessage *message,
void *opaque)
{
virNetDaemonPtr dmn = opaque;
virNetServerPtr srv = opaque;
VIR_DEBUG("dmn=%p", dmn);
VIR_DEBUG("srv=%p", srv);
if (dbus_message_is_signal(message,
DBUS_INTERFACE_LOCAL,
"Disconnected"))
daemonStop(dmn);
daemonStop(srv);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
@@ -915,14 +885,14 @@ handleSystemMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED,
DBusMessage *message,
void *opaque)
{
virNetDaemonPtr dmn = opaque;
virNetServerPtr srv = opaque;
VIR_DEBUG("dmn=%p", dmn);
VIR_DEBUG("srv=%p", srv);
if (dbus_message_is_signal(message,
"org.freedesktop.login1.Manager",
"PrepareForShutdown"))
daemonStop(dmn);
daemonStop(srv);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
@@ -931,22 +901,22 @@ handleSystemMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED,
static void daemonRunStateInit(void *opaque)
{
virNetDaemonPtr dmn = opaque;
virNetServerPtr srv = opaque;
virIdentityPtr sysident = virIdentityGetSystem();
virIdentitySetCurrent(sysident);
/* Since driver initialization can take time inhibit daemon shutdown until
we're done so clients get a chance to connect */
daemonInhibitCallback(true, dmn);
daemonInhibitCallback(true, srv);
/* Start the stateful HV drivers
* This is deliberately done after telling the parent process
* we're ready, since it can take a long time and this will
* seriously delay OS bootup process */
if (virStateInitialize(virNetDaemonIsPrivileged(dmn),
if (virStateInitialize(virNetServerIsPrivileged(srv),
daemonInhibitCallback,
dmn) < 0) {
srv) < 0) {
VIR_ERROR(_("Driver state initialization failed"));
/* Ensure the main event loop quits */
kill(getpid(), SIGTERM);
@@ -956,18 +926,18 @@ static void daemonRunStateInit(void *opaque)
driversInitialized = true;
#ifdef HAVE_DBUS
/* Tie the non-privileged libvirtd to the session/shutdown lifecycle */
if (!virNetDaemonIsPrivileged(dmn)) {
/* Tie the non-priviledged libvirtd to the session/shutdown lifecycle */
if (!virNetServerIsPrivileged(srv)) {
sessionBus = virDBusGetSessionBus();
if (sessionBus != NULL)
dbus_connection_add_filter(sessionBus,
handleSessionMessageFunc, dmn, NULL);
handleSessionMessageFunc, srv, NULL);
systemBus = virDBusGetSystemBus();
if (systemBus != NULL) {
dbus_connection_add_filter(systemBus,
handleSystemMessageFunc, dmn, NULL);
handleSystemMessageFunc, srv, NULL);
dbus_bus_add_match(systemBus,
"type='signal',sender='org.freedesktop.login1', interface='org.freedesktop.login1.Manager'",
NULL);
@@ -975,20 +945,20 @@ static void daemonRunStateInit(void *opaque)
}
#endif
/* Only now accept clients from network */
virNetDaemonUpdateServices(dmn, true);
virNetServerUpdateServices(srv, true);
cleanup:
daemonInhibitCallback(false, dmn);
virObjectUnref(dmn);
daemonInhibitCallback(false, srv);
virObjectUnref(srv);
virObjectUnref(sysident);
virIdentitySetCurrent(NULL);
}
static int daemonStateInit(virNetDaemonPtr dmn)
static int daemonStateInit(virNetServerPtr srv)
{
virThread thr;
virObjectRef(dmn);
if (virThreadCreate(&thr, false, daemonRunStateInit, dmn) < 0) {
virObjectUnref(dmn);
virObjectRef(srv);
if (virThreadCreate(&thr, false, daemonRunStateInit, srv) < 0) {
virObjectUnref(srv);
return -1;
}
return 0;
@@ -1010,8 +980,9 @@ static int migrateProfile(void)
if (!(home = virGetUserDirectory()))
goto cleanup;
if (virAsprintf(&old_base, "%s/.libvirt", home) < 0)
if (virAsprintf(&old_base, "%s/.libvirt", home) < 0) {
goto cleanup;
}
/* if the new directory is there or the old one is not: do nothing */
if (!(config_dir = virGetUserConfigDirectory()))
@@ -1026,18 +997,21 @@ static int migrateProfile(void)
}
/* test if we already attempted to migrate first */
if (virAsprintf(&updated, "%s/DEPRECATED-DIRECTORY", old_base) < 0)
if (virAsprintf(&updated, "%s/DEPRECATED-DIRECTORY", old_base) < 0) {
goto cleanup;
if (virFileExists(updated))
}
if (virFileExists(updated)) {
goto cleanup;
}
config_home = virGetEnvBlockSUID("XDG_CONFIG_HOME");
if (config_home && config_home[0] != '\0') {
if (VIR_STRDUP(xdg_dir, config_home) < 0)
goto cleanup;
} else {
if (virAsprintf(&xdg_dir, "%s/.config", home) < 0)
if (virAsprintf(&xdg_dir, "%s/.config", home) < 0) {
goto cleanup;
}
}
old_umask = umask(077);
@@ -1138,10 +1112,9 @@ daemonUsage(const char *argv0, bool privileged)
}
}
#define MAX_LISTEN 5
int main(int argc, char **argv) {
virNetDaemonPtr dmn = NULL;
virNetServerPtr srv = NULL;
virNetServerPtr srvAdm = NULL;
char *remote_config_file = NULL;
int statuswrite = -1;
int ret = 1;
@@ -1149,7 +1122,6 @@ int main(int argc, char **argv) {
char *pid_file = NULL;
char *sock_file = NULL;
char *sock_file_ro = NULL;
char *sock_file_adm = NULL;
int timeout = -1; /* -t: Shutdown timeout */
int verbose = 0;
int godaemon = 0;
@@ -1172,7 +1144,9 @@ int main(int argc, char **argv) {
{0, 0, 0, 0}
};
if (virGettextInitialize() < 0 ||
if (setlocale(LC_ALL, "") == NULL ||
bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
textdomain(PACKAGE) == NULL ||
virInitialize() < 0) {
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
@@ -1189,8 +1163,9 @@ int main(int argc, char **argv) {
c = getopt_long(argc, argv, "ldf:p:t:vVh", opts, &optidx);
if (c == -1)
if (c == -1) {
break;
}
switch (c) {
case 0:
@@ -1315,15 +1290,12 @@ int main(int argc, char **argv) {
if (daemonUnixSocketPaths(config,
privileged,
&sock_file,
&sock_file_ro,
&sock_file_adm) < 0) {
&sock_file_ro) < 0) {
VIR_ERROR(_("Can't determine socket paths"));
exit(EXIT_FAILURE);
}
VIR_DEBUG("Decided on socket paths '%s', '%s' and '%s'",
sock_file,
NULLSTR(sock_file_ro),
NULLSTR(sock_file_adm));
VIR_DEBUG("Decided on socket paths '%s' and '%s'",
sock_file, NULLSTR(sock_file_ro));
if (godaemon) {
char ebuf[1024];
@@ -1380,14 +1352,14 @@ int main(int argc, char **argv) {
goto cleanup;
}
if (!(srv = virNetServerNew("libvirtd",
config->min_workers,
if (!(srv = virNetServerNew(config->min_workers,
config->max_workers,
config->prio_workers,
config->max_clients,
config->max_anonymous_clients,
config->keepalive_interval,
config->keepalive_count,
!!config->keepalive_required,
config->mdns_adv ? config->mdns_name : NULL,
remoteClientInitHook,
NULL,
@@ -1397,12 +1369,6 @@ int main(int argc, char **argv) {
goto cleanup;
}
if (!(dmn = virNetDaemonNew()) ||
virNetDaemonAddServer(dmn, srv) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
/* Beyond this point, nothing should rely on using
* getuid/geteuid() == 0, for privilege level checks.
*/
@@ -1455,46 +1421,13 @@ int main(int argc, char **argv) {
goto cleanup;
}
if (!(srvAdm = virNetServerNew("admin",
config->admin_min_workers,
config->admin_max_workers,
0,
config->admin_max_clients,
0,
config->admin_keepalive_interval,
config->admin_keepalive_count,
NULL,
remoteAdmClientInitHook,
NULL,
remoteAdmClientFreeFunc,
dmn))) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
if (virNetDaemonAddServer(dmn, srvAdm) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
if (!(adminProgram = virNetServerProgramNew(ADMIN_PROGRAM,
ADMIN_PROTOCOL_VERSION,
adminProcs,
adminNProcs))) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
if (virNetServerAddProgram(srvAdm, adminProgram) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
if (timeout != -1) {
VIR_DEBUG("Registering shutdown timeout %d", timeout);
virNetDaemonAutoShutdown(dmn, timeout);
virNetServerAutoShutdown(srv,
timeout);
}
if ((daemonSetupSignals(dmn)) < 0) {
if ((daemonSetupSignals(srv)) < 0) {
ret = VIR_DAEMON_ERR_SIGNAL;
goto cleanup;
}
@@ -1509,7 +1442,7 @@ int main(int argc, char **argv) {
VIR_DEBUG("Proceeding without auditing");
}
}
virAuditLog(config->audit_logging > 0);
virAuditLog(config->audit_logging);
/* setup the hooks if any */
if (virHookInitialize() < 0) {
@@ -1529,11 +1462,8 @@ int main(int argc, char **argv) {
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", VIR_HOOK_DAEMON_OP_START,
0, "start", NULL, NULL);
if (daemonSetupNetworking(srv, srvAdm,
config,
sock_file,
sock_file_ro,
sock_file_adm,
if (daemonSetupNetworking(srv, config,
sock_file, sock_file_ro,
ipsock, privileged) < 0) {
ret = VIR_DAEMON_ERR_NETWORK;
goto cleanup;
@@ -1552,7 +1482,7 @@ int main(int argc, char **argv) {
}
/* Initialize drivers & then start accepting new clients from network */
if (daemonStateInit(dmn) < 0) {
if (daemonStateInit(srv) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
@@ -1574,7 +1504,7 @@ int main(int argc, char **argv) {
#endif
/* Run event loop. */
virNetDaemonRun(dmn);
virNetServerRun(srv);
ret = 0;
@@ -1586,11 +1516,8 @@ int main(int argc, char **argv) {
virObjectUnref(remoteProgram);
virObjectUnref(lxcProgram);
virObjectUnref(qemuProgram);
virObjectUnref(adminProgram);
virNetDaemonClose(dmn);
virObjectUnref(dmn);
virNetServerClose(srv);
virObjectUnref(srv);
virObjectUnref(srvAdm);
virNetlinkShutdown();
if (statuswrite != -1) {
if (ret != 0) {
@@ -1607,17 +1534,14 @@ int main(int argc, char **argv) {
VIR_FREE(sock_file);
VIR_FREE(sock_file_ro);
VIR_FREE(sock_file_adm);
VIR_FREE(pid_file);
VIR_FREE(remote_config_file);
VIR_FREE(run_dir);
daemonConfigFree(config);
if (driversInitialized) {
driversInitialized = false;
if (driversInitialized)
virStateCleanup();
}
return ret;
}

View File

@@ -77,6 +77,11 @@
# UNIX socket access controls
#
# Beware that if you are changing *any* of these options, and you use
# socket activation with systemd, you need to adjust the settings in
# the libvirtd.socket file as well since it could impose a security
# risk if you rely on file permission checking only.
# Set the UNIX domain socket group ownership. This can be used to
# allow a 'trusted' set of users access to management capabilities
# without becoming root.
@@ -101,17 +106,9 @@
# control, then you may want to relax this too.
#unix_sock_rw_perms = "0770"
# Set the UNIX socket permissions for the admin interface socket.
#
# Default allows only owner (root), do not change it unless you are
# sure to whom you are exposing the access to.
#unix_sock_admin_perms = "0700"
# Set the name of the directory in which sockets will be found/created.
#unix_sock_dir = "/var/run/libvirt"
#################################################################
#
# Authentication.
@@ -275,7 +272,7 @@
# connection succeeds.
#max_queued_clients = 1000
# The maximum length of queue of accepted but not yet
# The maximum length of queue of accepted but not yet not
# authenticated clients. The default value is zero, meaning
# the feature is disabled.
#max_anonymous_clients = 20
@@ -310,16 +307,6 @@
# and max_workers parameter
#max_client_requests = 5
# Same processing controls, but this time for the admin interface.
# For description of each option, be so kind to scroll few lines
# upwards.
#admin_min_workers = 1
#admin_max_workers = 5
#admin_max_clients = 5
#admin_max_queued_clients = 5
#admin_max_client_requests = 5
#################################################################
#
# Logging controls
@@ -339,16 +326,10 @@
# The format for a filter is one of:
# x:name
# x:+name
# where name is a string which is matched against the category
# given in the VIR_LOG_INIT() at the top of each libvirt source
# file, e.g., "remote", "qemu", or "util.json" (the name in the
# filter can be a substring of the full category name, in order
# to match multiple similar categories), the optional "+" prefix
# tells libvirt to log stack trace for each message matching
# name, and x is the minimal level where matching messages should
# be logged:
# where name is a string which is matched against source file name,
# e.g., "remote", "qemu", or "util/json", the optional "+" prefix
# tells libvirt to log stack trace for each message matching name,
# and x is the minimal level where matching messages should be logged:
# 1: DEBUG
# 2: INFO
# 3: WARNING
@@ -441,15 +422,8 @@
#
#keepalive_interval = 5
#keepalive_count = 5
#
# These configuration options are no longer used. There is no way to
# restrict such clients from connecting since they first need to
# connect in order to ask for keepalive.
# If set to 1, libvirtd will refuse to talk to clients that do not
# support keepalive protocol. Defaults to 0.
#
#keepalive_required = 1
#admin_keepalive_required = 1
# Keepalive settings for the admin interface
#admin_keepalive_interval = 5
#admin_keepalive_count = 5

View File

@@ -1,7 +1,7 @@
/*
* libvirtd.h: daemon data structure definitions
*
* Copyright (C) 2006-2015 Red Hat, Inc.
* Copyright (C) 2006-2014 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -30,11 +30,9 @@
# include <rpc/types.h>
# include <rpc/xdr.h>
# include "remote_protocol.h"
# include "admin_protocol.h"
# include "lxc_protocol.h"
# include "qemu_protocol.h"
# include "virthread.h"
# if WITH_SASL
# include "virnetsaslcontext.h"
# endif
@@ -44,8 +42,6 @@ typedef struct daemonClientStream daemonClientStream;
typedef daemonClientStream *daemonClientStreamPtr;
typedef struct daemonClientPrivate daemonClientPrivate;
typedef daemonClientPrivate *daemonClientPrivatePtr;
typedef struct daemonAdmClientPrivate daemonAdmClientPrivate;
typedef daemonAdmClientPrivate *daemonAdmClientPrivatePtr;
typedef struct daemonClientEventCallback daemonClientEventCallback;
typedef daemonClientEventCallback *daemonClientEventCallbackPtr;
@@ -60,7 +56,6 @@ struct daemonClientPrivate {
size_t nnetworkEventCallbacks;
daemonClientEventCallbackPtr *qemuEventCallbacks;
size_t nqemuEventCallbacks;
bool closeRegistered;
# if WITH_SASL
virNetSASLSessionPtr sasl;
@@ -73,14 +68,7 @@ struct daemonClientPrivate {
virConnectPtr conn;
daemonClientStreamPtr streams;
};
/* Separate private data for admin connection */
struct daemonAdmClientPrivate {
/* Just a placeholder, not that there is anything to be locked */
virMutex lock;
virNetDaemonPtr dmn;
bool keepalive_supported;
};
# if WITH_SASL

View File

@@ -1,16 +1,19 @@
#!/bin/sh
# the following is the LSB init header see
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV
#
### BEGIN INIT INFO
# Provides: libvirtd
# Required-Start: $network messagebus
# Should-Start: $named
# Should-Start: xend
# Should-Start: avahi-daemon
# Should-Start: virtlockd
# Required-Stop: $network messagebus
# Should-Stop: $named
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Required-Start: $network messagebus virtlogd
# Required-Stop: $network messagebus
# Should-Start: $named xend avahi-daemon virtlockd
# Should-Stop: $named
# Short-Description: daemon for libvirt virtualization API
# Description: This is a daemon for managing guest instances
# and libvirt virtual networks

View File

@@ -1,9 +0,0 @@
@localstatedir@/log/libvirt/libxl/*.log {
weekly
missingok
rotate 4
compress
delaycompress
copytruncate
minsize 100k
}

View File

@@ -1,8 +1,3 @@
# NB we don't use socket activation. When libvirtd starts it will
# spawn any virtual machines registered for autostart. We want this
# to occur on every boot, regardless of whether any client connects
# to a socket. Thus socket activation doesn't have any benefit
[Unit]
Description=Virtualization daemon
Before=libvirt-guests.service
@@ -10,8 +5,6 @@ After=network.target
After=dbus.service
After=iscsid.service
After=apparmor.service
After=local-fs.target
After=remote-fs.target
Documentation=man:libvirtd(8)
Documentation=http://libvirt.org
@@ -27,5 +20,3 @@ Restart=on-failure
[Install]
WantedBy=multi-user.target
Also=virtlockd.socket
Also=virtlogd.socket

11
daemon/libvirtd.socket.in Normal file
View File

@@ -0,0 +1,11 @@
[Socket]
ListenStream=@runstatedir@/libvirt/libvirt-sock
ListenStream=@runstatedir@/libvirt/libvirt-sock-ro
; The following settings must match libvirtd.conf file in order to
; work as expected because libvirtd can't change them later.
; SocketMode=0777 is safe only if authentication on the socket is set
; up. For further information, please see the libvirtd.conf file.
SocketMode=0777
SocketUser=root
SocketGroup=root

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
/*
* stream.c: APIs for managing client streams
*
* Copyright (C) 2009-2014 Red Hat, Inc.
* Copyright (C) 2009, 2011 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -383,7 +383,7 @@ int daemonFreeClientStream(virNetServerClientPtr client,
msg = tmp;
}
virObjectUnref(stream->st);
virStreamFree(stream->st);
VIR_FREE(stream);
return ret;
@@ -612,10 +612,10 @@ daemonStreamHandleAbort(virNetServerClientPtr client,
virStreamEventRemoveCallback(stream->st);
virStreamAbort(stream->st);
if (msg->header.status == VIR_NET_ERROR) {
if (msg->header.status == VIR_NET_ERROR)
virReportError(VIR_ERR_RPC,
"%s", _("stream aborted at client request"));
} else {
else {
VIR_WARN("unexpected stream status %d", msg->header.status);
virReportError(VIR_ERR_RPC,
_("stream aborted with unexpected status %d"),

View File

@@ -12,7 +12,6 @@ module Test_libvirtd =
{ "unix_sock_group" = "libvirt" }
{ "unix_sock_ro_perms" = "0777" }
{ "unix_sock_rw_perms" = "0770" }
{ "unix_sock_admin_perms" = "0700" }
{ "unix_sock_dir" = "/var/run/libvirt" }
{ "auth_unix_ro" = "none" }
{ "auth_unix_rw" = "none" }
@@ -43,11 +42,6 @@ module Test_libvirtd =
{ "prio_workers" = "5" }
{ "max_requests" = "20" }
{ "max_client_requests" = "5" }
{ "admin_min_workers" = "1" }
{ "admin_max_workers" = "5" }
{ "admin_max_clients" = "5" }
{ "admin_max_queued_clients" = "5" }
{ "admin_max_client_requests" = "5" }
{ "log_level" = "3" }
{ "log_filters" = "3:remote 4:event" }
{ "log_outputs" = "3:syslog:libvirtd" }
@@ -58,6 +52,3 @@ module Test_libvirtd =
{ "keepalive_interval" = "5" }
{ "keepalive_count" = "5" }
{ "keepalive_required" = "1" }
{ "admin_keepalive_required" = "1" }
{ "admin_keepalive_interval" = "5" }
{ "admin_keepalive_count" = "5" }

View File

@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2016 Red Hat, Inc.
## Copyright (C) 2005-2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
@@ -16,6 +16,8 @@
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
SUBDIRS= schemas
PERL = perl
# The directory containing the source code (if it contains documentation).
@@ -23,22 +25,9 @@ DOC_SOURCE_DIR=../src
DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
apihtml = \
html/index.html \
$(apihtml_generated)
apihtml_generated = \
html/libvirt-libvirt-domain.html \
html/libvirt-libvirt-domain-snapshot.html \
html/libvirt-libvirt-event.html \
html/libvirt-libvirt-host.html \
html/libvirt-libvirt-interface.html \
html/libvirt-libvirt-network.html \
html/libvirt-libvirt-nodedev.html \
html/libvirt-libvirt-nwfilter.html \
html/libvirt-libvirt-secret.html \
html/libvirt-libvirt-storage.html \
html/libvirt-libvirt-stream.html \
apihtml = \
html/index.html \
html/libvirt-libvirt.html \
html/libvirt-virterror.html
apipng = \
@@ -51,6 +40,7 @@ devhelphtml = \
devhelp/libvirt.devhelp \
devhelp/index.html \
devhelp/general.html \
devhelp/libvirt-libvirt.html \
devhelp/libvirt-virterror.html
css = \
@@ -70,6 +60,8 @@ devhelpxsl = devhelp/devhelp.xsl devhelp/html.xsl
png = \
32favicon.png \
footer_corner.png \
footer_pattern.png \
libvirt-header-bg.png \
libvirt-header-logo.png \
libvirtLogo.png \
@@ -79,6 +71,7 @@ png = \
libvirt-driver-arch.png \
libvirt-object-model.png \
madeWith.png \
et.png \
migration-managed-direct.png \
migration-managed-p2p.png \
migration-native.png \
@@ -123,15 +116,8 @@ lxc_xml = \
libvirt-lxc-api.xml \
libvirt-lxc-refs.xml
admin_xml = \
libvirt-admin-api.xml \
libvirt-admin-refs.xml
apidir = $(pkgdatadir)/api
api_DATA = \
libvirt-api.xml \
libvirt-qemu-api.xml \
libvirt-lxc-api.xml
api_DATA = libvirt-api.xml libvirt-qemu-api.xml libvirt-lxc-api.xml
fig = \
libvirt-net-logical.fig \
@@ -145,9 +131,6 @@ fig = \
migration-tunnel.fig \
migration-unmanaged-direct.fig
schemadir = $(pkgdatadir)/schemas
schema_DATA = $(wildcard $(srcdir)/schemas/*.rng)
EXTRA_DIST= \
apibuild.py genaclperms.pl \
site.xsl newapi.xsl news.xsl page.xsl \
@@ -158,10 +141,9 @@ EXTRA_DIST= \
$(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\
$(internals_html_in) $(internals_html) \
sitemap.html.in aclperms.htmlinc \
todo.pl hvsupport.pl todo.cfg-example \
$(schema_DATA)
todo.pl hvsupport.pl todo.cfg-example
acl_generated = aclperms.htmlinc
acl.html:: $(srcdir)/aclperms.htmlinc
$(srcdir)/aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \
$(srcdir)/genaclperms.pl Makefile.am
@@ -180,7 +162,6 @@ all-am: web
api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
qemu_api: $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
lxc_api: $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
admin_api: $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
web: $(dot_html) $(internals_html) html/index.html devhelp/index.html \
$(dot_php)
@@ -203,13 +184,13 @@ todo:
rm -f todo.html.in
$(MAKE) todo.html
hvsupport.html: $(srcdir)/hvsupport.html.in
hvsupport.html:: $(srcdir)/hvsupport.html.in
$(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
$(top_srcdir)/src/libvirt_public.syms \
$(top_srcdir)/src/libvirt_qemu.syms $(top_srcdir)/src/libvirt_lxc.syms \
$(top_srcdir)/src/driver.h
$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(top_srcdir)/src > $@ \
$(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl \
$(srcdir)/../src/libvirt_public.syms \
$(srcdir)/../src/libvirt_qemu.syms $(srcdir)/../src/libvirt_lxc.syms \
$(srcdir)/../src/driver.h
$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(srcdir)/../src > $@ \
|| { rm $@ && exit 1; }
.PHONY: todo
@@ -217,21 +198,21 @@ $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
%.png: %.fig
convert -rotate 90 $< $@
%.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
sitemap.html.in $(acl_generated)
internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
@if [ -x $(XSLTPROC) ] ; then \
echo "Generating $@"; \
$(MKDIR_P) internals; \
name=`echo $@ | sed -e 's/.tmp//'`; \
$(XSLTPROC) --stringparam pagename $$name --nonet \
$(top_srcdir)/docs/subsite.xsl $< > $@ \
|| { rm $@ && exit 1; }; fi
%.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in
@if [ -x $(XSLTPROC) ] ; then \
echo "Generating $@"; \
name=`echo $@ | sed -e 's/.tmp//'`; \
dir=`dirname $@` ; \
if test "$$dir" = "."; \
then \
style=site.xsl; \
else \
$(MKDIR_P) $$dir; \
style=subsite.xsl; \
fi; \
$(XSLTPROC) --stringparam pagename $$name --nonet \
$(top_srcdir)/docs/$$style $< > $@ \
$(top_srcdir)/docs/site.xsl $< > $@ \
|| { rm $@ && exit 1; }; fi
%.html: %.html.tmp
@@ -242,7 +223,7 @@ $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
$(XMLLINT) --catalogs --nonet --format --valid $< > $(srcdir)/$@ \
|| { rm $(srcdir)/$@ && exit 1; }; \
else echo "missing XHTML1 DTD"; cat $< > $(srcdir)/$@ ; fi ; fi
else echo "missing XHTML1 DTD" ; fi ; fi
%.php.tmp: %.php.in site.xsl page.xsl sitemap.html.in
@if [ -x $(XSLTPROC) ] ; then \
@@ -258,8 +239,6 @@ $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
-e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
|| { rm $(srcdir)/$@ && exit 1; }; fi
$(apihtml_generated): html/index.html
html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) --nonet -o $(srcdir)/ \
@@ -270,7 +249,7 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
> /dev/null ; then \
SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
$(XMLLINT) --catalogs --nonet --valid --noout $(srcdir)/html/*.html ; \
else echo "missing XHTML1 DTD"; cat $< > $(srcdir)/$@ ; fi ; fi
else echo "missing XHTML1 DTD" ; fi ; fi
$(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
@@ -279,9 +258,9 @@ $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
python_generated_files = \
$(srcdir)/html/libvirt-libvirt.html \
$(srcdir)/html/libvirt-libvirt-lxc.html \
$(srcdir)/html/libvirt-libvirt-qemu.html \
$(srcdir)/html/libvirt-libvirt-admin.html \
$(srcdir)/html/libvirt-virterror.html \
$(srcdir)/libvirt-api.xml \
$(srcdir)/libvirt-refs.xml \
@@ -289,8 +268,6 @@ python_generated_files = \
$(srcdir)/libvirt-lxc-refs.xml \
$(srcdir)/libvirt-qemu-api.xml \
$(srcdir)/libvirt-qemu-refs.xml \
$(srcdir)/libvirt-admin-api.xml \
$(srcdir)/libvirt-admin-refs.xml \
$(NULL)
APIBUILD=$(srcdir)/apibuild.py
@@ -300,30 +277,16 @@ EXTRA_DIST += $(APIBUILD_STAMP)
$(python_generated_files): $(APIBUILD_STAMP)
$(APIBUILD_STAMP): $(srcdir)/apibuild.py \
$(top_srcdir)/include/libvirt/libvirt.h \
$(top_srcdir)/include/libvirt/libvirt-common.h.in \
$(top_srcdir)/include/libvirt/libvirt-domain-snapshot.h \
$(top_srcdir)/include/libvirt/libvirt-domain.h \
$(top_srcdir)/include/libvirt/libvirt-event.h \
$(top_srcdir)/include/libvirt/libvirt-host.h \
$(top_srcdir)/include/libvirt/libvirt-interface.h \
$(top_srcdir)/include/libvirt/libvirt-network.h \
$(top_srcdir)/include/libvirt/libvirt-nodedev.h \
$(top_srcdir)/include/libvirt/libvirt-nwfilter.h \
$(top_srcdir)/include/libvirt/libvirt-secret.h \
$(top_srcdir)/include/libvirt/libvirt-storage.h \
$(top_srcdir)/include/libvirt/libvirt-stream.h \
$(top_srcdir)/include/libvirt/libvirt-lxc.h \
$(top_srcdir)/include/libvirt/libvirt-qemu.h \
$(top_srcdir)/include/libvirt/libvirt-admin.h \
$(top_srcdir)/include/libvirt/virterror.h \
$(top_srcdir)/src/libvirt.c \
$(top_srcdir)/src/libvirt-lxc.c \
$(top_srcdir)/src/libvirt-qemu.c \
$(top_srcdir)/src/libvirt-admin.c \
$(top_srcdir)/src/util/virerror.c \
$(top_srcdir)/src/util/virevent.c \
$(top_srcdir)/src/util/virtypedparam.c
$(srcdir)/../include/libvirt/libvirt.h.in \
$(srcdir)/../include/libvirt/libvirt-lxc.h \
$(srcdir)/../include/libvirt/libvirt-qemu.h \
$(srcdir)/../include/libvirt/virterror.h \
$(srcdir)/../src/libvirt.c \
$(srcdir)/../src/libvirt-lxc.c \
$(srcdir)/../src/libvirt-qemu.c \
$(srcdir)/../src/util/virerror.c \
$(srcdir)/../src/util/virevent.c \
$(srcdir)/../src/util/virtypedparam.c
$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(APIBUILD)
touch $@
@@ -339,10 +302,9 @@ maintainer-clean-local: clean-local
todo.html.in
rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
rm -rf $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
rm -rf $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
rm -rf $(APIBUILD_STAMP)
rebuild: api qemu_api lxc_api admin_api all
rebuild: api qemu_api lxc_api all
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
@@ -363,8 +325,8 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/libvirtLogo.png $(DESTDIR)$(pkgdatadir)
uninstall-local:
for h in $(apihtml); do rm -f $(DESTDIR)$(HTML_DIR)/$$h; done
for p in $(apipng); do rm -f $(DESTDIR)$(HTML_DIR)/$$p; done
for h in $(apihtml); do rm $(DESTDIR)$(HTML_DIR)/$$h; done
for p in $(apipng); do rm $(DESTDIR)$(HTML_DIR)/$$p; done
for f in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
rm -f $(DESTDIR)$(DEVHELP_DIR)/$$(basename $$f); \
rm $(DESTDIR)$(DEVHELP_DIR)/$$(basename $$f); \
done

View File

@@ -90,7 +90,7 @@
types in its API. Each object type, in turn, has a set
of permissions defined. To determine what permissions
are checked for specific API call, consult the
<a href="html/index.html">API reference manual</a>
<a href="html/libvirt-libvirt.html">API reference manual</a>
documentation for the API in question.
</p>

View File

@@ -121,7 +121,7 @@
<td>Name of the network interface, unique to the local host</td>
</tr>
<tr>
<td>interface_macaddr</td>
<td>interface_mac</td>
<td>MAC address of the network interface, not unique</td>
</tr>
</tbody>
@@ -348,12 +348,6 @@
<code>lookup</code> method.
</p>
<p>
See
<a href="http://libvirt.org/git/?p=libvirt.git;a=tree;f=examples/polkit;hb=HEAD">source code</a>
for a more complex example.
</p>
<h3><a name="exconnect">Example: restricting ability to connect to drivers</a></h3>
<p>

View File

@@ -16,7 +16,7 @@
manipulated through the API is the <code>virConnectPtr</code>, which
represents the connection to a hypervisor. Any application using libvirt
is likely to start using the
API by calling one of <a href="html/libvirt-libvirt-host.html#virConnectOpen"
API by calling one of <a href="html/libvirt-libvirt.html#virConnectOpen"
>the virConnectOpen functions</a>. You will note that those functions take
a name argument which is actually a <a href="uri.html">connection URI</a>
to select the right hypervisor to open.
@@ -26,10 +26,7 @@
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> OnDevice the application obtains a
<a href="/html/libvirt-libvirt-host.html#virConnectPtr">
<code>virConnectPtr</code>
</a>
<p> Once the application obtains a <code class='docref'>virConnectPtr</code>
connection to the hypervisor it can then use it to manage the hypervisor's
available domains and related virtualization
resources, such as storage and networking. All those are
@@ -41,61 +38,33 @@
</p>
<p> The figure above shows the five main objects exported by the API:</p>
<ul>
<li>
<a href="html/libvirt-libvirt-host.html#virConnectPtr">
<code>virConnectPtr</code>
</a>
<li><code class='docref'>virConnectPtr</code>
<p>Represents the connection to a hypervisor. Use one of the
<a href="html/libvirt-libvirt-host.html#virConnectOpen">virConnectOpen</a>
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a>
functions to obtain connection to the hypervisor which is then used
as a parameter to other connection API's.</p></li>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainPtr">
<code>virDomainPtr</code>
</a>
<li><code class='docref'>virDomainPtr</code>
<p>Represents one domain either active or defined (i.e. existing as
permanent config file and storage but not currently running on that
node). The function
<a href="html/libvirt-libvirt-domain.html#virConnectListAllDomains">
<code>virConnectListAllDomains</code>
</a>
node). The function <code class='docref'>virConnectListAllDomains</code>
lists all the domains for the hypervisor.</p></li>
<li>
<a href="html/libvirt-libvirt-network.html#virNetworkPtr">
<code>virNetworkPtr</code>
</a>
<li><code class='docref'>virNetworkPtr</code>
<p>Represents one network either active or defined (i.e. existing
as permanent config file and storage but not currently activated).
The function
<a href="html/libvirt-libvirt-network.html#virConnectListAllNetworks">
<code>virConnectListAllNetworks</code>
</a>
The function <code class='docref'>virConnectListAllNetworks</code>
lists all the virtualization networks for the hypervisor.</p></li>
<li>
<a href="html/libvirt-libvirt-storage.html#virStorageVolPtr">
<code>virStorageVolPtr</code>
</a>
<li><code class='docref'>virStorageVolPtr</code>
<p>Represents one storage volume generally used
as a block device available to one of the domains. The function
<a href="html/libvirt-libvirt-storage.html#virStorageVolLookupByPath">
<code>virStorageVolLookupByPath</code>
</a>
finds the storage volume object based on its path on the node.</p></li>
<li>
<a href="html/libvirt-libvirt-storage.html#virStoragePoolPtr">
<code>virStoragePoolPtr</code>
</a>
<code class="docref">virStorageVolLookupByPath</code> finds
the storage volume object based on its path on the node.</p></li>
<li><code class='docref'>virStoragePoolPtr</code>
<p>Represents a storage pool, which is a logical area
used to allocate and store storage volumes. The function
<a href="html/libvirt-libvirt-storage.html#virConnectListAllStoragePools">
<code>virConnectListAllStoragePools</code>
</a>
lists all of the virtualization storage pools on the hypervisor.
The function
<a href="html/libvirt-libvirt-storage.html#virStoragePoolLookupByVolume">
<code>virStoragePoolLookupByVolume</code>
</a>
finds the storage pool containing a given storage volume.</p></li>
<code class='docref'>virConnectListAllStoragePools</code> lists
all of the virtualization storage pools on the hypervisor. The function
<code class="docref">virStoragePoolLookupByVolume</code> finds
the storage pool containing a given storage volume.</p></li>
</ul>
<p> Most objects manipulated by the library can also be represented using
XML descriptions. This is used primarily to create those object, but is
@@ -132,114 +101,42 @@
<p>Used to perform lookups on objects by some type of identifier,
such as:</p>
<ul>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByID">
<code>virDomainLookupByID</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByName">
<code>virDomainLookupByName</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByUUID">
<code>virDomainLookupByUUID</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainLookupByUUIDString">
<code>virDomainLookupByUUIDString</code>
</a>
</li>
<li><code class='docref'>virDomainLookupByID</code></li>
<li><code class='docref'>virDomainLookupByName</code></li>
<li><code class='docref'>virDomainLookupByUUID</code></li>
<li><code class='docref'>virDomainLookupByUUIDString</code></li>
</ul>
</li>
<li><b>Enumeration</b> [virConnectList..., virConnectNumOf...]
<p>Used to enumerate a set of object available to an given
hypervisor connection such as:</p>
<ul>
<li>
<a href="html/libvirt-libvirt-domain.html#virConnectListDomains">
<code>virConnectListDomains</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-domain.html#virConnectNumOfDomains">
<code>virConnectNumOfDomains</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-network.html#virConnectListNetworks">
<code>virConnectListNetworks</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-storage.html#virConnectListStoragePools">
<code>virConnectListStoragePools</code>
</a>
</li>
<li><code class='docref'>virConnectListDomains</code></li>
<li><code class='docref'>virConnectNumOfDomains</code></li>
<li><code class='docref'>virConnectListNetworks</code></li>
<li><code class='docref'>virConnectListStoragePools</code></li>
</ul>
</li>
<li><b>Description</b> [...GetInfo]
<p>Generic accessor providing a set of generic information about an
object, such as: </p>
<ul>
<li>
<a href="html/libvirt-libvirt-host.html#virNodeGetInfo">
<code>virNodeGetInfo</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainGetInfo">
<code>virDomainGetInfo</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-storage.html#virStoragePoolGetInfo">
<code>virStoragePoolGetInfo</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-storage.html#virStorageVolGetInfo">
<code>virStorageVolGetInfo</code>
</a>
</li>
<li><code class='docref'>virNodeGetInfo</code></li>
<li><code class='docref'>virDomainGetInfo</code></li>
<li><code class='docref'>virStoragePoolGetInfo</code></li>
<li><code class='docref'>virStorageVolGetInfo</code></li>
</ul>
</li>
<li><b>Accessors</b> [...Get..., ...Set...]
<p>Specific accessors used to query or modify data for the given object,
such as: </p>
<ul>
<li>
<a href="html/libvirt-libvirt-host.html#virConnectGetType">
<code>virConnectGetType</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainGetMaxMemory">
<code>virDomainGetMaxMemory</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainSetMemory">
<code>virDomainSetMemory</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainGetVcpus">
<code>virDomainGetVcpus</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-storage.html#virStoragePoolSetAutostart">
<code>virStoragePoolSetAutostart</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-network.html#virNetworkGetBridgeName">
<code>virNetworkGetBridgeName</code>
</a>
</li>
<li><code class='docref'>virConnectGetType</code></li>
<li><code class='docref'>virDomainGetMaxMemory</code></li>
<li><code class='docref'>virDomainSetMemory</code></li>
<li><code class='docref'>virDomainGetVcpus</code></li>
<li><code class='docref'>virStoragePoolSetAutostart</code></li>
<li><code class='docref'>virNetworkGetBridgeName</code></li>
</ul>
</li>
<li><b>Creation</b> [...Create, ...CreateXML]
@@ -247,46 +144,18 @@
the object based on an XML description, while the ...Create APIs will
create the object based on existing object pointer, such as: </p>
<ul>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainCreate">
<code>virDomainCreate</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainCreateXML">
<code>virDomainCreateXML</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-network.html#virNetworkCreate">
<code>virNetworkCreate</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-network.html#virNetworkCreateXML">
<code>virNetworkCreateXML</code>
</a>
</li>
<li><code class='docref'>virDomainCreate</code></li>
<li><code class='docref'>virDomainCreateXML</code></li>
<li><code class='docref'>virNetworkCreate</code></li>
<li><code class='docref'>virNetworkCreateXML</code></li>
</ul>
</li>
<li><b>Destruction</b> [...Destroy]
<p>Used to shutdown or deactivate and destroy objects, such as: </p>
<ul>
<li>
<a href="html/libvirt-libvirt-domain.html#virDomainDestroy">
<code>virDomainDestroy</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-network.html#virNetworkDestroy">
<code>virNetworkDestroy</code>
</a>
</li>
<li>
<a href="html/libvirt-libvirt-storage.html#virStoragePoolDestroy">
<code>virStoragePoolDestroy</code>
</a>
</li>
<li><code class='docref'>virDomainDestroy</code></li>
<li><code class='docref'>virNetworkDestroy</code></li>
<li><code class='docref'>virStoragePoolDestroy</code></li>
</ul>
</li>
</ul>
@@ -301,11 +170,7 @@
<p>Drivers are the basic building block for libvirt functionality
to support the capability to handle specific hypervisor driver calls.
Drivers are discovered and registered during connection processing as
part of the
<a href="html/libvirt-libvirt-host.html#virInitialize">
<code>virInitialize</code>
</a>
API. Each driver
part of the <code class='docref'>virInitialize</code> API. Each driver
has a registration API which loads up the driver specific function
references for the libvirt APIs to call. The following is a simplistic
view of the hypervisor driver mechanism. Consider the stacked list of
@@ -330,14 +195,11 @@
daemon through the <a href="remote.html">remote</a> driver via an
<a href="internals/rpc.html">RPC</a>. Some hypervisors do support
client-side connections and responses, such as Test, OpenVZ, VMware,
Power VM (phyp), VirtualBox (vbox), ESX, Hyper-V, Xen, and Virtuozzo.
Power VM (phyp), VirtualBox (vbox), ESX, Hyper-V, Xen, and Parallels.
The libvirtd daemon service is started on the host at system boot
time and can also be restarted at any time by a properly privileged
user, such as root. The libvirtd daemon uses the same libvirt API
<a href="html/libvirt-libvirt-host.html#virInitialize">
<code>virInitialize</code>
</a>
sequence as applications
<code class='docref'>virInitialize</code> sequence as applications
for client-side driver registrations, but then extends the registered
driver list to encompass all known drivers supported for all driver
types supported on the host. </p>

View File

@@ -21,29 +21,9 @@ debugsym=None
# C parser analysis code
#
included_files = {
"libvirt-domain.h": "header with general libvirt API definitions",
"libvirt-domain-snapshot.h": "header with general libvirt API definitions",
"libvirt-event.h": "header with general libvirt API definitions",
"libvirt-host.h": "header with general libvirt API definitions",
"libvirt-interface.h": "header with general libvirt API definitions",
"libvirt-network.h": "header with general libvirt API definitions",
"libvirt-nodedev.h": "header with general libvirt API definitions",
"libvirt-nwfilter.h": "header with general libvirt API definitions",
"libvirt-secret.h": "header with general libvirt API definitions",
"libvirt-storage.h": "header with general libvirt API definitions",
"libvirt-stream.h": "header with general libvirt API definitions",
"libvirt.h": "header with general libvirt API definitions",
"virterror.h": "header with error specific API definitions",
"libvirt.c": "Main interfaces for the libvirt library",
"libvirt-domain.c": "Domain interfaces for the libvirt library",
"libvirt-domain-snapshot.c": "Domain snapshot interfaces for the libvirt library",
"libvirt-host.c": "Host interfaces for the libvirt library",
"libvirt-interface.c": "Interface interfaces for the libvirt library",
"libvirt-network.c": "Network interfaces for the libvirt library",
"libvirt-nodedev.c": "Node device interfaces for the libvirt library",
"libvirt-nwfilter.c": "NWFilter interfaces for the libvirt library",
"libvirt-secret.c": "Secret interfaces for the libvirt library",
"libvirt-storage.c": "Storage interfaces for the libvirt library",
"libvirt-stream.c": "Stream interfaces for the libvirt library",
"virerror.c": "implements error handling and reporting code for libvirt",
"virevent.c": "event loop for monitoring file handles",
"virtypedparam.c": "virTypedParameters APIs",
@@ -59,11 +39,6 @@ lxc_included_files = {
"libvirt-lxc.c": "Implementations for the LXC specific APIs",
}
admin_included_files = {
"libvirt-admin.h": "header with admin specific API definitions",
"libvirt-admin.c": "Implementations for the admin specific APIs",
}
ignored_words = {
"ATTRIBUTE_UNUSED": (0, "macro keyword"),
"ATTRIBUTE_SENTINEL": (0, "macro keyword"),
@@ -90,7 +65,6 @@ ignored_functions = {
"virDomainMigratePrepareTunnel3": "private function for tunnelled migration",
"DllMain": "specific function for Win32",
"virTypedParamsValidate": "internal function in virtypedparam.c",
"virTypedParameterValidateSet": "internal function in virtypedparam.c",
"virTypedParameterAssign": "internal function in virtypedparam.c",
"virTypedParameterAssignFromStr": "internal function in virtypedparam.c",
"virTypedParameterToString": "internal function in virtypedparam.c",
@@ -102,7 +76,6 @@ ignored_functions = {
"virDomainMigratePrepare3Params": "private function for migration",
"virDomainMigrateConfirm3Params": "private function for migration",
"virDomainMigratePrepareTunnel3Params": "private function for tunnelled migration",
"virErrorCopyNew": "private",
}
ignored_macros = {
@@ -465,14 +438,6 @@ class CLexer:
if line[0] == '#':
self.tokens = map((lambda x: ('preproc', x)),
string.split(line))
# We might have whitespace between the '#' and preproc
# macro name, so instead of having a single token element
# of '#define' we might end up with '#' and 'define'. This
# merges them back together
if self.tokens[0][1] == "#":
self.tokens[0] = ('preproc', self.tokens[0][1] + self.tokens[1][1])
self.tokens = self.tokens[:1] + self.tokens[2:]
break
l = len(line)
if line[0] == '"' or line[0] == "'":
@@ -1034,12 +999,9 @@ class CParser:
name = string.split(name, '(') [0]
except:
pass
strValue = None
if len(lst) == 1 and lst[0][0] == '"' and lst[0][-1] == '"':
strValue = lst[0][1:-1]
(args, desc) = self.parseMacroComment(name, not self.is_header)
info = self.parseMacroComment(name, not self.is_header)
self.index_add(name, self.filename, not self.is_header,
"macro", (args, desc, strValue))
"macro", info)
return token
#
@@ -1365,32 +1327,32 @@ class CParser:
token = self.token()
return token
elif token[0] == "name":
self.cleanupComment()
if name is not None:
if self.comment is not None:
comment = string.strip(self.comment)
self.comment = None
self.enums.append((name, value, comment))
name = token[1]
comment = ""
token = self.token()
if token[0] == "op" and token[1][0] == "=":
value = ""
if len(token[1]) > 1:
value = token[1][1:]
self.cleanupComment()
if name is not None:
if self.comment is not None:
comment = string.strip(self.comment)
self.comment = None
self.enums.append((name, value, comment))
name = token[1]
comment = ""
token = self.token()
while token[0] != "sep" or (token[1] != ',' and
token[1] != '}'):
value = value + token[1]
if token[0] == "op" and token[1][0] == "=":
value = ""
if len(token[1]) > 1:
value = token[1][1:]
token = self.token()
while token[0] != "sep" or (token[1] != ',' and
token[1] != '}'):
value = value + token[1]
token = self.token()
else:
try:
value = "%d" % (int(value) + 1)
except:
self.warning("Failed to compute value of enum %s" % (name))
value=""
if token[0] == "sep" and token[1] == ",":
token = self.token()
else:
try:
value = "%d" % (int(value) + 1)
except:
self.warning("Failed to compute value of enum %s" % (name))
value=""
if token[0] == "sep" and token[1] == ",":
token = self.token()
else:
token = self.token()
return token
@@ -2027,8 +1989,6 @@ class docBuilder:
self.includes = includes + qemu_included_files.keys()
elif name == "libvirt-lxc":
self.includes = includes + lxc_included_files.keys()
elif name == "libvirt-admin":
self.includes = includes + admin_included_files.keys()
self.modules = {}
self.headers = {}
self.idx = index()
@@ -2155,30 +2115,24 @@ class docBuilder:
def serialize_macro(self, output, name):
id = self.idx.macros[name]
output.write(" <macro name='%s' file='%s'" % (name,
output.write(" <macro name='%s' file='%s'>\n" % (name,
self.modulename_file(id.header)))
if id.info is None:
args = []
desc = None
strValue = None
else:
(args, desc, strValue) = id.info
if strValue is not None:
output.write(" string='%s'" % strValue)
output.write(">\n")
if desc is not None and desc != "":
output.write(" <info><![CDATA[%s]]></info>\n" % (desc))
self.indexString(name, desc)
for arg in args:
(name, desc) = arg
if desc is not None and desc != "":
output.write(" <arg name='%s' info='%s'/>\n" % (
name, escape(desc)))
self.indexString(name, desc)
else:
output.write(" <arg name='%s'/>\n" % (name))
if id.info is not None:
try:
(args, desc) = id.info
if desc is not None and desc != "":
output.write(" <info><![CDATA[%s]]></info>\n" % (desc))
self.indexString(name, desc)
for arg in args:
(name, desc) = arg
if desc is not None and desc != "":
output.write(" <arg name='%s' info='%s'/>\n" % (
name, escape(desc)))
self.indexString(name, desc)
else:
output.write(" <arg name='%s'/>\n" % (name))
except:
pass
output.write(" </macro>\n")
def serialize_union(self, output, field, desc):
@@ -2568,7 +2522,7 @@ class docBuilder:
def rebuild(name):
if name not in ["libvirt", "libvirt-qemu", "libvirt-lxc", "libvirt-admin"]:
if name not in ["libvirt", "libvirt-qemu", "libvirt-lxc"]:
self.warning("rebuild() failed, unknown module %s") % name
return None
builder = None
@@ -2612,7 +2566,6 @@ if __name__ == "__main__":
rebuild("libvirt")
rebuild("libvirt-qemu")
rebuild("libvirt-lxc")
rebuild("libvirt-admin")
if warnings > 0:
sys.exit(2)
else:

View File

@@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h1>Applications using libvirt</h1>
<h1>Applications using <strong>libvirt</strong></h1>
<p>
This page provides an illustration of the wide variety of
@@ -163,21 +163,25 @@
<h2><a name="conversion">Conversion</a></h2>
<dl>
<dt><a href="http://libguestfs.org/virt-p2v.1.html">virt-p2v</a></dt>
<dt><a href="https://rwmj.wordpress.com/2009/10/13/poor-mans-p2v/">Poor mans p2v</a></dt>
<dd>
Convert a physical machine to run on KVM. It is a LiveCD
which is booted on the machine to be converted. It collects a
little information from the user, then copies the disks over
to a remote machine and defines the XML for a domain to run
the guest. (Note this tool is included with libguestfs)
A simple approach for converting a physical machine to a virtual
machine, using a rescue CD.
</dd>
<dt><a href="http://libguestfs.org/virt-v2v.1.html">virt-v2v</a></dt>
<dt><a href="http://et.redhat.com/~rjones/virt-p2v/">virt-p2v</a></dt>
<dd>
virt-v2v converts guests from a foreign hypervisor to run on
KVM, managed by libvirt. It can convert guests from VMware or
Xen to run on OpenStack, oVirt (RHEV-M), or local libvirt. It
An older tool for converting a physical machine into a virtual
machine. It is a LiveCD which is booted on the machine to be
converted. It collects a little information from the user, then
copies the disks over to a remote machine and defines the XML for a
domain to run the guest.
</dd>
<dt><a href="http://git.fedorahosted.org/git/?p=virt-v2v.git;a=summary">virt-v2v</a></dt>
<dd>
virt-v2v converts guests from a foreign hypervisor to run on KVM,
managed by libvirt. It can currently convert Red Hat Enterprise
Linux (RHEL) and Fedora guests running on Xen and VMware ESX. It
will enable VirtIO drivers in the converted guest if possible.
(Note this tool is included with libguestfs)
</dd>
<dd>
For RHEL customers of Red Hat, conversion of Windows guests is also
@@ -262,16 +266,6 @@
using a dashboard. Compute part uses libvirt to manage VM
life-cycle, monitoring and so on.
</dd>
<dt><a href="https://github.com/gustavfranssonnyvell/cherrypop">Cherrypop</a></dt>
<dd>
A cloud software with no masters or central points. Nodes
autodetect other nodes and autodistribute virtual
machines and autodivide up the workload. Also there is no
minimum limit for hosts, well, one might be nice. It's
perfect for setting up low-end servers in a cloud or a
cloud where you want the most bang for the bucks.
</dd>
</dl>
<h2><a name="libraries">Libraries</a></h2>
@@ -331,12 +325,6 @@
For a full description, please refer to the libvirt section in the
collectd.conf(5) manual page.
</dd>
<dt><a href="http://host-sflow.sourceforge.net/">Host sFlow</a></dt>
<dd>
Host sFlow is a lightweight agent running on KVM hypervisors that
links to libvirt library and exports standardized cpu, memory, network
and disk metrics for all virtual machines.
</dd>
<dt><a href="http://honk.sigxcpu.org/projects/libvirt/#munin">Munin</a></dt>
<dd>
The plugins provided by Guido G&uuml;nther allow to monitor various things
@@ -420,14 +408,6 @@
functions, such as live migration that allows for load
balancing between cluster nodes, monitoring CPU, memory.
</dd>
<dt><a href="http://mist.io/">mist.io</a></dt>
<dd>
Mist.io is an open source project and a service that can assist you in
managing your virtual machines on a unified way, providing a simple
interface for all of your infrastructure (multiple public cloud
providers, OpenStack based public/private clouds, Docker servers, bare
metal servers and now KVM hypervisors).
</dd>
</dl>
<h2><a name="mobile">Mobile applications</a></h2>
@@ -441,19 +421,5 @@
</dd>
</dl>
<h2><a name="other">Other</a></h2>
<dl>
<dt><a href="http://cuckoosandbox.org/">Cuckoo Sandbox</a></dt>
<dd>
Cuckoo Sandbox is a malware analysis system. You can throw
any suspicious file at it and in a matter of seconds Cuckoo
will provide you back some detailed results outlining what
such file did when executed inside an isolated environment.
And libvirt is one of the backends that can be used for the
isolated environment.
</dd>
</dl>
</body>
</html>

View File

@@ -44,10 +44,8 @@
</li>
<li>
<p>
<strong>Python</strong>: Libvirt's python bindings are split to a
separate <a href="http://libvirt.org/git/?p=libvirt-python.git">package</a>
since version 1.2.0, older versions came with direct support for the
Python language.
<strong>Python</strong>: Libvirt comes with direct support for
the Python language.
</p>
<p>
If your libvirt is installed as packages, rather than compiled

View File

@@ -11,7 +11,7 @@
<p>
If you think that an issue with libvirt may have security
implications, <strong>please do not</strong> publicly
implications, <strong>please do not</strong> publically
report it in the bug tracker, mailing lists, or irc. Libvirt
has <a href="securityprocess.html">a dedicated process for handling (potential) security issues</a>
that should be used instead. So if your issue has security

View File

@@ -10,7 +10,7 @@
<p>
If you think that an issue with libvirt may have security
implications, <strong>please do not</strong> publicly
implications, <strong>please do not</strong> publically
report it in the bug tracker, mailing lists, or irc. Libvirt
has <a href="securityprocess.html">a dedicated process for handling (potential) security issues</a>
that should be used instead. So if your issue has security

View File

@@ -2,41 +2,55 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h1>libvirt Application Development Guides</h1>
<h1>libvirt Application Development Guide</h1>
<ul id="toc"></ul>
<p>
The libvirt API is accessible from a number of programming languages.
At this time, there are application development guides available
which cover the C API and the Python API. Of the two, the Python guide
is currently the more comprehensive document.
The guide is both a learning tool for developing with libvirt and an
API reference document. It is a work in progress, composed by a
professional author from contributions written by members of the
libvirt team.
</p>
<p>
Contributions to the guide are <b>VERY</b> welcome. If you'd like to get
your name on this and demonstrate your virtualisation prowess, a solid
contribution to the content here will do it. :)
</p>
<h2><a name="online">Browsable online</a></h2>
<ul>
<li><a href="http://libvirt.org/docs/libvirt-appdev-guide/en-US/html/">Application Development Guide (C language) HTML</a></li>
<li><a href="http://libvirt.org/docs/libvirt-appdev-guide/en-US/pdf/">Application Development Guide (C language) PDF</a></li>
<li><a href="http://libvirt.org/docs/libvirt-appdev-guide-python/en-US/html/">Application Development Guide (Python language) HTML</a></li>
<li><a href="http://libvirt.org/docs/libvirt-appdev-guide-python/en-US/pdf/">Application Development Guide (Python language) PDF</a></li>
<li><a href="http://libvirt.org/guide/html/">
HTML format using multiple pages</a></li>
<li><a href="http://libvirt.org/guide/html-single/">
HTML format using one big page</a></li>
<li><a href="http://libvirt.org/guide/pdf/Application_Development_Guide.pdf">
PDF format</a></li>
<li><a href="http://libvirt.org/guide/libvirt-0.7.5-Application_Development_Guide-en-US.epub">
ePub format</a></li>
<li><a href="http://libvirt.org/guide/txt/Application_Development_Guide.txt">
Plain text format</a></li>
<li><a href="http://libvirt.org/guide/libvirt-Application_Development_Guide-0.7.5-web-en-US-1-9.el5.src.rpm">
Source RPM format</a></li>
</ul>
<h2>Contributing content</h2>
<h2><a name="git">GIT source repository</a></h2>
<p>
These guides are written in DocBook and published with the
publican tool, which is also used for Fedora and Red Hat
documentation. The original content is provided in GIT and
any contributions to the guide are welcome.
The source is in a git repository:
</p>
<pre>
# C language
$ git clone <a href="http://libvirt.org/git/?p=libvirt-appdev-guide.git">git://libvirt.org/libvirt-appdev-guide.git</a>
git clone git://libvirt.org/libvirt-appdev-guide.git</pre>
# Python language
$ git clone <a href="http://libvirt.org/git/?p=libvirt-appdev-guide-python.git">git://libvirt.org/libvirt-appdev-guide-python.git</a>
<p>
Browsable here:
</p>
# Publican Style/Theme
$ git clone <a href="http://libvirt.org/git/?p=libvirt-publican.git">git://libvirt.org/libvirt-publican.git</a>
</pre>
<pre>
<a href="http://libvirt.org/git/?p=libvirt-appdev-guide.git;a=summary">http://libvirt.org/git/?p=libvirt-appdev-guide.git;a=summary</a></pre>
</body>
</html>

View File

@@ -71,20 +71,6 @@
<pre>
<a href="http://libvirt.org/git/?p=libvirt.git;a=summary">http://libvirt.org/git/?p=libvirt.git;a=summary</a></pre>
<p>
In addition to this repository, there are the following read-only git
repositories which mirror the master one. Note that we currently do not
use the full set of features on these mirrors (e.g. pull requests on
GitHub, so please don't use them). All patch review and discussion only
occurs on the <a href="contact.html">libvir-list</a> mailing list. Also
note that some repositories listed below allow HTTP checkouts too.
</p>
<pre>
<a href="https://github.com/libvirt/libvirt">https://github.com/libvirt/libvirt</a>
<a href="http://repo.or.cz/w/libvirt.git">http://repo.or.cz/w/libvirt.git</a>
<a href="https://gitlab.com/libvirt/libvirt">https://gitlab.com/libvirt/libvirt</a></pre>
<br />
<h1>libvirt Application Development Guide</h1>

View File

@@ -32,7 +32,7 @@
<li><strong><a href="drvxen.html">Xen</a></strong></li>
<li><strong><a href="drvhyperv.html">Microsoft Hyper-V</a></strong></li>
<li><strong><a href="drvphyp.html">IBM PowerVM (phyp)</a></strong></li>
<li><strong><a href="drvvirtuozzo.html">Virtuozzo</a></strong></li>
<li><strong><a href="drvparallels.html">Parallels</a></strong></li>
<li><strong><a href="drvbhyve.html">Bhyve</a></strong> - The BSD Hypervisor</li>
</ul>

View File

@@ -37,7 +37,8 @@ bhyve+ssh://root@example.com/system (remote access, SSH tunnelled)
<h3>Example config</h3>
<p>
The bhyve driver in libvirt is in its early stage and under active development. So it supports
only limited number of features bhyve provides.
only limited number of features bhyve provides. All the supported features could be found
in this sample domain XML.
</p>
<p>
@@ -47,21 +48,10 @@ disk device were supported per-domain. However,
up to 31 PCI devices.
</p>
<p>
Note: the Bhyve driver in libvirt will boot whichever device is first. If you
want to install from CD, put the CD device first. If not, put the root HDD
first.
</p>
<p>
Note: Only the SATA bus is supported. Only <code>cdrom</code>- and
<code>disk</code>-type disks are supported.
</p>
<pre>
&lt;domain type='bhyve'&gt;
&lt;name&gt;bhyve&lt;/name&gt;
&lt;uuid&gt;df3be7e7-a104-11e3-aeb0-50e5492bd3dc&lt;/uuid&gt;
&lt;name&gt;bhyve&lt;/name&gt;
&lt;uuid&gt;df3be7e7-a104-11e3-aeb0-50e5492bd3dc&lt;/uuid&gt;
&lt;memory&gt;219136&lt;/memory&gt;
&lt;currentMemory&gt;219136&lt;/currentMemory&gt;
&lt;vcpu&gt;1&lt;/vcpu&gt;
@@ -86,7 +76,6 @@ Note: Only the SATA bus is supported. Only <code>cdrom</code>- and
&lt;driver name='file' type='raw'/&gt;
&lt;source file='/path/to/cdrom.iso'/&gt;
&lt;target dev='hdc' bus='sata'/&gt;
&lt;readonly/&gt;
&lt;/disk&gt;
&lt;interface type='bridge'&gt;
&lt;model type='virtio'/&gt;
@@ -96,53 +85,6 @@ Note: Only the SATA bus is supported. Only <code>cdrom</code>- and
&lt;/domain&gt;
</pre>
<p>(The &lt;disk&gt; sections may be swapped in order to install from
<em>cdrom.iso</em>.)</p>
<h3>Example config (Linux guest)</h3>
<p>
Note the addition of &lt;bootloader&gt;.
</p>
<pre>
&lt;domain type='bhyve'&gt;
&lt;name&gt;linux_guest&lt;/name&gt;
&lt;uuid&gt;df3be7e7-a104-11e3-aeb0-50e5492bd3dc&lt;/uuid&gt;
&lt;memory&gt;131072&lt;/memory&gt;
&lt;currentMemory&gt;131072&lt;/currentMemory&gt;
&lt;vcpu&gt;1&lt;/vcpu&gt;
&lt;bootloader&gt;/usr/local/sbin/grub-bhyve&lt;/bootloader&gt;
&lt;os&gt;
&lt;type&gt;hvm&lt;/type&gt;
&lt;/os&gt;
&lt;features&gt;
&lt;apic/&gt;
&lt;acpi/&gt;
&lt;/features&gt;
&lt;clock offset='utc'/&gt;
&lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;
&lt;on_reboot&gt;restart&lt;/on_reboot&gt;
&lt;on_crash&gt;destroy&lt;/on_crash&gt;
&lt;devices&gt;
&lt;disk type='file' device='disk'&gt;
&lt;driver name='file' type='raw'/&gt;
&lt;source file='/path/to/guest_hdd.img'/&gt;
&lt;target dev='hda' bus='sata'/&gt;
&lt;/disk&gt;
&lt;disk type='file' device='cdrom'&gt;
&lt;driver name='file' type='raw'/&gt;
&lt;source file='/path/to/cdrom.iso'/&gt;
&lt;target dev='hdc' bus='sata'/&gt;
&lt;readonly/&gt;
&lt;/disk&gt;
&lt;interface type='bridge'&gt;
&lt;model type='virtio'/&gt;
&lt;source bridge="virbr0"/&gt;
&lt;/interface&gt;
&lt;/devices&gt;
&lt;/domain&gt;
</pre>
<h2><a name="usage">Guest usage / management</a></h2>
@@ -177,20 +119,6 @@ to let a guest boot or start a guest using:</p>
<pre>start --console domname</pre>
<p><b>NB:</b> An bootloader configured to require user interaction will prevent
the domain from starting (and thus <code>virsh console</code> or <code>start
--console</code> from functioning) until the user interacts with it manually on
the VM host. Because users typically do not have access to the VM host,
interactive bootloaders are unsupported by libvirt. <em>However,</em> if you happen to
run into this scenario and also happen to have access to the Bhyve host
machine, you may select a boot option and allow the domain to finish starting
by using an alternative terminal client on the VM host to connect to the
domain-configured null modem device. One example (assuming
<code>/dev/nmdm0B</code> is configured as the slave end of the domain serial
device) is:</p>
<pre>cu -l /dev/nmdm0B</pre>
<h3><a name="xmltonative">Converting from domain XML to Bhyve args</a></h3>
<p>
@@ -211,71 +139,6 @@ tweak them.</p>
# virsh -c "bhyve:///system" domxml-to-native --format bhyve-argv --xml /path/to/bhyve.xml
/usr/sbin/bhyveload -m 214 -d /home/user/vm1.img vm1
/usr/sbin/bhyve -c 2 -m 214 -A -I -H -P -s 0:0,hostbridge -s 3:0,virtio-net,tap0,mac=52:54:00:5d:74:e3 -s 2:0,virtio-blk,/home/user/vm1.img -s 1,lpc -l com1,/dev/nmdm0A vm1
</pre>
<h3><a name="zfsvolume">Using ZFS volumes</a></h3>
<p>It's possible to use ZFS volumes as disk devices <span class="since">since 1.2.8</span>.
An example of domain XML device entry for that will look like:</p>
<pre>
...
&lt;disk type='volume' device='disk'&gt;
&lt;source pool='zfspool' volume='vol1'/&gt;
&lt;target dev='vdb' bus='virtio'/&gt;
&lt;/disk&gt;
...</pre>
<p>Please refer to the <a href="storage.html">Storage documentation</a> for more details on storage
management.</p>
<h3><a name="grubbhyve">Using grub2-bhyve or Alternative Bootloaders</a></h3>
<p>It's possible to boot non-FreeBSD guests by specifying an explicit
bootloader, e.g. <code>grub-bhyve(1)</code>. Arguments to the bootloader may be
specified as well. If the bootloader is <code>grub-bhyve</code> and arguments
are omitted, libvirt will try and infer boot ordering from user-supplied
&lt;boot order='N'&gt; configuration in the domain. Failing that, it will boot
the first disk in the domain (either <code>cdrom</code>- or
<code>disk</code>-type devices). If the disk type is <code>disk</code>, it will
attempt to boot from the first partition in the disk image.</p>
<pre>
...
&lt;bootloader&gt;/usr/local/sbin/grub-bhyve&lt;/bootloader&gt;
&lt;bootloader_args&gt;...&lt;/bootloader_args&gt;
...
</pre>
<p>Caveat: <code>bootloader_args</code> does not support any quoting.
Filenames, etc, must not have spaces or they will be tokenized incorrectly.</p>
<h3><a name="clockconfig">Clock configuration</a></h3>
<p>Originally bhyve supported only localtime for RTC. Support for UTC time was introduced in
<a href="http://svnweb.freebsd.org/changeset/base/284894">r284894</a> for <i>10-STABLE</i> and
in <a href="http://svnweb.freebsd.org/changeset/base/279225">r279225</a> for <i>-CURRENT</i>.
It's possible to use this in libvirt <span class="since">since 1.2.18</span>, just place the
following to domain XML:</p>
<pre>
&lt;domain type="bhyve"&gt;
...
&lt;clock offset='utc'/&gt;
...
&lt;/domain&gt;
</pre>
<p>Please note that if you run the older bhyve version that doesn't support UTC time, you'll
fail to start a domain. As UTC is used as a default when you do not specify clock settings,
you'll need to explicitly specify 'localtime' in this case:</p>
<pre>
&lt;domain type="bhyve"&gt;
...
&lt;clock offset='localtime'/&gt;
...
&lt;/domain&gt;
</pre>
</body>

View File

@@ -88,8 +88,6 @@ to be provided by all container technologies on Linux.
<dd>The fixed string <code>/bin:/usr/bin</code></dd>
<dt>TERM</dt>
<dd>The fixed string <code>linux</code></dd>
<dt>HOME</dt>
<dd>The fixed string <code>/</code></dd>
</dl>
<p>
@@ -167,7 +165,7 @@ numbered incrementally from there.
<p>
Since /dev/ttyN and /dev/console are linked to the pts devices. The
tty device of login program is pts device. The pam module securetty
tty device of login program is pts device. the pam module securetty
may prevent root user from logging in container. If you want root
user to log in container successfully, add the pts device to the file
/etc/securetty of container.
@@ -590,27 +588,6 @@ Note that allowing capabilities that are normally dropped by default can serious
affect the security of the container and the host.
</p>
<h2><a name="share">Inherit namespaces</a></h2>
<p>
Libvirt allows you to inherit the namespace from container/process just like lxc tools
or docker provides to share the network namespace. The following can be used to share
required namespaces. If we want to share only one then the other namespaces can be ignored.
The netns option is specific to sharenet. It can be used in cases we want to use existing network namespace
rather than creating new network namespace for the container. In this case privnet option will be
ignored.
</p>
<pre>
&lt;domain type='lxc' xmlns:lxc='http://libvirt.org/schemas/domain/lxc/1.0'&gt;
...
&lt;lxc:namespace&gt;
&lt;lxc:sharenet type='netns' value='red'/&gt;
&lt;lxc:shareuts type='name' value='container1'/&gt;
&lt;lxc:shareipc type='pid' value='12345'/&gt;
&lt;/lxc:namespace&gt;
&lt;/domain&gt;
</pre>
<h2><a name="usage">Container usage / management</a></h2>
<p>

View File

@@ -2,43 +2,43 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h1>Virtuozzo driver</h1>
<h1>Parallels Cloud Server driver</h1>
<ul id="toc"></ul>
<p>
The libvirt vz driver can manage Virtuozzo starting from version 6.0.
The libvirt Parallels driver can manage Parallels Cloud Server starting from version 6.0.
</p>
<h2><a name="project">Project Links</a></h2>
<ul>
<li>
The <a href="http://www.odin.com/products/virtuozzo/">Virtuozzo</a> Solution.
The <a href="http://www.parallels.com/products/server/baremetal/sp/">Parallels Cloud Server</a> Virtualization Solution.
</li>
</ul>
<h2><a name="uri">Connections to the Virtuozzo driver</a></h2>
<h2><a name="uri">Connections to the Parallels Cloud Server driver</a></h2>
<p>
The libvirt Virtuozzo driver is a single-instance privileged driver, with a driver name of 'virtuozzo'. Some example connection URIs for the libvirt driver are:
The libvirt Parallels driver is a single-instance privileged driver, with a driver name of 'parallels'. Some example connection URIs for the libvirt driver are:
</p>
<pre>
vz:///system (local access)
vz+unix:///system (local access)
vz://example.com/system (remote access, TLS/x509)
vz+tcp://example.com/system (remote access, SASl/Kerberos)
vz+ssh://root@example.com/system (remote access, SSH tunnelled)
parallels:///system (local access)
parallels+unix:///system (local access)
parallels://example.com/system (remote access, TLS/x509)
parallels+tcp://example.com/system (remote access, SASl/Kerberos)
parallels+ssh://root@example.com/system (remote access, SSH tunnelled)
</pre>
<h2><a name="example">Example guest domain XML configuration</a></h2>
<p>
Virtuozzo driver require at least one hard disk for new domains
Parallels driver require at least one hard disk for new domains
at this time. It is used for defining directory, where VM should
be created.
</p>
<pre>
&lt;domain type='vz'&gt;
&lt;domain type='parallels'&gt;
&lt;name&gt;demo&lt;/name&gt;
&lt;uuid&gt;54cdecad-4492-4e31-a209-33cc21d64057&lt;/uuid&gt;
&lt;description&gt;some description&lt;/description&gt;

View File

@@ -8,7 +8,9 @@
<p>
The libvirt KVM/QEMU driver can manage any QEMU emulator from
version 0.12.0 or later.
version 0.8.1 or later. It can also manage Xenner, which
provides the same QEMU command line syntax and monitor
interaction.
</p>
<h2><a name="project">Project Links</a></h2>
@@ -41,6 +43,12 @@
node. If both are found, then KVM fullyvirtualized, hardware accelerated
guests will be available.
</li>
<li>
<strong>Xenner hypervisor</strong>: The driver will probe <code>/usr/bin</code>
for the presence of <code>xenner</code> and <code>/dev/kvm</code> device
node. If both are found, then Xen paravirtualized guests can be run using
the KVM hardware acceleration.
</li>
</ul>
<h2><a name="uris">Connections to QEMU driver</a></h2>
@@ -639,5 +647,9 @@ $ virsh domxml-to-native qemu-argv demo.xml
&lt;/devices&gt;
&lt;/domain&gt;</pre>
<h3>Xen paravirtualized guests with hardware acceleration</h3>
</body>
</html>

View File

@@ -46,9 +46,9 @@ following fields:</p>
<li>level: the error level, usually VIR_ERR_ERROR, though there is room for
warnings like VIR_ERR_WARNING</li>
<li>message: the full human-readable formatted string of the error</li>
<li>conn: if available a pointer to the <a href="html/libvirt-libvirt-host.html#virConnectPtr">virConnectPtr</a>
<li>conn: if available a pointer to the <a href="html/libvirt-libvirt.html#virConnectPtr">virConnectPtr</a>
connection to the hypervisor where this happened</li>
<li>dom: if available a pointer to the <a href="html/libvirt-libvirt-domain.html#virDomainPtr">virDomainPtr</a> domain
<li>dom: if available a pointer to the <a href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain
targeted in the operation</li>
</ul>
<p>and then extra raw information about the error which may be initialized

BIN
docs/et.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
docs/footer_corner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
docs/footer_pattern.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

View File

@@ -162,7 +162,7 @@
&lt;suspend_mem/&gt;
&lt;suspend_disk/&gt;
&lt;suspend_hybrid/&gt;
&lt;/power_management&gt;
&lt;power_management/&gt;
&lt;/host&gt;</span>
&lt;!-- xen-3.0-x86_64 --&gt;

File diff suppressed because it is too large Load Diff

View File

@@ -16,14 +16,11 @@
then it needs to be more recent to support VFIO, while legacy KVM is
achievable just fine with older qemus.</p>
<p>The main difference between
<a href="/html/libvirt-libvirt-host.html#virConnectGetCapabilities">
<code>virConnectGetCapabilities</code>
</a>
and the emulator capabilities API is, the former one aims more on
the host capabilities (e.g. NUMA topology, security models in
effect, etc.) while the latter one specializes on the hypervisor
capabilities.</p>
<p>The main difference between <code
class="docref">virConnectGetCapabilities</code> and the emulator
capabilities API is, the former one aims more on the host capabilities
(e.g. NUMA topology, security models in effect, etc.) while the latter one
specializes on the hypervisor capabilities.</p>
<p>While the <a href="formatcaps.html">Driver Capabilities</a> provides the
host capabilities (e.g NUMA topology, security models in effect, etc.), the
@@ -44,7 +41,7 @@
1.2.7</span>):</p>
<pre>
<a href="/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities">virConnectGetDomainCapabilities</a>
<code class="docref">virConnectGetDomainCapabilities</code>
</pre>
<p>The root element that emulator capability XML document starts with has
@@ -96,52 +93,6 @@
<dd>The maximum number of supported virtual CPUs</dd>
</dl>
<h3><a name="elementsOSBIOS">BIOS bootloader</a></h3>
<p>Sometimes users might want to tweak some BIOS knobs or use
UEFI. For cases like that, <a
href="formatdomain.html#elementsOSBIOS"><code>os</code></a>
element exposes what values can be passed to its children.</p>
<pre>
&lt;domainCapabilities&gt;
...
&lt;os supported='yes'&gt;
&lt;loader supported='yes'&gt;
&lt;value&gt;/usr/share/OVMF/OVMF_CODE.fd&lt;/value&gt;
&lt;enum name='type'&gt;
&lt;value&gt;rom&lt;/value&gt;
&lt;value&gt;pflash&lt;/value&gt;
&lt;/enum&gt;
&lt;enum name='readonly'&gt;
&lt;value&gt;yes&lt;/value&gt;
&lt;value&gt;no&lt;/value&gt;
&lt;/enum&gt;
&lt;/loader&gt;
&lt;/os&gt;
...
&lt;domainCapabilities&gt;
</pre>
<p>For the <code>loader</code> element, the following can occur:</p>
<dl>
<dt>value</dt>
<dd>List of known loader paths. Currently this is only used
to advertise known locations of OVMF binaries for qemu. Binaries
will only be listed if they actually exist on disk.</dd>
<dt>type</dt>
<dd>Whether loader is a typical BIOS (<code>rom</code>) or
an UEFI binary (<code>pflash</code>). This refers to
<code>type</code> attribute of the &lt;loader/&gt;
element.</dd>
<dt>readonly</dt>
<dd>Options for the <code>readonly</code> attribute of the
&lt;loader/&gt; element.</dd>
</dl>
<h3><a name="elementsDevices">Devices</a></h3>
<p>

View File

@@ -35,7 +35,7 @@
</p>
<pre>
&lt;network ipv6='yes' trustGuestRxFilters='no'&gt;
&lt;network ipv6='yes'&gt;
&lt;name&gt;default&lt;/name&gt;
&lt;uuid&gt;3e3fce45-4f53-4fa7-bb32-11f34168b82b&lt;/uuid&gt;
...</pre>
@@ -60,16 +60,6 @@
to have guest-to-guest communications. For further information,
see the example below for the example with no gateway addresses.
<span class="since">Since 1.0.1</span></dd>
<dt><code>trustGuestRxFilters='yes'</code></dt>
<dd>The optional parameter <code>trustGuestRxFilters</code> can
be used to set that attribute of the same name for each domain
interface connected to this network (<span class="since">since
1.2.10</span>). See
the <a href="formatdomain.html#elementSNICS">Network
interfaces</a> section of the domain XML documentation for
more details. Note that an explicit setting of this attribute
in a portgroup or the individual domain interface will
override the setting in the network.</dd>
</dl>
<h3><a name="elementsConnect">Connectivity</a></h3>
@@ -81,8 +71,8 @@
<pre>
...
&lt;bridge name="virbr0" stp="on" delay="5" macTableManager="libvirt"/&gt;
&lt;domain name="example.com" localOnly="no"/&gt;
&lt;bridge name="virbr0" stp="on" delay="5"/&gt;
&lt;domain name="example.com"/&gt;
&lt;forward mode="nat" dev="eth0"/&gt;
...</pre>
@@ -92,56 +82,18 @@
defines the name of a bridge device which will be used to construct
the virtual network. The virtual machines will be connected to this
bridge device allowing them to talk to each other. The bridge device
may also be connected to the LAN. When defining
may also be connected to the LAN. It is recommended that bridge
device names started with the prefix <code>vir</code>, but the name
<code>virbr0</code> is reserved for the "default" virtual
network. This element should always be provided when defining
a new network with a <code>&lt;forward&gt;</code> mode of
"nat" or "route" (or an isolated network with
no <code>&lt;forward&gt;</code> element), libvirt will
automatically generate a unique name for the bridge device if
none is given, and this name will be permanently stored in the
network configuration so that that the same name will be used
every time the network is started. For these types of networks
(nat, routed, and isolated), a bridge name beginning with the
prefix "virbr" is recommended (and that is what is
auto-generated), but not enforced.
no <code>&lt;forward&gt;</code> element).
Attribute <code>stp</code> specifies if Spanning Tree Protocol
is 'on' or 'off' (default is
'on'). Attribute <code>delay</code> sets the bridge's forward
delay value in seconds (default is 0).
<span class="since">Since 0.3.0</span>
<p>
The <code>macTableManager</code> attribute of the bridge
element is used to tell libvirt how the bridge's MAC address
table (used to determine the correct egress port for packets
based on destination MAC address) will be managed. In the
default <code>kernel</code> setting, the kernel
automatically adds and removes entries, typically using
learning, flooding, and promiscuous mode on the bridge's
ports in order to determine the proper egress port for
packets. When <code>macTableManager</code> is set
to <code>libvirt</code>, libvirt disables kernel management
of the MAC table (in the case of the Linux host bridge, this
means enabling vlan_filtering on the bridge, and disabling
learning and unicast_filter for all bridge ports), and
explicitly adds/removes entries to the table according to
the MAC addresses in the domain interface configurations.
Allowing libvirt to manage the MAC table can improve
performance - with a Linux host bridge, for example, turning
off learning and unicast_flood on ports has its own
performance advantage, and can also lead to an additional
boost by permitting the kernel to automatically turn off
promiscuous mode on some ports of the bridge (in particular,
the port attaching the bridge to the physical
network). However, it can also cause some networking setups
to stop working (e.g. vlan tagging, multicast,
guest-initiated changes to MAC address) and is not supported
by older kernels.
<span class="since">Since 1.2.11, requires kernel 3.17 or
newer</span>
</p>
</dd>
<dt><code>domain</code></dt>
<dd>
@@ -151,16 +103,6 @@
a <code>&lt;forward&gt;</code> mode of "nat" or "route" (or an
isolated network with no <code>&lt;forward&gt;</code>
element). <span class="since">Since 0.4.5</span>
<p>
If the optional <code>localOnly</code> attribute on the
<code>domain</code> element is "yes", then DNS requests under
this domain will only be resolved by the virtual network's own
DNS server - they will not be forwarded to the host's upstream
DNS server. If <code>localOnly</code> is "no", and by
default, unresolved requests <b>will</b> be forwarded.
<span class="since">Since 1.2.12</span>
</p>
</dd>
<dt><code>forward</code></dt>
<dd>Inclusion of the <code>forward</code> element indicates that
@@ -200,8 +142,6 @@
<p><span class="since">Since 1.0.3</span> it is possible to
specify a public IPv4 address and port range to be used for
the NAT by using the <code>&lt;nat&gt;</code> subelement.
Note that all addresses from the range are used, not just those
that are in use on the host.
The address range is set with the <code>&lt;address&gt;</code>
subelements and <code>start</code> and <code>stop</code>
attributes:
@@ -338,7 +278,7 @@
(Single Root I/O Virtualization) virtual function (VF)
devices can be assigned in this manner; to assign a
standard single-port PCI or PCIe ethernet card to a guest,
use the traditional <code>&lt;hostdev&gt;</code> device
use the traditional <code>&lt; hostdev&gt;</code> device
definition. <span class="since"> Since 0.10.0</span>
<p>
@@ -362,9 +302,9 @@
<p>Note that this "intelligent passthrough" of network
devices is very similar to the functionality of a
standard <code>&lt;hostdev&gt;</code> device, the
standard <code>&lt; hostdev&gt;</code> device, the
difference being that this method allows specifying a MAC
address, vlan tag, and <code>&lt;virtualport&gt;</code>
address, vlan tag, and <code>&lt;virtualport &gt;</code>
for the passed-through device. If these capabilities are
not required, if you have a standard single-port PCI,
PCIe, or USB network card that doesn't support SR-IOV (and
@@ -433,9 +373,9 @@
<span class="since">since 0.10.0</span> When using forward
mode 'hostdev', the interface pool is specified with a list
of <code>&lt;address&gt;</code> elements, each of which has
<code>&lt;type&gt;</code> (must always be <code>'pci'</code>),
<code>&lt; type&gt;</code> (must always be <code>'pci'</code>,
<code>&lt;domain&gt;</code>, <code>&lt;bus&gt;</code>,
<code>&lt;slot&gt;</code>and <code>&lt;function&gt;</code>
<code>&lt;slot&gt;</code>, and <code>&lt;function&gt;</code>
attributes.
</p>
<pre>
@@ -666,7 +606,7 @@
&lt;outbound average='1000' peak='5000' burst='5120'/&gt;
&lt;/bandwidth&gt;
&lt;/portgroup&gt;</b>
<b>&lt;portgroup name='sales' trustGuestRxFilters='no'&gt;
<b>&lt;portgroup name='sales'&gt;
&lt;virtualport type='802.1Qbh'&gt;
&lt;parameters profileid='salestest'/&gt;
&lt;/virtualport&gt;
@@ -686,7 +626,7 @@
network can have multiple portgroup elements (and one of those
can optionally be designated as the 'default' portgroup for the
network), and each portgroup has a name, as well as various
attributes and subelements associated with it. The currently supported
subelements associated with it. The currently supported
subelements are <code>&lt;bandwidth&gt;</code>
(described <a href="formatnetwork.html#elementQoS">here</a>)
and <code>&lt;virtualport&gt;</code>
@@ -710,19 +650,6 @@
considered an error, and will prevent the interface from
starting.
</p>
<p>
portgroups also support the optional
parameter <code>trustGuestRxFilters</code> which can be used to
set that attribute of the same name for each domain interface
using this portgroup (<span class="since">since
1.2.10</span>). See
the <a href="formatdomain.html#elementSNICS">Network
interfaces</a> section of the domain XML documentation for more
details. Note that an explicit setting of this attribute in the
portgroup overrides the network-wide setting, and an explicit
setting in the individual domain interface will override the
setting in the portgroup.
</p>
<h5><a name="elementsStaticroute">Static Routes</a></h5>
<p>

View File

@@ -97,38 +97,18 @@
<dd>
This optional element can occur multiple times. If it
exists, it has a mandatory <code>type</code> attribute
which will be set to:
<dl>
<dt><code>physical_function</code></dt>
<dd>
That means there will be a single <code>address</code>
subelement which contains the PCI address of the SRIOV
Physical Function (PF) that is the parent of this device
(and this device is, by implication, an SRIOV Virtual
Function (VF)).
</dd>
<dt><code>virtual_function</code></dt>
<dd>
In this case this device is an SRIOV PF, and the capability
element will have a list of <code>address</code>
subelements, one for each VF on this PF. If the host system
supports reporting it (via the "sriov_maxvfs" file in the
device's sysfs directory) the capability element will also
have an attribute named <code>maxCount</code> which is the
maximum number of SRIOV VFs supported by this device, which
could be higher than the number of VFs that are curently
active <span class="since">since 1.3.0</span>; in this case,
even if there are currently no active VFs the
virtual_functions capabililty will still be shown.
</dd>
<dt><code>pci-bridge</code> or <code>cardbus-bridge</code></dt>
<dd>
This shows merely that the lower 7 bits of PCI header type
have either value of 1 or 2 respectively. Usually this
means such device cannot be used for PCI passthrough.
<span class="since">Since 1.3.3</span>
</dd>
</dl>
which will be set to
either <code>physical_function</code>
or <code>virtual_functions</code>. If the type
is <code>physical_function</code>, there will be a
single <code>address</code> subelement which contains
the PCI address of the SRIOV Physical Function (PF)
that is the parent of this device (and this device is,
by implication, an SRIOV Virtual Function (VF)). If
the type is <code>virtual_functions</code>, then this
device is an SRIOV PF, and the capability element will
have a list of <code>address</code> subelements, one
for each VF on this PF.
</dd>
<dt><code>numa</code></dt>
<dd>
@@ -142,7 +122,7 @@
This optional element contains information on PCI Express part of
the device. For example, it can contain a child element
<code>link</code> which addresses the PCI Express device's link.
While a device has its own capabilities
While a device has it's own capabilities
(<code>validity='cap'</code>), the actual run time capabilities
are negotiated on the device initialization
(<code>validity='sta'</code>). The <code>link</code> element then
@@ -203,26 +183,6 @@
link. So far, the whole element is just for output,
not setting.
</dd>
<dt><code>feature</code></dt>
<dd>If present, the hw offloads supported by this network
interface. Possible features are:
<dl>
<dt><code>rx</code></dt><dd>rx-checksumming</dd>
<dt><code>tx</code></dt><dd>tx-checksumming</dd>
<dt><code>sg</code></dt><dd>scatter-gather</dd>
<dt><code>tso</code></dt><dd>tcp-segmentation-offload</dd>
<dt><code>ufo</code></dt><dd>udp-fragmentation-offload</dd>
<dt><code>gso</code></dt><dd>generic-segmentation-offload</dd>
<dt><code>gro</code></dt><dd>generic-receive-offload</dd>
<dt><code>lro</code></dt><dd>large-receive-offload</dd>
<dt><code>rxvlan</code></dt><dd>rx-vlan-offload</dd>
<dt><code>txvlan</code></dt><dd>tx-vlan-offload</dd>
<dt><code>ntuple</code></dt><dd>ntuple-filters</dd>
<dt><code>rxhash</code></dt><dd>receive-hashing</dd>
<dt><code>rdma</code></dt><dd>remote-direct-memory-access</dd>
<dt><code>txudptnl</code></dt><dd>tx-udp-tunnel-segmentation</dd>
</dl>
</dd>
<dt><code>capability</code></dt>
<dd>A network protocol exposed by the device, where the
attribute <code>type</code> can be "80203" for IEEE

View File

@@ -1196,26 +1196,6 @@
<td>UINT16</td>
<td>End of range of valid destination ports; requires <code>protocol</code></td>
</tr>
<tr>
<td>type<span class="since">(Since 1.2.12)</span></td>
<td>UINT8</td>
<td>ICMPv6 type; requires <code>protocol</code> to be set to <code>icmpv6</code></td>
</tr>
<tr>
<td>typeend<span class="since">(Since 1.2.12)</span></td>
<td>UINT8</td>
<td>ICMPv6 type end of range; requires <code>protocol</code> to be set to <code>icmpv6</code></td>
</tr>
<tr>
<td>code<span class="since">(Since 1.2.12)</span></td>
<td>UINT8</td>
<td>ICMPv6 code; requires <code>protocol</code> to be set to <code>icmpv6</code></td>
</tr>
<tr>
<td>code<span class="since">(Since 1.2.12)</span></td>
<td>UINT8</td>
<td>ICMPv6 code end of range; requires <code>protocol</code> to be set to <code>icmpv6</code></td>
</tr>
<tr>
<td>comment <span class="since">(Since 0.8.5)</span></td>
<td>STRING</td>

View File

@@ -156,31 +156,22 @@
require that if specified, the snapshot mode must not
override any snapshot mode attached to the corresponding
domain disk, while others like qemu allow this field to
override the domain default.
<dl>
<dt><code>source</code></dt>
<dd>If the snapshot mode is external (whether specified
or inherited), then there is an optional sub-element
<code>source</code>, with an attribute <code>file</code>
giving the name of the new file.
If <code>source</code> is not
given and the disk is backed by a local image file (not
a block device or remote storage), a file name is
generated that consists of the existing file name
with anything after the trailing dot replaced by the
snapshot name. Remember that with external
snapshots, the original file name becomes the read-only
snapshot, and the new file name contains the read-write
delta of all disk changes since the snapshot.
</dd>
<dt><code>driver</code></dt>
<dd>An optional sub-element <code>driver</code>,
with an attribute <code>type</code> giving the driver type (such
as qcow2), of the new file created by the external
snapshot of the new file.
</dd>
</dl>
override the domain default. If the snapshot mode is
external (whether specified or inherited), then there is
an optional sub-element <code>source</code>, with an
attribute <code>file</code> giving the name, and an
optional sub-element <code>driver</code>, with an
attribute <code>type</code> giving the driver type (such
as qcow2), of the new file created by the external
snapshot of the new file. If <code>source</code> is not
given and the disk is backed by a local image file (not
a block device or remote storage), a file name is
generated that consists of the existing file name
with anything after the trailing dot replaced by the
snapshot name. Remember that with external
snapshots, the original file name becomes the read-only
snapshot, and the new file name contains the read-write
delta of all disk changes since the snapshot.
<span class="since">Since 1.2.2</span> the <code>disk</code> element
supports an optional attribute <code>type</code> if the

View File

@@ -23,9 +23,8 @@
(<span class="since">since 0.7.1</span>), <code>rbd</code>
(<span class="since">since 0.9.13</span>), <code>sheepdog</code>
(<span class="since">since 0.10.0</span>),
<code>gluster</code> (<span class="since">since
1.2.0</span>) or <code>zfs</code> (<span class="since">since
1.2.8</span>). This corresponds to the
or <code>gluster</code> (<span class="since">since
1.2.0</span>). This corresponds to the
storage backend drivers listed further along in this document.
</p>
<h3><a name="StoragePoolFirst">General metadata</a></h3>
@@ -78,23 +77,15 @@
...
&lt;source&gt;
&lt;host name="iscsi.example.com"/&gt;
&lt;device path="iqn.2013-06.com.example:iscsi-pool"/&gt;
&lt;device path="demo-target"/&gt;
&lt;auth type='chap' username='myname'&gt;
&lt;secret usage='mycluster_myname'/&gt;
&lt;secret type='iscsi' usage='mycluster_myname'/&gt;
&lt;/auth&gt;
&lt;vendor name="Acme"/&gt;
&lt;product name="model"/&gt;
&lt;/source&gt;
...</pre>
<pre>
...
&lt;source&gt;
&lt;device path='/dev/mapper/mpatha' part_separator='no'/&gt;
&lt;format type='gpt'/&gt;
&lt;/source&gt;
...</pre>
<pre>
...
&lt;source&gt;
@@ -124,40 +115,17 @@
<dt><code>device</code></dt>
<dd>Provides the source for pools backed by physical devices
(pool types <code>fs</code>, <code>logical</code>, <code>disk</code>,
<code>iscsi</code>, <code>zfs</code>).
<code>iscsi</code>).
May be repeated multiple times depending on backend driver. Contains
a required attribute <code>path</code> which is either the fully
qualified path to the block device node or for <code>iscsi</code>
the iSCSI Qualified Name (IQN).
<span class="since">Since 0.4.1</span>
<p>An optional attribute <code>part_separator</code> for each
<code>path</code> may be supplied. Valid values for the attribute
may be either "yes" or "no". This attribute is to be used for a
<code>disk</code> pool type using a <code>path</code> to a
device mapper multipath device configured to utilize either
'user_friendly_names' or a custom 'alias' name in the
/etc/multipath.conf. The attribute directs libvirt to not
generate device volume names with the partition character "p".
By default, when libvirt generates the partition names for
device mapper multipath devices it will add a "p" path separator
to the device name before adding the partition number. For example,
a <code>device path</code> of '/dev/mapper/mpatha' libvirt would
generate partition names of '/dev/mapper/mpathap1',
'/dev/mapper/mpathap2', etc. for each partition found. With
this attribute set to "no", libvirt will not append the "p" to
the name unless it ends with a number thus generating names
of '/dev/mapper/mpatha1', '/dev/mapper/mpatha2', etc.
<span class="since">Since 1.3.1</span></p></dd>
a single attribute <code>path</code> which is the fully qualified
path to the block device node. <span class="since">Since 0.4.1</span></dd>
<dt><code>dir</code></dt>
<dd>Provides the source for pools backed by directories (pool
types <code>dir</code>, <code>netfs</code>, <code>gluster</code>),
or optionally to select a subdirectory
type <code>dir</code>), or optionally to select a subdirectory
within a pool that resembles a filesystem (pool
type <code>gluster</code>). May
only occur once. Contains a single attribute <code>path</code>
which is the fully qualified path to the backing directory or
for a <code>netfs</code> pool type using <code>format</code>
type "cifs", the path to the Samba share without the leading slash.
which is the fully qualified path to the backing directory.
<span class="since">Since 0.4.1</span></dd>
<dt><code>adapter</code></dt>
<dd>Provides the source for pools backed by SCSI adapters (pool
@@ -188,41 +156,16 @@
compatibility, this attribute is optional <b>only</b> for the
"scsi_host" adapter, but is mandatory for the "fc_host" adapter.
<span class="since">Since 1.0.5</span>
A "fc_host" capable scsi_hostN can be determined by using
<code>virsh nodedev-list --cap fc_host</code>.
<span class="since">Since 1.2.8</span>
<p>
Note: Regardless of whether a "scsi_host" adapter type is defined
using a <code>name</code> or a <code>parentaddr</code>, it
should refer to a real scsi_host adapter as found through a
<code>virsh nodedev-list scsi_host</code> and <code>virsh
nodedev-dumpxml scsi_hostN</code> on one of the scsi_host's
displayed. It should not refer to a "fc_host" capable scsi_hostN
nor should it refer to the vHBA created for some "fc_host"
adapter. For a vHBA the <code>nodedev-dumpxml</code>
output parent setting will be the "fc_host" capable scsi_hostN
value. Additionally, do not refer to an iSCSI scsi_hostN for the
"scsi_host" source. An iSCSI scsi_hostN's
<code>nodedev-dumpxml</code> output parent field is generally
"computer". This is a libvirt created parent value indicating
no parent was defined for the node device.
</p>
</dd>
</dl>
<dl>
<dt><code>wwnn</code> and <code>wwpn</code></dt>
<dt><code>wwwn</code> and <code>wwpn</code></dt>
<dd>The "World Wide Node Name" (<code>wwnn</code>) and "World Wide
Port Name" (<code>wwpn</code>) are used by the "fc_host" adapter
to uniquely identify the device in the Fibre Channel storage fabric
(the device can be either a HBA or vHBA). Both wwnn and wwpn should
be specified. Use the command 'virsh nodedev-dumpxml' to determine
how to set the values for the wwnn/wwpn of a (v)HBA. The wwnn and
wwpn have very specific numerical format requirements based on the
hypervisor being used, thus care should be taken if you decide to
generate your own to follow the standards; otherwise, the pool
will fail to start with an opaque error message indicating failure
to write to the vport_create file during vport create/delete due
to "No such file or directory".
how to set the values for the wwnn/wwpn of a (v)HBA.
<span class="since">Since 1.0.4</span>
</dd>
</dl>
@@ -232,32 +175,9 @@
parent scsi_host device defined in the
<a href="formatnode.html">Node Device</a> database as the
<a href="http://wiki.libvirt.org/page/NPIV_in_libvirt">NPIV</a>
virtual Host Bus Adapter (vHBA). The value provided must be
a vport capable scsi_host. The value is not the scsi_host of
the vHBA created by 'virsh nodedev-create', rather it is
the parent of that vHBA. If the value is not provided, libvirt
will determine the parent based either finding the wwnn,wwpn
defined for an existing scsi_host or by creating a vHBA. Providing
the parent attribute is also useful for the duplicate pool
definition checks. This is more important in environments where
both the "fc_host" and "scsi_host" source adapter pools are being
used in order to ensure a new definition doesn't duplicate using
the scsi_hostN of some existing storage pool.
virtual Host Bus Adapter (vHBA).
<span class="since">Since 1.0.4</span>
</dd>
<dt><code>managed</code></dt>
<dd>An optional attribute to instruct the SCSI storage backend to
manage destroying the vHBA when the pool is destroyed. For
configurations that do not provide an already created vHBA
from a 'virsh nodedev-create', libvirt will set this property
to "yes". For configurations that have already created a vHBA
via 'virsh nodedev-create' and are using the wwnn/wwpn from
that vHBA and optionally the scsi_host parent, setting this
attribute to "yes" will allow libvirt to destroy the node device
when the pool is destroyed. If this attribute is set to "no" or
not defined in the XML, then libvirt will not destroy the vHBA.
<span class="since">Since 1.2.11</span>
</dd>
</dl>
<dl>
<dt><code>parentaddr</code></dt>
@@ -323,15 +243,7 @@
or <code>device</code> element. Contains an attribute <code>name</code>
which is the hostname or IP address of the server. May optionally
contain a <code>port</code> attribute for the protocol specific
port number. Duplicate storage pool definition checks may perform
a cursory check that the same host name by string comparison in the
new pool does not match an existing pool's source host name when
combined with the <code>directory</code> or <code>device</code>
element. Name resolution of the provided hostname or IP address
is left to the storage driver backend interactions with the remote
server. See the <a href="storage.html">storage driver page</a> for
any restrictions for specific storage backends.
<span class="since">Since 0.4.1</span></dd>
port number. <span class="since">Since 0.4.1</span></dd>
<dt><code>auth</code></dt>
<dd>If present, the <code>auth</code> element provides the
authentication credentials needed to access the source by the
@@ -418,36 +330,26 @@
<dl>
<dt><code>path</code></dt>
<dd>Provides the location at which the pool will be mapped into
the local filesystem namespace, as an absolute path. For a
filesystem/directory based pool it will be a fully qualified name of
the directory in which volumes will be created. For device based pools
it will be a fully qualified name of the directory in which
the local filesystem namespace. For a filesystem/directory based
pool it will be the name of the directory in which volumes will
be created. For device based pools it will be the name of the directory in which
devices nodes exist. For the latter <code>/dev/</code> may seem
like the logical choice, however, devices nodes there are not
guaranteed stable across reboots, since they are allocated on
demand. It is preferable to use a stable location such as one
of the <code>/dev/disk/by-{path|id|uuid|label}</code> locations.
For a Multipath pool (type <code>mpath</code>), the provided
value is ignored and the default value of "/dev/mapper" is used.
of the <code>/dev/disk/by-{path,id,uuid,label</code> locations.
<span class="since">Since 0.4.1</span>
</dd>
<dt><code>permissions</code></dt>
<dd>This is currently only useful for directory or filesystem based
pools, which are mapped as a directory into the local filesystem
namespace. It provides information about the permissions to use for the
final directory when the pool is built. There are 4 child elements.
The <code>mode</code> element contains the octal permission set.
The <code>mode</code> defaults to 0755 when not provided.
The <code>owner</code> element contains the numeric user ID.
The <code>group</code> element contains the numeric group ID.
If <code>owner</code> or <code>group</code> aren't specified when
creating a directory, the values are inherited from the parent
directory. The <code>label</code> element contains the MAC (eg SELinux)
label string.
final directory when the pool is built. The
<code>mode</code> element contains the octal permission set. The
<code>owner</code> element contains the numeric user ID. The <code>group</code>
element contains the numeric group ID. The <code>label</code> element
contains the MAC (eg SELinux) label string.
<span class="since">Since 0.4.1</span>
For running directory or filesystem based pools, these fields
will be filled with the values used by the existing directory.
<span class="since">Since 1.2.16</span>
</dd>
<dt><code>timestamps</code></dt>
<dd>Provides timing information about the volume. Up to four
@@ -512,13 +414,7 @@
<dl>
<dt><code>name</code></dt>
<dd>Providing a name for the volume which is unique to the pool.
This is mandatory when defining a volume. For a disk pool, the
name must be combination of the <code>source</code> device path
device and next partition number to be created. For example, if
the <code>source</code> device path is /dev/sdb and there are no
partitions on the disk, then the name must be sdb1 with the next
name being sdb2 and so on.
<span class="since">Since 0.4.1</span></dd>
This is mandatory when defining a volume. <span class="since">Since 0.4.1</span></dd>
<dt><code>key</code></dt>
<dd>Providing an identifier for the volume which identifies a
single volume. In some cases it's possible to have two distinct keys
@@ -608,9 +504,7 @@
<span class="since">Since 0.4.1</span></dd>
<dt><code>format</code></dt>
<dd>Provides information about the pool specific volume format.
For disk pools it will provide the partition table format type, but is
not preserved after a pool refresh or libvirtd restart. Use extended
in order to create an extended disk extent partition. For filesystem
For disk pools it will provide the partition type. For filesystem
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
@@ -621,21 +515,15 @@
volume format type value and the default pool format will be used.
<span class="since">Since 0.4.1</span></dd>
<dt><code>permissions</code></dt>
<dd>Provides information about the permissions to use
<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
scripts determine permissions. There are 4 child elements.
The <code>mode</code> element contains the octal permission set.
The <code>mode</code> defaults to 0600 when not provided.
The <code>owner</code> element contains the numeric user ID.
The <code>group</code> element contains the numeric group ID.
If <code>owner</code> or <code>group</code> aren't specified when
creating a supported volume, the values are inherited from the parent
directory. The <code>label</code> element contains the MAC (eg SELinux)
label string.
For existing directory or filesystem based volumes, these fields
will be filled with the values used by the existing file.
scripts determine permissions. It contains 4 child elements. The
<code>mode</code> element contains the octal permission set. The
<code>owner</code> element contains the numeric user ID. The <code>group</code>
element contains the numeric group ID. The <code>label</code> element
contains the MAC (eg SELinux) label string.
<span class="since">Since 0.4.1</span>
</dd>
<dt><code>compat</code></dt>
@@ -643,9 +531,8 @@
<code>type='qcow2'</code> volumes. Valid values are <code>0.10</code>
and <code>1.1</code> so far, specifying QEMU version the images should
be compatible with. If the <code>feature</code> element is present,
1.1 is used.
<span class="since">Since 1.1.0</span> If omitted, 0.10 is used.
<span class="since">Since 1.1.2</span>
1.1 is used. If omitted, qemu-img default is used.
<span class="since">Since 1.1.0</span>
</dd>
<dt><code>nocow</code></dt>
<dd>Turn off COW of the newly created volume. So far, this is only valid
@@ -703,8 +590,11 @@
<span class="since">Since 0.6.0</span></dd>
<dt><code>permissions</code></dt>
<dd>Provides information about the permissions of the backing file.
See volume <code>permissions</code> documentation for explanation
of individual fields.
It contains 4 child elements. The
<code>mode</code> element contains the octal permission set. The
<code>owner</code> element contains the numeric user ID. The <code>group</code>
element contains the numeric group ID. The <code>label</code> element
contains the MAC (eg SELinux) label string.
<span class="since">Since 0.6.0</span>
</dd>
</dl>

View File

@@ -35,7 +35,7 @@
</p>
<h3><a name="StorageEncryptionDefault">"default" format</a></h3>
<p>
<code>&lt;encryption format="default"/&gt;</code> can be specified only
<code>&lt;encryption type="default"/&gt;</code> can be specified only
when creating a volume. If the volume is successfully created, the
encryption formats, parameters and secrets will be auto-generated by
libvirt and the attached <code>encryption</code> tag will be updated.

View File

@@ -2,32 +2,65 @@ body {
margin: 0em;
padding: 0px;
color: rgb(0,0,0);
font-family: sans-serif;
font-size: 90%;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: smaller;
background: #ffffff;
}
p, ul, ol, dl {
padding: 0px;
margin: 0px;
}
ol,ul {
margin-left: 3em;
}
ol,ul,dl,p {
margin-top: 1em;
margin-bottom: 1em;
}
p:first-line {
margin-right: 1em;
}
div.body p:first-letter {
font-size: 1.2em;
font-weight: bold;
}
p, ul, ol, dl {
padding: 0px;
h1,h2,h3,h4,h5,h6 {
font-weight: bold;
margin: 0px;
line-height: 150%;
padding: 0px;
margin-top: 0.5em;
}
p {
div.footer {
margin-top: 1em;
margin-bottom: 1em;
}
ul, ol {
margin-left: 2em;
h1 {
font-size: 2em;
}
h2 {
font-size: 1.6em;
}
h3 {
font-size: 1.4em;
}
h4 {
font-size: 1.2em;
}
h5 {
font-size: 1em;
}
h6 {
font-size: 0.8em;
}
dt {
dl dt {
margin-left: 1em;
margin-right: 2em;
}
@@ -37,41 +70,3 @@ dl dd {
margin-right: 2em;
margin-bottom: 0.5em;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
margin: 0px;
padding: 0px;
margin-bottom: 0.25em;
border-bottom: 1px solid #aaa;
}
h1 {
margin-top: 0em;
font-size: 1.6em;
}
h2 {
margin-top: 1.0em;
font-size: 1.4em;
}
h3 {
margin-top: 1.0em;
font-size: 1.2em;
}
h4 {
margin-top: 1.0em;
font-size: 1.1em;
}
h5 {
margin-top: 0.75em;
font-size: 1em;
}
h6 {
margin-top: 0.75em;
font-size: 0.8em;
}

View File

@@ -11,18 +11,6 @@
<li>Discuss any large changes on the mailing list first. Post patches
early and listen to feedback.</li>
<li>Official upstream repository is kept in git
(<code>git://libvirt.org/libvirt.git</code>) and is browsable
along with other libvirt-related repositories
(e.g. libvirt-python) <a href="http://libvirt.org/git/">online</a>.</li>
<li>Patches to translations are maintained via
the <a href="https://fedora.zanata.org/">zanata project</a>.
If you want to fix a translation in a .po file, join the
appropriate language team. The libvirt release process
automatically pulls the latest version of each translation
file from zanata.</li>
<li><p>Post patches in unified diff format, with git rename
detection enabled. You need a one-time setup of:</p>
<pre>
@@ -72,7 +60,7 @@
review your patch set. One should avoid sending patches as attachments,
but rather send them in email body along with commit message. If a
developer is sending another version of the patch (e.g. to address
review comments), they are advised to note differences to previous
review comments), he is advised to note differences to previous
versions after the <code>---</code> line in the patch so that it helps
reviewers but doesn't become part of git history. Moreover, such patch
needs to be prefixed correctly with
@@ -171,18 +159,6 @@
<pre>
./qemuxml2xmltest
</pre>
<p>
If you are adding new test cases, or making changes that alter
existing test output, you can use the environment variable
VIR_TEST_REGENERATE_OUTPUT to quickly update the saved test data.
Of course you still need to review the changes VERY CAREFULLY to
ensure they are correct.
</p>
<pre>
VIR_TEST_REGENERATE_OUTPUT=1 ./qemuxml2argvtest
</pre>
<p>There is also a <code>./run</code> script at the top level,
to make it easier to run programs that have not yet been
installed, as well as to wrap invocations of various tests
@@ -481,30 +457,20 @@
<p>
Omit the curly braces around an <code>if</code>, <code>while</code>,
<code>for</code> etc. body only when both that body and the condition
itself occupy a single line. In every other case we require
<code>for</code> etc. body only
when that body occupies a single line. In every other case we require
the braces. This ensures that it is trivially easy to identify a
single-<i>statement</i> loop: each has only one <i>line</i> in its body.
</p>
<p>
Omitting braces with a single-line body is fine:
</p>
<pre>
while (expr) // single line body; {} is forbidden
while (expr) // one-line body -> omitting curly braces is ok
single_line_stmt();
</pre>
<pre>
while (expr(arg1,
arg2)) // indentation makes it obvious it is single line,
single_line_stmt(); // {} is optional (not enforced either way)
</pre>
<pre>
while (expr1 &amp;&amp;
expr2) { // multi-line, at same indentation, {} required
single_line_stmt();
}
</pre>
<p>
However, the moment your loop/if/else body extends on to a second
line, for whatever reason (even if it's just an added comment), then
@@ -627,37 +593,6 @@
}
</pre>
<p>Use hanging braces for compound statements: the opening brace
of a compound statement should be on the same line as the
condition being tested. Only top-level function bodies, nested
scopes, and compound structure declarations should ever have {
on a line by itself.
</p>
<pre>
void
foo(int a, int b)
{ // correct - function body
int 2d[][] = {
{ // correct - complex initialization
1, 2,
},
};
if (a)
{ // BAD: compound brace on its own line
do_stuff();
}
{ // correct - nested scope
int tmp;
if (a &lt; b) { // correct - hanging brace
tmp = b;
b = a;
a = tmp;
}
}
}
</pre>
<h2><a name="preprocessor">Preprocessor</a></h2>
<p>Macros defined with an ALL_CAPS name should generally be

View File

@@ -177,17 +177,6 @@
script returns failure or the output XML is not valid, incoming
migration will be canceled. This hook may be used, e.g., to change
location of disk images for incoming domains.</li>
<li><span class="since">Since 1.2.9</span>, the qemu hook script is
also called when restoring a saved image either via the API or
automatically when restoring a managed save machine. It is called
as: <pre>/etc/libvirt/hooks/qemu guest_name restore begin -</pre>
with domain XML sent to standard input of the script. In this case,
the script acts as a filter and is supposed to modify the domain
XML and print it out on its standard output. Empty output is
identical to copying the input XML without changing it. In case the
script returns failure or the output XML is not valid, restore of the
image will be aborted. This hook may be used, e.g., to change
location of disk images for restored domains.</li>
<li><span class="since">Since 0.9.13</span>, the qemu hook script
is also called when the libvirtd daemon restarts and reconnects
to previously running QEMU processes. If the script fails, the

View File

@@ -4,8 +4,6 @@ use strict;
use warnings;
use File::Find;
use XML::XPath;
use XML::XPath::XMLParser;
die "syntax: $0 SRCDIR\n" unless int(@ARGV) == 1;
@@ -14,20 +12,10 @@ my $srcdir = shift @ARGV;
my $symslibvirt = "$srcdir/libvirt_public.syms";
my $symsqemu = "$srcdir/libvirt_qemu.syms";
my $symslxc = "$srcdir/libvirt_lxc.syms";
my @drivertable = (
"$srcdir/driver-hypervisor.h",
"$srcdir/driver-interface.h",
"$srcdir/driver-network.h",
"$srcdir/driver-nodedev.h",
"$srcdir/driver-nwfilter.h",
"$srcdir/driver-secret.h",
"$srcdir/driver-state.h",
"$srcdir/driver-storage.h",
"$srcdir/driver-stream.h",
);
my $drivertable = "$srcdir/driver.h";
my %groupheaders = (
"virHypervisorDriver" => "Hypervisor APIs",
"virDriver" => "Hypervisor APIs",
"virNetworkDriver" => "Virtual Network APIs",
"virInterfaceDriver" => "Host Interface APIs",
"virNodeDeviceDriver" => "Host Device APIs",
@@ -54,7 +42,6 @@ open FILE, "<$symslibvirt"
my $vers;
my $prevvers;
my $apixpath = XML::XPath->new(filename => "$srcdir/../docs/libvirt-api.xml");
while (defined($line = <FILE>)) {
chomp $line;
next if $line =~ /^\s*#/;
@@ -78,10 +65,7 @@ while (defined($line = <FILE>)) {
$prevvers = $vers;
$vers = undef;
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
my $file = $apixpath->find("/api/symbols/function[\@name='$1']/\@file");
$apis{$1} = {};
$apis{$1}->{vers} = $vers;
$apis{$1}->{file} = $file;
$apis{$1} = $vers;
} else {
die "unexpected data $line\n";
}
@@ -97,7 +81,6 @@ open FILE, "<$symsqemu"
$prevvers = undef;
$vers = undef;
$apixpath = XML::XPath->new(filename => "$srcdir/../docs/libvirt-qemu-api.xml");
while (defined($line = <FILE>)) {
chomp $line;
next if $line =~ /^\s*#/;
@@ -121,10 +104,7 @@ while (defined($line = <FILE>)) {
$prevvers = $vers;
$vers = undef;
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
my $file = $apixpath->find("/api/symbols/function[\@name='$1']/\@file");
$apis{$1} = {};
$apis{$1}->{vers} = $vers;
$apis{$1}->{file} = $file;
$apis{$1} = $vers;
} else {
die "unexpected data $line\n";
}
@@ -140,7 +120,6 @@ open FILE, "<$symslxc"
$prevvers = undef;
$vers = undef;
$apixpath = XML::XPath->new(filename => "$srcdir/../docs/libvirt-lxc-api.xml");
while (defined($line = <FILE>)) {
chomp $line;
next if $line =~ /^\s*#/;
@@ -164,10 +143,7 @@ while (defined($line = <FILE>)) {
$prevvers = $vers;
$vers = undef;
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
my $file = $apixpath->find("/api/symbols/function[\@name='$1']/\@file");
$apis{$1} = {};
$apis{$1}->{vers} = $vers;
$apis{$1}->{file} = $file;
$apis{$1} = $vers;
} else {
die "unexpected data $line\n";
}
@@ -178,27 +154,27 @@ close FILE;
# Some special things which aren't public APIs,
# but we want to report
$apis{virConnectSupportsFeature}->{vers} = "0.3.2";
$apis{virDomainMigratePrepare}->{vers} = "0.3.2";
$apis{virDomainMigratePerform}->{vers} = "0.3.2";
$apis{virDomainMigrateFinish}->{vers} = "0.3.2";
$apis{virDomainMigratePrepare2}->{vers} = "0.5.0";
$apis{virDomainMigrateFinish2}->{vers} = "0.5.0";
$apis{virDomainMigratePrepareTunnel}->{vers} = "0.7.2";
$apis{virConnectSupportsFeature} = "0.3.2";
$apis{virDomainMigratePrepare} = "0.3.2";
$apis{virDomainMigratePerform} = "0.3.2";
$apis{virDomainMigrateFinish} = "0.3.2";
$apis{virDomainMigratePrepare2} = "0.5.0";
$apis{virDomainMigrateFinish2} = "0.5.0";
$apis{virDomainMigratePrepareTunnel} = "0.7.2";
$apis{virDomainMigrateBegin3}->{vers} = "0.9.2";
$apis{virDomainMigratePrepare3}->{vers} = "0.9.2";
$apis{virDomainMigratePrepareTunnel3}->{vers} = "0.9.2";
$apis{virDomainMigratePerform3}->{vers} = "0.9.2";
$apis{virDomainMigrateFinish3}->{vers} = "0.9.2";
$apis{virDomainMigrateConfirm3}->{vers} = "0.9.2";
$apis{virDomainMigrateBegin3} = "0.9.2";
$apis{virDomainMigratePrepare3} = "0.9.2";
$apis{virDomainMigratePrepareTunnel3} = "0.9.2";
$apis{virDomainMigratePerform3} = "0.9.2";
$apis{virDomainMigrateFinish3} = "0.9.2";
$apis{virDomainMigrateConfirm3} = "0.9.2";
$apis{virDomainMigrateBegin3Params}->{vers} = "1.1.0";
$apis{virDomainMigratePrepare3Params}->{vers} = "1.1.0";
$apis{virDomainMigratePrepareTunnel3Params}->{vers} = "1.1.0";
$apis{virDomainMigratePerform3Params}->{vers} = "1.1.0";
$apis{virDomainMigrateFinish3Params}->{vers} = "1.1.0";
$apis{virDomainMigrateConfirm3Params}->{vers} = "1.1.0";
$apis{virDomainMigrateBegin3Params} = "1.1.0";
$apis{virDomainMigratePrepare3Params} = "1.1.0";
$apis{virDomainMigratePrepareTunnel3Params} = "1.1.0";
$apis{virDomainMigratePerform3Params} = "1.1.0";
$apis{virDomainMigrateFinish3Params} = "1.1.0";
$apis{virDomainMigrateConfirm3Params} = "1.1.0";
@@ -206,44 +182,42 @@ $apis{virDomainMigrateConfirm3Params}->{vers} = "1.1.0";
# and driver struct fields. This lets us later match
# update the driver impls with the public APis.
open FILE, "<$drivertable"
or die "cannot read $drivertable: $!";
# Group name -> hash of APIs { fields -> api name }
my %groups;
my $ingrp;
foreach my $drivertable (@drivertable) {
open FILE, "<$drivertable"
or die "cannot read $drivertable: $!";
while (defined($line = <FILE>)) {
if ($line =~ /struct _(vir\w*Driver)/) {
my $grp = $1;
if ($grp ne "virStateDriver" &&
$grp ne "virStreamDriver") {
$ingrp = $grp;
$groups{$ingrp} = { apis => {}, drivers => {} };
}
} elsif ($ingrp) {
if ($line =~ /^\s*vir(?:Drv)(\w+)\s+(\w+);\s*$/) {
my $field = $2;
my $name = $1;
while (defined($line = <FILE>)) {
if ($line =~ /struct _(vir\w*Driver)/) {
my $grp = $1;
if ($grp ne "virStateDriver" &&
$grp ne "virStreamDriver") {
$ingrp = $grp;
$groups{$ingrp} = { apis => {}, drivers => {} };
}
} elsif ($ingrp) {
if ($line =~ /^\s*vir(?:Drv)(\w+)\s+(\w+);\s*$/) {
my $field = $2;
my $name = $1;
my $api;
if (exists $apis{"vir$name"}) {
$api = "vir$name";
} elsif ($name =~ /\w+(Open|Close)/) {
next;
} else {
die "driver $name does not have a public API";
}
$groups{$ingrp}->{apis}->{$field} = $api;
} elsif ($line =~ /};/) {
$ingrp = undef;
my $api;
if (exists $apis{"vir$name"}) {
$api = "vir$name";
} elsif ($name =~ /\w+(Open|Close)/) {
next;
} else {
die "driver $name does not have a public API";
}
$groups{$ingrp}->{apis}->{$field} = $api;
} elsif ($line =~ /};/) {
$ingrp = undef;
}
}
close FILE;
}
close FILE;
# Finally, we read all the primary driver files and extract
# the driver API tables from each one.
@@ -316,43 +290,43 @@ foreach my $src (@srcs) {
# have a bit of manual fixup todo with the per-driver versioning
# and support matrix
$groups{virHypervisorDriver}->{apis}->{"openAuth"} = "virConnectOpenAuth";
$groups{virHypervisorDriver}->{apis}->{"openReadOnly"} = "virConnectOpenReadOnly";
$groups{virHypervisorDriver}->{apis}->{"domainMigrate"} = "virDomainMigrate";
$groups{virDriver}->{apis}->{"openAuth"} = "virConnectOpenAuth";
$groups{virDriver}->{apis}->{"openReadOnly"} = "virConnectOpenReadOnly";
$groups{virDriver}->{apis}->{"domainMigrate"} = "virDomainMigrate";
my $openAuthVers = (0 * 1000 * 1000) + (4 * 1000) + 0;
foreach my $drv (keys %{$groups{"virHypervisorDriver"}->{drivers}}) {
my $openVersStr = $groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"connectOpen"};
foreach my $drv (keys %{$groups{"virDriver"}->{drivers}}) {
my $openVersStr = $groups{"virDriver"}->{drivers}->{$drv}->{"connectOpen"};
my $openVers;
if ($openVersStr =~ /(\d+)\.(\d+)\.(\d+)/) {
$openVers = ($1 * 1000 * 1000) + ($2 * 1000) + $3;
}
# virConnectOpenReadOnly always matches virConnectOpen version
$groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"connectOpenReadOnly"} =
$groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"connectOpen"};
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpenReadOnly"} =
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpen"};
# virConnectOpenAuth is always 0.4.0 if the driver existed
# before this time, otherwise it matches the version of
# the driver's virConnectOpen entry
if ($openVersStr eq "Y" ||
$openVers >= $openAuthVers) {
$groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"connectOpenAuth"} = $openVersStr;
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpenAuth"} = $openVersStr;
} else {
$groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"connectOpenAuth"} = "0.4.0";
$groups{"virDriver"}->{drivers}->{$drv}->{"connectOpenAuth"} = "0.4.0";
}
}
# Another special case for the virDomainCreateLinux which was replaced
# with virDomainCreateXML
$groups{virHypervisorDriver}->{apis}->{"domainCreateLinux"} = "virDomainCreateLinux";
$groups{virDriver}->{apis}->{"domainCreateLinux"} = "virDomainCreateLinux";
my $createAPIVers = (0 * 1000 * 1000) + (0 * 1000) + 3;
foreach my $drv (keys %{$groups{"virHypervisorDriver"}->{drivers}}) {
my $createVersStr = $groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"domainCreateXML"};
foreach my $drv (keys %{$groups{"virDriver"}->{drivers}}) {
my $createVersStr = $groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateXML"};
next unless defined $createVersStr;
my $createVers;
if ($createVersStr =~ /(\d+)\.(\d+)\.(\d+)/) {
@@ -364,9 +338,9 @@ foreach my $drv (keys %{$groups{"virHypervisorDriver"}->{drivers}}) {
# the driver's virCreateXML entry
if ($createVersStr eq "Y" ||
$createVers >= $createAPIVers) {
$groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = $createVersStr;
$groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = $createVersStr;
} else {
$groups{"virHypervisorDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = "0.0.3";
$groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = "0.0.3";
}
}
@@ -393,7 +367,7 @@ in.
EOF
foreach my $grp (sort { $a cmp $b } keys %groups) {
foreach my $grp (sort { $a cmp $b } keys %groups) {
print "<h2><a name=\"$grp\">", $groupheaders{$grp}, "</a></h2>\n";
print <<EOF;
<table class="top_table">
@@ -420,23 +394,10 @@ EOF
$groups{$grp}->{apis}->{$b}
} keys %{$groups{$grp}->{apis}}) {
my $api = $groups{$grp}->{apis}->{$field};
my $vers = $apis{$api}->{vers};
my $htmlgrp = $apis{$api}->{file};
my $vers = $apis{$api};
print <<EOF;
<tr>
<td>
EOF
if (defined $htmlgrp) {
print <<EOF;
<a href=\"html/libvirt-$htmlgrp.html#$api\">$api</a>
EOF
} else {
print $api;
}
print <<EOF;
</td>
<td><a href=\"html/libvirt-libvirt.html#$api\">$api</a></td>
<td>$vers</td>
EOF

View File

@@ -72,7 +72,7 @@
The <a href="http://libvirt.org/drvphyp.html">IBM PowerVM</a> hypervisor
</li>
<li>
The <a href="http://libvirt.org/drvvirtuozzo.html">Virtuozzo</a> hypervisor
The <a href="http://libvirt.org/drvparallels.html">Parallels</a> hypervisor
</li>
<li>
The <a href="http://libvirt.org/drvbhyve.html">Bhyve</a> hypervisor

View File

@@ -82,9 +82,7 @@
<ul>
<li>Daemon Startup
<p>The daemon initialization processing will declare itself
as a daemon via a virNetDaemonNew() call, then creates new server
using virNetServerNew() and adds that server to the main daemon
struct with virNetDaemonAddServer() call. It will then use
as a server via a virNetServerNew() call, then use
virDriverLoadModule() to find/load all known drivers,
set up an RPC server program using the <code>remoteProcs[]</code>
table via a virNetServerProgramNew() call. The table is the

View File

@@ -68,8 +68,8 @@
There is now a high level API that provides a safe and
flexible way to spawn commands, which prevents the most
common errors &amp; is easy to code against. This
code is provided in the <code>src/util/vircommand.h</code>
header which can be imported using <code>#include "vircommand.h"</code>
code is provided in the <code>src/util/command.h</code>
header which can be imported using <code>#include "command.h"</code>
</p>
<h3><a name="initial">Defining commands in libvirt</a></h3>

View File

@@ -532,13 +532,6 @@
calls in parallel, with dispatch across multiple worker threads.
</dd>
<dt><code>virNetDaemonPtr</code> (virnetdaemon.h)</dt>
<dd>The virNetDaemon APIs are used to manage a daemon process. A
deamon is a process that might expose one or more servers. It
handles most process-related details, network-related should
be part of the underlying server.
</dd>
<dt><code>virNetServerMDNSPtr</code> (virnetservermdns.h)</dt>
<dd>The virNetServerMDNS APIs are used to advertise a server
across the local network, enabling clients to automatically
@@ -604,7 +597,7 @@
<h4><a name="apiclientdispatchex1">Example with buck passing</a></h4>
<p>
In the first example, a second thread issues an API call
In the first example, a second thread issues a API call
while the first thread holds the buck. The reply to the
first call arrives first, so the buck is passed to the
second thread.

View File

@@ -98,18 +98,18 @@ the code you can build the code with</p>
<p>The bindings are articulated around a few
classes in the <code>org/libvirt</code> package, notably the
<code>Connect</code>, <code>Domain</code> and <code>Network</code>
ones. Functions in the <a href="html/index.html">C API</a>
ones. Functions in the <a href="html/libvirt-libvirt.html">C API</a>
taking <code>virConnectPtr</code>, <code>virDomainPtr</code> or
<code>virNetworkPtr</code> as their first argument usually become
methods for the classes, their name is just stripped from the
virConnect or virDomain(Get) prefix and the first letter gets converted to
lower case, for example the C functions:</p>
<p>
<code>int <a href="html/libvirt-libvirt-domain.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
<code>int <a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
(virConnectPtr conn);</code>
</p>
<p>
<code>int <a href="html/libvirt-libvirt-domain.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
<code>int <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
(virDomainPtr domain, unsigned long memory);</code>
</p>
<p>become</p>

View File

@@ -1,4 +1,12 @@
h1, h2, h3, h4, h5, h6 {
h1 {
font-weight: normal;
color: #3c857c;
}
h1 strong {
font-weight: bold;
}
h2, h3, h4, h5, h6 {
color: #3c857c;
}
@@ -47,6 +55,12 @@ h1, h2, h3, h4, h5, h6 {
padding: 0px;
margin: 0px;
border: 0px;
font-weight: bold;
font-size: 1.2em;
}
#menu li ul li {
font-size: 1em;
}
#menu ul li a, #menu ul li span {
@@ -80,7 +94,6 @@ h1, h2, h3, h4, h5, h6 {
#menu ul.l1 li .inactive {
border-left: 6px solid #dfebea;
}
#menu ul.l1 li .active {
border-left: 6px solid #a5c6c2;
}
@@ -96,6 +109,7 @@ h1, h2, h3, h4, h5, h6 {
padding-left: 3em;
}
#headerLogo {
position: absolute;
top: 0px;
@@ -104,7 +118,6 @@ h1, h2, h3, h4, h5, h6 {
width: 400px;
background: url(libvirt-header-logo.png);
}
#headerSearch {
position: absolute;
top: 0px;
@@ -129,6 +142,7 @@ h1, h2, h3, h4, h5, h6 {
font-size: 1em;
}
#sitemap ul li {
list-style: none;
}
@@ -163,6 +177,7 @@ a {
color: #566866;
}
div.api {
border: 1px solid #999999;
background: #eeeeee;
@@ -188,6 +203,7 @@ div.api table td, div.variablelist table td {
padding-left: 1em;
}
h1 a, h2 a, h3 a, h4 a, h5 a {
color: inherit;
text-decoration: inherit;
@@ -227,6 +243,36 @@ p.image {
background: #c5dbd8;
}
#footer {
clear: both;
position: relative;
margin: 0px;
padding: 0px;
border: 0px;
width: 100%;
height: 180px;
background: #FFFFFF;
/* background: #757575; */
}
/* This is hidden from IE <= 6 because it can't do transparency */
/* body > #footer {
background: #757575 url(footer_pattern.png) repeat-x;
} */
#footer p {
position: absolute;
top: 0px;
left: 0px;
margin: 0px;
border: 0px solid red;
width: 220px;
text-align: center;
}
#footer p a img {
border: 0px;
}
#projects {
margin: 0px;
border: 0px;
@@ -236,6 +282,7 @@ p.image {
width: 100%;
}
#projects dl {
margin: 0px;
border: 0px solid white;
@@ -244,6 +291,10 @@ p.image {
top: 0px;
left: 0px;
}
/* This is hidden from IE <= 6 because it can't do transparency */
head:first-child+body #projects dl {
background: url(footer_corner.png) no-repeat ! important;
}
#projects #p1 {
margin-left: 25%;
@@ -268,15 +319,16 @@ p.image {
#projects #p1 dt, #projects #p1 dd {
width: 33%;
}
#projects #p2 dt, #projects #p2 dd {
width: 50%;
}
#projects #p3 dt, #projects #p3 dd {
width: 99%;
}
#projects {
}
#projects span {
font-size: 0.8em;
display: block;
@@ -300,6 +352,13 @@ p.image {
color: #ccc;
}
#sponsor {
color: #757575;
text-decoration: inherit;
font-size: 1.2em;
}
span.since {
color: #3c857c;
font-style: italic;
@@ -345,7 +404,6 @@ table.data tr.head th {
table.data tbody td {
background: rgb(240,240,240);
}
table.data tbody td.y {
background: rgb(220,255,220);
text-align: center;

View File

@@ -1,160 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h1>Virtual machine lock manager, virtlockd plugin</h1>
<ul id="toc"></ul>
<p>
This page describes use of the <code>virtlockd</code>
service as a <a href="locking.html">lock driver</a>
plugin for virtual machine disk mutual exclusion.
</p>
<h2><a name="background">virtlockd background</a></h2>
<p>
The virtlockd daemon is a single purpose binary which
focuses exclusively on the task of acquiring and holding
locks on behalf of running virtual machines. It is
designed to offer a low overhead, portable locking
scheme can be used out of the box on virtualization
hosts with minimal configuration overheads. It makes
use of the POSIX fcntl advisory locking capability
to hold locks, which is supported by the majority of
commonly used filesystems.
</p>
<h2><a name="sanlock">virtlockd daemon setup</a></h2>
<p>
In most OS, the virtlockd daemon itself will not require
any upfront configuration work. It is installed by default
when libvirtd is present, and a systemd socket unit is
registered such that the daemon will be automatically
started when first required. With OS that predate systemd
though, it will be necessary to start it at boot time,
prior to libvirtd being started. On RHEL/Fedora distros,
this can be achieved as follows
</p>
<pre>
# chkconfig virtlockd on
# service virtlockd start
</pre>
<p>
The above instructions apply to the instance of virtlockd
that runs privileged, and is used by the libvirtd daemon
that runs privileged. If running libvirtd as an unprivileged
user, it will always automatically spawn an instance of
the virtlockd daemon unprivileged too. This requires no
setup at all.
</p>
<h2><a name="lockdplugin">libvirt lockd plugin configuration</a></h2>
<p>
Once the virtlockd daemon is running, or setup to autostart,
the next step is to configure the libvirt lockd plugin.
There is a separate configuration file for each libvirt
driver that is using virtlockd. For QEMU, we will edit
<code>/etc/libvirt/qemu-lockd.conf</code>
</p>
<p>
The default behaviour of the lockd plugin is to acquire locks
directly on the virtual disk images associated with the guest
&lt;disk&gt; elements. This ensures it can run out of the box
with no configuration, providing locking for disk images on
shared filesystems such as NFS. It does not provide any cross
host protection for storage that is backed by block devices,
since locks acquired on device nodes in /dev only apply within
the host. It may also be the case that the filesystem holding
the disk images is not capable of supporting fcntl locks.
</p>
<p>
To address these problems it is possible to tell lockd to
acquire locks on an indirect file. Essentially lockd will
calculate the SHA256 checksum of the fully qualified path,
and create a zero length file in a given directory whose
filename is the checksum. It will then acquire a lock on
that file. Assuming the block devices assigned to the guest
are using stable paths (eg /dev/disk/by-path/XXXXXXX) then
this will allow for locks to apply across hosts. This
feature can be enabled by setting a configuration setting
that specifies the directory in which to create the lock
files. The directory referred to should of course be
placed on a shared filesystem (eg NFS) that is accessible
to all hosts which can see the shared block devices.
</p>
<pre>
$ su - root
# augtool -s set \
/files/etc/libvirt/qemu-lockd.conf/file_lockspace_dir \
"/var/lib/libvirt/lockd/files"
</pre>
<p>
If the guests are using either LVM and SCSI block devices
for their virtual disks, there is a unique identifier
associated with each device. It is possible to tell lockd
to use this UUID as the basis for acquiring locks, rather
than the SHA256 sum of the filename. The benefit of this
is that the locking protection will work even if the file
paths to the given block device are different on each
host.
</p>
<pre>
$ su - root
# augtool -s set \
/files/etc/libvirt/qemu-lockd.conf/scsi_lockspace_dir \
"/var/lib/libvirt/lockd/scsi"
# augtool -s set \
/files/etc/libvirt/qemu-lockd.conf/lvm_lockspace_dir \
"/var/lib/libvirt/lockd/lvm"
</pre>
<p>
It is important to remember that the changes made to the
<code>/etc/libvirt/qemu-lockd.conf</code> file must be
propagated to all hosts before any virtual machines are
launched on them. This ensures that all hosts are using
the same locking mechanism
</p>
<h2><a name="qemuconfig">QEMU/KVM driver configuration</a></h2>
<p>
The QEMU driver is capable of using the virtlockd plugin
since the release <span>1.0.2</span>.
The out of the box configuration, however, currently
uses the <strong>nop</strong> lock manager plugin.
To get protection for disks, it is thus necessary
to reconfigure QEMU to activate the <strong>lockd</strong>
driver. This is achieved by editing the QEMU driver
configuration file (<code>/etc/libvirt/qemu.conf</code>)
and changing the <code>lock_manager</code> configuration
tunable.
</p>
<pre>
$ su - root
# augtool -s set /files/etc/libvirt/qemu.conf/lock_manager lockd
# service libvirtd restart
</pre>
<p>
Every time you start a guest, the virtlockd daemon will acquire
locks on the disk files directly, or in one of the configured
lookaside directories based on SHA256 sum. To check that locks
are being acquired as expected, the <code>lslocks</code> tool
can be run.
</p>
</body>
</html>

View File

@@ -1,247 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h1>Virtual machine lock manager, sanlock plugin</h1>
<ul id="toc"></ul>
<p>
This page describes use of the
<a href="https://fedorahosted.org/sanlock/">sanlock</a>
service as a <a href="locking.html">lock driver</a>
plugin for virtual machine disk mutual exclusion.
</p>
<h2><a name="sanlock">Sanlock daemon setup</a></h2>
<p>
On many operating systems, the <strong>sanlock</strong> plugin
is distributed in a sub-package which needs to be installed
separately from the main libvirt RPM. On a Fedora/RHEL host
this can be done with the <code>yum</code> command
</p>
<pre>
$ su - root
# yum install libvirt-lock-sanlock
</pre>
<p>
The next step is to start the sanlock daemon. For maximum
safety sanlock prefers to have a connection to a watchdog
daemon. This will cause the entire host to be rebooted in
the event that sanlock crashes / terminates abnormally.
To start the watchdog daemon on a Fedora/RHEL host
the following commands can be run:
</p>
<pre>
$ su - root
# chkconfig wdmd on
# service wdmd start
</pre>
<p>
Once the watchdog is running, sanlock can be started
as follows
</p>
<pre>
# chkconfig sanlock on
# service sanlock start
</pre>
<p>
<em>Note:</em> if you wish to avoid the use of the
watchdog, add the following line to <code>/etc/sysconfig/sanlock</code>
before starting it
</p>
<pre>
SANLOCKOPTS="-w 0"
</pre>
<p>
The sanlock daemon must be started on every single host
that will be running virtual machines. So repeat these
steps as necessary.
</p>
<h2><a name="sanlockplugin">libvirt sanlock plugin configuration</a></h2>
<p>
Once the sanlock daemon is running, the next step is to
configure the libvirt sanlock plugin. There is a separate
configuration file for each libvirt driver that is using
sanlock. For QEMU, we will edit <code>/etc/libvirt/qemu-sanlock.conf</code>
There is one mandatory parameter that needs to be set,
the <code>host_id</code>. This is a integer between
1 and 2000, which must be set to a <strong>unique</strong>
value on each host running virtual machines.
</p>
<pre>
$ su - root
# augtool -s set /files/etc/libvirt/qemu-sanlock.conf/host_id 1
</pre>
<p>
Repeat this on every host, changing <strong>1</strong> to a
unique value for the host.
</p>
<h2><a name="sanlockstorage">libvirt sanlock storage configuration</a></h2>
<p>
The sanlock plugin needs to create leases in a directory
that is on a filesystem shared between all hosts running
virtual machines. Obvious choices for this include NFS
or GFS2. The libvirt sanlock plugin expects its lease
directory be at <code>/var/lib/libvirt/sanlock</code>
so update the host's <code>/etc/fstab</code> to mount
a suitable shared/cluster filesystem at that location
</p>
<pre>
$ su - root
# echo "some.nfs.server:/export/sanlock /var/lib/libvirt/sanlock nfs hard,nointr 0 0" >> /etc/fstab
# mount /var/lib/libvirt/sanlock
</pre>
<p>
If your sanlock daemon happen to run under non-root
privileges, you need to tell this to libvirt so it
chowns created files correctly. This can be done by
setting <code>user</code> and/or <code>group</code>
variables in the configuration file. Accepted values
range is specified in description to the same
variables in <code>/etc/libvirt/qemu.conf</code>. For
example:
</p>
<pre>
augtool -s set /files/etc/libvirt/qemu-sanlock.conf/user sanlock
augtool -s set /files/etc/libvirt/qemu-sanlock.conf/group sanlock
</pre>
<p>
But remember, that if this is NFS share, you need a
no_root_squash-ed one for chown (and chmod possibly)
to succeed.
</p>
<p>
In terms of storage requirements, if the filesystem
uses 512 byte sectors, you need to allow for <code>1MB</code>
of storage for each guest disk. So if you have a network
with 20 virtualization hosts, each running 50 virtual
machines and an average of 2 disks per guest, you will
need <code>20*50*2 == 2000 MB</code> of storage for
sanlock.
</p>
<p>
On one of the hosts on the network is it wise to setup
a cron job which runs the <code>virt-sanlock-cleanup</code>
script periodically. This scripts deletes any lease
files which are not currently in use by running virtual
machines, freeing up disk space on the shared filesystem.
Unless VM disks are very frequently created + deleted
it should be sufficient to run the cleanup once a week.
</p>
<h2><a name="qemuconfig">QEMU/KVM driver configuration</a></h2>
<p>
The QEMU/KVM driver is fully integrated with the lock
manager framework as of release <span>0.9.3</span>.
The out of the box configuration, however, currently
uses the <strong>nop</strong> lock manager plugin.
To get protection for disks, it is thus necessary
to reconfigure QEMU to activate the <strong>sanlock</strong>
driver. This is achieved by editing the QEMU driver
configuration file (<code>/etc/libvirt/qemu.conf</code>)
and changing the <code>lock_manager</code> configuration
tunable.
</p>
<pre>
$ su - root
# augtool -s set /files/etc/libvirt/qemu.conf/lock_manager sanlock
# service libvirtd restart
</pre>
<p>
If all went well, libvirtd will have talked to sanlock
and created the basic lockspace. This can be checked
by looking for existence of the following file
</p>
<pre>
# ls /var/lib/libvirt/sanlock/
__LIBVIRT__DISKS__
</pre>
<p>
Every time you start a guest, additional lease files will appear
in this directory, one for each virtual disk. The lease
files are named based on the MD5 checksum of the fully qualified
path of the virtual disk backing file. So if the guest is given
a disk backed by <code>/var/lib/libvirt/images/demo.img</code>
expect to see a lease <code>/var/lib/libvirt/sanlock/bfa0240911bc17753e0b473688822159</code>
</p>
<p>
It should be obvious that for locking to work correctly, every
host running virtual machines should have storage configured
in the same way. The easiest way to do this is to use the libvirt
storage pool capability to configure any NFS volumes, iSCSI targets,
or SCSI HBAs used for guest storage. Simply replicate the same
storage pool XML across every host. It is important that any
storage pools exposing block devices are configured to create
volume paths under <code>/dev/disks/by-path</code> to ensure
stable paths across hosts. An example iSCSI configuration
which ensures this is:
</p>
<pre>
&lt;pool type='iscsi'&gt;
&lt;name&gt;myiscsipool&lt;/name&gt;
&lt;source&gt;
&lt;host name='192.168.254.8'/&gt;
&lt;device path='your-iscsi-target-iqn'/&gt;
&lt;/source&gt;
&lt;target&gt;
&lt;path&gt;/dev/disk/by-path&lt;/path&gt;
&lt;/target&gt;
&lt;/pool&gt;
</pre>
<h2><a name="domainconfig">Domain configuration</a></h2>
<p>
In case sanlock loses access to disk locks for some reason, it will
kill all domains that lost their locks. This default behavior may
be changed using
<a href="formatdomain.html#elementsEvents">on_lockfailure
element</a> in domain XML. When this element is present, sanlock
will call <code>sanlock_helper</code> (provided by libvirt) with
the specified action. This helper binary will connect to libvirtd
and thus it may need to authenticate if libvirtd was configured to
require that on the read-write UNIX socket. To provide the
appropriate credentials to sanlock_helper, a
<a href="auth.html#Auth_client_config">client authentication
file</a> needs to contain something like the following:
</p>
<pre>
[auth-libvirt-localhost]
credentials=sanlock
[credentials-sanlock]
authname=login
password=password
</pre>
</body>
</html>

View File

@@ -2,47 +2,258 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h1>Virtual machine lock manager</h1>
<h1>Virtual machine disk locking</h1>
<ul id="toc"></ul>
<p>
Libvirt includes a framework for ensuring mutual exclusion
between virtual machines using host resources. Typically
this is used to prevent two VM processes from having concurrent
write access to the same disk image, as this would result in
data corruption if the guest was not using a cluster
aware filesystem.
This page describes how to ensure a single disk cannot be
used by more than one running VM at a time, across any
host in a network. This is critical to avoid data corruption
of guest files systems that are not cluster aware.
</p>
<h2><a name="plugins">Lock manager plugins</a></h2>
<p>
The lock manager framework has a pluggable architecture,
to allow different locking technologies to be used.
libvirt includes a pluggable framework for lock managers,
which hypervisor drivers can use to ensure safety for
guest domain disks, and potentially other resources.
At this time there are only two plugin implementations,
a "no op" implementation which does absolutely nothing,
and a <a href="https://fedorahosted.org/sanlock/">sanlock</a> implementation which uses
the Disk Paxos algorithm to ensure safety.
</p>
<dl>
<dt>nop</dt>
<dd>This is a "no op" implementation which does absolutely
nothing. This can be used if mutual exclusion between
virtual machines is not required, or if it is being
solved at another level in the management stack.</dd>
<dt><a href="locking-lockd.html">lockd</a></dt>
<dd>This is the current preferred implementation shipped
with libvirt. It uses the <code>virtlockd</code> daemon
to manage locks using the POSIX fcntl() advisory locking
capability. As such it requires a shared filesystem of
some kind be accessible to all hosts which share the
same image storage.</dd>
<dt><a href="locking-sanlock.html">sanlock</a></dt>
<dd>This is an alternative implementation preferred by
the oVirt project. It uses a disk paxos algorithm for
maintaining continuously renewed leases. In the default
setup it requires some shared filesystem, but it is
possible to use it in a manual mode where the management
application creates leases in SAN storage volumes.
</dd>
</dl>
<h2><a name="sanlock">Sanlock daemon setup</a></h2>
<p>
On many operating systems, the <strong>sanlock</strong> plugin
is distributed in a sub-package which needs to be installed
separately from the main libvirt RPM. On a Fedora/RHEL host
this can be done with the <code>yum</code> command
</p>
<pre>
$ su - root
# yum install libvirt-lock-sanlock
</pre>
<p>
The next step is to start the sanlock daemon. For maximum
safety sanlock prefers to have a connection to a watchdog
daemon. This will cause the entire host to be rebooted in
the event that sanlock crashes / terminates abnormally.
To start the watchdog daemon on a Fedora/RHEL host
the following commands can be run:
</p>
<pre>
$ su - root
# chkconfig wdmd on
# service wdmd start
</pre>
<p>
Once the watchdog is running, sanlock can be started
as follows
</p>
<pre>
# chkconfig sanlock on
# service sanlock start
</pre>
<p>
<em>Note:</em> if you wish to avoid the use of the
watchdog, add the following line to <code>/etc/sysconfig/sanlock</code>
before starting it
</p>
<pre>
SANLOCKOPTS="-w 0"
</pre>
<p>
The sanlock daemon must be started on every single host
that will be running virtual machines. So repeat these
steps as necessary.
</p>
<h2><a name="sanlockplugin">libvirt sanlock plugin configuration</a></h2>
<p>
Once the sanlock daemon is running, the next step is to
configure the libvirt sanlock plugin. There is a separate
configuration file for each libvirt driver that is using
sanlock. For QEMU, we will edit <code>/etc/libvirt/qemu-sanlock.conf</code>
There is one mandatory parameter that needs to be set,
the <code>host_id</code>. This is a integer between
1 and 2000, which must be set to a <strong>unique</strong>
value on each host running virtual machines.
</p>
<pre>
$ su - root
# augtool -s set /files/etc/libvirt/qemu-sanlock.conf/host_id 1
</pre>
<p>
Repeat this on every host, changing <strong>1</strong> to a
unique value for the host.
</p>
<h2><a name="sanlockstorage">libvirt sanlock storage configuration</a></h2>
<p>
The sanlock plugin needs to create leases in a directory
that is on a filesystem shared between all hosts running
virtual machines. Obvious choices for this include NFS
or GFS2. The libvirt sanlock plugin expects its lease
directory be at <code>/var/lib/libvirt/sanlock</code>
so update the host's <code>/etc/fstab</code> to mount
a suitable shared/cluster filesystem at that location
</p>
<pre>
$ su - root
# echo "some.nfs.server:/export/sanlock /var/lib/libvirt/sanlock nfs hard,nointr 0 0" >> /etc/fstab
# mount /var/lib/libvirt/sanlock
</pre>
<p>
If your sanlock daemon happen to run under non-root
privileges, you need to tell this to libvirt so it
chowns created files correctly. This can be done by
setting <code>user</code> and/or <code>group</code>
variables in the configuration file. Accepted values
range is specified in description to the same
variables in <code>/etc/libvirt/qemu.conf</code>. For
example:
</p>
<pre>
augtool -s set /files/etc/libvirt/qemu-sanlock.conf/user sanlock
augtool -s set /files/etc/libvirt/qemu-sanlock.conf/group sanlock
</pre>
<p>
But remember, that if this is NFS share, you need a
no_root_squash-ed one for chown (and chmod possibly)
to succeed.
</p>
<p>
In terms of storage requirements, if the filesystem
uses 512 byte sectors, you need to allow for <code>1MB</code>
of storage for each guest disk. So if you have a network
with 20 virtualization hosts, each running 50 virtual
machines and an average of 2 disks per guest, you will
need <code>20*50*2 == 2000 MB</code> of storage for
sanlock.
</p>
<p>
On one of the hosts on the network is it wise to setup
a cron job which runs the <code>virt-sanlock-cleanup</code>
script periodically. This scripts deletes any lease
files which are not currently in use by running virtual
machines, freeing up disk space on the shared filesystem.
Unless VM disks are very frequently created + deleted
it should be sufficient to run the cleanup once a week.
</p>
<h2><a name="qemuconfig">QEMU/KVM driver configuration</a></h2>
<p>
The QEMU/KVM driver is fully integrated with the lock
manager framework as of release <span>0.9.3</span>.
The out of the box configuration, however, currently
uses the <strong>nop</strong> lock manager plugin.
To get protection for disks, it is thus necessary
to reconfigure QEMU to activate the <strong>sanlock</strong>
driver. This is achieved by editing the QEMU driver
configuration file (<code>/etc/libvirt/qemu.conf</code>)
and changing the <code>lock_manager</code> configuration
tunable.
</p>
<pre>
$ su - root
# augtool -s set /files/etc/libvirt/qemu.conf/lock_manager sanlock
# service libvirtd restart
</pre>
<p>
If all went well, libvirtd will have talked to sanlock
and created the basic lockspace. This can be checked
by looking for existence of the following file
</p>
<pre>
# ls /var/lib/libvirt/sanlock/
__LIBVIRT__DISKS__
</pre>
<p>
Every time you start a guest, additional lease files will appear
in this directory, one for each virtual disk. The lease
files are named based on the MD5 checksum of the fully qualified
path of the virtual disk backing file. So if the guest is given
a disk backed by <code>/var/lib/libvirt/images/demo.img</code>
expect to see a lease <code>/var/lib/libvirt/sanlock/bfa0240911bc17753e0b473688822159</code>
</p>
<p>
It should be obvious that for locking to work correctly, every
host running virtual machines should have storage configured
in the same way. The easiest way to do this is to use the libvirt
storage pool capability to configure any NFS volumes, iSCSI targets,
or SCSI HBAs used for guest storage. Simply replicate the same
storage pool XML across every host. It is important that any
storage pools exposing block devices are configured to create
volume paths under <code>/dev/disks/by-path</code> to ensure
stable paths across hosts. An example iSCSI configuration
which ensures this is:
</p>
<pre>
&lt;pool type='iscsi'&gt;
&lt;name&gt;myiscsipool&lt;/name&gt;
&lt;source&gt;
&lt;host name='192.168.254.8'/&gt;
&lt;device path='your-iscsi-target-iqn'/&gt;
&lt;/source&gt;
&lt;target&gt;
&lt;path&gt;/dev/disk/by-path&lt;/path&gt;
&lt;/target&gt;
&lt;/pool&gt;
</pre>
<h2><a name="domainconfig">Domain configuration</a></h2>
<p>
In case sanlock loses access to disk locks for some reason, it will
kill all domains that lost their locks. This default behavior may
be changed using
<a href="formatdomain.html#elementsEvents">on_lockfailure
element</a> in domain XML. When this element is present, sanlock
will call <code>sanlock_helper</code> (provided by libvirt) with
the specified action. This helper binary will connect to libvirtd
and thus it may need to authenticate if libvirtd was configured to
require that on the read-write UNIX socket. To provide the
appropriate credentials to sanlock_helper, a
<a href="auth.html#Auth_client_config">client authentication
file</a> needs to contain something like the following:
</p>
<pre>
[auth-libvirt-localhost]
credentials=sanlock
[credentials-sanlock]
authname=login
password=password
</pre>
</body>
</html>

View File

@@ -104,15 +104,12 @@
<pre>
x:name (log message only)
x:+name (log message + stack trace)</pre>
<p>where <code>name</code> is a string which is matched against
the category given in the VIR_LOG_INIT() at the top of each
libvirt source file, e.g., <code>remote</code>, <code>qemu</code>,
or <code>util.json</code> (the name in the filter can be a
substring of the full category name, in order to match multiple
similar categories), the optional <code>+</code> prefix tells
libvirt to log stack trace for each message
matching <code>name</code>, and <code>x</code> is the minimal
level where matching messages should be logged:</p>
<p>where <code>name</code> is a string which is matched against source
file name, e.g., <code>remote</code>, <code>qemu</code>, or
<code>util/json</code>, the optional <code>+</code> prefix tells libvirt
to log stack trace for each message matching <code>name</code>, and
<code>x</code> is the minimal level where matching messages should
be logged:</p>
<ul>
<li>1: DEBUG</li>
<li>2: INFO</li>

View File

@@ -475,7 +475,7 @@
</pre>
<p>
Supported by Xen, QEMU, VMware and VirtualBox drivers
Supported by Xen, QEMU, VMWare and VirtualBox drivers
</p>
<h3><a name="scenarionativepeer2peer">Native migration, client to and peer2peer between, two libvirtd servers</a></h3>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1>Releases (2005)</h1>
<p>Here is the list of official releases made during the year 2005.
</p>
<p>It is also possible to just use
the <a href="downloads.html" shape="rect">GIT version or snapshot</a>,
contact the mailing list and check
the <a href="http://libvirt.org/git/?p=libvirt.git;a=log" shape="rect">GIT log</a>
to gauge progress.
</p>
<h3>0.0.1: Dec 19 2005</h3>
<ul>
<li>Features:<br/>
First release,<br/>
Basic management of existing Xen domains,<br/>
Minimal autogenerated Python bindings<br/>
</li>
</ul>
</body>
</html>

View File

@@ -1,354 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1>Releases (2006)</h1>
<p>Here is the list of official releases made during the year 2006.
A similar list for <a href="news-2005.html">2005</a> is also available.
</p>
<p>It is also possible to just use
the <a href="downloads.html" shape="rect">GIT version or snapshot</a>,
contact the mailing list and check
the <a href="http://libvirt.org/git/?p=libvirt.git;a=log" shape="rect">GIT log</a>
to gauge progress.
</p>
<h3>0.1.10: Dec 20 2006</h3>
<ul>
<li>Bug Fixes:<br/>
VCPU info breakages on xen 3.0.3,<br/>
xenDaemonListDomains buffer overflow (Daniel Berrange),<br/>
reference count bug when creating Xen domains (Daniel Berrange)<br/>
</li>
<li>Improvements:<br/>
more localizations,<br/>
support graphic framebuffer for Xen paravirt (Daniel Berrange),<br/>
VNC listen IP range support (Daniel Berrange),<br/>
support for default Xen config files and inactive domains of 3.0.4 (Daniel Berrange)<br/>
</li>
</ul>
<h3>0.1.9: Nov 29 2006</h3>
<ul>
<li>Features:<br/>
separate the notion of maximum memory and current use at the XML level,<br/>
add support for shareable drives,<br/>
add support for non-bridge style networking configs for guests (Daniel Berrange),<br/>
new config APIs virConfNew() and virConfSetValue() to build configs from scratch,<br/>
hot plug device support based on Michel Ponceau patch,<br/>
added support for inactive domains, new APIs, various associated cleanup (Daniel Berrange),<br/>
special device model for HVM guests (Daniel Berrange),<br/>
add API to dump core of domains (but requires a patched xend),<br/>
pygrub bootloader information take over &lt;os&gt; information<br/>
</li>
<li>Bug Fixes:<br/>
fix OS reporting when running as non-root,<br/>
fix the reconnect regression test,<br/>
Fix a memory leak (Daniel Berrange),<br/>
python bindings: fix unsigned long marshalling (Daniel Berrange)<br/>
</li>
<li>Improvements:<br/>
python bindings: release interpeter lock when calling C (Daniel Berrange),<br/>
don't raise HTTP error when looking information for a domain,<br/>
better error reporting (Daniel Berrange),<br/>
provide XML parsing errors,<br/>
extension of the test framework (Daniel Berrange),<br/>
python bindings: Domain instances now link to the Connect to avoid garbage collection and disconnect,<br/>
updated the localization strings<br/>
</li>
<li>Cleanups:<br/>
some refactoring to use the driver for all entry points<br/>
</li>
</ul>
<h3>0.1.8: Oct 16 2006</h3>
<ul>
<li>Documentation:<br/>
fix virsh man page (Noriko Mizumoto)<br/>
</li>
<li>Bug Fixes:<br/>
Bug for system with page size != 4k,<br/>
memory leak fixes (xend interface and XML parsing) (Daniel Berrange),<br/>
compile fix,<br/>
mlock/munlock size fixes (Daniel Berrange),<br/>
don't label crashed domains as shut off (Peter Vetere)<br/>
</li>
<li>Improvements:<br/>
vcpu number initialization (Philippe Berthault),<br/>
blktapdd support for alternate drivers like blktap (Daniel Berrange),<br/>
improve error reporting<br/>
</li>
</ul>
<h3>0.1.7: Sep 29 2006</h3>
<ul>
<li>Bug Fixes:<br/>
fix a memory bug on getting vcpu information from xend (Daniel Berrange),<br/>
fix another problem in the hypercalls change in Xen changeset 86d26e6ec89b when getting domain information (Daniel Berrange)<br/>
</li>
</ul>
<h3>0.1.6: Sep 22 2006</h3>
<ul>
<li>Features:<br/>
Support for localization of strings using gettext (Daniel Berrange),<br/>
Support for new Xen-3.0.3 cdrom and disk configuration (Daniel Berrange),<br/>
Support for setting VNC port when creating domains with new xend config files (Daniel Berrange)<br/>
</li>
<li>Bug Fixes:<br/>
Fix bug when running against xen-3.0.2 hypercalls (Jim Fehlig),<br/>
Fix reconnection problem when talking directly to http xend<br/>
</li>
</ul>
<h3>0.1.5: Sep 05 2006</h3>
<ul>
<li>Features:<br/>
Support for new hypercalls change in Xen changeset 86d26e6ec89b<br/>
</li>
<li>Bug Fixes:<br/>
virParseUUID() was wrong,<br/>
networking for paravirt guests (Daniel Berrange),<br/>
virsh on non-existent domains (Daniel Berrange),<br/>
string cast bug when handling error in python (Pete Vetere),<br/>
HTTP 500 xend error code handling (Pete Vetere and Daniel Berrange)<br/>
</li>
<li>Improvements:<br/>
test suite for SEXPR &lt;-&gt; XML format conversions (Daniel Berrange),<br/>
virsh output regression suite (Daniel Berrange),<br/>
new environ variable VIRSH_DEFAULT_CONNECT_URI for the default URI when connecting (Daniel Berrange),<br/>
graphical console support for paravirt guests (Jeremy Katz),<br/>
parsing of simple Xen config files (with Daniel Berrange),<br/>
early work on defined (not running) domains (Daniel Berrange),<br/>
virsh output improvement (Daniel Berrange)<br/>
</li>
</ul>
<h3>0.1.4: Aug 16 2006</h3>
<ul>
<li>Documentation:<br/>
spelling (Daniel Berrange),<br/>
test driver examples<br/>
</li>
<li>Bug Fixes:<br/>
spec file fix (Mark McLoughlin),<br/>
error report problem (with Hugh Brock),<br/>
long integer in Python bindings (with Daniel Berrange),<br/>
XML generation bug for CDRom (Daniel Berrange),<br/>
bug whem using number() XPath function (Mark McLoughlin),<br/>
fix python detection code,<br/>
remove duplicate initialization errors (Daniel Berrange)<br/>
</li>
<li>Improvements:<br/>
UUID in XML description (Peter Vetere),<br/>
proxy code cleanup,<br/>
virtual CPU and affinity support + virsh support (Michel Ponceau, Philippe Berthault, Daniel Berrange),<br/>
port and tty information for console in XML (Daniel Berrange),<br/>
added XML dump to driver and proxy support (Daniel Berrange),<br/>
extension of boot options with support for floppy and cdrom (Daniel Berrange),<br/>
features block in XML to report/ask PAE, ACPI, APIC for HVM domains (Daniel Berrange),<br/>
fail saide-effect operations when using read-only connection,<br/>
large improvements to test driver (Daniel Berrange)<br/>
</li>
</ul>
<h3>0.1.3: Jul 11 2006</h3>
<ul>
<li>Documentation:<br/>
augmented to cover hvm domains<br/>
</li>
<li>Bug Fixes:<br/>
build as non-root,<br/>
fix xend access when root,<br/>
handling of empty XML elements (Mark McLoughlin),<br/>
XML serialization and parsing fixes (Mark McLoughlin),<br/>
allow to create domains without disk (Mark McLoughlin)<br/>
</li>
<li>Improvements:<br/>
xenDaemonLookupByID from O(n^2) to O(n) (Daniel Berrange),<br/>
support for fully virtualized guest (Jim Fehlig, DV, Mark McLoughlin)<br/>
</li>
</ul>
<h3>0.1.2: Jul 03 2006</h3>
<ul>
<li>Features:<br/>
proxy mechanism for unprivileged read-only access by http<br/>
</li>
<li>Bug Fixes:<br/>
headers include paths fixup<br/>
</li>
</ul>
<h3>0.1.1: Jun 21 2006</h3>
<ul>
<li>Features:<br/>
Cope with API change introduced in Xen changeset 10277,<br/>
new test driver for regression checks (Daniel P. Berrange)<br/>
</li>
<li>Documentation:<br/>
Python examples (David Lutterkort),<br/>
new Perl binding URL,<br/>
man page update (Karel Zak)<br/>
</li>
<li>Portability:<br/>
ncurses fallback (Jim Fehlig),<br/>
VPATH builds (Daniel P. Berrange)<br/>
</li>
<li>Bug Fixes:<br/>
uninitialized memory access in error reporting,<br/>
S-Expr parsing (Jim Fehlig, Jeremy Katz),<br/>
virConnectOpen bug,<br/>
remove a TODO in xs_internal.c<br/>
</li>
<li>Improvements:<br/>
added UUID to XML serialization,<br/>
buffer usage (Karel Zak),<br/>
--connect argument to virsh (Daniel P. Berrange)<br/>
</li>
<li>Cleanups:<br/>
new entry points,<br/>
cleanup of libvirt.c (with Daniel P. Berrange)<br/>
</li>
</ul>
<h3>0.1.0: Apr 10 2006</h3>
<ul>
<li>Features:<br/>
new APIs for Node information and Reboot<br/>
</li>
<li>Documentation:<br/>
updates on architecture and format,<br/>
typo fix (Jim Meyering),<br/>
virsh: man page (Andrew Puch)<br/>
</li>
<li>Portability:<br/>
--with-xen-distdir option (Ronald Aigner),<br/>
out of tree build and pkginfo cflag fix (Daniel Berrange)<br/>
</li>
<li>Bug Fixes:<br/>
error message (Jim Meyering),<br/>
error allocation in virsh (Jim Meyering),<br/>
virDomainLookupByID (Jim Fehlig)<br/>
</li>
<li>Improvements:<br/>
enhancement and fixes of the XML description format (David Lutterkort and Jim Fehlig),<br/>
virsh: more options, create, nodeinfo (Karel Zak),<br/>
virsh: renaming of some options (Karel Zak),<br/>
virsh: use stderr only for errors (Karel Zak),<br/>
bindings: exception handling in examples (Jim Meyering),<br/>
bindings: perl ones out of tree (Daniel Berrange)<br/>
</li>
<li>Cleanups:<br/>
refactoring internals into a driver model,<br/>
more error handling,<br/>
structure sharing,<br/>
thread safety and ref counting<br/>
</li>
</ul>
<h3>0.0.6: Feb 28 2006</h3>
<ul>
<li>Features:<br/>
add UUID lookup and extract API,<br/>
add error handling APIs both synchronous and asynchronous,<br/>
added minimal hook for error handling at the python level<br/>
</li>
<li>Documentation:<br/>
augment the documentation and tests to cover error handling<br/>
</li>
<li>Improvements:<br/>
improved the python bindings<br/>
</li>
</ul>
<h3>0.0.5: Feb 23 2006</h3>
<ul>
<li>Features:<br/>
Added XML description parsing, dependance to libxml2, implemented the creation API virDomainCreateLinux(),<br/>
new APIs to lookup and name domain by UUID,<br/>
Adding regression tests in python and examples in C,<br/>
Added devhelp help for Gnome/Gtk programmers,<br/>
</li>
<li>Documentation:<br/>
web site improvement, extended the documentation to cover the XML format and Python API<br/>
</li>
<li>Bug Fixes:<br/>
fixed the XML dump when using the Xend access,<br/>
Fixed a few more problem related to the name change<br/>
</li>
</ul>
<h3>0.0.4: Feb 10 2006</h3>
<ul>
<li>Bug Fixes:<br/>
Fix various bugs introduced in the name change<br/>
</li>
</ul>
<h3>0.0.3: Feb 09 2006</h3>
<ul>
<li>Features:<br/>
Switch name from 'libvir' to libvirt,<br/>
Starting infrastructure to add code examples<br/>
</li>
<li>Improvements:<br/>
Update of python bindings for completeness<br/>
</li>
</ul>
<h3>0.0.2: Jan 29 2006</h3>
<ul>
<li>Features:<br/>
integration of HTTP xend RPC based on libxend by Anthony Liquori for most operations,<br/>
Adding Save and Restore APIs<br/>
</li>
<li>Documentation:<br/>
Update of the documentation, web site redesign (Diana Fong)<br/>
</li>
<li>Bug Fixes:<br/>
fix the Python bindings bug when domain and connections where freed<br/>
</li>
<li>Improvements:<br/>
extended the virsh command line tool (Karel Zak),<br/>
remove xenstore transactions (Anthony Liguori)<br/>
</li>
</ul>
</body>
</html>

View File

@@ -1,534 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1>Releases (2007)</h1>
<p>Here is the list of official releases made during the year 2007.
A similar list for <a href="news-2006.html">2006</a> is also available.
</p>
<p>It is also possible to just use
the <a href="downloads.html" shape="rect">GIT version or snapshot</a>,
contact the mailing list and check
the <a href="http://libvirt.org/git/?p=libvirt.git;a=log" shape="rect">GIT log</a>
to gauge progress.
</p>
<h3>0.4.0: Dec 18 2007</h3>
<ul>
<li>Features:<br/>
Compilation on Windows cygwin/mingw (Richard Jones),<br/>
Ruby bindings (David Lutterkort),<br/>
SASL based authentication for libvirt remote support (Daniel Berrange),<br/>
PolicyKit authentication (Daniel Berrange)<br/>
</li>
<li>Documentation:<br/>
example files for QEMU and libvirtd configuations (Daniel Berrange),<br/>
english cleanups (Jim Paris),<br/>
CIM and OpenVZ references,<br/>
document &lt;shareable/&gt;,<br/>
daemon startup when using QEMU/KVM,<br/>
document HV support for new NUMA calls (Richard Jones),<br/>
various english fixes (Bruce Montague),<br/>
OCaml docs links (Richard Jones),<br/>
describe the various bindings add Ruby link,<br/>
Windows support page (Richard Jones),<br/>
authentication documentation updates (Daniel Berrange)<br/>
</li>
<li>Bug Fixes:<br/>
NUMA topology error handling (Beth Kon),<br/>
NUMA topology cells without CPU (Beth Kon),<br/>
XML to/from XM bridge config (Daniel Berrange),<br/>
XM processing of vnc parameters (Daniel Berrange),<br/>
Reset migration source after failure (Jim Paris),<br/>
negative integer in config (Tatsuro Enokura),<br/>
zero terminating string buffer,<br/>
detect integer overflow (Jim Meyering),<br/>
QEmu command line ending fixes (Daniel Berrange),<br/>
recursion problem in the daemon (Daniel Berrange),<br/>
HVM domain with CDRom (Masayuki Sunou),<br/>
off by one error in NUMA cpu count (Beth Kon),<br/>
avoid xend errors when adding disks (Masayuki Sunou),<br/>
compile error (Chris Lalancette),<br/>
transposed fwrite args (Jim Meyering),<br/>
compile without xen and on solaris (Jim Paris),<br/>
parsing of interface names (Richard Jones),<br/>
overflow for starts on 32bits (Daniel Berrange),<br/>
fix problems in error reporting (Saori Fukuta),<br/>
wrong call to brSetForwardDelay changed to brSetEnableSTP (Richard Jones),<br/>
allow shareable disk in old Xen,<br/>
fix wrong certificate file (Jim Meyering),<br/>
avoid some startup error when non-root,<br/>
off-by-1 buffer NULL termination (Daniel Berrange),<br/>
various string allocation fixes (Daniel Berrange),<br/>
avoid problems with vnetXXX interfaces in domain dumps (Daniel Berrange),<br/>
build fixes for RHEL (Daniel Berrange),<br/>
virsh prompt should not depend on uid (Richard Jones),<br/>
fix scaping of '&lt;' (Richard Jones),<br/>
fix detach-disk on Xen tap devices (Saori Fukuta),<br/>
CPU parameter setting in XM config (Saori Fukuta),<br/>
credential handling fixes (Daniel Berrange),<br/>
fix compatibility with Xen 3.2.0 (Daniel Berrange)<br/>
</li>
<li>Improvements:<br/>
/etc/libvirt/qemu.conf configuration for QEMU driver (Daniel Berrange),<br/>
NUMA cpu pinning in config files (DV and Saori Fukuta),<br/>
CDRom media change in KVM/QEMU (Daniel Berrange),<br/>
tests for &lt;shareable/&gt; in configs,<br/>
pinning inactive domains for Xen 3.0.3 (Saori Fukuta),<br/>
use gnulib for portability enhancement (Jim Meyering),<br/>
--without-libvirtd config option (Richard Jones),<br/>
Python bindings for NUMA,<br/>
add extra utility functions to buffer (Richard Jones),<br/>
separate qparams module for handling query parameters (Richard Jones)<br/>
</li>
<li>Cleanups:<br/>
remove virDomainRestart from API as it was never used (Richard Jones),<br/>
constify params for attach/detach APIs (Daniel Berrange),<br/>
gcc printf attribute checkings (Jim Meyering),<br/>
refactoring of device parsing code and shell escaping (Daniel Berrange),<br/>
virsh schedinfo parameters validation (Masayuki Sunou),<br/>
Avoid risk of format string abuse (Jim Meyering),<br/>
integer parsing cleanups (Jim Meyering),<br/>
build out of the source tree (Jim Meyering),<br/>
URI parsing refactoring (Richard Jones),<br/>
failed strdup/malloc handling (Jim Meyering),<br/>
Make "make distcheck" work (Jim Meyering),<br/>
improve xen internall error reports (Richard Jones),<br/>
cleanup of the daemon remote code (Daniel Berrange),<br/>
rename error VIR_FROM_LINUX to VIR_FROM_STATS_LINUX (Richard Jones),<br/>
don't compile the proxy if without Xen (Richard Jones),<br/>
fix paths when configuring for /usr prefix,<br/>
improve error reporting code (Jim Meyering),<br/>
detect heap allocation failure (Jim Meyering),<br/>
disable xen sexpr parsing code if Xen is disabled (Daniel Berrange),<br/>
cleanup of the GetType entry point for Xen drivers,<br/>
move some QEmu path handling to generic module (Daniel Berrange),<br/>
many code cleanups related to the Windows port (Richard Jones),<br/>
disable the proxy if using PolicyKit,<br/>
readline availability detection,<br/>
test libvirtd's config-processing code (Jim Meyering),<br/>
use a variable name as sizeof argument (Jim Meyering)<br/>
</li>
</ul>
<h3>0.3.3: Sep 30 2007</h3>
<ul>
<li>Features:<br/>
Avahi mDNS daemon export (Daniel Berrange),<br/>
NUMA support (Beth Kan)<br/>
</li>
<li>Documentation:<br/>
cleanups (Toth Istvan),<br/>
typos (Eduardo Pereira)<br/>
</li>
<li>Bug Fixes:<br/>
memory corruption on large dumps (Masayuki Sunou),<br/>
fix virsh vncdisplay command exit (Masayuki Sunou),<br/>
Fix network stats TX/RX result (Richard Jones),<br/>
warning on Xen 3.0.3 (Richard Jones),<br/>
missing buffer check in virDomainXMLDevID (Hugh Brock),<br/>
avoid zombies when using remote (Daniel Berrange),<br/>
xend connection error message (Richard Jones),<br/>
avoid ssh tty prompt (Daniel Berrange),<br/>
username handling for remote URIs (Fabian Deutsch),<br/>
fix potential crash on multiple input XML tags (Daniel Berrange),<br/>
Solaris Xen hypercalls fixup (Mark Johnson)<br/>
</li>
<li>Improvements:<br/>
OpenVZ support (Shuveb Hussain and Anoop Cyriac),<br/>
CD-Rom reload on XEn (Hugh Brock),<br/>
PXE boot got QEmu/KVM (Daniel Berrange),<br/>
QEmu socket permissions customization (Daniel Berrange),<br/>
more QEmu support (Richard Jones),<br/>
better path detection for qemu and dnsmasq (Richard Jones),<br/>
QEmu flags are per-Domain (Daniel Berrange),<br/>
virsh freecell command,<br/>
Solaris portability fixes (Mark Johnson),<br/>
default bootloader support (Daniel Berrange),<br/>
new virNodeGetFreeMemory API,<br/>
vncpasswd extraction in configuration files if secure (Mark Johnson and Daniel Berrange),<br/>
Python bindings for block and interface statistics<br/>
</li>
<li>Cleanups:<br/>
virDrvOpenRemoteFlags definition (Richard Jones),<br/>
configure tests and output (Daniel Berrange)<br/>
</li>
</ul>
<h3>0.3.2: Aug 21 2007</h3>
<ul>
<li>Features:<br/>
KVM migration and save/restore (Jim Paris),<br/>
added API for migration (Richard Jones),<br/>
added APIs for block device and interface statistic (Richard Jones)<br/>
</li>
<li>Documentation:<br/>
examples for XML network APIs,<br/>
fix typo and schedinfo synopsis in man page (Atsushi SAKAI),<br/>
hypervisor support page update (Richard Jones)<br/>
</li>
<li>Bug Fixes:<br/>
remove a couple of leaks in QEmu/KVM backend (Daniel berrange),<br/>
fix GnuTLS 1.0 compatibility (Richard Jones),<br/>
--config/-f option mistake for libvirtd (Richard Jones),<br/>
remove leak in QEmu backend (Jim Paris),<br/>
fix some QEmu communication bugs (Jim Paris),<br/>
UUID lookup though proxy fix,<br/>
setvcpus checking bugs (with Atsushi SAKAI),<br/>
int checking in virsh parameters (with Masayuki Sunou),<br/>
deny devices attach/detach for &lt; Xen 3.0.4 (Masayuki Sunou),<br/>
XenStore query memory leak (Masayuki Sunou),<br/>
virsh schedinfo cleanup (Saori Fukuta)<br/>
</li>
<li>Improvements:<br/>
virsh new ttyconsole command,<br/>
networking API implementation for test driver (Daniel berrange),<br/>
qemu/kvm feature reporting of ACPI/APIC (David Lutterkort),<br/>
checking of QEmu architectures (Daniel berrange),<br/>
improve devices XML errors reporting (Masayuki Sunou),<br/>
speedup of domain queries on Xen (Daniel berrange),<br/>
augment XML dumps with interface devices names (Richard Jones),<br/>
internal API to query drivers for features (Richard Jones)<br/>
</li>
<li>Cleanups:<br/>
Improve virNodeGetInfo implentation (Daniel berrange),<br/>
general UUID code cleanup (Daniel berrange),<br/>
fix API generator file selection<br/>
</li>
</ul>
<h3>0.3.1: Jul 24 2007</h3>
<ul>
<li>Documentation:<br/>
index to remote page,<br/>
script to test certificates,<br/>
IPv6 remote support docs (Daniel Berrange),<br/>
document VIRSH_DEFAULT_CONNECT_URI in virsh man page (David Lutterkort),<br/>
Relax-NG early grammar for the network XML (David Lutterkort)<br/>
</li>
<li>Bug Fixes:<br/>
leaks in disk XML parsing (Masayuki Sunou),<br/>
hypervisor alignment call problems on PPC64 (Christian Ehrhardt),<br/>
dead client registration in daemon event loop (Daniel Berrange),<br/>
double free in error handling (Daniel Berrange),<br/>
close on exec for log file descriptors in the daemon (Daniel Berrange),<br/>
avoid caching problem in remote daemon (Daniel Berrange),<br/>
avoid crash after QEmu domain failure (Daniel Berrange)<br/>
</li>
<li>Improvements:<br/>
checks of x509 certificates and keys (Daniel Berrange),<br/>
error reports in the daemon (Daniel Berrange),<br/>
checking of Ethernet MAC addresses in XML configs (Masayuki Sunou),<br/>
support for a new clock switch between UTC and localtime (Daniel Berrange),<br/>
early version of OpenVZ support (Shuveb Hussain),<br/>
support for input devices on PS/2 and USB buses (Daniel Berrange),<br/>
more tests especially the QEmu support (Daniel Berrange),<br/>
range check in credit scheduler (with Saori Fukuta and Atsushi Sakai),<br/>
add support for listen VNC parameter un QEmu and fix command line arg (Daniel Berrange)<br/>
</li>
<li>Cleanups:<br/>
debug tracing (Richard Jones),<br/>
removal of --with-qemud-pid-file (Richard Jones),<br/>
remove unused virDeviceMode,<br/>
new util module for code shared between drivers (Shuveb Hussain),<br/>
xen header location detection (Richard Jones)<br/>
</li>
</ul>
<h3>0.3.0: Jul 09 2007</h3>
<ul>
<li>Features:<br/>
Secure Remote support (Richard Jones).
See <a href="http://libvirt.org/remote.html">the remote page</a> of the documentation<br/>
</li>
<li>Documentation:<br/>
remote support (Richard Jones),<br/>
description of the URI connection strings (Richard Jones),<br/>
update of virsh man page,<br/>
matrix of libvirt API/hypervisor support with version information (Richard Jones)<br/>
</li>
<li>Bug Fixes:<br/>
examples Makefile.am generation (Richard Jones),<br/>
SetMem fix (Mark Johnson),<br/>
URI handling and ordering of drivers (Daniel Berrange),<br/>
fix virsh help without hypervisor (Richard Jones),<br/>
id marshalling fix (Daniel Berrange),<br/>
fix virConnectGetMaxVcpus on remote (Richard Jones),<br/>
avoid a realloc leak (Jim Meyering),<br/>
scheduler parameters handling for Xen (Richard Jones),<br/>
various early remote bug fixes (Richard Jones),<br/>
remove virsh leaks of domains references (Masayuki Sunou),<br/>
configCache refill bug (Richard Jones),<br/>
fix XML serialization bugs<br/>
</li>
<li>Improvements:<br/>
QEmu switch to XDR-based protocol (Dan Berrange),<br/>
device attach/detach commands (Masayuki Sunou),<br/>
OCaml bindings (Richard Jones),<br/>
new entry points virDomainGetConnect and virNetworkGetConnect useful for bindings (Richard Jones),<br/>
reunitifaction of remote and qemu daemon under a single libvirtd with a config file (Daniel Berrange),<br/>
Localization updates<br/>
</li>
<li>Cleanups:<br/>
parsing of connection URIs (Richard Jones),<br/>
messages from virsh (Saori Fukuta),<br/>
Coverage files (Daniel Berrange),<br/>
Solaris fixes (Mark Johnson),<br/>
avoid [r]index calls (Richard Jones),<br/>
release information in Xen backend,<br/>
virsh cpupin command cleanups (Masayuki Sunou),<br/>
xen:/// support as standard Xen URI (Richard Jones and Daniel Berrange),<br/>
improve driver selection/decline mechanism (Richard Jones),<br/>
error reporting on XML dump (Richard Jones),<br/>
Remove unused virDomainKernel structure (Richard Jones),<br/>
daemon event loop event handling (Daniel Berrange),<br/>
various unifications cleanup in the daemon merging (Daniel Berrange),<br/>
internal file and timer monitoring API (Daniel Berrange),<br/>
remove libsysfs dependancy,<br/>
call brctl program directly (Daniel Berrange),<br/>
virBuffer functions cleanups (Richard Jones),<br/>
make init script LSB compliant,<br/>
error handling on lookup functions (Richard Jones),<br/>
remove internal virGetDomainByID (Richard Jones),<br/>
revamp of xen subdrivers interfaces (Richard Jones)<br/>
</li>
</ul>
<h3>0.2.3: Jun 08 2007</h3>
<ul>
<li>Documentation:<br/>
documentation for upcoming remote access (Richard Jones),<br/>
virConnectNumOfDefinedDomains doc (Jan Michael),<br/>
virsh help messages for dumpxml and net-dumpxml (Chris Wright)<br/>
</li>
<li>Bug Fixes:<br/>
RelaxNG schemas regexp fix (Robin Green),<br/>
RelaxNG arch bug (Mark McLoughlin),<br/>
large buffers bug fixes (Shigeki Sakamoto),<br/>
error on out of memory condition (Shigeki Sakamoto),<br/>
virshStrdup fix,<br/>
non-root driver when using Xen bug (Richard Jones),<br/>
use --strict-order when running dnsmasq (Daniel Berrange),<br/>
virbr0 weirdness on restart (Mark McLoughlin),<br/>
keep connection error messages (Richard Jones),<br/>
increase QEmu read buffer on help (Daniel Berrange),<br/>
rpm dependance on dnsmasq (Daniel Berrange),<br/>
fix XML boot device syntax (Daniel Berrange),<br/>
QEmu memory bug (Daniel Berrange),<br/>
memory leak fix (Masayuki Sunou),<br/>
fix compiler flags (Richard Jones),<br/>
remove type ioemu on recent Xen HVM for paravirt drivers (Saori Fukuta),<br/>
uninitialized string bug (Masayuki Sunou),<br/>
allow init even if the daemon is not running,<br/>
XML to config fix (Daniel Berrange)<br/>
</li>
<li>Improvements:<br/>
add a special error class for the test module (Richard Jones),<br/>
virConnectGetCapabilities on proxy (Richard Jones),<br/>
allow network driver to decline usage (Richard Jones),<br/>
extend error messages for upcoming remote access (Richard Jones),<br/>
on_reboot support for QEmu (Daniel Berrange),<br/>
save daemon output in a log file (Daniel Berrange),<br/>
xenXMDomainDefineXML can override guest config (Hugh Brock),<br/>
add attach-device and detach-device commands to virsh (Masayuki Sunou and Mark McLoughlin and Richard Jones),<br/>
make virGetVersion case insensitive and Python bindings (Richard Jones),<br/>
new scheduler API (Atsushi SAKAI),<br/>
localizations updates,<br/>
add logging option for virsh (Nobuhiro Itou),<br/>
allow arguments to be passed to bootloader (Hugh Brock),<br/>
increase the test suite (Daniel Berrange and Hugh Brock)<br/>
</li>
<li>Cleanups:<br/>
Remove VIR_DRV_OPEN_QUIET (Richard Jones),<br/>
disable xm_internal.c for Xen &gt; 3.0.3 (Daniel Berrange),<br/>
unused fields in _virDomain (Richard Jones),<br/>
export __virGetDomain and __virGetNetwork for libvirtd only (Richard Jones),<br/>
ignore old VNC config for HVM on recent Xen (Daniel Berrange),<br/>
various code cleanups,<br/>
-Werror cleanup (Hugh Brock)<br/>
</li>
</ul>
<h3>0.2.2: Apr 17 2007</h3>
<ul>
<li>Documentation:<br/>
fix errors due to Amaya (with Simon Hernandez),<br/>
virsh uses kB not bytes (Atsushi SAKAI),<br/>
add command line help to qemud (Richard Jones),<br/>
xenUnifiedRegister docs (Atsushi SAKAI),<br/>
strings typos (Nikolay Sivov),<br/>
ilocalization problem raised by Thomas Canniot<br/>
</li>
<li>Bug Fixes:<br/>
virsh memory values test (Masayuki Sunou),<br/>
operations without libvirt_qemud (Atsushi SAKAI),<br/>
fix spec file (Florian La Roche, Jeremy Katz, Michael Schwendt),<br/>
direct hypervisor call (Atsushi SAKAI),<br/>
buffer overflow on qemu networking command (Daniel Berrange),<br/>
buffer overflow in quemud (Daniel Berrange),<br/>
virsh vcpupin bug (Masayuki Sunou),<br/>
host PAE detections and strcuctures size (Richard Jones),<br/>
Xen PAE flag handling (Daniel Berrange),<br/>
bridged config configuration (Daniel Berrange),<br/>
erroneous XEN_V2_OP_SETMAXMEM value (Masayuki Sunou),<br/>
memory free error (Mark McLoughlin),<br/>
set VIR_CONNECT_RO on read-only connections (S.Sakamoto),<br/>
avoid memory explosion bug (Daniel Berrange),<br/>
integer overflow for qemu CPU time (Daniel Berrange),<br/>
QEMU binary path check (Daniel Berrange)<br/>
</li>
<li>Cleanups:<br/>
remove some global variables (Jim Meyering),<br/>
printf-style functions checks (Jim Meyering),<br/>
better virsh error messages,<br/>
increase compiler checkings and security (Daniel Berrange),<br/>
virBufferGrow usage and docs,<br/>
use calloc instead of malloc/memset,<br/>
replace all sprintf by snprintf,<br/>
avoid configure clobbering user's CTAGS (Jim Meyering),<br/>
signal handler error cleanup (Richard Jones),<br/>
iptables internal code claenup (Mark McLoughlin),<br/>
unified Xen driver (Richard Jones),<br/>
cleanup XPath libxml2 calls,<br/>
IPTables rules tightening (Daniel Berrange)<br/>
</li>
<li>Improvements:<br/>
more regression tests on XML (Daniel Berrange),<br/>
Python bindings now generate exception in error cases (Richard Jones),<br/>
Python bindings for vir*GetAutoStart (Daniel Berrange),<br/>
handling of CD-Rom device without device name (Nobuhiro Itou),<br/>
fix hypervisor call to work with Xen 3.0.5 (Daniel Berrange),<br/>
DomainGetOSType for inactive domains (Daniel Berrange),<br/>
multiple boot devices for HVM (Daniel Berrange)<br/>
</li>
</ul>
<h3>0.2.1: Mar 16 2007</h3>
<ul>
<li>Features:<br/>
Add support for network autostart and init scripts (Mark McLoughlin),<br/>
New API virConnectGetCapabilities() to detect the virtualization capabilities of a host (Richard Jones)<br/>
</li>
<li>Documentation:<br/>
Documentation updates especially on the XML formats<br/>
</li>
<li>Portability:<br/>
IA64 fixes (Atsushi SAKAI),<br/>
dependancies and build (Daniel Berrange),<br/>
fix xend port detection (Daniel Berrange),<br/>
icompile time warnings (Mark),<br/>
avoid const related compiler warnings (Daniel Berrange),<br/>
automated builds (Daniel Berrange),<br/>
pointer/int mismatch (Richard Jones),<br/>
configure time selection of drivers,<br/>
libvirt spec hacking (Daniel Berrange)<br/>
</li>
<li>Bug Fixes:<br/>
libvirt_qemud daemon path (Daniel Berrange),<br/>
libvirt config directory (Daniel Berrange and Mark McLoughlin),<br/>
memory leak in qemud (Mark),<br/>
various fixes on network support (Mark),<br/>
avoid Xen domain zombies on device hotplug errors (Daniel Berrange),<br/>
various fixes on qemud (Mark),<br/>
args parsing (Richard Jones),<br/>
virsh -t argument (Saori Fukuta),<br/>
avoid virsh crash on TAB key (Daniel Berrange),<br/>
detect xend operation failures (Kazuki Mizushima),<br/>
don't listen on null socket (Rich Jones),<br/>
read-only socket cleanup (Rich Jones),<br/>
use of vnc port 5900 (Nobuhiro Itou),<br/>
assorted networking fixes (Daniel Berrange),<br/>
shutoff and shutdown mismatches (Kazuki Mizushima),<br/>
unlimited memory handling (Atsushi SAKAI),<br/>
python binding fixes (Tatsuro Enokura)<br/>
</li>
<li>Improvements:<br/>
qemud signal handling (Mark),<br/>
don't shutdown or reboot domain0 (Kazuki Mizushima),<br/>
QEmu version autodetection (Daniel Berrange),<br/>
network UUIDs (Mark),<br/>
speed up UUID domain lookups (Tatsuro Enokura and Daniel Berrange),<br/>
support for paused QEmu CPU (Daniel Berrange),<br/>
keymap VNC attribute support (Takahashi Tomohiro and Daniel Berrange),<br/>
maximum number of virtual CPU (Masayuki Sunou),<br/>
virtsh --readonly option (Rich Jones),<br/>
python bindings for new functions (Daniel Berrange)<br/>
</li>
<li>Cleanups:<br/>
Various internal cleanups (Richard Jones, Daniel Berrange, Mark McLoughlin)<br/>
</li>
</ul>
<h3>0.2.0: Feb 14 2007</h3>
<ul>
<li>Features:<br/>
Add support for QEmu and KVM virtualization (Daniel Berrange),<br/>
Add support for network configuration (Mark McLoughlin)<br/>
</li>
<li>Bug Fixes:<br/>
avoid a crash in connect (Daniel Berrange),<br/>
virsh args parsing (Richard Jones)<br/>
</li>
<li>Improvements:<br/>
regression testing (Daniel Berrange),<br/>
localization string updates<br/>
</li>
<li>Cleanups:<br/>
Various internal cleanups (Mark McLoughlin, Richard Jones, Daniel Berrange, Karel Zak)<br/>
</li>
</ul>
<h3>0.1.11: Jan 22 2007</h3>
<ul>
<li>Features:<br/>
Added a Relax-NG schemas to check XML instances<br/>
</li>
<li>Bug Fixes:<br/>
Remove memory leak when freeing virConf objects<br/>
</li>
<li>Improvements:<br/>
Finish XML &lt;-&gt; XM config files support,<br/>
Finishing inactive domain support (Daniel Berrange)<br/>
</li>
</ul>
</body>
</html>

View File

@@ -1,580 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1>Releases (2008)</h1>
<p>Here is the list of official releases made during the year 2008.
A similar list for <a href="news-2007.html">2007</a> is also available.
</p>
<p>It is also possible to just use
the <a href="downloads.html" shape="rect">GIT version or snapshot</a>,
contact the mailing list and check
the <a href="http://libvirt.org/git/?p=libvirt.git;a=log" shape="rect">GIT log</a>
to gauge progress.
</p>
<h3>0.5.1: Dec 04 2008</h3>
<ul>
<li>Portability:<br/>
fix missing dep in spec file,<br/>
fix compilation with new NUMA libraries (Daniel Berrange),<br/>
udev compatibility for RHEL (Chris Lalancette)<br/>
</li>
<li>Documentation:<br/>
documentation copy and paste errors and typo (Cole Robinson)<br/>
</li>
<li>Bug Fixes:<br/>
add a delay in storage backend for disks to show up (Chris Lalancette),<br/>
fix parsing for CDRom device with no source (Daniel Berrange),<br/>
use xenstore to list domains to avoid some bugs (Guido Günther),<br/>
remove a leak in xen inotify code (Daniel Berrange),<br/>
UML driver freeing of uninitialialized variable (Ron Yorston),<br/>
fix UML inotify code (Daniel Berrange),<br/>
crash when adding storage without a format (Cole Robinson)<br/>
</li>
<li>Improvements:<br/>
use xend preferably to hypervisor call to set Xen max memory (Jim Fehlig),<br/>
allow remote://hostname/ URI for automatic probe of hypervisors (Daniel Berrange),<br/>
fix daemon configuration regression testing (Jim Meyering),<br/>
check /usr/bin/kvm for QEmu driver init (Guido Günther),<br/>
proper active vs. inactive differentiation (Guido Günther),<br/>
improve MTU setting on tap interfaces (Eduardo Habkost),<br/>
increase timeout for initial QEmu monitor poll (Cole Robinson)<br/>
</li>
<li>Cleanups:<br/>
fix improper initialisations (Jim Meyering)<br/>
</li>
</ul>
<h3>0.5.0: Nov 25 2008</h3>
<ul>
<li>Features:<br/>
CPU and scheduler support for LXC (Dan Smith),<br/>
SDL display configuration (Daniel Berrange),<br/>
domain lifecycle event support for QEmu and Xen with python bindings (Ben Guthro and Daniel Berrange),<br/>
KVM/QEmu migration support (Rich Jones and Chris Lalancette),<br/>
User Mode Linux driver (Daniel Berrange),<br/>
API for node device enumeration using HAL and DeviceKit with python bindings (David Lively)<br/>
</li>
<li>Portability:<br/>
RHEL build fixes,<br/>
VPATH build (Guido Gunther),<br/>
many MinGW related cleanups and fixes (Richard Jones),<br/>
compilation without libvirtd (Richard Jones),<br/>
Add a Windows icon (Richard Jones),<br/>
sys/poll.h portability fixes (Daniel Berrange),<br/>
gnulib and mingw cleanups (Jim Meyering)<br/>
</li>
<li>Documentation:<br/>
virsh man page cleanups (Mark McLoughlin),<br/>
doc for NIC model selection (Richard Jones),<br/>
monitoring section,<br/>
link to AMQP bindings,<br/>
inew APIs,<br/>
UML driver docs (Daniel Berrange)<br/>
</li>
<li>Bug Fixes:<br/>
Xen interfaces ordering (Jim Fehlig),<br/>
startup timeout with multiple pty (Cole Robinson),<br/>
segfault if QEmu without active virtual network (Cole Robinson),<br/>
qemu small leak (Eduardo Habkost),<br/>
index creation for more than 26 disks (Sanjay Rao and Chris Wright),<br/>
virRealloc handling of 0 (Daniel Berrange),<br/>
missing pointer initialization (Chris Lalancette),<br/>
bus device index bug (Guido Günther),<br/>
avoid crash in some error patch (Chris Lalancette),<br/>
fix a problem in storage back-end (Chris Lalancette),<br/>
minimum domain memory size check for Xen (Shigeki Sakamoto),<br/>
switch off QEmu cache if device is shared (Charles Duffy),<br/>
logical volume definition before scan bug (Chris Lalancette),<br/>
a couple of memory leaks on QEmu vnc (Jim Meyering),<br/>
lvs parsing fixes (Cole Robinson)<br/>
</li>
<li>Improvements:<br/>
LXC resources control and internal cgroup API (Dan Smith),<br/>
virDomainCreateLinux renamed virDomainDefineXML,<br/>
network driver modularization (Daniel Berrange),<br/>
change the way domain and net are reported in errors (Jim Meyering),<br/>
partition table scan on iSCSI (Chris Lalancette),<br/>
qemudDiskDeviceName to handle normal disks (Guido Günther),<br/>
qemudDomainBlockStats improvement (Guido Günther),<br/>
scsi/virtio hotplug support for KVM (Guido Günther),<br/>
USB hot addition in QEmu (Guido Günther),<br/>
logical pool and storage backend XML dump improvement (Chris Lalancette),<br/>
MAC addresses prefix per driver (Daniel Berrange),<br/>
OpenVZ getVersion support (Daniel Berrange),<br/>
hot removal of scsi/virtio disks for KVM (Guido Günther),<br/>
test storage driver (Cole Robinson),<br/>
iSCSI and disk storage driver improvement on path handling (Chris Lalancette),<br/>
UUID and ID support for Xenner (Daniel Berrange),<br/>
better logging when when executing commands (Cole Robinson),<br/>
bridged network for OpenVZ (Daniel Berrange),<br/>
OpenVZ config file params (Evgeniy Sokolov),<br/>
allow to build drivers as libtool convenience libs (Daniel Berrange),<br/>
fully versioned linker script for exported ABI (Daniel Berrange),<br/>
Push URI probing down into drivers open (Daniel Berrange),<br/>
move all stateful drivers into the daemon binary (Daniel Berrange),<br/>
improve domain event with a detail field (Daniel Berrange),<br/>
domain events for QEMU driver (Daniel Berrange),<br/>
event unregister callback crash (David Lively),<br/>
plug a few leaks (Daniel Berrange),<br/>
internal APIs for handling node device XML config (David Lively),<br/>
tweaks to node device implementation (Daniel Berrange),<br/>
OpenVZ vCPUs values init (Evgeniy Sokolov)<br/>
</li>
<li>Cleanups:<br/>
C99 initializers (Guido Gunther),<br/>
test output (Cole Robinson),<br/>
debug macro centralization (Cole Robinson),<br/>
various error handling (Guido Günther),<br/>
safewrite use cleanup (Jim Meyering),<br/>
centralize error reporting logic (Cole Robinson),<br/>
avoid printf warnings (Daniel Berrange),<br/>
use arrays instead of list for internal APIs (Daniel Berrange),<br/>
remove many format string warnings Jim Meyering),<br/>
avoid syntax check warnings (Chris Lalancette),<br/>
improve po-check and list generation (Jim Meyering),<br/>
.gitignore generation and handling (Jim Meyering),<br/>
use ARRAY_CARDINALITY (Jim Meyering),<br/>
gnulib updates and switch to use netdb.h (Jim Meyering),<br/>
drop usage of socket_errno (Jim Meyering),<br/>
remove socketcompat.h (Jim Meyering),<br/>
more tests (Jim Meyering),<br/>
drop virStringList (Daniel Berrange),<br/>
reformatting and isolation of the error APIs (Daniel Berrange),<br/>
cleanup internal.h and move internal APIs in specific headers (Daniel Berrange),<br/>
move domain events helpers into domain_events.c (Daniel Berrange),<br/>
cleanup the way optional modules are compiled (Daniel Berrange),<br/>
add new logging module,<br/>
optional dlopen of drivers (Daniel Berrange),<br/>
various new tests (Jim Meyering),<br/>
cleanups when Xen is not configured in (Daniel Berrange),<br/>
add some missing functions comments (Jim Meyering)<br/>
</li>
</ul>
<h3>0.4.6: Sep 23 2008</h3>
<ul>
<li>Documentation:<br/>
fix some comments in API (Anton Protopopov),<br/>
cleanup and extension of bindings and windows pages (Richard Jones)<br/>
</li>
<li>Portability:<br/>
missing include file (Richard Jones)<br/>
</li>
<li>Bug Fixes:<br/>
avoid a segfault if missing qemu emulator (Cole Robinson),<br/>
reading vncdisplay from xend domain (Cole Robinson),<br/>
segfault in OpenVZ (Evgeniy Sokolov),<br/>
fix parsing of pool without a source (Chris Lalancette and Daniel Berrange)<br/>
</li>
<li>Improvements:<br/>
add storage disk volume delete (Cole Robinson),<br/>
KVM dynamic max CPU detection (Guido Günther),<br/>
spec file improvement for minimal builds (Ben Guthro),<br/>
improved error message in XM configuration module (Richard Jones),<br/>
network config in OpenVZ support (Evgeniy Sokolov),<br/>
enable stopping a pool in logical storage backend and cleanup deletion of pool (Chris Lalancette)<br/>
</li>
<li>Cleanups:<br/>
deadcode removal (Nguyen Anh Quynh),<br/>
fix one test case (Daniel Berrange),<br/>
various strings and space cleanups (Daniel Berrange),<br/>
structure initialization cleanup (Chris Lalancette)<br/>
</li>
</ul>
<h3>0.4.5: Sep 08 2008</h3>
<ul>
<li>Features:<br/>
NETNS support for Linux containers (Dan Smith),<br/>
unified XML domain and network parsing for all drivers (Daniel Berrange),<br/>
OpenVZ features improvements (Evgeniy Sokolov),<br/>
OpenVZ and Linux containers support now default,<br/>
USB device passthrough for QEmu/KVM (Guido Günther),<br/>
storage pool source discovery (David Lively)<br/>
</li>
<li>Portability:<br/>
fixes for MinGW (Atsushi SAKAI and Daniel Berrange),<br/>
detection of xen lib improvement (David Lively),<br/>
storage backend portability for SLES (David Lively),<br/>
fix make distclean and distcheck (Jim Meyering),<br/>
fix build failures on RHEL4,<br/>
lot of MinGW portability fixes (Atsushi SAKAI and Daniel Berrange),<br/>
HTML generation fix,<br/>
-lpthread explicit linking when needed (Jim Meyering)<br/>
</li>
<li>Documentation:<br/>
various typo fixes (Anton Protopopov, Toth István, Atsushi SAKAI, Nguyen Anh Quynh),<br/>
Java bindings docs,<br/>
remove Xen centric comments (Guido Günther),<br/>
various typo in comments (Chris Lalancette),<br/>
docs and API comments fixes (Charles Duffy),<br/>
how to contribute to open source link (Richard Jones),<br/>
memory unit fixups (matthew chan)<br/>
</li>
<li>Bug Fixes:<br/>
memory leaks and testing for OOM (Daniel Berrange),<br/>
do_open driver bug (Evgeniy Sokolov),<br/>
don't use polkit auth when running as non-root (Daniel Berrange),<br/>
boot of CDRom devices in QEmu/KVM (Daniel Berrange),<br/>
fix OpenVZ probe function (Evgeniy Sokolov),<br/>
ID related lookup fixes in OpenVZ (Evgeniy Sokolov),<br/>
pool cration for netfs (Cole Robinson),<br/>
check for migrate support with QEmu (Guido Günther),<br/>
check against double create with QEmu (Guido Günther),<br/>
broken open failure detection in QEmu (Guido Günther),<br/>
UUID string conversions in QEmu (Guido Günther),<br/>
various small cleanup and bug fixes (Daniel Berrange),<br/>
ID related fixes in the test driver (Daniel Berrange),<br/>
better error reporting on XML parsing (Daniel Berrange),<br/>
empty CD-ROM source device section (Chris Lalancette),<br/>
avoid crashes for interface without a name in QEmu (Guido Günther),<br/>
provide the real vncport (Charles Duffy),<br/>
fix forward delay (Daniel Berrange),<br/>
new VM state is initialized to be SHUTOFF (Daniel Berrange),<br/>
virsh attach-disk bug fixes (Chris Lalancette),<br/>
veth clash of device names (Dan Smith),<br/>
connection lookup fixes on storage creation (Cole Robinson),<br/>
parted call fix (Cole Robinson),<br/>
use "server" option when using serial/telnet with QEmu (Mark McLoughlin),<br/>
duplicate virInitialize calls (Nguyen Anh Quynh),<br/>
many fixes to virExec and related functions (Daniel Berrange),<br/>
size of disk without partitions (Cole Robinson),<br/>
creating and cleaning up logical volumes with target path (Cole Robinson),<br/>
fix reporting of virConnectOpen problems (Daniel Berrange),<br/>
veth cleanup at shutdown (Dan Smith),<br/>
lookup of Xen VMs after define (Cole Robinson),<br/>
fix emulator reported capabilities (Cole Robinson),<br/>
avoid segfault on KVM CD eject (Cole Robinson),<br/>
fix disk ordering and avoid duplicate in QEmu XML parsing (Cole Robinson),<br/>
update domain XML after device hotplug (Cole Robinson),<br/>
use poweroff instead of halt when shutting down a Xen domain (John Levon),<br/>
don't dump core of Xen domain live by default (John Levon),<br/>
vgcreate command line size bug (Jim Fehlig),<br/>
signed/unsigned issue in probing file (Cole Robinson),<br/>
Fix Xen domains without PVFB console (Daniel Berrange),<br/>
OpenVZ config read bug fix (Evgeniy Sokolov)<br/>
</li>
<li>Improvements:<br/>
improved failure diagnostic for TAP (Jim Meyering),<br/>
better exec and error diagnostic for OpenVZ commands (Evgeniy Sokolov),<br/>
OpenVZ auto start and stop of domains (Evgeniy Sokolov),<br/>
OpenVZ domain cpu time consumption (Evgeniy Sokolov),<br/>
virsh shutdown improvements and test (Jim Meyering),<br/>
better report of XML well formedness errors (Richard Jones),<br/>
new XML elements (Daniel Berrange),<br/>
virsh "edit" command (Richard Jones),<br/>
save UUID of OpenVZ domains (Evgeniy Sokolov),<br/>
improve xen blocks statistics (Chris Lalancette),<br/>
gnulib updates (Jim Meyering),<br/>
allow to add disk as USB devices (Guido Günther),<br/>
LXC container process should survive libvirtd restarts (Daniel Berrange),<br/>
allow to define static host domain configs,<br/>
number of CPU used by OpenVZ domains (Evgeniy Sokolov),<br/>
private root fs for LXC (Daniel Berrange),<br/>
storage source information in storage pools (David Lively),<br/>
virsh reports attach and detach success (Cole Robinson),<br/>
detect failure in QEmu eject command (Cole Robinson),<br/>
add support for eect on floppy and SCSI cdroms for QEmu (Cole Robinson),<br/>
LXC hypervisor version extraction (Dan Smith),<br/>
Augeas config file support (Daniel Berrange),<br/>
support for a domain name in network config (JJ Reynolds)<br/>
</li>
<li>Cleanups:<br/>
Python verbosity cleanup (Ryan Scott),<br/>
space and tabs cleanups (Atsushi SAKAI),<br/>
OpenVZ and LXC drivers cleanup and unification of XML handling (Daniel Berrange),<br/>
updates to Relax-NG XML schemas (John Levon and Daniel Berrange),<br/>
more printf format checkings (Jim Meyering),<br/>
VIR_FREE related cleanups (Jim Meyering),<br/>
integer string parsing cleanup (Evgeniy Sokolov),<br/>
initial OpenVZ xml refactoring (Evgeniy Sokolov),<br/>
better error message on domain redefine (Charles Duffy),<br/>
check XML files against the RNG Schemas (Daniel Berrange),<br/>
const-correctness in virsh (Richard Jones and Jim Meyering),<br/>
const-correctness and cleanups in LXC and OpenVZ drivers (Daniel Berrange),<br/>
virFileLinkPointsTo rewrite (Jim Meyering),<br/>
cleanup of the conditional compilation of C files (Daniel Berrange),<br/>
shell quoting fixes (Jim Meyering),<br/>
parallel build support (James Morris and Jim Meyering),<br/>
new convenience virFileReadLimFD function (Jim Meyering)<br/>
</li>
</ul>
<h3>0.4.4: Jun 25 2008</h3>
<ul>
<li>Bug Fixes:<br/>
QEmu network serialization (Kaitlin Rupert),<br/>
internal memory allocation fixes (Chris Lalancette Jim Meyering),<br/>
virsh large file config problem (Jim Meyering),<br/>
xen list APIs when max is zero,<br/>
string escape problems in the xm driver<br/>
</li>
<li>Improvements:<br/>
add autogen to tarballs,<br/>
improve iSCSI support (Chris Lalancette),<br/>
localization updates<br/>
</li>
<li>Cleanups:<br/>
const-ness fixed (Daniel P. Berrange),<br/>
string helpers for enumerations (Daniel P. Berrange)<br/>
</li>
</ul>
<h3>0.4.3: Jun 12 2008</h3>
<ul>
<li>Features:<br/>
Linux Container start and stop (Dave Leskovec),<br/>
Network interface model settings (Daniel Berrange),<br/>
serial and parallel device support for QEmu and Xen (Daniel Berrange),<br/>
Sound support for QEmu and Xen (Cole Robinson),<br/>
vCPU settings for QEmu (Cole Robinson),<br/>
support for NUMA and vCPU pinning in QEmu (Daniel Berrange),<br/>
new virDomainBlockPeek API (Richard Jones)<br/>
</li>
<li>Documentation:<br/>
coding guidelines (Jim Meyering and Richard Jones),<br/>
small man page missing entries and cleanup,<br/>
Web site revamp (Daniel Berrange),<br/>
typo fixes (Atsushi SAKAI),<br/>
more docs on network XML format (Daniel Berrange),<br/>
libvirt Wiki (Daniel Berrange),<br/>
policykit config docs (Cole Robinson),<br/>
XML domain docs revamp (Daniel Berrange),<br/>
docs for remote listen-tls/tcp fixes (Kenneth Nagin)<br/>
</li>
<li>Bug Fixes:<br/>
save change to config file for Xen (Ryan Scott),<br/>
fix /var/run/libvirt/ group ownership (Anton Protopopov),<br/>
ancient libparted workaround (Soren Hansen),<br/>
out of bount array access (Daniel Berrange),<br/>
remote check bug (Dave Leskovec),<br/>
LXC signal and daemon restart problems (Dave Leskovec),<br/>
bus selection logic fix in the daemon config (Daniel Berrange),<br/>
2 memory leaks in the daemon (Jim Meyering),<br/>
daemon pid file logic bug fix (Daniel Berrange),<br/>
python generator fixes (Daniel Berrange),<br/>
ivarious leaks and memory problem pointed by valgrind (Daniel Berrange),<br/>
iptables forwarding cleanup (Daniel Berrange),<br/>
Xen cpuset value checking (Hiroyuki Kaguchi),<br/>
container process checks for LXC (Dave Leskovec),<br/>
let xend check block device syntax (Hiroyuki Kaguchi),<br/>
UUIDString for python fixes (Cole Robinson)<br/>
</li>
<li>Improvements:<br/>
fixes for MinGW compilation (Richard Jones),<br/>
autostart for running Xen domains (Cole Robinson),<br/>
control of listening IP for daemon (Stefan de Konink),<br/>
various Xenner related fixes and improvements (Daniel Berrange)<br/>
autostart status printed in virsh domainfo (Shigeki Sakamoto),<br/>
better error messages for xend driver (Richard Jones)<br/>
</li>
<li>Cleanups:<br/>
OpenVZ compilation (Richard Jones),<br/>
conn dom and net fields deprecation in error structures (Richard Jones),<br/>
Xen-ism on UUID (Richard Jones),<br/>
add missing .pod to dist (Richard Jones),<br/>
tab cleanup from sources (Jim Meyering),<br/>
remove unused field in virsh control structure (Richard Jones),<br/>
compilation without pthread.h (Jim Meyering),<br/>
cleanup of tests (Daniel Berrange),<br/>
syntax-check improvements (Jim Meyering),<br/>
python cleanup,<br/>
remove dependancy on libc is_* character tests (Jim Meyering),<br/>
format related cleanups (Jim Meyering),<br/>
cleanup of the buffer internal APIs (Daniel Berrange),<br/>
conversion to the new memory allocation API (Daniel Berrange),<br/>
lcov coverage testing (Daniel Berrange),<br/>
gnulib updates (Jim Meyering),<br/>
compatibility fix with RHEL 5 (Daniel Berrange),<br/>
SuSE compatibility fix (Jim Fehlig),<br/>
const'ification of a number of structures (Jim Meyering),<br/>
string comparison macro cleanups (Daniel Berrange),<br/>
character range testing cleanups and assorted bug fixes (Jim Meyering),<br/>
QEmu test fixes (Daniel Berrange),<br/>
configure macro cleanup (Daniel Berrange),<br/>
refactor QEmu command line building code (Daniel Berrange),<br/>
type punning warning in remote code (Richard Jones),<br/>
refactoring of internal headers (Richard Jones),<br/>
generic out of memory testing and associated bug fixes (Daniel Berrange),<br/>
don't raise internal error for unsupported features (Kaitlin Rupert),<br/>
missing driver entry points (Daniel Berrange)<br/>
</li>
</ul>
<h3>0.4.2: Apr 08 2008</h3>
<ul>
<li>Features:<br/>
memory operation for QEmu/KVM driver (Cole Robinson),<br/>
new routed networking schemas (Mads Olesen)<br/>
</li>
<li>Documentation:<br/>
storage documentation fixes (Atsushi Sakai),<br/>
many typo cleanups (Atsushi Sakai),<br/>
string fixes (Francesco Tombolini)<br/>
</li>
<li>Bug Fixes:<br/>
pointer errors in qemu (Jim Meyering),<br/>
iSCSI login fix (Chris Lalancette),<br/>
well formedness error in test driver capabilities (Cole Robinson),<br/>
fixes cleanup code when daemon exits (Daniel Berrange),<br/>
CD Rom change on live QEmu/KVM domains (Cole Robinson),<br/>
setting scheduler parameter is forbidden for read-only (Saori Fukuta)i,<br/>
fixes for TAP devices (Daniel Berrange),<br/>
assorted storage driver fixes (Daniel Berrange),<br/>
Makefile fixes (Jim Meyering),<br/>
Xen-3.2 hypercall fix,<br/>
fix iptables rules to avoid blocking traffic within virtual network (Daniel Berrange),<br/>
XML output fix for directory pools (Daniel Berrange),<br/>
remove dandling domain/net/conn pointers from error data,<br/>
do not ask polkit auth when root (Daniel Berrange),<br/>
handling of fork and pipe errors when starting the daemon (Richard Jones)<br/>
</li>
<li>Improvements:<br/>
better validation of MAC addresses (Jim Meyering and Hiroyuki Kaguchi),<br/>
virsh vcpupin error report (Shigeki Sakamoto),<br/>
keep boot tag on HVM domains (Cole Robinson),<br/>
virsh non-root should not be limited to read only anymore (Daniel Berrange),<br/>
switch to polkit-auth from polkit-grant (Daniel Berrange),<br/>
better handling of missing SElinux data (Daniel Berrange and Jim Meyering),<br/>
cleanup of the connection opening logic (Daniel Berrange),<br/>
first bits of Linux Containers support (Dave Leskovec),<br/>
scheduler API support via xend (Saori Fukuta),<br/>
improvement of the testing framework and first tests (Jim Meyering),<br/>
missing error messages from virsh parameters validation (Shigeki Sakamoto),<br/>
improve support of older iscsiadm command (Chris Lalancette),<br/>
move linux container support in the daemon (Dan Berrange),<br/>
older awk implementation support (Mike Gerdts),<br/>
NUMA support in test driver (Cole Robinson),<br/>
xen and hvm added to test driver capabilities (Cole Robinson)<br/>
</li>
<li>Cleanups:<br/>
remove unused getopt header (Jim Meyering),<br/>
mark more strings as translatable (Guido G&#xFC;nther and Jim Meyering),<br/>
convert error strings to something meaningful and translatable (Jim Meyering),<br/>
Linux Containers code cleanup,<br/>
last error initializer (Guido G&#xFC;nther)<br/>
</li>
</ul>
<h3>0.4.1: Mar 03 2008</h3>
<ul>
<li>Features:<br/>
build on MacOSX (Richard Jones),<br/>
storage management (Daniel Berrange),<br/>
Xenner - Xen on KVM - support (Daniel Berrange)<br/>
</li>
<li>Documentation:<br/>
Fix of various typos (Atsushi SAKAI),<br/>
memory and vcpu settings details (Richard Jones),<br/>
ethernet bridging typo (Maxwell Bottiger),<br/>
add storage APIs documentation (Daniel Berrange)<br/>
</li>
<li>Bug Fixes:<br/>
OpenVZ code compilation (Mikhail Pokidko),<br/>
crash in policykit auth handling (Daniel Berrange),<br/>
large config files (Daniel Berrange),<br/>
cpumap hypercall size (Saori Fukuta),<br/>
crash in remote auth (Daniel Berrange),<br/>
ssh args error (Daniel Berrange),<br/>
preserve vif order from config files (Hiroyuki Kaguchi),<br/>
invalid pointer access (Jim Meyering),<br/>
virDomainGetXMLDesc flag handling,<br/>
device name conversion on stats (Daniel Berrange),<br/>
double mutex lock (Daniel Berrange),<br/>
config file reading crashes (Guido Guenther),<br/>
xenUnifiedDomainSuspend bug (Marcus Meissner),<br/>
do not crash if /sys/hypervisor/capabilities is missing (Mark McLoughlin),<br/>
virHashRemoveSet bug (Hiroyuki Kaguchi),<br/>
close-on-exec flag for qemud signal pipe (Daniel Berrange),<br/>
double free in OpenVZ (Anton Protopopov),<br/>
handle mac without addresses (Shigeki Sakamoto),<br/>
MAC addresses checks (Shigeki Sakamoto and Richard Jones),<br/>
allow to read non-seekable files (Jim Meyering)<br/>
</li>
<li>Improvements:<br/>
Windows build (Richard Jones),<br/>
KVM/QEmu shutdown (Guido Guenther),<br/>
catch virExec output on debug (Mark McLoughlin),<br/>
integration of iptables and lokkit (Mark McLoughlin),<br/>
keymap parameter for VNC servers (Daniel Hokka Zakrisson),<br/>
enable debug by default using VIR_DEBUG (Daniel Berrange),<br/>
xen 3.2 fixes (Daniel Berrange),<br/>
Python bindings for VCPU and scheduling (Daniel Berrange),<br/>
framework for automatic code syntax checks (Jim Meyering),<br/>
allow kernel+initrd setup in Xen PV (Daniel Berrange),<br/>
allow change of Disk/NIC of an inactive domains (Shigeki Sakamoto),<br/>
virsh commands to manipulate and create storage (Daniel Berrange),<br/>
update use of PolicyKit APIs,<br/>
better detection of fedault hypervisor,<br/>
block device statistics for QEmu/KVM (Richard Jones),<br/>
various improvements for Xenner (Daniel Berrange)<br/>
</li>
<li>Cleanups:<br/>
avoid warnings (Daniel Berrange),<br/>
virRun helper function (Dan Berrange),<br/>
iptable code fixes (Mark McLoughlin),<br/>
static and const cleanups (Jim Meyering),<br/>
malloc and python cleanups (Jim Meyering),<br/>
xstrtol_ull and xstrtol_ll functions (Daniel Berrange),<br/>
remove no-op networking from OpenVZ (Daniel Berrange),<br/>
python generator cleanups (Daniel Berrange),<br/>
cleanup ref counting (Daniel Berrange),<br/>
remove uninitialized warnings (Jim Meyering),<br/>
cleanup configure for RHEL4 (Daniel Berrange),<br/>
CR/LF cleanups (Richard Jones),<br/>
various automatic code check and associated cleanups (Jim Meyering),<br/>
various memory leaks (Jim Meyering),<br/>
fix compilation when building without Xen (Guido Guenther),<br/>
mark translatables strings (Jim Meyering),<br/>
use virBufferAddLit for constant strings (Jim Meyering),<br/>
fix make distcheck (Jim Meyering),<br/>
return values for python bindings (Cole Robinson),<br/>
trailing blanks fixes (Jim Meyering),<br/>
gcc-4.3.0 fixes (Mark McLoughlin),<br/>
use safe read and write routines (Jim Meyering),<br/>
refactoring of code dealing with hypervisor capabilities (Daniel Berrange),<br/>
qemudReportError to use virErrorMsg (Cole Robinson),<br/>
intemediate library and Makefiles for compiling static and coverage rule support (Jim Meyering),<br/>
cleanup of various leaks (Jim Meyering)<br/>
</li>
</ul>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,46 +1,39 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:text>
NEWS file for libvirt
Note that this file contains only the most recent releases; for the full
list, please visit:
Note that this is automatically generated from the news webpage at:
http://libvirt.org/news.html
</xsl:text>
<xsl:apply-templates select="html:html/html:body/*"/>
<xsl:apply-templates select="html/body/*"/>
</xsl:template>
<xsl:template match="h1"/>
<xsl:template match="html:h1"/>
<xsl:template match="html:p"/>
<xsl:template match="html:h3">
<xsl:template match="h3">
<xsl:text>
</xsl:text>
<xsl:apply-templates/>
<xsl:text>:
</xsl:text>
</xsl:template>
<xsl:template match="html:ul">
<xsl:apply-templates select="html:li"/>
<xsl:template match="ul">
<xsl:apply-templates select=".//li"/>
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="html:li">
<xsl:template match="li">
<xsl:text> - </xsl:text>
<xsl:value-of select="."/>
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="html:a">
<xsl:template match="a">
<xsl:value-of select="."/>
<xsl:text> at
</xsl:text>
@@ -48,5 +41,6 @@
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="p">
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,141 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h1>Libvirt NSS module</h1>
<ul id="toc"></ul>
<p>
When it comes to managing guests and executing commands inside them, logging
into guest operating system and doing the job is convenient. Users are used
to ssh in this case. Ideally:
</p>
<code>ssh user@virtualMachine</code>
<p>
would be nice. But depending on virtual network configuration it might not
be always possible. For instance, when using libvirt NATed network it's
dnsmasq (spawned by libvirt) who assigns IP addresses to domains. But by
default, the dnsmasq process is then not consulted when it comes to host
name translation. Users work around this problem by configuring their
libvirt network to assign static IP addresses and maintaining
<code>/etc/hosts</code> file in sync. But this puts needless burden onto
users. This is where NSS module comes handy.
</p>
<h2><a name="Installation">Installation</a></h2>
<p>
Installing the module is really easy:
</p>
<pre>
# yum install libvirt-nss
</pre>
<h2><a name="Configuration">Configuration</a></h2>
<p>
Enabling the module is really easy. Just add <b>libvirt</b> into
<code>/etc/nsswitch.conf</code> file. For instance:
</p>
<pre>
$ cat /etc/nsswitch.conf
# /etc/nsswitch.conf:
passwd: compat
shadow: compat
group: compat
hosts: files libvirt dns
# ...
</pre>
<p>
So, in this specific case, whenever ssh program is looking up the host user
is trying to connect to, <b>files</b> module is consulted first (which
boils down to looking up the host name in <code>/etc/hosts</code> file), if
not found <b>libvirt</b> module is consulted then. The DNS is the last
effort then, if none of the previous modules matched the host in question.
Therefore users should consider the order in which they want the modules to
lookup given host name.
</p>
<h2><a name="Internals">How does it work?</a></h2>
<p>
Whenever an Unix process wants to do a host name translation
<a href="http://linux.die.net/man/3/gethostbyname"><code>gethostbyname()</code></a>
or some variant of it is called. This is a glibc function that takes a
string containing the host name, crunch it and produces a list of IP
addresses assigned to that host. Now, glibc developers made a really good
decision when implementing the internals of the function when they decided
to make the function pluggable. Since there can be several sources for the
records (e.g. <code>/etc/hosts</code> file, DNS, LDAP, etc.) it would not
make much sense to create one big implementation containing all possible
cases. What they have done instead is this pluggable mechanism. Small
plugins implementing nothing but specific technology for lookup process are
provided and the function then calls those plugins. There is just one
configuration file that instructs the lookup function in which order should
the plugins be called and which plugins should be loaded. For more info
reading <a href="https://en.wikipedia.org/wiki/Name_Service_Switch">wiki
page</a> is recommended.
</p>
<p>
And this is point where libvirt comes in. Libvirt provides plugin for the
NSS ecosystem. For some time now libvirt keeps a list of assigned IP
addresses for libvirt networks. The NSS plugin does no more than search the
list trying to find matching record for given host name. When found,
matching IP address is returned to the caller. If not found, translation
process continues with the next plugin configured. At this point it is
important to stress the order in which plugins are called. Users should be
aware that a hostname might match in multiple plugins and right after first
match, translation process is terminated and no other plugin is consulted.
Therefore, if there are two different records for the same host name users
should carefully chose the lookup order.
</p>
<h2><a name="Limitations">Limitations</a></h2>
<ol>
<li>The libvirt NSS module matches only hostnames provided by guest. If
the libvirt name and one advertised by guest differs, the latter is
matched.</li>
<li>The module works only in that cases where IP addresses are assigned by
dnsmasq spawned by libvirt. Libvirt NATed networks are typical
example.</li>
</ol>
<p>
These limitation are result of libvirt's internal implementation. While
libvirt can report IP addresses regardless of their origin, a public API
must be used to obtain those. However, for the API a connection object is
required. Doing that for every name translation request would be too
costly. Fortunately, libvirt spawns dnsmasq for NATed networks. Not only
that, it provides small executable that on each IP address space change
updates an internal list of addresses thus keeping it in sync. The NSS
module then merely consults the list trying to find the match. Users can
view the list themselves:
</p>
<pre>
virsh net-dhcp-leases $network
</pre>
<p>
where <code>$network</code> iterates through all running networks. So the module
does merely the same as
</p>
<pre>
virsh domifaddr --source lease $domain
</pre>
<p>
If there's no record for either of the aforementioned commands, it's very
likely that NSS module won't find anything and vice versa.
</p>
</body>
</html>

View File

@@ -10,6 +10,11 @@
<!-- The sitemap.html.in page contains the master navigation structure -->
<xsl:variable name="sitemap" select="document('sitemap.html.in')/html:html/html:body/html:div[@id='sitemap']"/>
<xsl:template match="html: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"/>
@@ -163,6 +168,12 @@
<xsl:apply-templates select="/html:html/html:body/*" mode="content"/>
</div>
</div>
<div id="footer">
<p id="sponsor">
Sponsored by:<br/>
<a href="http://et.redhat.com/"><img src="{$href_base}et.png" alt="Project sponsored by Red Hat Emerging Technology"/></a>
</p>
</div>
</body>
</html>
</xsl:template>

View File

@@ -6,7 +6,8 @@
<h2>Presentation</h2>
<p>The libvirt-php, originally called php-libvirt, is the PHP API bindings for
the libvirt virtualization toolkit originally developed by Radek Hladik.</p>
the libvirt virtualization toolkit originally developed by Radek Hladik but
currently maintained by Red Hat.</p>
<h2>Getting the source</h2>
<p> The PHP bindings code source is now maintained in a <a
@@ -25,7 +26,7 @@ It can also be browsed at
<p></p>
<h2>Project pages</h2>
<p>Since February 2011 the project has its own pages hosted at libvirt.org. For more information on the project
<p>Since February 2011 the project have it's own pages hosted at libvirt.org. For more information on the project
please refer to <a href="http://libvirt.org/php">http://libvirt.org/php</a>.
</p>

View File

@@ -12,11 +12,11 @@ becomes methods for the classes, their name is just stripped from the
virConnect or virDomain(Get) prefix and the first letter gets converted to
lower case, for example the C functions:</p>
<p>
<code>int <a href="html/libvirt-libvirt-domain.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
<code>int <a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
(virConnectPtr conn);</code>
</p>
<p>
<code>int <a href="html/libvirt-libvirt-domain.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
<code>int <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
(virDomainPtr domain, unsigned long memory);</code>
</p>
<p>become</p>
@@ -31,10 +31,10 @@ in the file libvirtclass.txt present in the python dir or in the docs.There
is a couple of function who don't map directly to their C counterparts due to
specificities in their argument conversions:</p>
<ul>
<li><code><a href="html/libvirt-libvirt-domain.html#virConnectListDomains">virConnectListDomains</a></code>
<li><code><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a></code>
is replaced by <code>virDomain::listDomainsID(self)</code> which returns
a list of the integer ID for the currently running domains</li>
<li><code><a href="html/libvirt-libvirt-domain.html#virDomainGetInfo">virDomainGetInfo</a></code>
<li><code><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a></code>
is replaced by <code>virDomain::info()</code> which returns a list of
<ol><li>state: one of the state values (virDomainState)</li><li>maxMemory: the maximum memory used by the domain</li><li>memory: the current amount of memory used by the domain</li><li>nbVirtCPU: the number of virtual CPU</li><li>cpuTime: the time used by the domain in nanoseconds</li></ol></li>
</ul>

35
docs/schemas/Makefile.am Normal file
View File

@@ -0,0 +1,35 @@
## Copyright (C) 2005-2011, 2013-2014 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
schemadir = $(pkgdatadir)/schemas
schema_DATA = \
basictypes.rng \
capability.rng \
domain.rng \
domaincaps.rng \
domaincommon.rng \
domainsnapshot.rng \
interface.rng \
network.rng \
networkcommon.rng \
nodedev.rng \
nwfilter.rng \
secret.rng \
storagecommon.rng \
storagepool.rng \
storagevol.rng
EXTRA_DIST = $(schema_DATA)

View File

@@ -14,12 +14,6 @@
</data>
</define>
<define name='hexuint'>
<data type='string'>
<param name="pattern">(0x)?[0-9a-f]+</param>
</data>
</define>
<define name="positiveInteger">
<data type="positiveInteger">
<param name="pattern">[0-9]+</param>
@@ -83,7 +77,10 @@
</attribute>
<optional>
<attribute name="multifunction">
<ref name="virOnOff"/>
<choice>
<value>on</value>
<value>off</value>
</choice>
</attribute>
</optional>
</define>
@@ -115,7 +112,7 @@
<!--interface on a device (system). The duid is often used by servers -->
<!--such as dnsmasq to assign a specific IP address (and optionally a -->
<!--name to an interface. The applicable standards are RFC3315 and -->
<!--RFC6355. These standards actually require the duid to be fixed for -->
<!--RFC6355. These standards actualy require the duid to be fixed for -->
<!--the hardward device and applicable to all network interfaces on -->
<!--that device. It is not clear that any software currently enforces -->
<!--this requirement although it could be implemented manually. -->
@@ -180,7 +177,7 @@
<define name="ipv6Addr">
<data type="string">
<!-- To understand this better, take apart the toplevel "|"s -->
<param name="pattern">(([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9]))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9])))|(([0-9A-Fa-f]{1,4}:){0,5}:(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9]))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9])))|(::([0-9A-Fa-f]{1,4}:){0,5}(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9]))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9])))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:)|(::)</param>
<param name="pattern">(([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9]))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9])))|(([0-9A-Fa-f]{1,4}:){0,5}:(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9]))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9])))|(::([0-9A-Fa-f]{1,4}:){0,5}(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9]))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9])))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:)</param>
</data>
</define>
@@ -242,7 +239,7 @@
<define name="absFilePath">
<data type="string">
<param name="pattern">/[a-zA-Z0-9_\.\+\-\\&amp;&quot;&apos;&lt;&gt;/%,:]+</param>
<param name="pattern">/[a-zA-Z0-9_\.\+\-\\&amp;&quot;&apos;&lt;&gt;/%,]+</param>
</data>
</define>
@@ -333,7 +330,6 @@
<value>parisc64</value>
<value>ppc</value>
<value>ppc64</value>
<value>ppc64le</value>
<value>ppcemb</value>
<value>s390</value>
<value>s390x</value>
@@ -349,9 +345,8 @@
</define>
<define name="PortNumber">
<data type="int">
<data type="short">
<param name="minInclusive">-1</param>
<param name="maxInclusive">65535</param>
</data>
</define>
@@ -397,11 +392,6 @@
<text/>
</attribute>
</optional>
<optional>
<attribute name='managed'>
<ref name="virYesNo"/>
</attribute>
</optional>
<attribute name='wwnn'>
<ref name='wwn'/>
</attribute>
@@ -456,18 +446,4 @@
</optional>
</define>
<define name="virYesNo">
<choice>
<value>yes</value>
<value>no</value>
</choice>
</define>
<define name="virOnOff">
<choice>
<value>on</value>
<value>off</value>
</choice>
</define>
</grammar>

View File

@@ -262,8 +262,7 @@
<element name='os_type'>
<choice>
<value>xen</value> <!-- Xen 3.0 pv -->
<value>linux</value> <!-- same as 'xen' - meant to be legacy,
but is also used by phyp driver -->
<value>linux</value> <!-- same as 'xen' - legacy -->
<value>hvm</value> <!-- unmodified OS -->
<value>exe</value> <!-- For container based virt -->
<value>uml</value> <!-- user mode linux -->
@@ -406,10 +405,16 @@
<define name='featuretoggle'>
<attribute name='toggle'>
<ref name="virYesNo"/>
<choice>
<value>yes</value>
<value>no</value>
</choice>
</attribute>
<attribute name='default'>
<ref name="virOnOff"/>
<choice>
<value>on</value>
<value>off</value>
</choice>
</attribute>
</define>

View File

@@ -25,9 +25,6 @@
<optional>
<ref name='vcpu'/>
</optional>
<optional>
<ref name='os'/>
</optional>
<optional>
<ref name='devices'/>
</optional>
@@ -44,27 +41,6 @@
</element>
</define>
<define name='loader'>
<element name='loader'>
<ref name='supported'/>
<optional>
<ref name='value'/>
</optional>
<ref name='enum'/>
</element>
</define>
<define name='os'>
<element name='os'>
<interleave>
<ref name='supported'/>
<optional>
<ref name='loader'/>
</optional>
</interleave>
</element>
</define>
<define name='devices'>
<element name='devices'>
<interleave>
@@ -88,17 +64,12 @@
</element>
</define>
<define name='value'>
<zeroOrMore>
<element name='value'>
<text/>
</element>
</zeroOrMore>
</define>
<define name='supported'>
<attribute name='supported'>
<ref name="virYesNo"/>
<choice>
<value>yes</value>
<value>no</value>
</choice>
</attribute>
</define>
@@ -108,7 +79,11 @@
<attribute name='name'>
<text/>
</attribute>
<ref name='value'/>
<zeroOrMore>
<element name='value'>
<text/>
</element>
</zeroOrMore>
</element>
</zeroOrMore>
</define>

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
xmlns:v="http://netcf.org/xml/version/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<!-- Versions for this schema are simple integers that are incremented
every time a changed (but backwards compatible) version
everytime a changed (but backwards compatible) version
is released. The current version is indicated with the v:serial
attribute on the start element.
-->
@@ -127,7 +127,7 @@
<element name="bridge">
<optional>
<attribute name="stp">
<ref name="virOnOff"/>
<ref name="on-or-off"/>
</attribute>
</optional>
<!-- Bridge forward delay (see 'brctl setfd') -->
@@ -323,22 +323,22 @@
<value>ipv4</value>
</attribute>
<interleave>
<optional>
<choice>
<ref name="dhcp-element"/>
</optional>
<zeroOrMore>
<element name="ip">
<attribute name="address"><ref name="ipv4Addr"/></attribute>
<group>
<element name="ip">
<attribute name="address"><ref name="ipv4Addr"/></attribute>
<optional>
<attribute name="prefix"><ref name="ipv4Prefix"/></attribute>
</optional>
</element>
<optional>
<attribute name="prefix"><ref name="ipv4Prefix"/></attribute>
<element name="route">
<attribute name="gateway"><ref name="ipv4Addr"/></attribute>
</element>
</optional>
</element>
</zeroOrMore>
<optional>
<element name="route">
<attribute name="gateway"><ref name="ipv4Addr"/></attribute>
</element>
</optional>
</group>
</choice>
</interleave>
</element>
</define>
@@ -376,7 +376,7 @@
<element name="dhcp">
<optional>
<attribute name="peerdns">
<ref name="virYesNo"/>
<ref name="yes-or-no"/>
</attribute>
</optional>
</element>
@@ -415,6 +415,21 @@
instead of destination and nexthop instead of gateway.
-->
<!-- Auxiliary definitions -->
<define name="on-or-off">
<choice>
<value>on</value>
<value>off</value>
</choice>
</define>
<define name="yes-or-no">
<choice>
<value>yes</value>
<value>no</value>
</choice>
</define>
<!-- Type library -->
<define name="timeval">

Some files were not shown because too many files have changed in this diff Show More