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

Compare commits

..

108 Commits

Author SHA1 Message Date
Cole Robinson
0911d1c6a6 Prep for release 1.2.13.1 2015-04-28 11:47:33 -04:00
Jiri Denemark
40d774a4af Fix memory leak in virNetSocketNewConnectUNIX
==26726==    by 0x673CD67: __vasprintf_chk (vasprintf_chk.c:80)
==26726==    by 0x5673605: UnknownInlinedFun (stdio2.h:210)
==26726==    by 0x5673605: virVasprintfInternal (virstring.c:476)
==26726==    by 0x56736EE: virAsprintfInternal (virstring.c:497)
==26726==    by 0x5680C37: virGetUserRuntimeDirectory (virutil.c:866)
==26726==    by 0x5783A89: virNetSocketNewConnectUNIX (virnetsocket.c:572)
==26726==    by 0x57751AF: virNetClientNewUNIX (virnetclient.c:344)
==26726==    by 0x57689B3: doRemoteOpen (remote_driver.c:895)
==26726==    by 0x5769F8E: remoteConnectOpen (remote_driver.c:1195)
==26726==    by 0x57092DF: do_open (libvirt.c:1189)
==26726==    by 0x570A7BF: virConnectOpenAuth (libvirt.c:1341)

https://bugzilla.redhat.com/show_bug.cgi?id=1215042
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit da4d7c3069)
2015-04-28 11:28:37 -04:00
Daniel P. Berrange
9117783bc0 rng: fix port number range validation
The PortNumber data type is declared to derive from 'short'.
Unfortunately this is an signed type, so validates the range
[-32,768, 32,767] which excludes valid port numbers between
32767 and 65535.

We can't use 'unsignedShort', since we need -1 to be a valid
port number too.

This change is to use 'int' and set an explicit max boundary
instead of relying on the data types' built-in max.

One of the existing tests is changed to use a high port number
to validate the schema.

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

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 615bdfda07)
2015-04-28 11:27:24 -04:00
zhang bo
f708713efe qemu: Don't fail to reboot domains with unresponsive agent
just as what b8e25c35d7 did, we
fall back to the ACPI method when the guest agent is unresponsive
in qemuDomainReboot().

Signed-off-by: YueWenyuan <yuewenyuan@huawei.com>
Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit eadf41fe31)
2015-04-28 11:27:10 -04:00
Roman Bogorodskiy
b5a210dce7 vircommand: fix polling in virCommandProcessIO
When running on FreeBSD, there's a bug in virCommandProcessIO
polling that is triggered by the commandtest.

A test that triggers EPIPE in commandtest (named "test20") hungs
forever on FreeBSD.

Apparently, this happens because FreeBSD sets POLLHUP flag on revents
when stdin in closed. And as the current implementation only checks for
POLLOUT and POLLERR, it ends up looping forever inside
virCommandProcessIO and not trying to do one more write() that would
trigger EPIPE.

To fix that check for the POLLHUP flag along with POLLOUT and POLLERR.

(cherry picked from commit e34cccf783)
2015-04-28 11:26:47 -04:00
Peter Krempa
e84e5aa3df util: storage: Fix possible crash when source path is NULL
Some storage protocols allow to have the @path field in struct
virStorageSource set to NULL. Add NULLSTR() wrappers to handle this
possibility until I finish the storage source error formatter.

(cherry picked from commit 62a61d583c)
2015-04-28 11:26:08 -04:00
Laine Stump
24e0cecb7c qemu: set macvtap physdevs online when macvtap is set online
A further fix for:

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

Since there is no possibility that any type of macvtap will work if
the parent physdev it's attached to is offline, we should bring the
physdev online at the same time as the macvtap. When taking the
macvtap offline, it's also necessary to take the physdev offline for
macvtap passthrough mode (because the physdev has the same MAC address
as the macvtap device, so could potentially cause problems with
misdirected packets during migration, as outlined in commits 829770
and 879c13). We can't set the physdev offline for other macvtap modes
1) because there may be other macvtap devices attached to the same
physdev (and/or the host itself may be using the device) in the other
modes whereas passthrough mode is exclusive to one macvtap at a time,
and 2) there's no practical reason to do so anyway.

(cherry picked from commit 38172ed894)
2015-04-28 11:26:08 -04:00
Laine Stump
d336362cea util: set MAC address for VF via netlink message to PF+VF# when possible
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1113474

When we set the MAC address of a network device as a part of setting
up macvtap "passthrough" mode (where the domain has an emulated netdev
connected to a host macvtap device that has exclusive use of the
physical device, and sets the device MAC address to match its own,
i.e. "<interface type='direct'> <source mode='passthrough' .../>"), we
use ioctl(SIOCSIFHWADDR) giving it the name of that device. This is
true even if it is an SRIOV Virtual Function (VF).

But, when we are setting the MAC address / vlan ID of a VF in
preparation for "hostdev network" passthrough (this is where we set
the MAC address and vlan id of the VF after detaching the host net
driver and before assigning the device to the domain with PCI
passthrough, i.e. "<interface type='hostdev'>", we do the setting via
a netlink RTM_SETLINK message for that VF's Physical Function (PF),
telling it the VF# we want to change. This sets an "administratively
changed MAC" flag for that VF in the PF's driver, and from that point
on (until the PF driver is reloaded, *not* merely the VF driver) that
VF's MAC address can't be changed using ioctl(SIOCSIFHWADDR) - the
only way to change it is via the PF with RTM_SETLINK.

This means that if a VF is used for hostdev passthrough, it will have
the admin flag set, and future attempts to use that VF for macvtap
passthrough will fail.

The solution to this problem is to check if the device being used for
macvtap passthrough is actually a VF; if so, we use the netlink
RTM_SETLINK message to the PF to set the VF's mac address instead of
ioctl(SIOCSIFHWADDR) directly to the VF; if not, behavior does not
change from previously.

There are three pieces to making this work:

1) virNetDevMacVLan(Create|Delete)WithVPortProfile() now call
   virNetDev(Replace|Restore)NetConfig() rather than
   virNetDev(Replace|Restore)MacAddress() (simply passing -1 for VF#
   and vlanid).

2) virNetDev(Replace|Restore)NetConfig() check to see if the device is
   a VF. If so, they find the PF's name and VF#, allowing them to call
   virNetDev(Replace|Restore)VfConfig().

3) To prevent mixups when detaching a macvtap passthrough device that
   had been attached while running an older version of libvirt,
   virNetDevRestoreVfConfig() is potentially given the preserved name
   of the VF, and if the proper statefile for a VF can't be found in
   the stateDir (${stateDir}/${pfname}_vf${vfid}),
   virNetDevRestoreMacAddress() is called instead (which will look in
   the file named ${stateDir}/${vfname}).

This problem has existed in every version of libvirt that has both
macvtap passthrough and interface type='hostdev'. Fortunately people
seem to use one or the other though, so it hasn't caused any real
world problem reports.

(cherry picked from commit cb3fe38c74)
2015-04-28 11:26:08 -04:00
Richard W.M. Jones
d1ef7b625e xend: Remove a couple of unused function prototypes.
Commit 70f446631f (from 2008) introduced
some functions for testing whether xend was returning correct sound
models.  Those functions have long gone, but the function prototypes
remain.  This commit removes the unused prototypes.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
(cherry picked from commit 093eea9589)
2015-04-28 11:26:08 -04:00
zhang bo
0636291d8b qemuDomainShutdownFlags: Set fakeReboot more frequently
When a qemu domain is to be rebooted, from outside, at libvirt
level it looks like regular shutdown. To really restart the
domain, libvirt needs to issue reset command on the monitor once
SHUTDOWN event appeared. So, in order to differentiate bare
shutdown and reboot libvirt uses a variable within domain private
data. It's called fakeReboot. When the reboot API is called, the
variable is set, but when the shutdown API is called it must be
cleared out. But it was not for every possible case. So if user
called virDomainReboot(), and there was no ACPI daemon running
inside the guest (so guest didn't initiated shutdown sequence)
and then virDomainShutdown(mode=agent) was called bad thing
happened. We remembered the fakeReboot and instead of shutting
the domain down, we just rebooted it.

Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
Signed-off-by: Wang Yufei <james.wangyufei@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 8be502fd90)
2015-04-28 11:26:07 -04:00
Michal Privoznik
10736cb41c nwfilter: Partly initialize driver even for non-privileged users
https://bugzilla.redhat.com/show_bug.cgi?id=1211436

This reverts commit b7829f959b.

The previous fix was not correct. Like everywhere else, a driver is a
global variable allocated in stateInitialize function (or something
similar for stateless drivers). Later, when a driver API is called,
it's possible that the global variable is accessed and dereferenced.
Now, some drivers require root privileges because they undertake some
actions reserved only for the system admin (e.g. manipulating host
firewall). And here's the trouble, the NWFilter state initializer
exited too early when finding out it's running unprivileged, leaving
the global NWFilter driver variable uninitialized. Any subsequent
API call that tried to lock the driver resulted in dereferencing the
driver and thus crash.

On the other hand, in order to not resurrect the bug the original
commit was fixing, Let's forbid the nwfilter define in session mode.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

Conflicts:
	src/nwfilter/nwfilter_driver.c: Context. Code changed a bit
        since 2013.

(cherry picked from commit 77d92e2e77)
2015-04-28 11:26:07 -04:00
Michal Privoznik
5328780b5f virNetSocketNewConnectUNIX: Don't unlink(NULL)
There is a possibility that we jump onto error label with @lockpath
still initialized to NULL. Here, the @lockpath should be unlink()-ed,
but passing there a NULL is not a good idea. Don't do that. In fact,
we should call unlink() only if we created the lock file successfully.

Reported-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 1fdac3d99a)
2015-04-28 11:26:07 -04:00
Jiri Denemark
c6e7a9ea64 sanlock: Use VIR_ERR_RESOURCE_BUSY if sanlock_acquire fails
When acquiring resource via sanlock fails, we would report it as
VIR_ERR_INTERNAL_ERROR, which is not very friendly to applications using
libvirt. Moreover, the lockd driver would report the same failure as
VIR_ERR_RESOURCE_BUSY, which looks better.

Unfortunately, in sanlock driver we don't really know if acquiring the
resource failed because it was already locked or there was another
reason behind. But the end result is the same and I think using
VIR_ERR_RESOURCE_BUSY reason for all acquire failures is still better
than what we have now.

https://bugzilla.redhat.com/show_bug.cgi?id=1165119
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit 4864e377c9)
2015-04-28 11:18:22 -04:00
Michal Privoznik
9d0c2053c2 qemuMigrationPrecreateStorage: Fix debug message
When pre-creating storage for domains, we need to find corresponding
disk in the XML on the destination (domain XML may differ there, e.g.
disk is accessible under different path). For better debugging, I'm
printing all info I received on a disk. But there was a typo when
printing the disk capacity: "%lluu" instead of "%llu".

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 65a88572ad)
2015-04-28 11:14:29 -04:00
Xing Lin
8ab12f1a5b qemu_migration.c: sleep first before checking for migration status.
The problem with the previous implementation is,
even when qemuMigrationUpdateJobStatus() detects a migration job
has completed, it will do a sleep for 50 ms (which is unnecessary
and only adds up to the VM pause time).

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 522e81cbb5)
2015-04-28 11:14:10 -04:00
Michael Chapman
d17b2d9d5d qemu_driver: check caps after starting block job
Currently we check qemuCaps before starting the block job. But qemuCaps
isn't available on a stopped domain, which means we get a misleading
error message in this case:

  # virsh domstate example
  shut off

  # virsh blockjob example vda
  error: unsupported configuration: block jobs not supported with this QEMU binary

Move the qemuCaps check into the block job so that we are guaranteed the
domain is running.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
(cherry picked from commit cfcdf5ff01)
2015-04-28 11:10:53 -04:00
Michael Chapman
0ff86a4792 qemu_migrate: use nested job when adding NBD to cookie
qemuMigrationCookieAddNBD is usually called from within an async
MIGRATION_OUT or MIGRATION_IN job, so it needs to start a nested job.

(The one exception is during the Begin phase when change protection
isn't enabled, but qemuDomainObjEnterMonitorAsync will behave the same
as qemuDomainObjEnterMonitor in this case.)

This bug was encountered with a libvirt client that repeatedly queries
the disk mirroring block job info during a migration. If one of these
queries occurs just as the Perform migration cookie is baked, libvirt
crashes.

Relevant logs are as follows:

    6701: warning : qemuDomainObjEnterMonitorInternal:1544 : This thread seems to be the async job owner; entering monitor without asking for a nested job is dangerous
[1] 6701: info : qemuMonitorSend:972 : QEMU_MONITOR_SEND_MSG: mon=0x7fefdc004700 msg={"execute":"query-block","id":"libvirt-629"}
[2] 6699: info : qemuMonitorIOWrite:503 : QEMU_MONITOR_IO_WRITE: mon=0x7fefdc004700 buf={"execute":"query-block","id":"libvirt-629"}
[3] 6704: info : qemuMonitorSend:972 : QEMU_MONITOR_SEND_MSG: mon=0x7fefdc004700 msg={"execute":"query-block-jobs","id":"libvirt-630"}
[4] 6699: info : qemuMonitorJSONIOProcessLine:203 : QEMU_MONITOR_RECV_REPLY: mon=0x7fefdc004700 reply={"return": [...], "id": "libvirt-629"}
    6699: error : qemuMonitorJSONIOProcessLine:211 : internal error: Unexpected JSON reply '{"return": [...], "id": "libvirt-629"}'

At [1] qemuMonitorBlockStatsUpdateCapacity sends its request, then waits
on mon->notify. At [2] the request is written out to the monitor socket.
At [3] qemuMonitorBlockJobInfo sends its request, and also waits on
mon->notify. The reply from the first request is received at [4].
However, qemuMonitorJSONIOProcessLine is not expecting this reply since
the second request hadn't completed sending. The reply is dropped and an
error is returned.

qemuMonitorIO signals mon->notify twice during its error handling,
waking up both of the threads waiting on it. One of them clears mon->msg
as it exits qemuMonitorSend; the other crashes:

  qemuMonitorSend (mon=0x7fefdc004700, msg=<value optimized out>) at qemu/qemu_monitor.c:975
  975         while (!mon->msg->finished) {
  (gdb) print mon->msg
  $1 = (qemuMonitorMessagePtr) 0x0

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
(cherry picked from commit 72df8314f0)
2015-04-28 11:10:35 -04:00
Michael Chapman
29b3402b8b util: fix removal of callbacks in virCloseCallbacksRun
The close callbacks hash are keyed by a UUID-string, but
virCloseCallbacksRun was attempting to remove them by raw UUID. This
patch ensures the callback entries are removed by UUID-string as well.

This bug caused problems when guest migrations were abnormally aborted:

  # timeout --signal KILL 1 \
      virsh migrate example qemu+tls://remote/system \
        --verbose --compressed --live --auto-converge \
        --abort-on-error --unsafe --persistent \
        --undefinesource --copy-storage-all --xml example.xml
  Killed

  # virsh migrate example qemu+tls://remote/system \
      --verbose --compressed --live --auto-converge \
      --abort-on-error --unsafe --persistent \
      --undefinesource --copy-storage-all --xml example.xml
  error: Requested operation is not valid: domain 'example' is not being migrated

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
(cherry picked from commit fa2607d577)
2015-04-28 11:10:17 -04:00
Michael Chapman
9a0e0d3f17 qemu: fix race between disk mirror fail and cancel
If a VM migration is aborted, a disk mirror may be failed by QEMU before
libvirt has a chance to cancel it. The disk->mirrorState remains at
_ABORT in this case, and this breaks subsequent mirrorings of that disk.

We should instead check the mirrorState directly and transition to _NONE
if it is already aborted. Do the check *after* aborting the block job in
QEMU to avoid a race.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
(cherry picked from commit e5d729ba42)
2015-04-28 11:10:08 -04:00
Michael Chapman
188e536739 qemu: fix error propagation in qemuMigrationBegin
If virCloseCallbacksSet fails, qemuMigrationBegin must return NULL to
indicate an error occurred.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
(cherry picked from commit 77ddd0bba2)
2015-04-28 11:09:59 -04:00
Michael Chapman
9b4dd2c75b qemu: fix crash in qemuProcessAutoDestroy
The destination libvirt daemon in a migration may segfault if the client
disconnects immediately after the migration has begun:

  # virsh -c qemu+tls://remote/system list --all
   Id    Name                           State
  ----------------------------------------------------
  ...

  # timeout --signal KILL 1 \
      virsh migrate example qemu+tls://remote/system \
        --verbose --compressed --live --auto-converge \
        --abort-on-error --unsafe --persistent \
        --undefinesource --copy-storage-all --xml example.xml
  Killed

  # virsh -c qemu+tls://remote/system list --all
  error: failed to connect to the hypervisor
  error: unable to connect to server at 'remote:16514': Connection refused

The crash is in:

   1531 void
   1532 qemuDomainObjEndJob(virQEMUDriverPtr driver, virDomainObjPtr obj)
   1533 {
   1534     qemuDomainObjPrivatePtr priv = obj->privateData;
   1535     qemuDomainJob job = priv->job.active;
   1536
   1537     priv->jobs_queued--;

Backtrace:

  #0  at qemuDomainObjEndJob at qemu/qemu_domain.c:1537
  #1  in qemuDomainRemoveInactive at qemu/qemu_domain.c:2497
  #2  in qemuProcessAutoDestroy at qemu/qemu_process.c:5646
  #3  in virCloseCallbacksRun at util/virclosecallbacks.c:350
  #4  in qemuConnectClose at qemu/qemu_driver.c:1154
  ...

qemuDomainRemoveInactive calls virDomainObjListRemove, which in this
case is holding the last remaining reference to the domain.
qemuDomainRemoveInactive then calls qemuDomainObjEndJob, but the domain
object has been freed and poisoned by then.

This patch bumps the domain's refcount until qemuDomainRemoveInactive
has completed. We also ensure qemuProcessAutoDestroy does not return the
domain to virCloseCallbacksRun to be unlocked in this case. There is
similar logic in bhyveProcessAutoDestroy and lxcProcessAutoDestroy
(which call virDomainObjListRemove directly).

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
(cherry picked from commit 7578cc17f5)
2015-04-28 11:09:47 -04:00
Peter Krempa
fd27080848 qemu: blockCopy: Pass adjusted bandwidth when called via blockRebase
The block copy API takes the speed in bytes/s rather than MiB/s that was
the prior approach in virDomainBlockRebase. We correctly converted the
speed to bytes/s in the old API but we still called the common helper
virDomainBlockCopyCommon with the unadjusted variable.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1207122
(cherry picked from commit 3c6a72d537)
2015-04-28 11:07:10 -04:00
Luyao Huang
4fdd4d2089 virsh: blockCopy: Add missing jump on error path
The overflow check for the bandwidth parameter did not jump to the
cleanup label.

Additionally virsh should use vshError instead of virReportError.

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

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit 390f218b83)
2015-04-28 11:07:03 -04:00
Shanzhi Yu
52ef86afbe qemu: end the job when try to blockcopy to non-file destination
Blockcopy to non-file destination is not supported according the code,
but a 'goto endjob' is missed after checking the destination.

This leads to calling drive-mirror with wrong parameters.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1206406
Signed-off-by: Shanzhi Yu <shyu@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit c5fbad6623)
2015-04-28 11:06:44 -04:00
Wei Huang
cb4fd344b4 nodeinfo: Increase the num of CPU thread siblings to a larger value
Current libvirt can only handle up to 1023 bytes when it
reads Linux sysfs topology/thread_siblings. This isn't enough for
Linux distributions that support a large value. This patch fixes
the problem by using VIR_ALLOC()/VIR_FREE(), instead of using a
fixed-size (1024) local char array. In the meanwhile
SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX is increased to 8192 which
should be large enough for a foreseeable future.

Signed-off-by: Wei Huang <wei@redhat.com>
(cherry picked from commit c13de01691)
2015-04-28 11:06:43 -04:00
Eric Blake
0b635e15c8 relaxng: allow : in /dev/disk/by-path names
On IRC, Hydrar pointed a problem where 'virsh edit' failed on
his domain created through an ISCSI pool managed by virt-manager,
all because the XML included a block device with colons in the
name.

* docs/schemas/basictypes.rng (absFilePath): Add colon as safe.
* tests/qemuxml2argvdata/qemuxml2argv-disk-iscsi.xml: New file.
* tests/qemuxml2argvdata/qemuxml2argv-disk-iscsi.args: Likewise.
* tests/qemuxml2argvtest.c (mymain): Test it.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit dfc708750b)
2015-04-28 11:06:43 -04:00
Jiri Denemark
a7c8b30e90 qemu: Give hint about -noTSX CPU model
Because of the microcode update to Haswell/Broadwell CPUs, existing
domains using these CPUs may fail to start even though they used to run
just fine. To help users solve this issue we try to suggest switching to
-noTSX variant of the CPU model:

    virsh # start cd
    error: Failed to start domain cd
    error: unsupported configuration: guest and host CPU are not
    compatible: Host CPU does not provide required features: rtm, hle;
    try using 'Haswell-noTSX' CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit 53c8062f7e)
2015-04-28 11:06:43 -04:00
Amy Fong
f046531ed3 build: fix race when creating the cpu_map.xml symlink
In some circumstances where the build tree differs from the source,
libvirt's compile will try to create the symlink for cpu_map.xml before
creating the directory $(abs_builddir)/cpu:

'src/cpu/cpu_map.xml': No such file or directory'

Do not create the symlink, it is no longer needed after
commit e562e82f
    Load CPU map from builddir when run uninstalled

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 237ffd1b1d)
2015-04-28 11:06:43 -04:00
Guido Günther
a5ebbe9ccf Don't validata filesystem target type
When using QEMU's 9pfs the target "dir" element is not necessarily an
absolute path but merely an arbitrary identifier. So validation in that
case currently fails with the misleading

   $ virt-xml-validate /tmp/test.xml
   Relax-NG validity error : Extra element devices in interleave
   /tmp/test.xml:24: element devices: Relax-NG validity error : Element domain failed to validate content
   /tmp/test.xml fails to validate

(cherry picked from commit db1edae895)
2015-04-28 11:06:43 -04:00
Ján Tomko
6fee5eaa53 Document behavior of compat when creating qcow2 volumes
Commit bab2eda changed the behavior for missing compat attribute,
but failed to update the documentation.

Before, the option was omitted from qemu-img command line and the
qemu-img default was used. Now we always specify the compat value
and the default is 0.10.

Reported by Christophe Fergeau
https://bugzilla.gnome.org/show_bug.cgi?id=746660#c4

(cherry picked from commit 7c8ae42d49)
2015-04-28 11:06:43 -04:00
Ján Tomko
6d1430ec7f Fix typo in error message
by rewriting it completely from:
error: unsupported configuration: virtio only support device address
type 'PCI'

to:

error: unsupported configuration: virtio disk cannot have an address of type
drive

Since we now support CCW addresses as well.

(cherry picked from commit 68545ea629)
2015-04-28 11:06:42 -04:00
Laine Stump
b1972ce50b qemu: change accidental VIR_WARNING back to VIR_DEBUG
While debugging the support for responding to qemu RX_FILTER_CHANGED
events, I had changed the "ignoring this event" log message from
VIR_DEBUG to VIR_WARN, but forgot to change it back before
pushing. Since many guest OSes make enough changes to multicast lists
and/or promiscuous mode settings to trigger this message, it's
starting to show up as a red herring in bug reports.

(cherry picked from commit dae3e24663)
2015-04-28 11:06:42 -04:00
Luyao Huang
28575e750f conf: fix parsing of NUMA settings in VM status XML
Commit 5bba61f changed the XPath strings to be absolute when parsing
the VM NUMA configuration. Unfortunately the <domain> element is not a
top level element when parsing the domain status XML thus the absolute
XPath string doesn't match.

Use the relative string so that the <numa> settings are not lost.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit d75e23bbfb)
2015-04-28 11:06:42 -04:00
Michael Chapman
a883fb9c75 qemu: skip precreation of network disks
Commit cf54c60699 introduced the ability
to create missing storage volumes during migration. For network disks,
however, we may not necessarily be able to detect whether they already
exist -- there is no straight-forward way to map the disk to a storage
volume, and even if there were it's possible no configured storage pool
actually contains the disk.

It is better to assume the network disk exists in this case, rather than
aborting the migration completely. If the volume really is missing, QEMU
will generate an appropriate error later in the migration.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
(cherry picked from commit a1b1805155)
2015-04-28 11:06:42 -04:00
Luyao Huang
93c5841e08 qemu: do not overwrite the error in qemuDomainObjExitMonitor
https://bugzilla.redhat.com/show_bug.cgi?id=1196934

When qemu exits during startup, libvirt includes the error from
/var/log/libvirt/qemu/vm.log in the error message:

$ virsh start test3
error: Failed to start domain test3
error: internal error: early end of file from monitor: possible problem:
2015-02-27T03:03:16.985494Z qemu-kvm: -numa memdev is not supported by
machine rhel6.5.0

The check for domain liveness added to qemuDomainObjExitMonitor
in commit dc2fd51f sometimes overwrites this error:
$ virsh start test3
error: Failed to start domain test3
error: operation failed: domain is no longer running

Fix the check to only report an error if there is none set.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 4f06820938)
2015-04-28 11:06:42 -04:00
Jim Fehlig
bb00c1f9fc libxl: Don't overwrite errors from xenconfig
When converting domXML from native, the libxl driver was overwriting
useful errors from the xenconfig parsing code with a useless, generic
error.  E.g. "internal error: parsing xm config failed" vs
"internal error: config value usbdevice was malformed".  Remove the
redundant (and useless) error reporting in the libxl driver.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
(cherry picked from commit bd235cd873)
2015-04-28 11:06:42 -04:00
Laine Stump
b10e27ada5 util: more verbose error when failing to create macvtap device
Investigation of a problem with creating passthrough macvtap devices
(https://bugzilla.redhat.com/show_bug.cgi?id=1185501) has shown that
this slightly more verbose failure message is useful. In particular,
the mac address can be used to determine the domain. You could also
figure this out by looking at preceding messages in a debug log, but
this gets it in a single place.

(cherry picked from commit 72423df992)
2015-04-28 11:06:42 -04:00
Peter Krempa
2c3aba719a qemu: hotplug: Use checker function to check if disk is empty
(cherry picked from commit e7974b4f80)
2015-04-28 11:06:41 -04:00
Peter Krempa
7d11e8de0b qemu: driver: Fix cold-update of removable storage devices
Only selected fields from the disk source were copied when cold updating
source in a CDROM drive. When such drive was backed by a network file
this resulted into corruption of the definition:

    <disk type='network' device='cdrom'>
      <driver name='qemu' type='raw' cache='none'/>
      <source protocol='gluster' name='gluster-vol1(null)'>
        <host name='localhost'/>
      </source>
      <target dev='vdc' bus='virtio'/>
      <readonly/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </disk>

Update the whole source instead of cherry-picking elements.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1166024
(cherry picked from commit d0dc6c0369)
2015-04-28 11:06:41 -04:00
Erik Skultety
b41d99b72e qemu: Check for negative port values in network drive configuration
We interpret port values as signed int (convert them from char *),
so if a negative value is provided in network disk's configuration,
we accept it as valid, however there's an 'unknown cause' error raised later.
This error is only accidental because we return the port value in the return code.
This patch adds just a minor tweak to the already existing check so we
reject negative values the same way as we reject non-numerical strings.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1163553
(cherry picked from commit 8464616526)
2015-04-28 11:06:41 -04:00
Eric Blake
8ff41608f1 virsh: fix report of non-active commit completion
Commit f182da20 (v1.2.6) caused a slight regression in virsh
reporting of a non-active block job; where it used to state
"Commit complete", it now states "Now in synchronized phase".
But the synchronized phase is only possible for an active commit.

For a reproducer, I created a chain 'a <- b <- c <- d <- e' and
ran virsh blockcommit $dom vda --top c --base a --verbose --wait

* tools/virsh-domain.c (cmdBlockCommit): Synchronized phase is
only possible on active commits.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit ceec58ac9e)
2015-04-28 11:06:41 -04:00
zhang bo
b6fcd7ba06 util: don't fail if no PortData is found while getting migrateData
Introduced by f6a2f97e

Problem Description:
After multiple times of migrating a domain, which has an ovs interface with no portData set,
with non-shared disk, nbd ports got overflowed.

The steps to reproduce the problem:
1 define and start a domain with its network configured as:
    <interface type='bridge'>
          <source bridge='br0'/>
          <virtualport type='openvswitch'>
          </virtualport>
          <model type='virtio'/>
          <driver name='vhost' queues='4'/>
    </interface>
2 do not set the network's portData.
3 migrate(ToURI2) it with flag 91(1011011), which means:
  VIR_MIGRATE_LIVE
  VIR_MIGRATE_PEER2PEER
  VIR_MIGRATE_PERSIST_DEST
  VIR_MIGRATE_UNDEFINE_SOURCE
  VIR_MIGRATE_NON_SHARED_DISK
4 migrate success, but we got an error log in libvirtd.log:
  error : virCommandWait:2423 : internal error: Child process (ovs-vsctl --timeout=5 get Interface
  vnet1 external_ids:PortData) unexpected exit status 1: ovs-vsctl: no key "PortData" in Interface
  record "vnet1" column external_ids
5 migrate it back, migrate it , migrate it back, .......
6 nbd port got overflowed.

The reasons for the problem is :
1 virNetDevOpenvswitchGetMigrateData() takes it as wrong if no portData is available for  the ovs
 interface of a domain. (We think it's not appropriate, as portData is just OPTIONAL)
2 in func qemuMigrationBakeCookie(), it fails in qemuMigrationCookieAddNetwork(), and returns with -1.
 qemuMigrationCookieAddNBD() is not called thereafter, and mig->nbd is still NULL.
3 However, qemuMigrationRun() just *WARN* if qemuMigrationBakeCookie() fails, migration still successes.
 cookie is NULL, it's not baked on the src side.
4 On the destination side, it would alloc a port first and then free the nbd port in COOKIE.
 But the cookie is NULL due to qemuMigrationCookieAddNetwork() failure at src side. thus the nbd port
 is not freed.

In this patch, we add "--if-exists" option to make ovs-vsctl not raise error if there's no portData available.
Further more, because portData may be NULL in the cookie at the dest side, check it before setting portData.

Signed-off-by: Zhou Yimin <zhouyimin@huawei.com>
Signed-off-by: Zhang Bo <oscar.zhangbo@huawei.com>
(cherry picked from commit 25df57db73)
2015-04-28 11:06:41 -04:00
Ján Tomko
be74ebccbe Clarify the meaning of version in redirdev filters
The version attribute in redirdev filters refers to the revision
of the device, not the version of the USB protocol.

Explicitly state that this is not the USB protocol and remove references
to those round version numbers that resemble USB protocol versions.

https://bugzilla.redhat.com/show_bug.cgi?id=1177237
(cherry picked from commit 76a2a5ce8b)
2015-04-28 11:06:41 -04:00
John Ferlan
ac4713899b xenapi: Resolve Coverity REVERSE_INULL
Coverity notes in xenapiDomainGetXMLDesc that 'vms' is dereferenced
a few times before a "if (vms) xen_vm_set_free(vms);" call is made.
Since we'd exit out much sooner if the fetch of the vms failed, just
remove the unnecessary "if (vms)" check.

(cherry picked from commit eab968c7d7)
2015-04-28 11:06:40 -04:00
John Ferlan
2cb4b820fd xenapi: Resolve Coverity REVERSE_INULL
Coverity complains that "net_set" is compared to NULL before calling
xen_network_set_free, but used rather liberally before that.  While
I was looking at the code I also noted that if the virAsprintfQuiet
fails, then we leak our structures - so I added those too.

(cherry picked from commit 6da29e0faa)
2015-04-28 11:06:40 -04:00
John Ferlan
e4afc2a29d xenapi: Resolve Coverity NULL_RETURNS
Coverity points out that the return from virDomainDefParseString is
not checked in xenapiDomainCreateXML like it should be which could
end up in a NULL pointer dereference

(cherry picked from commit b193a1d617)
2015-04-28 11:06:40 -04:00
John Ferlan
2f26dccb65 xenapi: Resolve Coverity NO_EFFECT
Coverity points out that check (def->uuid) has no effect since it's not
a pointer, rather an array of characters.   Just remove the extranous check.

(cherry picked from commit 467c905909)
2015-04-28 11:06:40 -04:00
John Ferlan
2213707b6b xenapi: Resolve Coverity FORWARD_NULL
Since inception.  Coverity complains that the code checks "(record ==
NULL && !session->ok)", but doesn't check (record != NULL) before
dereferencing at "record->is_a_template"

(cherry picked from commit 500d77f181)
2015-04-28 11:06:40 -04:00
Michal Privoznik
193b057352 RNG: Allow multiple parameters to be passed to an interface filter
Our code supports that for ages. When using a <filterref/> to an
<interface/> several parameters can be passed to the filter. Later,
when building firewall rules, parameters are substituted for their
values. However, our RNG schema allowed only one parameter to be
passed.

Reported-by: Brian Rak <brak@gameservers.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 6cc5080a09)
2015-04-28 11:06:40 -04:00
Michael Chapman
3db520d9db domain_conf: fix crash in virDomainObjListFindByUUIDInternal
If a domain object is being removed and looked up concurrently we must
ensure we unlock the object before unreferencing it, since the latter
might free the object.

The flaw was introduced in commit feb1a4d792.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
(cherry picked from commit 616003d6bd)
2015-04-28 11:06:40 -04:00
Michael Chapman
2206ec869b {domain, network}_conf: disable autostart when deleting config
Undefining a running, autostarted domain removes the autostart link, but
dom->autostart is not cleared. If the domain is subsequently redefined,
libvirt thinks it is already autostarted and will not create the link
even if requested:

  # virsh dominfo example | grep Autostart
  Autostart:      enable

  # ls /etc/libvirt/qemu/autostart/example.xml
  /etc/libvirt/qemu/autostart/example.xml

  # virsh undefine example
  Domain example has been undefined

  # virsh define example.xml
  Domain example defined from example.xml

  # virsh dominfo example | grep Autostart
  Autostart:      enable

  # virsh autostart example
  Domain example marked as autostarted

  # ls /etc/libvirt/qemu/autostart/example.xml
  ls: cannot access /etc/libvirt/qemu/autostart/example.xml: No such file or directory

This commit ensures dom->autostart is cleared whenever the config and
autostart link (if present) are removed.

The bridge network driver cleared this flag itself in networkUndefine.
This commit moves this into virNetworkDeleteConfig for symmetry with
virDomainDeleteConfig, and to ensure it is not missed in future network
drivers.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
(cherry picked from commit a6ec4f472d)
2015-04-28 11:06:39 -04:00
Luyao Huang
5f3db97168 qemu: Remove unnecessary virReportError on networkGetNetworkAddress return
Error messages are already set in all code paths returning -1 from
networkGetNetworkAddress, so we don't want to overwrite them.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: John Ferlan <jferlan@redhat.com>
(cherry picked from commit 64595431cd)
2015-04-28 11:06:39 -04:00
Michal Privoznik
55576d3512 virQEMUCapsInitQMP: Don't dispose locked @vm
When creating qemu capabilities, a dummy virDomainObj is created just
because our monitor code expects that. However, the object is created
locked already. Then, under cleanup label, we simply unref the object
which results in whole domain object to be disposed. The object lock
is destroyed subsequently, but hey - it's still locked:

==24845== Thread #14's call to pthread_mutex_destroy failed
==24845==    with error code 16 (EBUSY: Device or resource busy)
==24845==    at 0x4C3024E: pthread_mutex_destroy (in /usr/lib64/valgrind/vgpreload_helgrind-amd64-linux.so)
==24845==    by 0x531F72E: virMutexDestroy (virthread.c:83)
==24845==    by 0x5302977: virObjectLockableDispose (virobject.c:237)
==24845==    by 0x5302A89: virObjectUnref (virobject.c:265)
==24845==    by 0x1DD37866: virQEMUCapsInitQMP (qemu_capabilities.c:3397)
==24845==    by 0x1DD37CC6: virQEMUCapsNewForBinary (qemu_capabilities.c:3481)
==24845==    by 0x1DD381E2: virQEMUCapsCacheLookup (qemu_capabilities.c:3609)
==24845==    by 0x1DD30F8A: virQEMUCapsInitGuest (qemu_capabilities.c:744)
==24845==    by 0x1DD31889: virQEMUCapsInit (qemu_capabilities.c:1020)
==24845==    by 0x1DD7DD36: virQEMUDriverCreateCapabilities (qemu_conf.c:888)
==24845==    by 0x1DDC57C0: qemuStateInitialize (qemu_driver.c:803)
==24845==    by 0x53DC743: virStateInitialize (libvirt.c:777)
==24845==

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 954427c354)
2015-04-28 11:06:39 -04:00
Chen Fan
0f9ee86062 qemu: fix memory leak in qemuAgentGetFSInfo
in virDomainFSInfoFree(), don't free the virDomainFSInfo data.

==10670== 80 bytes in 2 blocks are definitely lost in loss record 576 of 793
==10670==    at 0x4A06BC3: calloc (vg_replace_malloc.c:618)
==10670==    by 0x509DEBD: virAlloc (viralloc.c:144)
==10670==    by 0x19FBD558: qemuAgentGetFSInfo (qemu_agent.c:1837)
==10670==    by 0x1A03CF91: qemuDomainGetFSInfo (qemu_driver.c:19238)

Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
(cherry picked from commit f276b36d65)
2015-04-28 11:06:39 -04:00
Pavel Hrdina
a2d4e78296 docs: add a note that spice channel is usable only with spice graphics
To prevent a confusion about missing chardev argument in qemu
command line add a note about that behavior into documentation.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit 242e8c5472)
2015-04-28 11:06:39 -04:00
Jiri Denemark
a065bb0fe6 locking: Fix flags in virLockManagerLockDaemonNew
virLockManager*New APIs are never called with
VIR_LOCK_MANAGER_USES_STATE. Moreover, lockd driver does not maintain
any state that would need to be transferred during migration and thus it
should not mention VIR_LOCK_MANAGER_USES_STATE at all.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit 6beb75d96d)
2015-04-28 11:06:39 -04:00
Pavel Hrdina
bb1018f6b2 tests: fix qemuxml2argvtest to be arch independent
Commit 5aee81a0 introduced a new test for disk-serial.  The test fails
on i686 arch because there is no need to add "-cpu qemu32" to command
line.  To fix the test update emulator in XML to "/usr/bin/qemu" so we
don't add the "-cpu qemu32" to command while running the test on i686 or
x86_64 host.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit c2851781f1)
2015-04-28 11:06:38 -04:00
Martin Kletzander
87673df221 tests: Add test for virtio-mmio address type
Commit 3e4b783e fixed an issue with RNG schema where this address type
was missing, this commit adds a test for it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 6b22e0b562)
2015-04-28 11:06:38 -04:00
Michal Privoznik
61ab292139 qemu: Allow spaces in disk serial
https://bugzilla.redhat.com/show_bug.cgi?id=1195660

There's been a bug report appearing on the qemu-devel list, that
libvirt is unable to pass spaces in disk serial number [1]. Not only
our RNG schema forbids that, the code is not prepared either. However,
with a bit of escaping (if needed) we can allow spaces there.

1: https://lists.gnu.org/archive/html/qemu-devel/2015-02/msg04041.html

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 5aee81a0cb)
2015-04-28 11:06:38 -04:00
Erik Skultety
6ae19e709e storage: tweak condition to properly test lseek
According to the POSIX standard, off_t (returned by lseek) is defined as
signed integral type no shorter than int. Because our offset variable is defined
as unsigned long long, the original check was passed successfully if UINT64_MAX had
been used as offset value, due to implicit conversion.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1177219
(cherry picked from commit 3fde7986d6)
2015-04-28 11:06:38 -04:00
Erik Skultety
41fdb11391 virsh: tweak domif-getlink link state reporting message
According to docs, we only support 2 link states for an interface
up/down, 'up' being the default state if link state is unspecified in
domain's XML, so the message when no link state is provided should be
changed a little.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1141119
(cherry picked from commit d9c7f014ee)
2015-04-28 11:06:38 -04:00
Shanzhi Yu
97015f2fc4 qemu: snapshot: Don't skip check for qcow2 format with network disks
When the domain's source disk type is network, if source protocol is rbd
or sheepdog, the 'if().. break' will end the current case, which lead to
miss check the driver type is raw or qcow2. Libvirt will allow to create
internal snapshot for a running domain with raw format disk which based
on rbd storage.

While both protocols support internal snapshots of the disk qemu is not
able to use it as it requires some place to store the memory image. The
check if the disk is backed by a qcow2 image needs to be executed
always.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1179533
Signed-off-by: Shanzhi Yu <shyu@redhat.com>
(cherry picked from commit f7c1410b0e)
2015-04-28 11:06:38 -04:00
Michal Privoznik
2362e98273 networkLookupByUUID: Improve error message
We have this function networkObjFromNetwork() which for given
virNetworkPtr tries to find corresponding virNetworkObjPtr. If no
object is found, a nice error message is printed out:

  no network with matching uuid '$uuid' ($name)

Let's improve the error message produced by networkLookupByUUID to
follow that logic.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit bf1afdd491)
2015-04-28 11:06:38 -04:00
Michal Privoznik
91cf6052de qemuProcessReconnect: Fill in pid file path
https://bugzilla.redhat.com/show_bug.cgi?id=1197600

So, libvirt uses pid file to track pid of started qemus. Whenever
a domain is started, its pid is put into corresponding pid file.
The pid file path is generated based on domain name and stored
into domain object internals. However, it's not stored in the
status XML and therefore lost on daemon restarts. Hence, later,
when domain is being shut down, the daemon does not know which
pid file to unlink, and the correct pid file is left behind. To
avoid this, lets generate the pid file path again in
qemuProcessReconnect().

Reported-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 63889e0c77)
2015-04-28 11:06:37 -04:00
Prerna Saxena
9aec9a46b4 tests : Add test for 'ppc64le' architecture.
Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
(cherry picked from commit 8672a1e496)
2015-04-28 11:06:37 -04:00
Prerna Saxena
2e47fb1539 RNG: Add 'ppc64le' arch and newer pseries-2.* machine types
Acked-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
(cherry picked from commit 0afa6be815)
2015-04-28 11:06:37 -04:00
Peter Krempa
e022ba7334 schema: Fix interface link state schema
In commit edd1295e1d I've introduced an
XML element that allows to configure state of the network interface
link. Somehow the RNG schema hunk ended up in a weird place in the
network schema definition. Move it to the right place and add a test
case.

Note that the link state is set up via the monitor at VM startup so I
originally didn't think of adding a test case.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1173468
(cherry picked from commit 8eb907b8d0)
2015-04-28 11:06:37 -04:00
Martin Kletzander
d048e8ec9e conf: De-duplicate scheduling policy enums
Since adding the support for scheduler policy settings in commit
8680ea97, there are two enums with the same information.  That was
caused by rewriting the patch since first draft.

Find out thanks to clang, but there was no impact whatsoever.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 2fd5880b3b)
2015-04-28 11:06:37 -04:00
Martin Kletzander
5b3d68730d qemu: Don't crash in qemuDomainOpenChannel()
The problem here was that when opening a channel, we were checking
whether the channel given is alias (can't be NULL for running domain) or
it's name, which can be NULL (for example with spicevmc).  In case of
such domain qemuDomainOpenChannel() made the daemon crash.
STREQ_NULLABLE() is safe to use since the code in question is wrapped in
"if (name)" and is more readable, so use that instead of checking for
non-NULL "vm->def->channels[i]->target.name".

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit b3ea0a8fb8)
2015-04-28 11:06:37 -04:00
John Ferlan
67ca910eec virsh.pod: Update find-storage-pool-sources[-as] man page
https://bugzilla.redhat.com/show_bug.cgi?id=921426

Add to the man page a more complete description of what exactly the
command expects on input and will return on output based on what is
currently supported.

Perhaps missing findPoolSources implementations are backends for
sheepdog and rbd.  Also missing any backend is zfs.

(cherry picked from commit 567bd0fa57)
2015-04-28 11:06:36 -04:00
John Ferlan
5696678a1e iscsi: Adjust error message for findStorageSources backend
The virStorageBackendISCSIFindPoolSources API only needs the 'host' name
in order to discover iSCSI pools, it returns the various device paths.
On input, it's also possible to further restrict a search by providing the
port attribute for the host element and the (undocumented) initiator element.

For example:

$  virsh find-storage-pool-sources-as iscsi
error: Failed to find any iscsi pool sources
error: invalid argument: hostname and device path must be specified for iscsi sources

$ virsh find-storage-pool-sources-as iscsi 192.168.122.1
<sources>
  <source>
    <host name='192.168.122.1' port='3260'/>
    <device path='iqn.2013-12.com.example:iscsi-chap-lclpool'/>
  </source>
</sources>

(cherry picked from commit 30f69ae86b)
2015-04-28 11:06:36 -04:00
John Ferlan
0a19376986 virsh.pod: Add information regarding LXC for setmem, memtune, and dominfo
https://bugzilla.redhat.com/show_bug.cgi?id=1070695

Modify the virsh man page to more accurately describe which values are
set by the virsh setmem and displayed by the virsh memtune or dominfo
based on the setmem command results.

(cherry picked from commit 69db32f93d)
2015-04-28 11:06:36 -04:00
Erik Skultety
627f615a6e docs: add a note that attr 'managed' is only used by PCI devices
Our documentation isn't 100% clear about hostdev 'managed' attribute usage,
because it only makes sense to use it with PCI devices, yet we format
this attribute to all hostdev devices. By adding a note into the docs,
we can possibly avoid confusion from customer's side and also avoid a solution
using ternary logic.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1155887
(cherry picked from commit ccfe9e4809)
2015-04-28 11:06:36 -04:00
Ján Tomko
37448a868e Check if domain is running in qemuDomainAgentIsAvailable
If the domain is not running, the agent will not respond.
Do not even try.

https://bugzilla.redhat.com/show_bug.cgi?id=872424
(cherry picked from commit 723522328f)
2015-04-28 11:06:36 -04:00
Ján Tomko
4f712a2e95 Pass virDomainObjPtr to qemuDomainAgentAvailable
Not just the DomainObj's private data.

(cherry picked from commit fbb94044ea)
2015-04-28 11:06:36 -04:00
Ján Tomko
99680243f6 Check for qemu guest agent availability after getting the job
This way checks requiring the job can be done in qemuDomainAgentAvailable.

(cherry picked from commit c8b80b49f6)
2015-04-28 11:06:35 -04:00
Cole Robinson
5939f52a95 storage: fs: Ignore volumes that fail to open with EACCESS/EPERM
Trying to use qemu:///session to create a storage pool pointing at
/tmp will usually fail with something like:

$ virsh pool-start tmp
error: Failed to start pool tmp
error: cannot open volume '/tmp/systemd-private-c38cf0418d7a4734a66a8175996c384f-colord.service-kEyiTA': Permission denied

If any volume in an FS pool can't be opened by the daemon, the refresh
fails, and the pool can't be used.

This causes pain for virt-install/virt-manager though. Imaging a user
downloads a disk image to /tmp. virt-manager wants to import /tmp as
a storage pool, so we can detect what disk format it is, and set the
XML correctly. However this case will likely fail as explained above.

Change the logic here to skip volumes that fail to open. This could
conceivably cause user complaints along the lines of 'why doesn't
libvirt show $ROOT-OWNED-VOLUME-FOO', but figuring that currently
the pool won't even startup, I don't think there are any current
users that care about that case.

https://bugzilla.redhat.com/show_bug.cgi?id=1103308
(cherry picked from commit 56476f6a2d)
2015-04-28 09:48:36 -04:00
Cole Robinson
dc7cbdde6a domain: conf: Don't validate VM ostype/arch at daemon startup
When parsing XML, we validate the passed ostype + arch combo against
the detected hypervisor capabilities. This has led to the following
problem:

- Define x86 qemu guest
- qemu is inadvertently removed from the host
- libvirtd is restarted. fails to parse VM config since arch is removed
- 'virsh list --all' is now empty, user is wondering where their VMs went

Add a new internal flag VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS. Use
it when loading VM and snapshot configs from disk.

https://bugzilla.redhat.com/show_bug.cgi?id=1043572
(cherry picked from commit f1a89a8b6d)
2015-04-27 20:23:35 -04:00
Cole Robinson
e8fb46f7e9 domain: conf: Better errors on bad os <type> values
If no <os><type> was specified:
  before: unknown OS type no OS type
  after : xml error: an os <type> must be specified

If an <os><type> is specified that's not in our capabiliities data:
  before: unknown OS type: $type
  after : unsupported configuration: no support found for os <type> '$type'

VIR_ERR_OS_TYPE is now unused (as it should be frankly) so drop its strings
as well to save our translators some effort.

(cherry picked from commit 3700c065cd)
2015-04-27 20:23:29 -04:00
Cole Robinson
d430c9545f spec: Point fedora --with-loader-nvram at nightly firmware repo
Fedora doesn't ship OVMF/AAVMF builds in its repos due to licensing
issues, so the recommended way to consume these bits is via Gerd's
nightly repo: https://www.kraxel.org/repos

Let's teach fedora builds about the loader/nvram pairs these packages
installed, so users don't need to edit qemu.conf to get virt-manager
UEFI support.

(cherry picked from commit f93e121129)
2015-04-27 20:23:02 -04:00
Cole Robinson
df0f243b0c configure: Report --with-loader-nvram value in summary
(cherry picked from commit ce452877cb)
2015-04-27 20:22:57 -04:00
Cole Robinson
931a6985a8 configure: Fix --loader-nvram typo
(cherry picked from commit 714668b506)
2015-04-27 20:22:54 -04:00
Jiri Denemark
22b46ad765 cpu: Add {Haswell,Broadwell}-noTSX CPU models
QEMU 2.3 adds these new models to cover Haswell and Broadwell CPUs with
updated microcode. Luckily, they also reverted former the machine type
specific changes to existing models. And since these changes were never
released, we don't need to hack around them in libvirt.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit c563b50605)
2015-04-27 20:14:49 -04:00
Michal Privoznik
6d79e8b3ac domcaps: Check for architecture more wisely
https://bugzilla.redhat.com/show_bug.cgi?id=1209948

So we have this bug. The virConnectGetDomainCapabilities() API
performs a couple of checks before it produces any result. One of
the checks is if the architecture requested by user can be run by
the binary (again user provided). However, the check is pretty
dumb. It merely compares if the default binary architecture
matches the one provided by user. However, a qemu binary can run
multiple architectures. For instance: qemu-system-ppc64 can run:
ppc, ppcle, ppc64, ppc64le and ppcemb. The default is ppc64, so
if user requested something else, like ppc64le, the check would
have failed without obvious reason.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 0af9325e6a)
2015-04-27 19:57:36 -04:00
Peter Krempa
5a37b2a639 daemon: Clear fake domain def object that is used to check ACL prior to use
The fake object is used to pass the domain name and UUID to the ACL code
for events where we don't have the full domain def when dispatching
events. The rest of the entries would be left uninitialized. While this
is not a problem code-wise as the used fields are initialized it looks
ugly in the debugger.

(cherry picked from commit 6ca857c7c8)
2015-04-27 19:54:54 -04:00
Peter Krempa
5081142ed8 util: identity: Harden virIdentitySetCurrent()
Don't unref the old identity unless we set the new one correctly and
unref the new one on failure to set it so that we don't leak any
references or use invalid pointers.

(cherry picked from commit ad886fa6c8)
2015-04-27 19:54:49 -04:00
Cole Robinson
dc7c0de587 qemu: Always refresh capabilities if no <guests> found
- Remove all qemu emulators
- Restart libvirtd
- Install qemu emulators
- Call 'virsh version' -> errors

The only thing that will force the qemu driver to refresh it's cached
capablities info is an explict API call to GetCapabilities.

However in the case when the initial caps lookup at driver connect didn't
find a single qemu emulator to poll, the driver is effectively useless
and really can't do anything until it's populated some qemu capabilities
info.

With the above steps, the user would have to either know about the
magic refresh capabilities call, or restart libvirtd to pick up the
changes.

Instead, this patch changes things so that every time a part of th
driver requests access to capabilities info, check to see if
we've previously seen any emulators. If not, force a refresh.

In the case of 'still no emulators found', this is still very quick, so
I can't think of a downside.

https://bugzilla.redhat.com/show_bug.cgi?id=1000116
(cherry picked from commit 95546c43de)
(cherry picked from commit 9ebc1631b4)
2015-04-27 19:45:50 -04:00
Cole Robinson
ab87fb1cbc qemu: Build nvram directory at driver startup
Similar to what was done for the channel socket in the previous commit.

(cherry picked from commit 19425d110b)
2015-04-27 19:36:21 -04:00
Cole Robinson
9ed89d783b qemu: Build channel autosocket directory at driver startup
Rather than depend on the RPM to put it in place, since this doesn't
cover the qemu:///session case. Currently auto allocated socket path is
completely busted with qemu:///session

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

And because we chown the directory at driver startup now, this also fixes
autosocket startup failures when using user/group=root

https://bugzilla.redhat.com/show_bug.cgi?id=1044561
https://bugzilla.redhat.com/show_bug.cgi?id=1146886
(cherry picked from commit e31ab02fd0)
2015-04-27 19:36:21 -04:00
Michal Privoznik
c163111b58 virQEMUDriverGetConfig: Fix memleak
==19015== 968 (416 direct, 552 indirect) bytes in 1 blocks are definitely lost in loss record 999 of 1,049
==19015==    at 0x4C2C070: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==19015==    by 0x52ADF14: virAllocVar (viralloc.c:560)
==19015==    by 0x5302FD1: virObjectNew (virobject.c:193)
==19015==    by 0x1DD9401E: virQEMUDriverConfigNew (qemu_conf.c:164)
==19015==    by 0x1DDDF65D: qemuStateInitialize (qemu_driver.c:666)
==19015==    by 0x53E0823: virStateInitialize (libvirt.c:777)
==19015==    by 0x11E067: daemonRunStateInit (libvirtd.c:905)
==19015==    by 0x53201AD: virThreadHelper (virthread.c:206)
==19015==    by 0xA1EE1F2: start_thread (in /lib64/libpthread-2.19.so)
==19015==    by 0xA4EFC8C: clone (in /lib64/libc-2.19.so)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 225aa80246)
2015-04-27 19:36:21 -04:00
Cole Robinson
be95a1f150 qemu: chown autoDumpPath on driver startup
Not sure if this is required, but it makes things consistent with the
rest of the directories.

(cherry picked from commit db3ccd582c)
2015-04-27 19:36:21 -04:00
Cole Robinson
0dea832ada qemu: conf: Clarify paths that are relative to libDir
Rather than duplicate libDir for each new path

(cherry picked from commit c19f43ae7e)
2015-04-27 19:36:21 -04:00
Ján Tomko
b19b91a9f2 Strip control codes in virBufferEscapeString
These cannot be represented in XML.

We have been stripping them, but only if the string had
characters that needed escaping: <>"'&

Extend the strcspn check to include control codes, and strip
them even if we don't do any escaping.

https://bugzilla.redhat.com/show_bug.cgi?id=1184131
https://bugzilla.redhat.com/show_bug.cgi?id=1066564
(cherry picked from commit aeb5262e43)
2015-04-27 19:14:32 -04:00
Peter Krempa
39232280d1 util: buffer: Add support for adding text blocks with indentation
The current auto-indentation buffer code applies indentation only on
complete strings. To allow adding a string containing newlines and
having it properly indented this patch adds virBufferAddStr.

(cherry picked from commit 6ff59cbc83)
2015-04-27 19:14:32 -04:00
Ján Tomko
a0b55f2cf9 Ignore storage volumes with control codes in their names
To prevent generating invalid XML.

https://bugzilla.redhat.com/show_bug.cgi?id=1066564
(cherry picked from commit 60db2bc80f)
2015-04-27 19:14:32 -04:00
Ján Tomko
89b8dd650f Strip control characters from sysfs attributes
Including them in the XML makes them unparsable.

https://bugzilla.redhat.com/show_bug.cgi?id=1184131
(cherry picked from commit 557107500b)
2015-04-27 19:14:32 -04:00
Ján Tomko
20674276cf Add functions dealing with control characters in strings
Add virStringHasControlChars that checks if the string has
any control characters other than \t\r\n,
and virStringStripControlChars that removes them in-place.

(cherry picked from commit 2a530a3e50)
2015-04-27 19:14:32 -04:00
Ján Tomko
0a09130d34 tests: rename testStripIPv6BracketsData to testStripData
For reuse with other Strip* functions.

(cherry picked from commit e892842dfd)
2015-04-27 19:14:32 -04:00
Luyao Huang
417a32631d lxc: fix starting a domain with non-strict numa memory mode
# virsh -c lxc:/// start helloworld
 error: Failed to start domain helloworld
 error: internal error: guest failed to start: Unknown
 failure in libvirt_lxc startup

Return success when there are no cpuset.mems to be set,
instead of failing without setting an error.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 930e8697a5)
2015-04-20 16:00:23 +02:00
Luyao Huang
278995f9af lxc: fix starting a domain with a cpuset but no numatune
# virsh -c lxc:/// start helloworld
 error: Failed to start domain helloworld
 error: internal error: guest failed to start: Invalid value '1-3'
 for 'cpuset.mems': Invalid argument

Free the cpu mask to avoid reusing it as a mem mask
in virCgroupSetCpusetMems
if virDomainNumatuneMaybeFormatNodeset does not set a mask.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 461eafecfa)
2015-04-20 16:00:12 +02:00
Eric Blake
44fdfbb081 virsh: fix regression in 'virsh event' by domain
https://bugzilla.redhat.com/show_bug.cgi?id=1212620

Commit a0670ae caused a regression in 'virsh event' and
'virsh qemu-monitor-event' - if a user tries to filter the
command to a specific domain, an error message is printed:

$ virsh event dom --loop
error: internal error: virsh qemu-monitor-event: no domain VSH_OT_DATA option

and then the command continues as though no domain had been
supplied (giving events for ALL domains, instead of the
requested one).  This is because the code was incorrectly
assuming that all "domain" options would be supplied via a
mandatory VSH_OT_DATA, even though "domain" is optional for
these two commands, so we had changed them to VSH_OT_STRING
to quit failing for other reasons (ever since it was decided
that VSH_OT_DATA and VSH_OT_STRING should no longer be
synonyms).

In looking at the situation, though, the code for looking up
a domain was making a pointless check for whether the option
exists prior to finding the option's string value, as
vshCommandOptStringReq does just fine at reporting any errors
when looking up a string whether or not the option was present.

So this is a case of regression fixing by pure code deletion :)

* tools/virsh-domain.c (vshCommandOptDomainBy): Drop useless filter.
* tools/virsh-interface.c (vshCommandOptInterfaceBy): Likewise.
* tools/virsh-network.c (vshCommandOptNetworkBy): Likewise.
* tools/virsh-nwfilter.c (vshCommandOptNWFilterBy): Likewise.
* tools/virsh-secret.c (vshCommandOptSecret): Likewise.
* tools/virsh.h (vshCmdHasOption): Drop unused function.
* tools/virsh.c (vshCmdHasOption): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 31ef0836a7)
2015-04-16 13:54:49 -06:00
Cole Robinson
8a5b7ecf70 virsh: Improve change-media success message
$ sudo virsh change-media f19 hdc /mnt/data/devel/media/Fedora-16-x86_64-Live-KDE.iso
succeeded to complete action update on media

Change the message to:

  Successfully {inserted,ejected,changed} media.

https://bugzilla.redhat.com/show_bug.cgi?id=967946
(cherry picked from commit e3aa4c91c8)
2015-04-15 13:50:52 -04:00
Michal Privoznik
59668f6301 virNetSocketNewConnectUNIX: Use flocks when spawning a daemon
https://bugzilla.redhat.com/show_bug.cgi?id=1200149

Even though we have a mutex mechanism so that two clients don't spawn
two daemons, it's not strong enough. It can happen that while one
client is spawning the daemon, the other one fails to connect.
Basically two possible errors can happen:

  error: Failed to connect socket to '/home/mprivozn/.cache/libvirt/libvirt-sock': Connection refused

or:

  error: Failed to connect socket to '/home/mprivozn/.cache/libvirt/libvirt-sock': No such file or directory

The problem in both cases is, the daemon is only starting up, while we
are trying to connect (and fail). We should postpone the connecting
phase until the daemon is started (by the other thread that is
spawning it). In order to do that, create a file lock 'libvirt-lock'
in the directory where session daemon would create its socket. So even
when called from multiple processes, spawning a daemon will serialize
on the file lock. So only the first to come will spawn the daemon.

Tested-by: Richard W. M. Jones <rjones@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit be78814ae0)
2015-04-15 13:45:21 -04:00
Peter Krempa
72e4e1a105 rpc: Don't unref identity object while callbacks still can be executed
While this thread is cleaning up the client and connection objects:
 #2  virFileReadAll (path=0x7f28780012b0 "/proc/1319/stat", maxlen=maxlen@entry=1024, buf=buf@entry=0x7f289c60fc40) at util/virfile.c:1287
 #3  0x00007f28adbb1539 in virProcessGetStartTime (pid=<optimized out>, timestamp=timestamp@entry=0x7f289c60fc98) at util/virprocess.c:838
 #4  0x00007f28adb91981 in virIdentityGetSystem () at util/viridentity.c:151
 #5  0x00007f28ae73f17c in remoteClientFreeFunc (data=<optimized out>) at remote.c:1131
 #6  0x00007f28adcb7f33 in virNetServerClientDispose (obj=0x7f28aecad180) at rpc/virnetserverclient.c:858
 #7  0x00007f28adba8eeb in virObjectUnref (anyobj=<optimized out>) at util/virobject.c:265
 #8  0x00007f28ae74ad05 in virNetServerHandleJob (jobOpaque=<optimized out>, opaque=0x7f28aec93ff0) at rpc/virnetserver.c:205
 #9  0x00007f28adbbef4e in virThreadPoolWorker (opaque=opaque@entry=0x7f28aec88030) at util/virthreadpool.c:145

In stack frame #6 the client->identity object got unref'd, but the code
that removes the event callbacks in frame #5 did not run yet as we are
trying to obtain the system identity (frames #4, #3, #2).

In other thead:
 #0  virObjectUnref (anyobj=anyobj@entry=0x7f288c162c60) at util/virobject.c:264
        klass = 0xdeadbeef
        obj = 0x7f288c162c60
 #1  0x00007f28ae71c709 in remoteRelayDomainEventCheckACL (client=<optimized out>, conn=<optimized out>, dom=dom@entry=0x7f28aecaafc0) at remote.c:164
 #2  0x00007f28ae71fc83 in remoteRelayDomainEventTrayChange (conn=<optimized out>, dom=0x7f28aecaafc0, ... ) at remote.c:717
 #3  0x00007f28adc04e53 in virDomainEventDispatchDefaultFunc (conn=0x7f287c0009a0, event=0x7f28aecab1a0, ...) at conf/domain_event.c:1455
 #4  0x00007f28adc03831 in virObjectEventStateDispatchCallbacks (callbacks=<optimized out>, ....) at conf/object_event.c:724
 #5  virObjectEventStateQueueDispatch (callbacks=0x7f288c083730, queue=0x7fff51f90030, state=0x7f288c18da20) at conf/object_event.c:738
 #6  virObjectEventStateFlush (state=0x7f288c18da20) at conf/object_event.c:816
 #7  virObjectEventTimer (timer=<optimized out>, opaque=0x7f288c18da20) at conf/object_event.c:562
 #8  0x00007f28adb859cd in virEventPollDispatchTimeouts () at util/vireventpoll.c:459

Frame #0 is unrefing an invalid identity object while frame #2 hints
that the client is still dispatching the event.

For untrimmed backtrace see the bugzilla attachment.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1203030
(cherry picked from commit a98129c0ee)
2015-04-15 13:44:45 -04:00
Lubomir Rintel
ed1cf00af8 lxc: create the required directories upon driver start
/var/run may reside on a tmpfs and we fail to create the PID file if
/var/run/lxc does not exist.

Since commit 0a8addc1, the lxc driver's state directory isn't
automatically created before starting a domain. Now, the lxc driver
makes sure the state directory exists when it initializes.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
(cherry picked from commit da33a1ac1f)
2015-04-15 13:43:31 -04:00
Eric Blake
ece6debbb0 qemu: read backing chain names from qemu
https://bugzilla.redhat.com/show_bug.cgi?id=1199182 documents that
after a series of disk snapshots into existing destination images,
followed by active commits of the top image, it is possible for
qemu 2.2 and earlier to end up tracking a different name for the
image than what it would have had when opening the chain afresh.
That is, when starting with the chain 'a <- b <- c', the name
associated with 'b' is how it was spelled in the metadata of 'c',
but when starting with 'a', taking two snapshots into 'a <- b <- c',
then committing 'c' back into 'b', the name associated with 'b' is
now the name used when taking the first snapshot.

Sadly, older qemu doesn't know how to treat different spellings of
the same filename as identical files (it uses strcmp() instead of
checking for the same inode), which means libvirt's attempt to
commit an image using solely the names learned from qcow2 metadata
fails with a cryptic:

error: internal error: unable to execute QEMU command 'block-commit': Top image file /tmp/images/c/../b/b not found

even though the file exists.  Trying to teach libvirt the rules on
which name qemu will expect is not worth the effort (besides, we'd
have to remember it across libvirtd restarts, and track whether a
file was opened via metadata or via snapshot creation for a given
qemu process); it is easier to just always directly ask qemu what
string it expects to see in the first place.

As a safety valve, we validate that any name returned by qemu
still maps to the same local file as we have tracked it, so that
a compromised qemu cannot accidentally cause us to act on an
incorrect file.

* src/qemu/qemu_monitor.h (qemuMonitorDiskNameLookup): New
prototype.
* src/qemu/qemu_monitor_json.h (qemuMonitorJSONDiskNameLookup):
Likewise.
* src/qemu/qemu_monitor.c (qemuMonitorDiskNameLookup): New function.
* src/qemu/qemu_monitor_json.c (qemuMonitorJSONDiskNameLookup)
(qemuMonitorJSONDiskNameLookupOne): Likewise.
* src/qemu/qemu_driver.c (qemuDomainBlockCommit)
(qemuDomainBlockJobImpl): Use it.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit f9ea3d6011)
2015-04-02 14:24:44 -04:00
Eric Blake
117f60ca53 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)
2015-03-16 10:21:06 -06:00
Laine Stump
a461375714 qemu: don't fill in nicindexes for session mode libvirtd
Commit 4bbe1029f fixed a problem in commit f7afeddc by moving the call
to virNetDevGetIndex() to a location common to all interface types (so
that the nicindex array would be filled in for macvtap as well as tap
interfaces), but the location was *too* common, as the original call
to virNetDevGetIndex() had been in a section qualified by "if
(cfg->privileged)". The result was that the "fixed" libvirtd would try
to call virNetDevGetIndex() even for session mode libvirtd, and end up
failing with the log message:

  Unable to open control socket: Operation not permitted

To remedy that, this patch qualifies the call to virNetDevGetIndex()
in its new location with cfg->privileged.

This resolves https://bugzilla.redhat.com/show_bug.cgi?id=1198244

(cherry picked from commit 705242f880)
2015-03-10 07:54:21 -04:00
4628 changed files with 1330205 additions and 1124278 deletions

24
.gitignore vendored
View File

@@ -1,7 +1,5 @@
*#*#
*.#*#
*.[18]
*.[18].in
*.a
*.cov
*.exe
@@ -20,7 +18,6 @@
*.pyc
*.rej
*.s
*.swp
*~
.#*
.deps
@@ -59,16 +56,18 @@
/daemon/libvirt_qemud
/daemon/libvirtd
/daemon/libvirtd*.logrotate
/daemon/libvirtd.8
/daemon/libvirtd.8.in
/daemon/libvirtd.init
/daemon/libvirtd.pod
/daemon/libvirtd.policy
/daemon/libvirtd.service
/daemon/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 +81,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 +110,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 +120,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,13 +142,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.init
/tests/*.log
/tests/*.pid
/tests/*.trs
@@ -171,13 +161,13 @@
/tests/reconnect
/tests/ssh
/tests/test_conf
/tools/*.[18]
/tools/libvirt-guests.init
/tools/libvirt-guests.service
/tools/libvirt-guests.sh
/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...c27f1a356f

View File

@@ -7,8 +7,6 @@
<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>
@@ -60,4 +58,3 @@ 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,7 +8,6 @@ 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>
Cédric Bosdonnat <cbosdonnat@suse.com>
Christophe Fergeau <cfergeau@redhat.com>
Claudio Bley <claudio.bley@gmail.com>
@@ -17,7 +16,6 @@ Daniel Berrange <berrange@redhat.com>
Daniel Veillard <veillard@redhat.com>
Doug Goldstein <cardoe@gentoo.org>
Eric Blake <eblake@redhat.com>
Erik Skultety <eskultet@redhat.com>
Gao Feng <gaofeng@cn.fujitsu.com>
Guido Günther <agx@sigxcpu.org>
Ján Tomko <jtomko@redhat.com>
@@ -28,7 +26,6 @@ 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>
Pavel Hrdina <phrdina@redhat.com>
Peter Krempa <pkrempa@redhat.com>
@@ -45,7 +42,6 @@ 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>

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

26
HACKING
View File

@@ -18,12 +18,7 @@ listen to feedback.
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
(3) Post patches in unified diff format, with git rename detection enabled. You
need a one-time setup of:
git config diff.renames true
@@ -75,7 +70,7 @@ the correct version if needed though).
(5) In your commit message, make the summary line reasonably short (60 characters
(4) 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 +82,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
(5) 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 +93,10 @@ things).
(7) Make sure your patches apply against libvirt GIT. Developers only follow GIT
(6) 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
(7) 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 +136,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
(8) 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 +218,7 @@ to "tests/.valgrind.supp" in order to suppress the warning:
(10) Update tests and/or documentation, particularly if you are adding a new
(9) Update tests and/or documentation, particularly if you are adding a new
feature or changing the output of a program.

View File

@@ -19,11 +19,19 @@
LCOV = lcov
GENHTML = genhtml
SUBDIRS = . gnulib/lib include/libvirt src daemon tools docs gnulib/tests \
tests po examples
SUBDIRS = . gnulib/lib include src daemon tools docs gnulib/tests \
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
@@ -68,7 +76,7 @@ rpm: clean
check-local: all tests
cov: clean-cov
$(MKDIR_P) $(top_builddir)/coverage
mkdir $(top_builddir)/coverage
$(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp \
-d $(top_builddir)/src -d $(top_builddir)/daemon \
-d $(top_builddir)/tests
@@ -83,6 +91,9 @@ clean-cov:
MAINTAINERCLEANFILES = .git-module-status
# disable this check
distuninstallcheck:
dist-hook: gen-ChangeLog gen-AUTHORS
# Generate the ChangeLog file (with all entries since the switch to git)

View File

@@ -4,7 +4,7 @@ scriptversion=2014-12-08.12; # UTC
# Bootstrap this package from checked-out sources.
# Copyright (C) 2003-2016 Free Software Foundation, Inc.
# Copyright (C) 2003-2015 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
@@ -915,8 +915,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

@@ -196,7 +196,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
@@ -209,11 +212,19 @@ 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

193
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)
@@ -304,11 +307,10 @@ sc_flags_usage:
$(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; } || :
@prohibit=' flags ATTRIBUTE_UNUSED' \
@prohibit=' flags ''ATTRIBUTE_UNUSED' \
halt='flags should be checked with virCheckFlags' \
$(_sc_search_regexp)
@prohibit='^[^@]*([^d] (int|long long)|[^dg] long) flags[;,)]' \
@@ -351,8 +353,8 @@ sc_prohibit_mkstemp:
# access with X_OK accepts directories, but we can't exec() those.
# access with F_OK or R_OK is okay, though.
sc_prohibit_access_xok:
@prohibit='access(at)? *\(.*X_OK' \
halt='use virFileIsExecutable instead of access(,X_OK)' \
@prohibit='access''(at)? *\(.*X_OK' \
halt='use virFileIsExecutable instead of access''(,X_OK)' \
$(_sc_search_regexp)
# Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
@@ -361,7 +363,7 @@ snp_ = strncmp *\(.+\)
sc_prohibit_strncmp:
@prohibit='! *strncmp *\(|\<$(snp_) *[!=]=|[!=]= *$(snp_)' \
exclude=':# *define STR(N?EQLEN|PREFIX)\(' \
halt='use STREQLEN or STRPREFIX instead of strncmp' \
halt='use STREQLEN or STRPREFIX instead of str''ncmp' \
$(_sc_search_regexp)
# strtol and friends are too easy to misuse
@@ -379,7 +381,7 @@ sc_prohibit_strtol:
# But for plain %s, virAsprintf is overkill compared to strdup.
sc_prohibit_asprintf:
@prohibit='\<v?a[s]printf\>' \
halt='use virAsprintf, not asprintf' \
halt='use virAsprintf, not as'printf \
$(_sc_search_regexp)
@prohibit='virAsprintf.*, *"%s",' \
halt='use VIR_STRDUP instead of virAsprintf with "%s"' \
@@ -406,7 +408,7 @@ sc_prohibit_risky_id_promotion:
# since gnulib has more guarantees for snprintf portability
sc_prohibit_sprintf:
@prohibit='\<[s]printf\>' \
halt='use snprintf, not sprintf' \
halt='use snprintf, not s'printf \
$(_sc_search_regexp)
sc_prohibit_readlink:
@@ -431,13 +433,13 @@ sc_prohibit_gettext_noop:
$(_sc_search_regexp)
sc_prohibit_VIR_ERR_NO_MEMORY:
@prohibit='\<VIR_ERR_NO_MEMORY\>' \
halt='use virReportOOMError, not VIR_ERR_NO_MEMORY' \
@prohibit='\<V''IR_ERR_NO_MEMORY\>' \
halt='use virReportOOMError, not V'IR_ERR_NO_MEMORY \
$(_sc_search_regexp)
sc_prohibit_PATH_MAX:
@prohibit='\<PATH_MAX\>' \
halt='dynamically allocate paths, do not use PATH_MAX' \
@prohibit='\<P''ATH_MAX\>' \
halt='dynamically allocate paths, do not use P'ATH_MAX \
$(_sc_search_regexp)
# Use a subshell for each function, to give the optimal warning message.
@@ -454,20 +456,20 @@ sc_prohibit_nonreentrant:
exit $$fail
sc_prohibit_select:
@prohibit='\<select *\(' \
halt='use poll(), not select()' \
@prohibit="\\<select *\\(" \
halt="use poll(), not se""lect()" \
$(_sc_search_regexp)
# Prohibit the inclusion of <ctype.h>.
sc_prohibit_ctype_h:
@prohibit='^# *include *<ctype\.h>' \
halt='use c-ctype.h instead of ctype.h' \
halt="don't use ctype.h; instead, use c-ctype.h" \
$(_sc_search_regexp)
# Insist on correct types for [pug]id.
sc_correct_id_types:
@prohibit='\<(int|long) *[pug]id\>' \
halt='use pid_t for pid, uid_t for uid, gid_t for gid' \
halt="use pid_t for pid, uid_t for uid, gid_t for gid" \
$(_sc_search_regexp)
# "const fooPtr a" is the same as "foo * const a", even though it is
@@ -503,12 +505,12 @@ ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
sc_avoid_ctype_macros:
@prohibit='\b($(ctype_re)) *\(' \
halt='use c-ctype.h instead of ctype macros' \
halt="don't use ctype macros (use c-ctype.h)" \
$(_sc_search_regexp)
sc_avoid_strcase:
@prohibit='\bstrn?case(cmp|str) *\(' \
halt='use c-strcase.h instead of raw strcase functions' \
halt="don't use raw strcase functions (use c-strcase instead)" \
$(_sc_search_regexp)
sc_prohibit_virBufferAdd_with_string_literal:
@@ -565,20 +567,14 @@ 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)
sc_prohibit_loop_iijjkk:
@prohibit='\<(int|unsigned) ([^=]+ )*(ii|jj|kk)\>(\s|,|;)' \
halt='use i, j, k for loop iterators, not ii, jj, kk' \
halt='use i, j, k for loop iterators, not ii, jj, kk' \
$(_sc_search_regexp)
# RHEL 5 gcc can't grok "for (int i..."
@@ -743,7 +739,7 @@ sc_copyright_format:
@prohibit='Copyright [^(].*Red 'Hat \
halt='consistently use (C) in Red Hat copyright' \
$(_sc_search_regexp)
@prohibit='\<RedHat\>' \
@prohibit='\<Red''Hat\>' \
halt='spell Red Hat as two words' \
$(_sc_search_regexp)
@@ -776,7 +772,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 \
@@ -810,7 +806,7 @@ sc_require_enum_last_marker:
sc_prohibit_semicolon_at_eol_in_python:
@prohibit='^[^#].*\;$$' \
in_vc_files='\.py$$' \
halt='python does not require to end lines with a semicolon' \
halt="Don't use semicolon at eol in python files" \
$(_sc_search_regexp)
# mymain() in test files should use return, not exit, for nicer output
@@ -917,23 +913,14 @@ sc_prohibit_virConnectOpen_in_virsh:
sc_require_space_before_label:
@prohibit='^( ?)?[_a-zA-Z0-9]+:$$' \
in_vc_files='\.[ch]$$' \
halt='Top-level labels should be indented by one space' \
$(_sc_search_regexp)
# Allow for up to three spaces before the label: this is to avoid running
# into situations where neither this rule nor require_space_before_label
# would apply, eg. a line matching ^[a-zA-Z0-9]+ :$
sc_prohibit_space_in_label:
@prohibit='^ {0,3}[_a-zA-Z0-9]+ +:$$' \
in_vc_files='\.[ch]$$' \
halt='There should be no space between label name and colon' \
halt="Top-level labels should be indented by one space" \
$(_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' \
halt="if one side of if-else uses {}, both sides must use it" \
$(_sc_search_regexp)
sc_curly_braces_style:
@@ -993,7 +980,7 @@ sc_prohibit_static_zero_init:
sc_prohibit_devname:
@prohibit='\bdevname\b' \
exclude='sc_prohibit_devname' \
halt='avoid using devname as FreeBSD exports the symbol' \
halt='avoid using 'devname' as FreeBSD exports the symbol' \
$(_sc_search_regexp)
sc_prohibit_system_error_with_vir_err:
@@ -1007,7 +994,7 @@ sc_prohibit_system_error_with_vir_err:
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' \
halt='avoid using 'virXXXFree', use 'virObjectUnref' instead' \
$(_sc_search_regexp)
sc_prohibit_sysconf_pagesize:
@@ -1015,48 +1002,6 @@ sc_prohibit_sysconf_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)
# <dt> is mostly used to document symbols, in which case it should contain
# a <code> element. The regular expression below trades speed and readability
# for accuracy, and won't catch someone trying to stick a <canvas> inside a
# <dt>, but that's what code reviews are for :)
sc_prohibit_dt_without_code:
@prohibit='<dt>([^<]|<[^c])' \
exclude='exempt from syntax-check' \
in_vc_files='docs/.*$$' \
halt='Use <code> inside <dt> when documenting symbols' \
$(_sc_search_regexp)
# We don't use this feature of maint.mk.
prev_version_file = /dev/null
@@ -1104,7 +1049,7 @@ _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:
@@ -1113,58 +1058,33 @@ bracket-spacing-check:
{ echo '$(ME): incorrect formatting, 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-stream|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_copyright_format = \
^cfg\.mk$$
exclude_file_name_regexp--sc_bindtextdomain = ^(tests|examples)/
exclude_file_name_regexp--sc_copyright_usage = \
^COPYING(|\.LESSER)$$
exclude_file_name_regexp--sc_flags_usage = \
^(cfg\.mk|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/)
@@ -1172,27 +1092,23 @@ exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
exclude_file_name_regexp--sc_po_check = ^(docs/|src/rpc/gendispatch\.pl$$)
exclude_file_name_regexp--sc_prohibit_VIR_ERR_NO_MEMORY = \
^(cfg\.mk|include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virerror\.c|docs/internals/oomtesting\.html\.in)$$
^(include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virerror\.c|docs/internals/oomtesting\.html\.in)$$
exclude_file_name_regexp--sc_prohibit_PATH_MAX = \
^cfg\.mk$$
exclude_file_name_regexp--sc_prohibit_access_xok = \
^(cfg\.mk|src/util/virutil\.c)$$
exclude_file_name_regexp--sc_prohibit_access_xok = ^src/util/virutil\.c$$
exclude_file_name_regexp--sc_prohibit_asprintf = \
^(cfg\.mk|bootstrap.conf$$|src/util/virstring\.[ch]$$|tests/vircgroupmock\.c$$)
^(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$$)
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]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir(cgroup|pci)mock\.c)$$)
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
(^tests/(qemuhelp|nodeinfo|virpcitest)data/|\.diff|tests/virconfdata/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$$)
@@ -1207,9 +1123,6 @@ exclude_file_name_regexp--sc_prohibit_newline_at_end_of_diagnostic = \
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
^((po|tests)/|docs/.*(py|html\.in)|run.in$$|tools/wireshark/util/genxdrstub\.pl$$)
exclude_file_name_regexp--sc_prohibit_select = \
^cfg\.mk$$
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
^(docs/hacking\.html\.in|src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|vircgroupmock)\.c|tools/wireshark/src/packet-libvirt\.c)$$
@@ -1219,14 +1132,12 @@ exclude_file_name_regexp--sc_prohibit_readlink = \
exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/virutil\.c$$
exclude_file_name_regexp--sc_prohibit_sprintf = \
^(cfg\.mk|docs/hacking\.html\.in|.*\.stp|.*\.pl)$$
(^docs/hacking\.html\.in|\.stp|\.pl)$$
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$$
@@ -1256,22 +1167,22 @@ 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/|src/admin_protocol-structs|src/admin/admin_protocol.x)$
^(src/remote_protocol-structs|src/remote/remote_protocol.x|cfg.mk|include/)$
exclude_file_name_regexp--sc_prohibit_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/.*)$$
^(README|daemon/THREADS\.txt|src/esx/README|docs/library.xen|tests/vmwareverdata/fusion-5.0.3.txt|tests/nodeinfodata/linux-raspberrypi/cpu/offline)$$
exclude_file_name_regexp--sc_prohibit_useless_translation = \
^tests/virpolkittest.c
@@ -1284,15 +1195,3 @@ exclude_file_name_regexp--sc_prohibit_virXXXFree = \
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]$$
exclude_file_name_regexp--sc_prohibit_dt_without_code = \
^docs/(newapi\.xsl|(apps|contact)\.html\.in)$$

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

@@ -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.4], [libvir-list@redhat.com], [], [http://libvirt.org])
AC_INIT([libvirt], [1.2.13.1], [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
@@ -144,8 +139,6 @@ AC_TYPE_UID_T
dnl Support building Win32 DLLs (must appear *before* AM_PROG_LIBTOOL)
AC_LIBTOOL_WIN32_DLL
AC_HEADER_MAJOR
m4_ifndef([LT_INIT], [
AM_PROG_LIBTOOL
], [
@@ -177,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
@@ -195,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"])
@@ -258,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])
@@ -286,7 +273,7 @@ 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])
@@ -323,10 +310,10 @@ if test "x$lv_cv_pthread_sigmask_works" != xyes; then
AC_DEFINE([FUNC_PTHREAD_SIGMASK_BROKEN], [1],
[Define to 1 if pthread_sigmask is not a real function])
fi
LIBS=$old_LIBS
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])
@@ -396,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.
@@ -415,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],
@@ -428,7 +404,6 @@ AC_PATH_PROG([XMLCATALOG], [xmlcatalog], [/usr/bin/xmlcatalog])
AC_PATH_PROG([XSLTPROC], [xsltproc], [/usr/bin/xsltproc])
AC_PATH_PROG([AUGPARSE], [augparse], [/usr/bin/augparse])
AC_PROG_MKDIR_P
AC_PROG_LN_S
dnl External programs that we can use if they are available.
dnl We will hard-code paths to these programs unless we cannot
@@ -450,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],
@@ -467,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])
@@ -577,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@:>@])])
@@ -836,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=""
@@ -887,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"
@@ -935,20 +895,6 @@ if test "$with_libxl" = "yes"; then
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"])
@@ -1099,25 +1045,27 @@ 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
dnl
dnl Check for virt-host-validate
dnl
LIBVIRT_CHECK_HOST_VALIDATE
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" = "yes" ||
test "$with_parallels" = "check"; then
PKG_CHECK_MODULES([PARALLELS_SDK], [parallels-sdk],
[PARALLELS_SDK_FOUND=yes], [PARALLELS_SDK_FOUND=no])
if test "$with_parallels" = "yes" && test "$PARALLELS_SDK_FOUND" = "no"; then
AC_MSG_ERROR([Parallels Virtualization SDK is needed to build the Parallels driver.])
fi
with_parallels=$PARALLELS_SDK_FOUND
if test "$with_parallels" = "yes"; then
AC_DEFINE_UNQUOTED([WITH_PARALLELS], 1,
[whether Parallels driver is enabled])
fi
fi
AM_CONDITIONAL([WITH_PARALLELS], [test "$with_parallels" = "yes"])
dnl
dnl Checks for bhyve driver
@@ -1125,6 +1073,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
@@ -1211,15 +1209,15 @@ AC_SUBST([LIBXML_CFLAGS])
AC_SUBST([LIBXML_LIBS])
dnl xmlURI structure has query_raw?
old_CFLAGS="$CFLAGS"
old_LIBS="$LIBS"
old_cflags="$CFLAGS"
old_libs="$LIBS"
CFLAGS="$CFLAGS $LIBXML_CFLAGS"
LIBS="$LIBS $LIBXML_LIBS"
AC_CHECK_MEMBER([struct _xmlURI.query_raw],
[AC_DEFINE([HAVE_XMLURI_QUERY_RAW], [], [Have query_raw field in libxml2 xmlURI structure])],,
[#include <libxml/uri.h>])
CFLAGS="$old_CFLAGS"
LIBS="$old_LIBS"
CFLAGS="$old_cflags"
LIBS="$old_libs"
dnl GnuTLS library
AC_ARG_WITH([gnutls],
@@ -1235,8 +1233,8 @@ if test "x$with_gnutls" != "xno"; then
GNUTLS_LIBS="-L$with_gnutls/lib"
fi
fail=0
old_CFLAGS="$CFLAGS"
old_LIBS="$LIBS"
old_cflags="$CFLAGS"
old_libs="$LIBS"
CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
LIBS="$LIBS $GNUTLS_LIBS"
@@ -1294,23 +1292,16 @@ if test "x$with_gnutls" != "xno"; then
[set to 1 if it is known or assumed that GNUTLS uses gcrypt])
fi
dnl gnutls 3.x moved some declarations to a new header
AC_CHECK_HEADERS([gnutls/crypto.h], [], [], [[
#include <gnutls/gnutls.h>
]])
with_gnutls=yes
fi
dnl GNUTLS_CFLAGS and GNUTLS_LIBS have probably been updated above,
dnl and we need the final values for function probing to work
CFLAGS="$old_CFLAGS $GNUTLS_CFLAGS"
LIBS="$old_LIBS $GNUTLS_LIBS"
dnl gnutls 3.x moved some declarations to a new header
AC_CHECK_HEADERS([gnutls/crypto.h], [], [], [[
#include <gnutls/gnutls.h>
]])
AC_CHECK_FUNCS([gnutls_rnd])
LIBS="$old_libs"
CFLAGS="$old_CFLAGS"
LIBS="$old_LIBS"
fi
if test "x$with_gnutls" = "xyes" ; then
@@ -1335,28 +1326,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,
@@ -1451,8 +1438,8 @@ if test "$with_selinux" != "yes" ; then
AC_MSG_ERROR([You must install the libselinux development package and enable SELinux with the --with-selinux=yes in order to compile libvirt --with-secdriver-selinux=yes])
fi
elif test "$with_secdriver_selinux" != "no"; then
old_CFLAGS="$CFLAGS"
old_LIBS="$LIBS"
old_cflags="$CFLAGS"
old_libs="$LIBS"
CFLAGS="$CFLAGS $SELINUX_CFLAGS"
LIBS="$CFLAGS $SELINUX_LIBS"
@@ -1460,8 +1447,8 @@ elif test "$with_secdriver_selinux" != "no"; then
AC_CHECK_FUNC([selinux_virtual_domain_context_path], [], [fail=1])
AC_CHECK_FUNC([selinux_virtual_image_context_path], [], [fail=1])
AC_CHECK_FUNCS([selinux_lxc_contexts_path])
CFLAGS="$old_CFLAGS"
LIBS="$old_LIBS"
CFLAGS="$old_cflags"
LIBS="$old_libs"
if test "$fail" = "1" ; then
if test "$with_secdriver_selinux" = "check" ; then
@@ -1666,6 +1653,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],
@@ -1945,14 +1936,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
@@ -1964,7 +1955,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],
@@ -1982,6 +1973,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])
@@ -2330,7 +2329,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=
@@ -2361,7 +2359,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
@@ -2377,7 +2374,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])
@@ -2507,9 +2503,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],
@@ -2644,6 +2637,70 @@ 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,
@@ -2764,23 +2821,35 @@ AC_DEFINE_UNQUOTED([base64_encode_alloc],[libvirt_gl_base64_encode_alloc],[Hack
AC_CONFIG_FILES([run],
[chmod +x,-w run])
AC_CONFIG_FILES([\
Makefile src/Makefile include/libvirt/Makefile docs/Makefile \
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([])
@@ -2801,7 +2870,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])
@@ -2863,8 +2932,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])
@@ -2933,23 +3000,21 @@ 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([])
AC_MSG_NOTICE([ Debug: $enable_debug])
AC_MSG_NOTICE([ Use -Werror: $set_werror])
AC_MSG_NOTICE([ Warning Flags: $WARN_CFLAGS])
AC_MSG_NOTICE([ DTrace: $with_dtrace])
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([virt-host-validate: $with_host_validate])
AC_MSG_NOTICE([ Debug: $enable_debug])
AC_MSG_NOTICE([ Use -Werror: $set_werror])
AC_MSG_NOTICE([ Warning Flags: $WARN_CFLAGS])
AC_MSG_NOTICE([ DTrace: $with_dtrace])
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([])
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 = \
@@ -46,39 +44,29 @@ DAEMON_SOURCES = \
LIBVIRTD_CONF_SOURCES = libvirtd-config.c libvirtd-config.h
PODFILES = \
libvirtd.pod \
$(NULL)
MANINFILES = \
libvirtd.8.in \
$(NULL)
DISTCLEANFILES =
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 \
$(PODFILES) \
$(MANINFILES) \
libvirtd.pod.in \
libvirtd.8.in \
$(DAEMON_SOURCES) \
$(LIBVIRTD_CONF_SOURCES) \
$(NULL)
@@ -88,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
@@ -133,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
@@ -169,6 +129,13 @@ augeastests_DATA = test_libvirtd.aug
CLEANFILES += test_libvirtd.aug
libvirtd.8: $(srcdir)/libvirtd.8.in
$(AM_V_GEN)sed \
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
< $< > $@-t && \
mv $@-t $@
libvirtd_SOURCES = $(DAEMON_SOURCES)
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
@@ -199,7 +166,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 \
@@ -233,10 +199,6 @@ if WITH_VBOX
libvirtd_LDADD += ../src/libvirt_driver_vbox.la
endif WITH_VBOX
if WITH_VZ
libvirtd_LDADD += ../src/libvirt_driver_vz.la
endif WITH_VZ
if WITH_STORAGE
libvirtd_LDADD += ../src/libvirt_driver_storage.la
endif WITH_STORAGE
@@ -271,8 +233,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
@@ -303,19 +263,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::
@@ -323,12 +273,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)
@@ -350,12 +297,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' \
@@ -373,8 +314,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
@@ -382,7 +321,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 || :
@@ -403,10 +341,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:
@@ -450,15 +388,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:
@@ -482,6 +423,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
@@ -505,24 +452,12 @@ install-data-local: install-data-sasl
uninstall-local:: uninstall-data-sasl
endif ! WITH_LIBVIRTD
POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
POD2MAN = pod2man -c "Virtualization Support" \
-r "$(PACKAGE)-$(VERSION)" -s 8
%.8.in: %.pod
$(AM_V_GEN)$(POD2MAN) --section=8 $< $@-t1 && \
if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
sed \
-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
< $@-t1 > $@-t2 && \
rm -f $@-t1 && \
mv $@-t2 $@
%.8: %.8.in $(top_srcdir)/configure.ac
$(AM_V_GEN)sed \
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
< $< > $@-t && \
mv $@-t $@
$(srcdir)/libvirtd.8.in: libvirtd.pod.in $(top_srcdir)/configure.ac
$(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ \
&& if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi
# This is needed for clients too, so can't wrap in
# the WITH_LIBVIRTD conditional
@@ -543,4 +478,4 @@ endif ! WITH_SASL
CLEANFILES += $(BUILT_SOURCES) $(man8_MANS)
CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
MAINTAINERCLEANFILES = $(MANINFILES) $(DAEMON_GENERATED)
MAINTAINERCLEANFILES = $(srcdir)/libvirtd.8.in $(DAEMON_GENERATED)

View File

@@ -1,224 +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"
#include "virtypedparam.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;
}
static int
adminDispatchServerGetThreadpoolParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientPtr client,
virNetMessagePtr msg ATTRIBUTE_UNUSED,
virNetMessageErrorPtr rerr,
struct admin_server_get_threadpool_parameters_args *args,
struct admin_server_get_threadpool_parameters_ret *ret)
{
int rv = -1;
virNetServerPtr srv = NULL;
virTypedParameterPtr params = NULL;
int nparams = 0;
struct daemonAdmClientPrivate *priv =
virNetServerClientGetPrivateData(client);
if (!(srv = virNetDaemonGetServer(priv->dmn, args->srv.name)))
goto cleanup;
if (adminServerGetThreadPoolParameters(srv, &params, &nparams,
args->flags) < 0)
goto cleanup;
if (nparams > ADMIN_SERVER_THREADPOOL_PARAMETERS_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Number of threadpool parameters %d exceeds max "
"allowed limit: %d"), nparams,
ADMIN_SERVER_THREADPOOL_PARAMETERS_MAX);
goto cleanup;
}
if (virTypedParamsSerialize(params, nparams,
(virTypedParameterRemotePtr *) &ret->params.params_val,
&ret->params.params_len, 0) < 0)
goto cleanup;
rv = 0;
cleanup:
if (rv < 0)
virNetMessageSaveError(rerr);
virTypedParamsFree(params, nparams);
virObjectUnref(srv);
return rv;
}
static int
adminDispatchServerSetThreadpoolParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientPtr client,
virNetMessagePtr msg ATTRIBUTE_UNUSED,
virNetMessageErrorPtr rerr,
struct admin_server_set_threadpool_parameters_args *args)
{
int rv = -1;
virNetServerPtr srv = NULL;
virTypedParameterPtr params = NULL;
int nparams = 0;
struct daemonAdmClientPrivate *priv =
virNetServerClientGetPrivateData(client);
if (!(srv = virNetDaemonGetServer(priv->dmn, args->srv.name))) {
virReportError(VIR_ERR_NO_SERVER,
_("no server with matching name '%s' found"),
args->srv.name);
goto cleanup;
}
if (virTypedParamsDeserialize((virTypedParameterRemotePtr) args->params.params_val,
args->params.params_len,
ADMIN_SERVER_THREADPOOL_PARAMETERS_MAX,
&params,
&nparams) < 0)
goto cleanup;
if (adminServerSetThreadPoolParameters(srv, params,
nparams, args->flags) < 0)
goto cleanup;
rv = 0;
cleanup:
if (rv < 0)
virNetMessageSaveError(rerr);
virTypedParamsFree(params, nparams);
virObjectUnref(srv);
return rv;
}
#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,180 +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"
#include "virthreadpool.h"
#include "virtypedparam.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);
}
int
adminServerGetThreadPoolParameters(virNetServerPtr srv,
virTypedParameterPtr *params,
int *nparams,
unsigned int flags)
{
int ret = -1;
int maxparams = 0;
size_t minWorkers;
size_t maxWorkers;
size_t nWorkers;
size_t freeWorkers;
size_t nPrioWorkers;
size_t jobQueueDepth;
virTypedParameterPtr tmpparams = NULL;
virCheckFlags(0, -1);
if (virNetServerGetThreadPoolParameters(srv, &minWorkers, &maxWorkers,
&nWorkers, &freeWorkers,
&nPrioWorkers,
&jobQueueDepth) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to retrieve threadpool parameters"));
goto cleanup;
}
if (virTypedParamsAddUInt(&tmpparams, nparams,
&maxparams, VIR_THREADPOOL_WORKERS_MIN,
minWorkers) < 0)
goto cleanup;
if (virTypedParamsAddUInt(&tmpparams, nparams,
&maxparams, VIR_THREADPOOL_WORKERS_MAX,
maxWorkers) < 0)
goto cleanup;
if (virTypedParamsAddUInt(&tmpparams, nparams,
&maxparams, VIR_THREADPOOL_WORKERS_CURRENT,
nWorkers) < 0)
goto cleanup;
if (virTypedParamsAddUInt(&tmpparams, nparams,
&maxparams, VIR_THREADPOOL_WORKERS_FREE,
freeWorkers) < 0)
goto cleanup;
if (virTypedParamsAddUInt(&tmpparams, nparams,
&maxparams, VIR_THREADPOOL_WORKERS_PRIORITY,
nPrioWorkers) < 0)
goto cleanup;
if (virTypedParamsAddUInt(&tmpparams, nparams,
&maxparams, VIR_THREADPOOL_JOB_QUEUE_DEPTH,
jobQueueDepth) < 0)
goto cleanup;
*params = tmpparams;
tmpparams = NULL;
ret = 0;
cleanup:
virTypedParamsFree(tmpparams, *nparams);
return ret;
}
int
adminServerSetThreadPoolParameters(virNetServerPtr srv,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
{
long long int minWorkers = -1;
long long int maxWorkers = -1;
long long int prioWorkers = -1;
virTypedParameterPtr param = NULL;
virCheckFlags(0, -1);
if (virTypedParamsValidate(params, nparams,
VIR_THREADPOOL_WORKERS_MIN,
VIR_TYPED_PARAM_UINT,
VIR_THREADPOOL_WORKERS_MAX,
VIR_TYPED_PARAM_UINT,
VIR_THREADPOOL_WORKERS_PRIORITY,
VIR_TYPED_PARAM_UINT,
NULL) < 0)
return -1;
if ((param = virTypedParamsGet(params, nparams,
VIR_THREADPOOL_WORKERS_MIN)))
minWorkers = param->value.ui;
if ((param = virTypedParamsGet(params, nparams,
VIR_THREADPOOL_WORKERS_MAX)))
maxWorkers = param->value.ui;
if ((param = virTypedParamsGet(params, nparams,
VIR_THREADPOOL_WORKERS_PRIORITY)))
prioWorkers = param->value.ui;
if (virNetServerSetThreadPoolParameters(srv, minWorkers,
maxWorkers, prioWorkers) < 0)
return -1;
return 0;
}

View File

@@ -1,49 +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);
int
adminServerGetThreadPoolParameters(virNetServerPtr srv,
virTypedParameterPtr *params,
int *nparams,
unsigned int flags);
int
adminServerSetThreadPoolParameters(virNetServerPtr srv,
virTypedParameterPtr params,
int nparams,
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
@@ -264,8 +264,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 +279,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 +291,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 +337,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);
@@ -415,7 +404,6 @@ 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);
@@ -453,12 +441,6 @@ daemonConfigLoadOptions(struct daemonConfig *data,
GET_CONF_INT(conf, filename, max_requests);
GET_CONF_UINT(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);
@@ -470,9 +452,7 @@ daemonConfigLoadOptions(struct daemonConfig *data,
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_UINT(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"
@@ -102,13 +101,11 @@
# include "nwfilter/nwfilter_driver.h"
# endif
#endif
#ifdef WITH_VZ
# include "vz/vz_driver.h"
#endif
#include "configmake.h"
#include "virdbus.h"
#include "cpu/cpu_map.h"
VIR_LOG_INIT("daemon.libvirtd");
@@ -116,7 +113,6 @@ VIR_LOG_INIT("daemon.libvirtd");
virNetSASLContextPtr saslCtxt = NULL;
#endif
virNetServerProgramPtr remoteProgram = NULL;
virNetServerProgramPtr adminProgram = NULL;
virNetServerProgramPtr qemuProgram = NULL;
virNetServerProgramPtr lxcProgram = NULL;
@@ -258,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;
@@ -291,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;
}
@@ -332,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;
}
@@ -393,9 +381,6 @@ static void daemonInitialize(void)
# ifdef WITH_BHYVE
virDriverLoadModule("bhyve");
# endif
# ifdef WITH_VZ
virDriverLoadModule("vz");
# endif
#else
# ifdef WITH_NETWORK
networkRegister();
@@ -436,25 +421,19 @@ static void daemonInitialize(void)
# ifdef WITH_BHYVE
bhyveRegister();
# endif
# ifdef WITH_VZ
vzRegister();
# endif
#endif
}
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)
{
virNetServerServicePtr svc = NULL;
virNetServerServicePtr svcAdm = NULL;
virNetServerServicePtr svcRO = NULL;
virNetServerServicePtr svcTCP = NULL;
#if WITH_GNUTLS
@@ -463,35 +442,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)) {
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,
@@ -505,7 +477,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,
@@ -518,37 +490,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) {
@@ -556,7 +509,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,
@@ -564,11 +516,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
@@ -585,14 +537,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",
@@ -600,19 +552,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);
}
@@ -621,7 +572,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
}
@@ -636,21 +587,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;
}
@@ -824,14 +774,14 @@ 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)
{
@@ -847,15 +797,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;
}
@@ -863,12 +813,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);
}
@@ -878,26 +828,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);
}
@@ -906,14 +856,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;
}
@@ -924,14 +874,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;
}
@@ -940,22 +890,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);
@@ -965,18 +915,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);
@@ -984,20 +934,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;
@@ -1147,10 +1097,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;
@@ -1158,7 +1107,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;
@@ -1181,7 +1129,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);
@@ -1324,15 +1274,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];
@@ -1389,14 +1336,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,
@@ -1406,12 +1353,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.
*/
@@ -1464,46 +1405,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;
}
@@ -1538,11 +1446,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;
@@ -1561,7 +1466,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;
}
@@ -1583,7 +1488,7 @@ int main(int argc, char **argv) {
#endif
/* Run event loop. */
virNetDaemonRun(dmn);
virNetServerRun(srv);
ret = 0;
@@ -1595,11 +1500,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) {
@@ -1616,7 +1518,6 @@ 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);

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.
@@ -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

@@ -4,7 +4,9 @@ libvirtd - libvirtd management daemon
=head1 SYNOPSIS
B<libvirtd> [I<OPTION>]...
B<libvirtd> [ -dlv ] [ -f config_file ] [ -p pid_file ] [ -t timeout_seconds ]
B<libvirtd> --version
=head1 DESCRIPTION

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

@@ -42,15 +42,15 @@ struct daemonClientStream {
virStreamPtr st;
int procedure;
unsigned int serial;
int serial;
bool recvEOF;
bool closed;
unsigned int recvEOF : 1;
unsigned int closed : 1;
int filterID;
virNetMessagePtr rx;
bool tx;
int tx;
daemonClientStreamPtr next;
};
@@ -92,14 +92,14 @@ daemonStreamUpdateEvents(daemonClientStream *stream)
* fast stream, but slow client
*/
static void
daemonStreamMessageFinished(virNetMessagePtr msg,
daemonStreamMessageFinished(virNetMessagePtr msg ATTRIBUTE_UNUSED,
void *opaque)
{
daemonClientStream *stream = opaque;
VIR_DEBUG("stream=%p proc=%d serial=%u",
VIR_DEBUG("stream=%p proc=%d serial=%d",
stream, msg->header.proc, msg->header.serial);
stream->tx = true;
stream->tx = 1;
daemonStreamUpdateEvents(stream);
daemonFreeClientStream(NULL, stream);
@@ -197,8 +197,8 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
(events & VIR_STREAM_EVENT_HANGUP)) {
virNetMessagePtr msg;
events &= ~(VIR_STREAM_EVENT_HANGUP);
stream->tx = false;
stream->recvEOF = true;
stream->tx = 0;
stream->recvEOF = 1;
if (!(msg = virNetMessageNew(false))) {
daemonRemoveClientStream(client, stream);
virNetServerClientClose(client);
@@ -227,7 +227,7 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
virNetMessageError rerr;
memset(&rerr, 0, sizeof(rerr));
stream->closed = true;
stream->closed = 1;
virStreamEventRemoveCallback(stream->st);
virStreamAbort(stream->st);
if (events & VIR_STREAM_EVENT_HANGUP)
@@ -293,7 +293,7 @@ daemonStreamFilter(virNetServerClientPtr client ATTRIBUTE_UNUSED,
msg->header.serial != stream->serial)
goto cleanup;
VIR_DEBUG("Incoming client=%p, rx=%p, serial=%u, proc=%d, status=%d",
VIR_DEBUG("Incoming client=%p, rx=%p, serial=%d, proc=%d, status=%d",
client, stream->rx, msg->header.proc,
msg->header.serial, msg->header.status);
@@ -324,7 +324,7 @@ daemonCreateClientStream(virNetServerClientPtr client,
daemonClientStream *stream;
daemonClientPrivatePtr priv = virNetServerClientGetPrivateData(client);
VIR_DEBUG("client=%p, proc=%d, serial=%u, st=%p",
VIR_DEBUG("client=%p, proc=%d, serial=%d, st=%p",
client, header->proc, header->serial, st);
if (VIR_ALLOC(stream) < 0)
@@ -360,7 +360,7 @@ int daemonFreeClientStream(virNetServerClientPtr client,
if (stream->refs)
return 0;
VIR_DEBUG("client=%p, proc=%d, serial=%u",
VIR_DEBUG("client=%p, proc=%d, serial=%d",
client, stream->procedure, stream->serial);
virObjectUnref(stream->prog);
@@ -398,7 +398,7 @@ int daemonAddClientStream(virNetServerClientPtr client,
daemonClientStream *stream,
bool transmit)
{
VIR_DEBUG("client=%p, proc=%d, serial=%u, st=%p, transmit=%d",
VIR_DEBUG("client=%p, proc=%d, serial=%d, st=%p, transmit=%d",
client, stream->procedure, stream->serial, stream->st, transmit);
daemonClientPrivatePtr priv = virNetServerClientGetPrivateData(client);
@@ -422,7 +422,7 @@ int daemonAddClientStream(virNetServerClientPtr client,
}
if (transmit)
stream->tx = true;
stream->tx = 1;
virMutexLock(&priv->lock);
stream->next = priv->streams;
@@ -448,7 +448,7 @@ int
daemonRemoveClientStream(virNetServerClientPtr client,
daemonClientStream *stream)
{
VIR_DEBUG("client=%p, proc=%d, serial=%u, st=%p",
VIR_DEBUG("client=%p, proc=%d, serial=%d, st=%p",
client, stream->procedure, stream->serial, stream->st);
daemonClientPrivatePtr priv = virNetServerClientGetPrivateData(client);
daemonClientStream *curr = priv->streams;
@@ -515,7 +515,7 @@ daemonStreamHandleWriteData(virNetServerClientPtr client,
{
int ret;
VIR_DEBUG("client=%p, stream=%p, proc=%d, serial=%u, len=%zu, offset=%zu",
VIR_DEBUG("client=%p, stream=%p, proc=%d, serial=%d, len=%zu, offset=%zu",
client, stream, msg->header.proc, msg->header.serial,
msg->bufferLength, msg->bufferOffset);
@@ -538,7 +538,7 @@ daemonStreamHandleWriteData(virNetServerClientPtr client,
memset(&rerr, 0, sizeof(rerr));
VIR_INFO("Stream send failed");
stream->closed = true;
stream->closed = 1;
return virNetServerProgramSendReplyError(stream->prog,
client,
msg,
@@ -565,10 +565,10 @@ daemonStreamHandleFinish(virNetServerClientPtr client,
{
int ret;
VIR_DEBUG("client=%p, stream=%p, proc=%d, serial=%u",
VIR_DEBUG("client=%p, stream=%p, proc=%d, serial=%d",
client, stream, msg->header.proc, msg->header.serial);
stream->closed = true;
stream->closed = 1;
virStreamEventRemoveCallback(stream->st);
ret = virStreamFinish(stream->st);
@@ -602,13 +602,13 @@ daemonStreamHandleAbort(virNetServerClientPtr client,
daemonClientStream *stream,
virNetMessagePtr msg)
{
VIR_DEBUG("client=%p, stream=%p, proc=%d, serial=%u",
VIR_DEBUG("client=%p, stream=%p, proc=%d, serial=%d",
client, stream, msg->header.proc, msg->header.serial);
virNetMessageError rerr;
memset(&rerr, 0, sizeof(rerr));
stream->closed = true;
stream->closed = 1;
virStreamEventRemoveCallback(stream->st);
virStreamAbort(stream->st);
@@ -709,12 +709,9 @@ static int
daemonStreamHandleRead(virNetServerClientPtr client,
daemonClientStream *stream)
{
virNetMessagePtr msg = NULL;
virNetMessageError rerr;
char *buffer;
size_t bufferLen = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
int ret = -1;
int rv;
int ret;
VIR_DEBUG("client=%p, stream=%p tx=%d closed=%d",
client, stream, stream->tx, stream->closed);
@@ -731,48 +728,50 @@ daemonStreamHandleRead(virNetServerClientPtr client,
if (!stream->tx)
return 0;
memset(&rerr, 0, sizeof(rerr));
if (VIR_ALLOC_N(buffer, bufferLen) < 0)
return -1;
if (!(msg = virNetMessageNew(false)))
goto cleanup;
rv = virStreamRecv(stream->st, buffer, bufferLen);
if (rv == -2) {
ret = virStreamRecv(stream->st, buffer, bufferLen);
if (ret == -2) {
/* Should never get this, since we're only called when we know
* we're readable, but hey things change... */
} else if (rv < 0) {
if (virNetServerProgramSendStreamError(remoteProgram,
client,
msg,
&rerr,
stream->procedure,
stream->serial) < 0)
goto cleanup;
msg = NULL;
} else {
stream->tx = false;
if (rv == 0)
stream->recvEOF = true;
ret = 0;
} else if (ret < 0) {
virNetMessagePtr msg;
virNetMessageError rerr;
msg->cb = daemonStreamMessageFinished;
msg->opaque = stream;
stream->refs++;
if (virNetServerProgramSendStreamData(remoteProgram,
client,
msg,
stream->procedure,
stream->serial,
buffer, rv) < 0)
goto cleanup;
msg = NULL;
memset(&rerr, 0, sizeof(rerr));
if (!(msg = virNetMessageNew(false)))
ret = -1;
else
ret = virNetServerProgramSendStreamError(remoteProgram,
client,
msg,
&rerr,
stream->procedure,
stream->serial);
} else {
virNetMessagePtr msg;
stream->tx = 0;
if (ret == 0)
stream->recvEOF = 1;
if (!(msg = virNetMessageNew(false)))
ret = -1;
if (msg) {
msg->cb = daemonStreamMessageFinished;
msg->opaque = stream;
stream->refs++;
ret = virNetServerProgramSendStreamData(remoteProgram,
client,
msg,
stream->procedure,
stream->serial,
buffer, ret);
}
}
ret = 0;
cleanup:
VIR_FREE(buffer);
virNetMessageFree(msg);
return ret;
}

View File

@@ -26,6 +26,8 @@
# include "libvirtd.h"
daemonClientStream *
daemonCreateClientStream(virNetServerClientPtr client,
virStreamPtr st,

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-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
@@ -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).
@@ -28,7 +30,6 @@ apihtml = \
$(apihtml_generated)
apihtml_generated = \
html/libvirt-libvirt-common.html \
html/libvirt-libvirt-domain.html \
html/libvirt-libvirt-domain-snapshot.html \
html/libvirt-libvirt-event.html \
@@ -71,6 +72,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 \
@@ -80,6 +83,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 \
@@ -124,15 +128,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 \
@@ -146,9 +143,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 \
@@ -159,10 +153,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
@@ -181,7 +174,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)
@@ -204,13 +196,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)/../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
@@ -218,21 +210,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
@@ -282,7 +274,6 @@ $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
python_generated_files = \
$(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 \
@@ -290,8 +281,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
@@ -301,31 +290,28 @@ 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
$(AM_V_GEN)srcdir=$(srcdir) builddir=$(builddir) $(PYTHON) $(APIBUILD)
$(srcdir)/../include/libvirt/libvirt.h.in \
$(srcdir)/../include/libvirt/libvirt-domain-snapshot.h \
$(srcdir)/../include/libvirt/libvirt-domain.h \
$(srcdir)/../include/libvirt/libvirt-event.h \
$(srcdir)/../include/libvirt/libvirt-host.h \
$(srcdir)/../include/libvirt/libvirt-interface.h \
$(srcdir)/../include/libvirt/libvirt-network.h \
$(srcdir)/../include/libvirt/libvirt-nodedev.h \
$(srcdir)/../include/libvirt/libvirt-nwfilter.h \
$(srcdir)/../include/libvirt/libvirt-secret.h \
$(srcdir)/../include/libvirt/libvirt-storage.h \
$(srcdir)/../include/libvirt/libvirt-stream.h \
$(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 $@
@@ -340,10 +326,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)
@@ -364,15 +349,8 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/libvirtLogo.png $(DESTDIR)$(pkgdatadir)
uninstall-local:
for f in $(css) $(dot_html) $(gif) $(png); do \
rm -f $(DESTDIR)$(HTML_DIR)/$$f; \
done
for h in $(apihtml); do rm -f $(DESTDIR)$(HTML_DIR)/$$h; done
for p in $(apipng); do rm -f $(DESTDIR)$(HTML_DIR)/$$p; done
for f in $(internals_html); do \
rm -f $(DESTDIR)$(HTML_DIR)/$$f; \
done
for 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
rm -f $(DESTDIR)$(pkgdatadir)/libvirtLogo.png

View File

@@ -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

@@ -330,7 +330,7 @@
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

View File

@@ -21,7 +21,6 @@ debugsym=None
# C parser analysis code
#
included_files = {
"libvirt-common.h": "header with general libvirt API definitions",
"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",
@@ -60,11 +59,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"),
@@ -103,7 +97,6 @@ ignored_functions = {
"virDomainMigratePrepare3Params": "private function for migration",
"virDomainMigrateConfirm3Params": "private function for migration",
"virDomainMigratePrepareTunnel3Params": "private function for tunnelled migration",
"virErrorCopyNew": "private",
}
ignored_macros = {
@@ -112,12 +105,6 @@ ignored_macros = {
"_virMemoryParameter": "backward compatibility macro for virTypedParameter",
}
# macros that should be completely skipped
hidden_macros = {
"VIR_DEPRECATED": "internal macro to mark deprecated apis",
"VIR_EXPORT_VAR": "internal macro to mark exported vars",
}
def escape(raw):
raw = string.replace(raw, '&', '&amp;')
raw = string.replace(raw, '<', '&lt;')
@@ -240,11 +227,6 @@ class index:
self.references = {}
self.info = {}
def warning(self, msg):
global warnings
warnings = warnings + 1
print msg
def add_ref(self, name, header, module, static, type, lineno, info=None, extra=None, conditionals = None):
if name[0:2] == '__':
return None
@@ -1046,17 +1028,9 @@ class CParser:
name = string.split(name, '(') [0]
except:
pass
# skip hidden macros
if name in hidden_macros:
return token
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
#
@@ -1382,32 +1356,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
@@ -2044,8 +2018,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()
@@ -2172,30 +2144,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):
@@ -2584,65 +2550,51 @@ class docBuilder:
output.close()
class app:
def warning(self, msg):
global warnings
warnings = warnings + 1
print msg
def rebuild(self, name):
if name not in ["libvirt", "libvirt-qemu", "libvirt-lxc", "libvirt-admin"]:
self.warning("rebuild() failed, unknown module %s" % name)
return None
builder = None
srcdir = os.path.abspath((os.environ["srcdir"]))
builddir = os.path.abspath((os.environ["builddir"]))
if srcdir == builddir:
builddir = None
if glob.glob(srcdir + "/../src/libvirt.c") != [] :
if not quiet:
print "Rebuilding API description for %s" % name
dirs = [srcdir + "/../src",
srcdir + "/../src/util",
srcdir + "/../include/libvirt"]
if builddir:
dirs.append(builddir + "/../include/libvirt")
if glob.glob(srcdir + "/../include/libvirt/libvirt.h") == [] :
dirs.append("../include/libvirt")
builder = docBuilder(name, srcdir, dirs, [])
elif glob.glob("src/libvirt.c") != [] :
if not quiet:
print "Rebuilding API description for %s" % name
builder = docBuilder(name, srcdir,
["src", "src/util", "include/libvirt"],
[])
else:
self.warning("rebuild() failed, unable to guess the module")
return None
builder.scan()
builder.analyze()
builder.serialize()
return builder
#
# for debugging the parser
#
def parse(self, filename):
parser = CParser(filename)
idx = parser.parse()
return idx
def rebuild(name):
if name not in ["libvirt", "libvirt-qemu", "libvirt-lxc"]:
self.warning("rebuild() failed, unknown module %s") % name
return None
builder = None
srcdir = os.environ["srcdir"]
if glob.glob(srcdir + "/../src/libvirt.c") != [] :
if not quiet:
print "Rebuilding API description for %s" % name
dirs = [srcdir + "/../src",
srcdir + "/../src/util",
srcdir + "/../include/libvirt"]
if glob.glob(srcdir + "/../include/libvirt/libvirt.h") == [] :
dirs.append("../include/libvirt")
builder = docBuilder(name, srcdir, dirs, [])
elif glob.glob("src/libvirt.c") != [] :
if not quiet:
print "Rebuilding API description for %s" % name
builder = docBuilder(name, srcdir,
["src", "src/util", "include/libvirt"],
[])
else:
self.warning("rebuild() failed, unable to guess the module")
return None
builder.scan()
builder.analyze()
builder.serialize()
return builder
#
# for debugging the parser
#
def parse(filename):
parser = CParser(filename)
idx = parser.parse()
return idx
if __name__ == "__main__":
app = app()
if len(sys.argv) > 1:
debug = 1
app.parse(sys.argv[1])
parse(sys.argv[1])
else:
app.rebuild("libvirt")
app.rebuild("libvirt-qemu")
app.rebuild("libvirt-lxc")
app.rebuild("libvirt-admin")
rebuild("libvirt")
rebuild("libvirt-qemu")
rebuild("libvirt-lxc")
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
@@ -262,16 +262,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 +321,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
@@ -441,19 +425,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

@@ -57,13 +57,13 @@
</p>
<dl>
<dt><code>pid</code></dt>
<dt>pid</dt>
<dd>Process ID of the libvirtd daemon generating the audit record.</dd>
<dt><code>uid</code></dt>
<dt>uid</dt>
<dd>User ID of the libvirtd daemon process generating the audit record.</dd>
<dt><code>subj</code></dt>
<dt>subj</dt>
<dd>Security context of the libvirtd daemon process generating the audit record.</dd>
<dt><code>msg</code></dt>
<dt>msg</dt>
<dd>String containing a list of key=value pairs specific to the type of audit record being reported.</dd>
</dl>
@@ -72,21 +72,21 @@
</p>
<dl>
<dt><code>virt</code></dt>
<dt>virt</dt>
<dd>Type of virtualization driver used. One of <code>qemu</code> or <code>lxc</code></dd>
<dt><code>vm</code></dt>
<dt>vm</dt>
<dd>Host driver unique name of the guest</dd>
<dt><code>uuid</code></dt>
<dt>uuid</dt>
<dd>Globally unique identifier for the guest</dd>
<dt><code>exe</code></dt>
<dt>exe</dt>
<dd>Path of the libvirtd daemon</dd>
<dt><code>hostname</code></dt>
<dt>hostname</dt>
<dd>Currently unused</dd>
<dt><code>addr</code></dt>
<dt>addr</dt>
<dd>Currently unused</dd>
<dt><code>terminal</code></dt>
<dt>terminal</dt>
<dd>Currently unused</dd>
<dt><code>res</code></dt>
<dt>res</dt>
<dd>Result of the action, either <code>success</code> or <code>failed</code></dd>
</dl>
@@ -98,15 +98,15 @@
</p>
<dl>
<dt><code>op</code></dt>
<dt>op</dt>
<dd>Type of operation performed. One of <code>start</code>, <code>stop</code> or <code>init</code></dd>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the operation to happen</dd>
<dt><code>vm-pid</code></dt>
<dt>vm-pid</dt>
<dd>ID of the primary/leading process associated with the guest</dd>
<dt><code>init-pid</code></dt>
<dt>init-pid</dt>
<dd>ID of the <code>init</code> process in a container. Only if <code>op=init</code> and <code>virt=lxc</code></dd>
<dt><code>pid-ns</code></dt>
<dt>pid-ns</dt>
<dd>Namespace ID of the <code>init</code> process in a container. Only if <code>op=init</code> and <code>virt=lxc</code></dd>
</dl>
@@ -118,11 +118,11 @@
</p>
<dl>
<dt><code>model</code></dt>
<dt>model</dt>
<dd>The security driver type. One of <code>selinux</code> or <code>apparmor</code></dd>
<dt><code>vm-ctx</code></dt>
<dt>vm-ctx</dt>
<dd>Security context for the guest process</dd>
<dt><code>img-ctx</code></dt>
<dt>img-ctx</dt>
<dd>Security context for the guest disk images and other assigned host resources</dd>
</dl>
@@ -144,13 +144,13 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>vcpu</code></dd>
<dt><code>old-vcpu</code></dt>
<dt>old-vcpu</dt>
<dd>Original vCPU count, or 0</dd>
<dt><code>new-vcpu</code></dt>
<dt>new-vcpu</dt>
<dd>Updated vCPU count</dd>
</dl>
@@ -162,13 +162,13 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>mem</code></dd>
<dt><code>old-mem</code></dt>
<dt>old-mem</dt>
<dd>Original memory size in bytes, or 0</dd>
<dt><code>new-mem</code></dt>
<dt>new-mem</dt>
<dd>Updated memory size in bytes</dd>
</dl>
@@ -178,13 +178,13 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>disk</code></dd>
<dt><code>old-disk</code></dt>
<dt>old-disk</dt>
<dd>Original host file or device path acting as the disk backing file</dd>
<dt><code>new-disk</code></dt>
<dt>new-disk</dt>
<dd>Updated host file or device path acting as the disk backing file</dd>
</dl>
@@ -195,13 +195,13 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>net</code></dd>
<dt><code>old-net</code></dt>
<dt>old-net</dt>
<dd>Original MAC address of the guest network interface</dd>
<dt><code>new-net</code></dt>
<dt>new-net</dt>
<dd>Updated MAC address of the guest network interface</dd>
</dl>
@@ -211,13 +211,13 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>net</code></dd>
<dt><code>net</code></dt>
<dt>net</dt>
<dd>MAC address of the host network interface</dd>
<dt><code>rdev</code></dt>
<dt>rdev</dt>
<dd>Name of the host network interface</dd>
</dl>
@@ -227,13 +227,13 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>fs</code></dd>
<dt><code>old-fs</code></dt>
<dt>old-fs</dt>
<dd>Original host directory, file or device path backing the filesystem </dd>
<dt><code>new-fs</code></dt>
<dt>new-fs</dt>
<dd>Updated host directory, file or device path backing the filesystem</dd>
</dl>
@@ -243,15 +243,15 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>hostdev</code> or <code>dev</code></dd>
<dt><code>dev</code></dt>
<dt>dev</dt>
<dd>The unique bus identifier of the USB, PCI or SCSI device, if <code>resrc=dev</code></dd>
<dt><code>disk</code></dt>
<dt>disk</dt>
<dd>The path of the block device assigned to the guest, if <code>resrc=hostdev</code></dd>
<dt><code>chardev</code></dt>
<dt>chardev</dt>
<dd>The path of the character device assigned to the guest, if <code>resrc=hostdev</code></dd>
</dl>
@@ -261,11 +261,11 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>tpm</code></dd>
<dt><code>device</code></dt>
<dt>device</dt>
<dd>The path of the host TPM device assigned to the guest</dd>
</dl>
@@ -275,13 +275,13 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>rng</code></dd>
<dt><code>old-rng</code></dt>
<dt>old-rng</dt>
<dd>Original path of the host entropy source for the RNG</dd>
<dt><code>new-rng</code></dt>
<dt>new-rng</dt>
<dd>Updated path of the host entropy source for the RNG</dd>
</dl>
@@ -291,13 +291,13 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>chardev</code></dd>
<dt><code>old-chardev</code></dt>
<dt>old-chardev</dt>
<dd>Original path of the backing character device for given emulated device</dd>
<dt><code>new-chardev</code></dt>
<dt>new-chardev</dt>
<dd>Updated path of the backing character device for given emulated device</dd>
</dl>
@@ -307,15 +307,15 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>smartcard</code></dd>
<dt><code>old-smartcard</code></dt>
<dt>old-smartcard</dt>
<dd>Original path of the backing character device, certificate store or
"nss-smartcard-device" for host smartcard passthrough.
</dd>
<dt><code>new-smartcard</code></dt>
<dt>new-smartcard</dt>
<dd>Updated path of the backing character device, certificate store or
"nss-smartcard-device" for host smartcard passthrough.
</dd>
@@ -327,13 +327,13 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>redir</code></dd>
<dt><code>bus</code></dt>
<dt>bus</dt>
<dd>The bus type, only <code>usb</code> allowed</dd>
<dt><code>device</code></dt>
<dt>device</dt>
<dd>The device type, only <code>USB redir</code> allowed</dd>
</dl>
@@ -344,11 +344,11 @@
</p>
<dl>
<dt><code>reason</code></dt>
<dt>reason</dt>
<dd>The reason which caused the resource to be assigned to happen</dd>
<dt><code>resrc</code></dt>
<dt>resrc</dt>
<dd>The type of resource assigned. Set to <code>cgroup</code></dd>
<dt><code>cgroup</code></dt>
<dt>cgroup</dt>
<dd>The name of the cgroup controller</dd>
</dl>

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

@@ -250,33 +250,5 @@ attempt to boot from the first partition in the disk image.</p>
<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>
</html>

View File

@@ -80,15 +80,15 @@ to be provided by all container technologies on Linux.
</p>
<dl>
<dt><code>container</code></dt>
<dt>container</dt>
<dd>The fixed string <code>libvirt-lxc</code> to identify libvirt as the creator</dd>
<dt><code>container_uuid</code></dt>
<dt>container_uuid</dt>
<dd>The UUID assigned to the container by libvirt</dd>
<dt><code>PATH</code></dt>
<dt>PATH</dt>
<dd>The fixed string <code>/bin:/usr/bin</code></dd>
<dt><code>TERM</code></dt>
<dt>TERM</dt>
<dd>The fixed string <code>linux</code></dd>
<dt><code>HOME</code></dt>
<dt>HOME</dt>
<dd>The fixed string <code>/</code></dd>
</dl>
@@ -98,11 +98,11 @@ environment variables are also provided
</p>
<dl>
<dt><code>LIBVIRT_LXC_NAME</code></dt>
<dt>LIBVIRT_LXC_NAME</dt>
<dd>The name assigned to the container by libvirt</dd>
<dt><code>LIBVIRT_LXC_UUID</code></dt>
<dt>LIBVIRT_LXC_UUID</dt>
<dd>The UUID assigned to the container by libvirt</dd>
<dt><code>LIBVIRT_LXC_CMDLINE</code></dt>
<dt>LIBVIRT_LXC_CMDLINE</dt>
<dd>The unparsed command line arguments specified in the container configuration.
Use of this is discouraged, in favour of passing arguments directly to the
container init process via the <code>initarg</code> config element.</dd>
@@ -590,27 +590,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>

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

@@ -73,19 +73,19 @@
<dd>This expresses what kind of operating system the hypervisor
is able to run. Possible values are:
<dl>
<dt><code>xen</code></dt>
<dt>xen</dt>
<dd>for XEN</dd>
<dt><code>linux</code></dt>
<dt>linux</dt>
<dd>legacy alias for <code>xen</code></dd>
<dt><code>hvm</code></dt>
<dt>hvm</dt>
<dd>Unmodified operating system</dd>
<dt><code>exe</code></dt>
<dt>exe</dt>
<dd>Container based virtualization</dd>
<dt><code>uml</code></dt>
<dt>uml</dt>
<dd>User Mode Linux</dd>
</dl>
</dd>
@@ -97,37 +97,37 @@
<dd>This optional element encases possible features that can be used
with a guest of described type. Possible subelements are:
<dl>
<dt><code>pae</code></dt><dd>If present, 32-bit guests can use PAE
<dt>pae</dt><dd>If present, 32-bit guests can use PAE
address space extensions, <span class="since">since
0.4.1</span></dd>
<dt><code>nonpae</code></dt><dd>If present, 32-bit guests can be run
<dt>nonpae</dt><dd>If present, 32-bit guests can be run
without requiring PAE, <span class="since">since
0.4.1</span></dd>
<dt><code>ia64_be</code></dt><dd>If present, IA64 guests can be run in
<dt>ia64_be</dt><dd>If present, IA64 guests can be run in
big-endian mode, <span class="since">since 0.4.1</span></dd>
<dt><code>acpi</code></dt><dd>If this element is present,
<dt>acpi</dt><dd>If this element is present,
the <code>default</code> attribute describes whether the
hypervisor exposes ACPI to the guest by default, and
the <code>toggle</code> attribute describes whether the
user can override this
default. <span class="since">Since 0.4.1</span></dd>
<dt><code>apic</code></dt><dd>If this element is present,
<dt>apic</dt><dd>If this element is present,
the <code>default</code> attribute describes whether the
hypervisor exposes APIC to the guest by default, and
the <code>toggle</code> attribute describes whether the
user can override this
default. <span class="since">Since 0.4.1</span></dd>
<dt><code>cpuselection</code></dt><dd>If this element is present, the
<dt>cpuselection</dt><dd>If this element is present, the
hypervisor supports the <code>&lt;cpu&gt;</code> element
within a domain definition for fine-grained control over
the CPU presented to the
guest. <span class="since">Since 0.7.5</span></dd>
<dt><code>deviceboot</code></dt><dd>If this element is present,
<dt>deviceboot</dt><dd>If this element is present,
the <code>&lt;boot order='...'/&gt;</code> element can
be used inside devices, rather than the older boot
specification by category. <span class="since">Since
0.8.8</span></dd>
<dt><code>disksnapshot</code></dt><dd>If this element is present,
<dt>disksnapshot</dt><dd>If this element is present,
the <code>default</code> attribute describes whether
external disk snapshots are supported. If absent,
external snapshots may still be supported, but it
@@ -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

@@ -61,18 +61,18 @@
&lt;/domainCapabilities&gt;
</pre>
<dl>
<dt><code>path</code></dt>
<dt>path</dt>
<dd>The full path to the emulator binary.</dd>
<dt><code>domain</code></dt>
<dt>domain</dt>
<dd>Describes the <a href="formatdomain.html#elements">virtualization
type</a> (or so called domain type).</dd>
<dt><code>machine</code></dt>
<dt>machine</dt>
<dd>The domain's <a href="formatdomain.html#elementsOSBIOS">machine
type</a>.</dd>
<dt><code>arch</code></dt>
<dt>arch</dt>
<dd>The domain's <a href="formatdomain.html#elementsOSBIOS">
architecture</a>.</dd>
@@ -92,7 +92,7 @@
</pre>
<dl>
<dt><code>vcpu</code></dt>
<dt>vcpu</dt>
<dd>The maximum number of supported virtual CPUs</dd>
</dl>
@@ -126,18 +126,18 @@
<p>For the <code>loader</code> element, the following can occur:</p>
<dl>
<dt><code>value</code></dt>
<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><code>type</code></dt>
<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><code>readonly</code></dt>
<dt>readonly</dt>
<dd>Options for the <code>readonly</code> attribute of the
&lt;loader/&gt; element.</dd>
</dl>
@@ -145,7 +145,7 @@
<h3><a name="elementsDevices">Devices</a></h3>
<p>
Another set of XML elements describe the supported devices and their
The final set of XML elements describe the supported devices and their
capabilities. All devices occur as children of the main
<code>devices</code> element.
</p>
@@ -207,11 +207,11 @@
</pre>
<dl>
<dt><code>diskDevice</code></dt>
<dt>diskDevice</dt>
<dd>Options for the <code>device</code> attribute of the &lt;disk/&gt;
element.</dd>
<dt><code>bus</code></dt>
<dt>bus</dt>
<dd>Options for the <code>bus</code> attribute of the &lt;target/&gt;
element for a &lt;disk/&gt;.</dd>
</dl>
@@ -257,66 +257,25 @@
</pre>
<dl>
<dt><code>mode</code></dt>
<dt>mode</dt>
<dd>Options for the <code>mode</code> attribute of the &lt;hostdev/&gt;
element.</dd>
<dt><code>startupPolicy</code></dt>
<dt>startupPolicy</dt>
<dd>Options for the <code>startupPolicy</code> attribute of the
&lt;hostdev/&gt; element.</dd>
<dt><code>subsysType</code></dt>
<dt>subsysType</dt>
<dd>Options for the <code>type</code> attribute of the &lt;hostdev/&gt;
element in case of <code>mode="subsystem"</code>.</dd>
<dt><code>capsType</code></dt>
<dt>capsType</dt>
<dd>Options for the <code>type</code> attribute of the &lt;hostdev/&gt;
element in case of <code>mode="capabilities"</code>.</dd>
<dt><code>pciBackend</code></dt>
<dt>pciBackend</dt>
<dd>Options for the <code>name</code> attribute of the &lt;driver/&gt;
element.</dd>
</dl>
<h3><a name="elementsFeatures">Features</a></h3>
<p>One more set of XML elements describe the supported features and
their capabilities. All features occur as children of the main
<code>features</code> element.</p>
<pre>
&lt;domainCapabilities&gt;
...
&lt;features&gt;
&lt;gic supported='yes'&gt;
&lt;enum name='version'&gt;
&lt;value&gt;2&lt;/value&gt;
&lt;value&gt;3&lt;/value&gt;
&lt;/enum&gt;
&lt;/gic&gt;
&lt;/features&gt;
&lt;/domainCapabilities&gt;
</pre>
<p>Reported capabilities are expressed as an enumerated list of
possible values for each of the elements or attributes. For example, the
<code>gic</code> element has an attribute <code>version</code> which can
support the values <code>2</code> or <code>3</code>.</p>
<p>For information about the purpose of each feature, see the
<a href="formatdomain.html#elementsFeatures">relevant section</a> in
the domain XML documentation.
</p>
<h4><a name="elementsGIC">GIC capabilities</a></h4>
<p>GIC capabilities are exposed under the <code>gic</code> element.</p>
<dl>
<dt><code>version</code></dt>
<dd>Options for the <code>version</code> attribute of the
<code>gic</code> element.</dd>
</dl>
</body>
</html>

View File

@@ -54,14 +54,13 @@
The format must be RFC 4122 compliant, eg <code>3e3fce45-4f53-4fa7-bb32-11f34168b82b</code>.
If omitted when defining/creating a new network, a random
UUID is generated. <span class="since">Since 0.3.0</span></dd>
<dt><code>ipv6</code></dt>
<dd>When set to <code>yes</code>, the optional parameter
<code>ipv6</code> enables
<dt><code>ipv6='yes'</code></dt>
<dd>The new, optional parameter <code>ipv6='yes'</code> enables
a network definition with no IPv6 gateway addresses specified
to have guest-to-guest communications. For further information,
see the example below for the example with no gateway addresses.
<span class="since">Since 1.0.1</span></dd>
<dt><code>trustGuestRxFilters</code></dt>
<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

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

@@ -1779,9 +1779,9 @@
<br/><br/>
</p>
<h5><a name="nwfelemsRulesProtoMiscv6">ESP, AH, UDPLITE, 'ALL' over IPv6</a></h5>
<h5><a name="nwfelemsRulesProtoMiscv6">IGMP, ESP, AH, UDPLITE, 'ALL' over IPv6</a></h5>
<p>
Protocol ID: <code>esp-ipv6</code>, <code>ah-ipv6</code>, <code>udplite-ipv6</code>, <code>all-ipv6</code>
Protocol ID: <code>igmp-ipv6</code>, <code>esp-ipv6</code>, <code>ah-ipv6</code>, <code>udplite-ipv6</code>, <code>all-ipv6</code>
<br/>
Note: The chain parameter is ignored for this type of traffic
and should either be omitted or set to <code>root</code>.

View File

@@ -12,7 +12,7 @@
There are several types of snapshots:
</p>
<dl>
<dt>disk snapshot</dt> <!-- exempt from syntax-check -->
<dt>disk snapshot</dt>
<dd>Contents of disks (whether a subset or all disks associated
with the domain) are saved at a given point of time, and can
be restored back to that state. On a running guest, a disk
@@ -26,14 +26,14 @@
since the snapshot in a single file) and external (the
snapshot is one file, and the changes since the snapshot are
in another file).</dd>
<dt>memory state (or VM state)</dt> <!-- exempt from syntax-check -->
<dt>memory state (or VM state)</dt>
<dd>Tracks only the state of RAM and all other resources in use
by the VM. If the disks are unmodified between the time a VM
state snapshot is taken and restored, then the guest will
resume in a consistent state; but if the disks are modified
externally in the meantime, this is likely to lead to data
corruption.</dd>
<dt>system checkpoint</dt> <!-- exempt from syntax-check -->
<dt>system checkpoint</dt>
<dd>A combination of disk snapshots for all disks as well as VM
memory state, which can be used to resume the guest from where it
left off with symptoms similar to hibernation (that is, TCP
@@ -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

@@ -78,7 +78,7 @@
...
&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;/auth&gt;
@@ -87,14 +87,6 @@
&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;
@@ -126,38 +118,15 @@
(pool types <code>fs</code>, <code>logical</code>, <code>disk</code>,
<code>iscsi</code>, <code>zfs</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
@@ -323,15 +292,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 +379,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.
<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
@@ -494,7 +445,7 @@
A storage volume will generally be either a file or a device
node; <span class="since">since 1.2.0</span>, an optional
output-only attribute <code>type</code> lists the actual type
(file, block, dir, network, netdir or ploop), which is also available
(file, block, dir, network, or netdir), which is also available
from <code>virStorageVolGetInfo()</code>. The storage volume
XML format is available <span class="since">since 0.4.1</span>
</p>
@@ -621,21 +572,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>
@@ -703,8 +648,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

@@ -2,75 +2,71 @@ 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;
line-height: 150%;
}
p {
ol,ul {
margin-left: 3em;
}
ol,ul,dl,p {
margin-top: 1em;
margin-bottom: 1em;
}
ul, ol {
margin-left: 2em;
p:first-line {
margin-right: 1em;
}
dt {
div.body p:first-letter {
font-size: 1.2em;
font-weight: bold;
}
h1,h2,h3,h4,h5,h6 {
font-weight: bold;
margin: 0px;
padding: 0px;
margin-top: 0.5em;
}
div.footer {
margin-top: 1em;
}
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;
}
dl dt {
margin-left: 1em;
margin-right: 2em;
}
dt code {
font-weight: bold;
}
dl dd {
margin-left: 2em;
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

@@ -16,13 +16,6 @@
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>
@@ -171,18 +164,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

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

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

@@ -23,19 +23,19 @@
</p>
<dl>
<dt><code>nop</code></dt>
<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><code><a href="locking-lockd.html">lockd</a></code></dt>
<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><code><a href="locking-sanlock.html">sanlock</a></code></dt>
<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

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

@@ -163,6 +163,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

@@ -102,7 +102,7 @@ much slower than, say, direct hypervisor calls. </li>
Remote libvirt supports a range of transports:
</p>
<dl>
<dt><code>tls</code></dt>
<dt> tls </dt>
<dd><a href="http://en.wikipedia.org/wiki/Transport_Layer_Security" title="Transport Layer Security">TLS</a>
1.0 (SSL 3.1) authenticated and encrypted TCP/IP socket, usually
listening on a public port number. To use this you will need to
@@ -110,7 +110,7 @@ Remote libvirt supports a range of transports:
server certificates</a>.
The standard port is 16514.
</dd>
<dt><code>unix</code></dt>
<dt> unix </dt>
<dd> Unix domain socket. Since this is only accessible on the
local machine, it is not encrypted, and uses Unix permissions or
SELinux for authentication.
@@ -119,7 +119,7 @@ Remote libvirt supports a range of transports:
<code>/var/run/libvirt/libvirt-sock-ro</code> (the latter
for read-only connections).
</dd>
<dt><code>ssh</code></dt>
<dt> ssh </dt>
<dd> Transported over an ordinary
<a href="http://www.openssh.com/" title="OpenSSH homepage">ssh
(secure shell)</a> connection.
@@ -130,15 +130,15 @@ Remote libvirt supports a range of transports:
<a href="http://mah.everybody.org/docs/ssh" title="Using ssh-agent with ssh">ssh-agent</a>)
otherwise programs which use
this transport will stop to ask for a password. </dd>
<dt><code>ext</code></dt>
<dt> ext </dt>
<dd> Any external program which can make a connection to the
remote machine by means outside the scope of libvirt. </dd>
<dt><code>tcp</code></dt>
<dt> tcp </dt>
<dd> Unencrypted TCP/IP socket. Not recommended for production
use, this is normally disabled, but an administrator can enable
it for testing or use over a trusted network.
The standard port is 16509. </dd>
<dt><code>libssh2</code></dt>
<dt> libssh2 </dt>
<dd> Transport over the SSH protocol using
<a href="http://libssh2.org/" title="libssh2 homepage">libssh2</a> instead
of the OpenSSH binary. This transport uses the libvirt authentication callback for
@@ -712,7 +712,7 @@ cp clientcert.pem /etc/pki/libvirt/clientcert.pem
<a name="Remote_TLS_troubleshooting">Troubleshooting TLS certificate problems</a>
</h4>
<dl>
<dt>failed to verify client's certificate</dt> <!-- exempt from syntax-check -->
<dt> failed to verify client's certificate </dt>
<dd>
<p>
On the server side, run the libvirtd server with

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

@@ -32,7 +32,7 @@
</data>
</define>
<define name="uint8">
<define name="uint8range">
<choice>
<data type="string">
<param name="pattern">0x[0-9a-fA-F]{1,2}</param>
@@ -43,18 +43,7 @@
</data>
</choice>
</define>
<define name="uint16">
<choice>
<data type="string">
<param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
</data>
<data type='int'>
<param name="minInclusive">0</param>
<param name="maxInclusive">65535</param>
</data>
</choice>
</define>
<define name="uint24">
<define name="uint24range">
<choice>
<data type="string">
<param name="pattern">0x[0-9a-fA-F]{1,6}</param>
@@ -86,16 +75,12 @@
<attribute name="bus">
<ref name="pciBus"/>
</attribute>
<optional>
<attribute name="slot">
<ref name="pciSlot"/>
</attribute>
</optional>
<optional>
<attribute name="function">
<ref name="pciFunc"/>
</attribute>
</optional>
<attribute name="slot">
<ref name="pciSlot"/>
</attribute>
<attribute name="function">
<ref name="pciFunc"/>
</attribute>
<optional>
<attribute name="multifunction">
<ref name="virOnOff"/>
@@ -130,7 +115,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. -->
@@ -282,32 +267,24 @@
</define>
<define name="pciDomain">
<ref name="uint16"/>
<data type="string">
<param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
</data>
</define>
<define name="pciBus">
<ref name="uint8"/>
<data type="string">
<param name="pattern">(0x)?[0-9a-fA-F]{1,2}</param>
</data>
</define>
<define name="pciSlot">
<choice>
<data type="string">
<param name="pattern">(0x)?[0-1]?[0-9a-fA-F]</param>
</data>
<data type="int">
<param name="minInclusive">0</param>
<param name="maxInclusive">31</param>
</data>
</choice>
<data type="string">
<param name="pattern">(0x)?[0-1]?[0-9a-fA-F]</param>
</data>
</define>
<define name="pciFunc">
<choice>
<data type="string">
<param name="pattern">(0x)?[0-7]</param>
</data>
<data type="int">
<param name="minInclusive">0</param>
<param name="maxInclusive">7</param>
</data>
</choice>
<data type="string">
<param name="pattern">(0x)?[0-7]</param>
</data>
</define>
<define name='wwn'>

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 -->

View File

@@ -31,9 +31,6 @@
<optional>
<ref name='devices'/>
</optional>
<optional>
<ref name='features'/>
</optional>
</interleave>
</element>
</define>
@@ -91,21 +88,6 @@
</element>
</define>
<define name='features'>
<element name='features'>
<interleave>
<ref name='gic'/>
</interleave>
</element>
</define>
<define name='gic'>
<element name='gic'>
<ref name='supported'/>
<ref name='enum'/>
</element>
</define>
<define name='value'>
<zeroOrMore>
<element name='value'>

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.
-->
@@ -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>

View File

@@ -19,17 +19,17 @@
<element name="parameters">
<optional>
<attribute name="managerid">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
<attribute name="typeid">
<ref name="uint24"/>
<ref name="uint24range"/>
</attribute>
</optional>
<optional>
<attribute name="typeidversion">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
@@ -78,18 +78,6 @@
</optional>
</element>
</group>
<group>
<element name="virtualport">
<attribute name="type">
<value>midonet</value>
</attribute>
<element name="parameters">
<attribute name="interfaceid">
<ref name="UUID"/>
</attribute>
</element>
</element>
</group>
<group>
<!-- use this when no type attribute is present -->
<element name="virtualport">
@@ -97,17 +85,17 @@
<element name="parameters">
<optional>
<attribute name="managerid">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
<attribute name="typeid">
<ref name="uint24"/>
<ref name="uint24range"/>
</attribute>
</optional>
<optional>
<attribute name="typeidversion">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
@@ -152,11 +140,9 @@
</define>
<define name="bandwidth-attributes">
<optional>
<attribute name="average">
<ref name="speed"/>
</attribute>
</optional>
<attribute name="average">
<ref name="speed"/>
</attribute>
<optional>
<attribute name="peak">
<ref name="speed"/>

View File

@@ -40,7 +40,6 @@
<ref name="capusbinterface"/>
<ref name="capnet"/>
<ref name="capscsihost"/>
<ref name="capscsitarget"/>
<ref name="capscsi"/>
<ref name="capstorage"/>
</choice>
@@ -169,17 +168,6 @@
</element>
</optional>
<optional>
<element name='capability'>
<attribute name='type'>
<choice>
<value>pci-bridge</value>
<value>cardbus-bridge</value>
</choice>
</attribute>
</element>
</optional>
<optional>
<element name='pci-express'>
<zeroOrMore>
@@ -286,25 +274,11 @@
</optional>
<ref name="link-speed-state"/>
<zeroOrMore>
<element name='feature'>
<attribute name='name'>
<ref name='netfeaturename'/>
</attribute>
</element>
</zeroOrMore>
<zeroOrMore>
<ref name='subcapnet'/>
</zeroOrMore>
</define>
<define name='netfeaturename'>
<data type='string'>
<param name='pattern'>[a-zA-Z\-_]+</param>
</data>
</define>
<define name='subcapnet'>
<element name='capability'>
<choice>
@@ -383,16 +357,6 @@
</optional>
</define>
<define name='capscsitarget'>
<attribute name='type'>
<value>scsi_target</value>
</attribute>
<element name='target'>
<text/>
</element>
</define>
<define name='capscsi'>
<attribute name='type'>
<value>scsi</value>

View File

@@ -578,12 +578,12 @@
<interleave>
<optional>
<attribute name="type">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
<attribute name="code">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
</interleave>
@@ -593,22 +593,22 @@
<interleave>
<optional>
<attribute name="type">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
<attribute name="typeend">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
<attribute name="code">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
<attribute name="codeend">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
</interleave>
@@ -642,12 +642,12 @@
<define name="stp-attributes">
<optional>
<attribute name="type">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
<attribute name="flags">
<ref name="uint8"/>
<ref name="uint8range"/>
</attribute>
</optional>
<optional>

View File

@@ -98,27 +98,21 @@
<optional>
<element name='permissions'>
<interleave>
<optional>
<element name='mode'>
<ref name='octalMode'/>
</element>
</optional>
<optional>
<element name='owner'>
<choice>
<ref name='unsignedInt'/>
<value>-1</value>
</choice>
</element>
</optional>
<optional>
<element name='group'>
<choice>
<ref name='unsignedInt'/>
<value>-1</value>
</choice>
</element>
</optional>
<element name='mode'>
<ref name='octalMode'/>
</element>
<element name='owner'>
<choice>
<ref name='unsignedInt'/>
<value>-1</value>
</choice>
</element>
<element name='group'>
<choice>
<ref name='unsignedInt'/>
<value>-1</value>
</choice>
</element>
<optional>
<element name='label'>
<text/>

View File

@@ -278,11 +278,6 @@
<empty/>
<ref name='devextents'/>
</choice>
<optional>
<attribute name="part_separator">
<ref name="virYesNo"/>
</attribute>
</optional>
</element>
</define>
@@ -319,7 +314,7 @@
</element>
</define>
<define name='sourceinfonetrelativepath'>
<define name='sourceinfonetfsgluster'>
<element name='dir'>
<attribute name='path'>
<ref name='dirPath'/>
@@ -405,6 +400,7 @@
<choice>
<value>auto</value>
<value>nfs</value>
<value>cifs</value>
</choice>
</attribute>
</element>
@@ -417,7 +413,7 @@
<element name='format'>
<attribute name='type'>
<choice>
<value>unknown</value>
<value>none</value>
<value>dos</value>
<value>dvh</value>
<value>gpt</value>
@@ -492,13 +488,10 @@
<group>
<interleave>
<ref name='sourceinfohost'/>
<ref name='sourceinfonetrelativepath'/>
<ref name='sourceinfonetfsgluster'/>
<element name='format'>
<attribute name='type'>
<choice>
<value>cifs</value>
<value>glusterfs</value>
</choice>
<value>glusterfs</value>
</attribute>
</element>
<optional>

View File

@@ -9,12 +9,11 @@
$scope = ltrim ($scope);
if ($scope == "")
$scope = "any";
$querystr = htmlspecialchars($query, ENT_QUOTES, 'UTF-8');
?>
<form action="<?php echo $_SERVER['PHP_SELF'], "?query=", rawurlencode($query) ?>"
enctype="application/x-www-form-urlencoded" method="get">
<input name="query" type="text" size="50" value="<?php echo $querystr ?>"/>
<input name="query" type="text" size="50" value="<?php echo $query?>"/>
<select name="scope">
<option value="any">Search All</option>
<option value="API" <?php if ($scope == 'API') print "selected='selected'"?>>Only the APIs</option>
@@ -201,7 +200,7 @@
}
mysql_close($link);
$nb = count($results);
echo "<h3 align='center'>Found $nb results for query $querystr</h3>\n";
echo "<h3 align='center'>Found $nb results for query $query</h3>\n";
usort($results, "resSort");
if ($nb > 0) {

View File

@@ -66,9 +66,9 @@
<p>
The libvirt security team operates a policy of
<a href="http://en.wikipedia.org/wiki/Responsible_disclosure">responsible disclosure</a>.
As such any security issue reported, that is not already publicly disclosed
As such any security issue reported, that is not already publically disclosed
elsewhere, will have an embargo date assigned. Members of the security team agree
not to publicly disclose any details of the security issue until the embargo
not to publically disclose any details of the security issue until the embargo
date expires.
</p>
@@ -77,7 +77,7 @@
are two weeks or less in duration. If a problem is identified
with a proposed patch for a security issue, requiring further
investigation and bug fixing, the embargo clock may be restarted.
In exceptional circumstances longer initial embargoes may be
In exceptional circumstances longer initial embargos may be
negotiated by mutual agreement between members of the security
team and other relevant parties to the problem. Any such extended
embargoes will aim to be at most one month in duration.

View File

@@ -120,10 +120,6 @@
<a href="hooks.html">Hooks</a>
<span>Hooks for system specific management</span>
</li>
<li>
<a href="nss.html">NSS module</a>
<span>Enable domain host name translation to IP addresses</span>
</li>
</ul>
</li>
<li>
@@ -263,8 +259,8 @@
<span>Driver for IBM PowerVM</span>
</li>
<li>
<a href="drvvirtuozzo.html">Virtuozzo</a>
<span>Driver for Virtuozzo</span>
<a href="drvparallels.html">Parallels</a>
<span>Driver for Parallels Cloud Server</span>
</li>
<li>
<a href="drvbhyve.html">Bhyve</a>
@@ -304,10 +300,6 @@
</ul>
-->
<ul>
<li>
<a href="html/libvirt-libvirt-common.html">Common</a>
<span>common APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-domain.html">Domain</a>
<span>domain APIs for the libvirt library</span>

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