1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-09-24 21:44:59 +03:00

Compare commits

..

40 Commits

Author SHA1 Message Date
Cole Robinson
1a06da1fa2 Prep for release 1.2.9.1 2014-11-15 18:44:37 -05:00
Jiri Denemark
c2dd9c69fc qemu: Don't try to parse -help for new QEMU
Since QEMU 1.2.0, we switched to QMP probing instead of parsing -help
(and other commands, such as -cpu ?) output. However, if QMP probing
failed, we still tried starting QEMU with various options and parsing
the output, which was guaranteed to fail because the output changed.
Let's just refuse parsing -help for QEMU >= 1.2.0.

https://bugzilla.redhat.com/show_bug.cgi?id=1160318
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit ae3e29e6e7)

Conflicts:
	tests/qemuhelptest.c
2014-11-15 16:02:10 -05:00
Jiri Denemark
6cdd9a76a5 qemu: Always set migration capabilities
We used to set migration capabilities only when a user asked for them in
flags. This is fine when migration succeeds since the QEMU process is
killed in the end but in case migration fails or if it's cancelled, some
capabilities may remain turned on with no way to turn them off. To fix
that, migration capabilities have to be turned on if requested but
explicitly turned off in case they were not requested but QEMU supports
them.

https://bugzilla.redhat.com/show_bug.cgi?id=1163953
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit ab393383c8)
2014-11-15 16:02:10 -05:00
Pavel Hrdina
26a87687c7 nwfilter: fix deadlock caused updating network device and nwfilter
Commit 6e5c79a1 tried to fix deadlock between nwfilter{Define,Undefine}
and starting of guest, but this same deadlock exists for
updating/attaching network device to domain.

The deadlock was introduced by removing global QEMU driver lock because
nwfilter was counting on this lock and ensure that all driver locks are
locked inside of nwfilter{Define,Undefine}.

This patch extends usage of virNWFilterReadLockFilterUpdates to prevent
the deadlock for all possible paths in QEMU driver. LXC and UML drivers
still have global lock.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit 41127244fb)
2014-11-15 16:02:10 -05:00
Michal Privoznik
c9ab47ad44 qemuPrepareNVRAM: Save domain conf only if domain's persistent
In one of my previous patches (3a3c3780b) I've tried to fix the
problem of nvram path disappearing on a domain that's been
started and shut down again. I fixed this by explicitly saving
domain's config file.  However, I did a bit of clumsy without
realizing we have a transient domains for which we don't save the
config file. Hence, any domain using UEFI became persistent.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 54ddc08ddb)
2014-11-15 16:02:09 -05:00
Ján Tomko
40f8708e9a Do not crash on gluster snapshots with no host name
virStorageFileBackendGlusterInit did not check nhosts.

https://bugzilla.redhat.com/show_bug.cgi?id=1162974
(cherry picked from commit b66288faab)
2014-11-15 16:02:09 -05:00
Ján Tomko
1aeac2af00 Display nicer error message for unsupported chardev hotplug
Use the device type name if we know it instead of its number,
even if we can't hotplug it:
qemuMonitorJSONAttachCharDevCommand:6094 : operation failed: Unsupported
char device type '10'

(cherry picked from commit cce8e5f739)
2014-11-15 16:02:09 -05:00
Ján Tomko
35b06cebd4 Fix virDomainChrEquals for spicevmc
virDomainChrSourceDefIsEqual should return 'true' for
identical SPICEVMC chardevs, and those that have no source
specification.

After this change, a failed hotplug no longer leaves a stale
pointer in the domain definition.

https://bugzilla.redhat.com/show_bug.cgi?id=1162097
(cherry picked from commit b987684ff6)
2014-11-15 16:02:09 -05:00
Michal Privoznik
d937f1f939 qemu: Update fsfreeze status on domain state transitions
https://bugzilla.redhat.com/show_bug.cgi?id=1160084

As of b6d4dad1 (1.2.5) libvirt keeps track if domain disks have been
frozen. However, this falls into that set of information which don't
survive domain restart. Therefore, we need to clear the flag upon some
state transitions. Moreover, once we clear the flag we must update the
status file too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 6ea54769ba)
2014-11-15 16:02:08 -05:00
Luyao Huang
6d25ed4895 network: fix call virNetworkEventLifecycleNew when networkStartNetwork fail
When start a network fail, libvirt still call virNetworkEventLifecycleNew
to send a event.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit 45d9ea5cdd)
2014-11-15 16:02:08 -05:00
Ján Tomko
d54460f2eb Require at least one console for LXC domain
A domain without a console quietly dies soon after start,
because we try to set /dev/null as a controlling TTY
2014-10-30 15:10:59.705+0000: 1: error : lxcContainerSetupFDs:283 :
ioctl(TIOCSCTTY) failed: Inappropriate ioctl for device

Report an error early instead of trying to start it.

https://bugzilla.redhat.com/show_bug.cgi?id=1155410
(cherry picked from commit 44686f6523)
2014-11-15 16:02:08 -05:00
Ján Tomko
bc43f8cbfe Do not probe for power mgmt capabilities in lxc emulator
It fails after 30 seconds with this error:
error : virDBusCall:1429 : error from service: CanSuspend:
Did not receive a reply. Possible causes include: the remote
application did not send a reply, the message bus security
policy blocked the reply, the reply timeout expired, or the
network connection was broken.

Only probe for the power mgmt capabilities when driver is non-NULL.
This speeds up domain startup by 30 seconds.

https://bugzilla.redhat.com/show_bug.cgi?id=1159227
(cherry picked from commit 7ead1a5d91)
2014-11-15 16:02:08 -05:00
Martin Kletzander
d2cebf0b05 util: fix releasing pidfile in cleanup
Coverity found out the very obvious problem in the code.  That is that
virPidFileReleasePath() was called only if
virPidFileAcquirePath() returned 0.  But virPidFileAcquirePath() doesn't
return only 0 on success, but the FD that needs to be closed.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 3f43bb8326)
2014-11-15 16:02:07 -05:00
Weiwei Li
dbc11c4f97 qemu: stop NBD server after successful migration
In qemuMigrationFinish mig->nbd can not be initialized by
qemuMigrationEatCookie without the QEMU_MIGRATION_COOKIE_NBD flag.
That causes qemuMigrationStopNBDServer to return early without
stopping the NBD server properly.

Signed-off-by: Weiwei Li <nuonuoli@tencent.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit c3012a023f)
2014-11-15 16:02:07 -05:00
Martin Kletzander
963d0bb5e6 qemu: make sure capability probing process can start
When daemon is killed right in the middle of probing a qemu binary for
its capabilities, the qemu process is left running.  Next time the
daemon is starting, it cannot start the probing qemu process because the
one that's already running does have the pidfile flock()'d.

Reported-by: Wang Yufei <james.wangyufei@huawei.com>

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 0ed1b55b20)
2014-11-15 16:02:07 -05:00
Martin Kletzander
595a1c8836 util: Introduce virPidFileForceCleanupPath
This function is used to cleanup a pidfile doing whatever it takes, even
killing the owning process.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit d1fd086eb4)
2014-11-15 16:02:07 -05:00
Martin Kletzander
08182c7fd8 qemu: make advice from numad available when building commandline
Particularly in qemuBuildNumaArgStr(), there was a need for the advice
due to memory backing, which needs to know the nodeset it will be pinned
to.  With newer qemu this caused the following error when starting
domain:

  error: internal error: Advice from numad is needed in case of
  automatic numa placement

even when starting perfectly valid domain, e.g.:

  ...
  <vcpu placement='auto'>4</vcpu>
  <numatune>
    <memory mode='strict' placement='auto'/>
  </numatune>
  <cpu>
    <numa>
      <cell id='0' cpus='0' memory='524288'/>
      <cell id='1' cpus='1' memory='524288'/>
    </numa>
  </cpu>
  ...

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 11a48758a7)
2014-11-15 16:02:06 -05:00
weiwei li
65599f2777 qemu: Release nbd port from migrationPorts instead of remotePorts
commit 3e1e16aa8d (Use a port from the
migration range for NBD as well) changed ndb port allocation from
remotePorts to migrationPorts, but did not change the port releasing
process, which makes an error when migrating several times (above 64):
error: internal error: Unable to find an unused port in range
'migration' (49152-49215)

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

Signed-off-by: Weiwei Li <nuonuoli@tencent.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit be598c5ff8)
2014-11-15 16:02:06 -05:00
Eric Blake
ecfdfb15cc qemu: better error message when block job can't succeed
https://bugzilla.redhat.com/show_bug.cgi?id=1140981 reports that
the qemu-kvm shipped as part of RHEL 7.0 intentionally[1] cripples
block jobs by removing the 'block-stream' QMP command, while still
leaving 'block-job-cancel' as an unusable no-op.  Meanwhile, we
already had existing code that checked whether block jobs were
completely missing (such as qemu 0.15), old style (cancel is
synchronous, and all commands spelled with '_'), or new style
(cancel is asynchronous, and all commands spelled with '-'), and
used that three-way probe to give decent error messages.  At the
time that code was added, all existing qemu versions fell in one
of three buckets, and the code was using the presence of
'block-job-cancel' as the witness of which of the three buckets.
But now that RHEL qemu has shipped with intentionally crippled
'block-stream', we have a fourth bucket, which results in ugly
error messages when trying 'virsh blockpull':

 error: Requested operation is not valid: Command 'block-stream' is not found

In reality, the fourth bucket should be treated the same as the
first bucket (no block job support); we can do that by realizing
that no existing build of qemu has working block-stream while
lacking block-job-cancel, so it is easiest to change our witness
to the command that starts a job rather than ends one.  We still
act correctly regarding command spelling and whether cancel is
asynchronous.  And on crippled RHEL builds, we now get the desired:

 error: unsupported configuration: block jobs not supported with this qemu binary

[1] The intentional cripple is limited to qemu-kvm of RHEL; when using
qemu-kvm-rhev of RHEV, block job functionality is supported.  Don't ask
me to explain the "why" behind it all - I'm just dealing with fallout
from someone else's decision.

* src/qemu/qemu_capabilities.h (QEMU_CAPS_BLOCKJOB_SYNC): Tweak comment.
* src/qemu/qemu_capabilities.c (virQEMUCapsCommands): Look for stream
rather than cancel when determining the flavor of block jobs supported.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 00331bfbc9)
2014-11-15 16:02:06 -05:00
Peter Krempa
28a3732d87 test: Add test to verify helpers used for backing file name parsing
Add two test cases to verify that the helpers split and parse the
backing store components properly.

(cherry picked from commit 95a5683592)
2014-11-15 16:02:06 -05:00
Peter Krempa
b8bf1188eb storage: Fix crash when parsing backing store URI with schema
The code that parses the schema from the URI touches the "hosts[0]"
member of the storage file source structure in case the URI contains a
schema. The hosts array was not yet allocated at the point in the code
where the transport protocol was parsed and set. This lead to a crash of
libvirtd.

Fix the code by allocating the "hosts" array upfront and add a test case
to verify this scenario. (Unfortunately this requires shuffling the test
case numbers too).

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1156288
(cherry picked from commit 98784369fd)
2014-11-15 16:02:05 -05:00
Jincheng Miao
052432765d remote: fix jump depends on uninitialised value
Currently remote driver only initializes partial fields of
remote_connect_get_all_domain_stats_args. But xdr_array()
will check the uninitialised field 'doms_val'.
For safty reason, memset all fields of args is better.

Fix the following error from valgrind, like:
==30515== 1 errors in context 1 of 3:
==30515== Conditional jump or move depends on uninitialised value(s)
==30515==    at 0x85E9402: xdr_array (xdr_array.c:88)
==30515==    by 0x4FD8FC9: xdr_remote_connect_get_all_domain_stats_args (remote_protocol.c:6473)
==30515==    by 0x4FE72F2: virNetMessageEncodePayload (virnetmessage.c:350)
==30515==    by 0x4FDD21C: virNetClientProgramCall (virnetclientprogram.c:326)
==30515==    by 0x4FB4D01: callFull.isra.2 (remote_driver.c:6667)
==30515==    by 0x4FCBD45: call (remote_driver.c:6689)
==30515==    by 0x4FCBD45: remoteConnectGetAllDomainStats (remote_driver.c:7793)
==30515==    by 0x4FA0E75: virConnectGetAllDomainStats (libvirt.c:21678)
==30515==    by 0x147FD1: cmdDomstats (virsh-domain-monitor.c:2148)
==30515==    by 0x13006B: vshCommandRun (virsh.c:1915)
==30515==    by 0x12A9E1: main (virsh.c:3699)

Signed-off-by: Jincheng Miao <jmiao@redhat.com>
(cherry picked from commit 28b7601dc7)
2014-11-15 16:02:05 -05:00
Michal Privoznik
b6366531a5 qemu_agent: Produce more readable error messages
Not every error message from qemu-ga has to have the 'class' field
filled out. For instance, I've seen this error message lately:

  qemuAgentCheckError:1047 : unable to execute QEMU agent command \
  {"execute":"guest-set-time"}: \
  {"error":{"desc":"Invalid parameter type, expected: integer"}}

However, this got translated into rather generic error message:

  internal error: unable to execute QEMU agent command
  'guest-set-time': unknown QEMU command error

So we've dropped better error message in favor of a generic one.
This is due to our code which expects 'class' which is not
present here.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit b7fe5a6555)
2014-11-15 16:02:05 -05:00
Eric Blake
3b4b9aee83 qemu: forbid snapshot-delete --children-only on external snapshot
https://bugzilla.redhat.com/show_bug.cgi?id=956506 documents that
given a domain where an internal snapshot parent has an external
snapshot child, we lacked a safety check when trying to use the
--children-only option to snapshot-delete:

$ virsh start dom
$ virsh snapshot-create-as dom internal
$ virsh snapshot-create-as dom external --disk-only
$ virsh snapshot-delete dom external
error: Failed to delete snapshot external
error: unsupported configuration: deletion of 1 external disk snapshots not supported yet
$ virsh snapshot-delete dom internal --children
error: Failed to delete snapshot internal
error: unsupported configuration: deletion of 1 external disk snapshots not supported yet
$ virsh snapshot-delete dom internal --children-only
Domain snapshot internal children deleted

While I'd still like to see patches that actually do proper external
snapshot deletion, we should at least fix the inconsistency in the
meantime.  With this patch:

$ virsh snapshot-delete dom internal --children-only
error: Failed to delete snapshot internal
error: unsupported configuration: deletion of 1 external disk snapshots not supported yet

* src/qemu/qemu_driver.c (qemuDomainSnapshotDelete): Fix condition.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 2086a9905a)
2014-11-15 16:02:05 -05:00
Julio Faracco
0940208b52 tests: Add SELINUX_LIBS to fix viridentitytest linker bug
In a clean build system (Ubuntu 14.04), the viridentitytest failed to compile.
Even if all the SELINUX libraries and depedencies are installed. See the error
message below:

[...]
  CC       viridentitytest.o
  CCLD     viridentitytest
/usr/bin/ld: viridentitytest.o: undefined reference to symbol
                                                       'security_disable'
//lib/x86_64-linux-gnu/libselinux.so.1: error adding symbols: DSO missing
                                                           from command line
collect2: error: ld returned 1 exit status
make: *** [viridentitytest] Error 1

Simply adding the variable SELINUX_LIBS in viridentitytest rules of
Makefile.am to include SELINUX libraries into viridentitytest solved that
compilation issue.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit f2a2d0e9ab)
2014-11-15 16:02:04 -05:00
Peter Krempa
a70d93e226 qemu: migration: Make check for empty hook XML robust
Also consider whitespace only strings returned from the hook as empty
result.

(cherry picked from commit 19b1ee42b4)
2014-11-15 16:02:04 -05:00
Peter Krempa
3d52d5e6d5 qemu: restore: Fix restoring of VM when the restore hook returns empty XML
The documentation for the restore hook states that returning an empty
XML is equivalent with copying the input. There was a bug in the code
checking the returned string by checking the string instead of the
contents. Use the new helper to check if the string is empty.

(cherry picked from commit e386779937)
2014-11-15 16:02:04 -05:00
Peter Krempa
1bcf7e10ab util: string: Add helper to check whether string is empty
The helper checks whether a string contains only whitespace or is NULL.
This will be helpful to skip cases where a user string is optional, but
may be provided empty with the same meaning.

(cherry picked from commit 0eeafeedeb)
2014-11-15 16:02:04 -05:00
Peter Krempa
5d02a123ab virsh: domain: Use global constant for XML file size limit
Few places still used hardcoded limit for maximum XML size for commands
that accept XML files. The hardcoded limits ranged from 8k to 1M. Use
VSH_MAX_XML_FILE to express this limit in a unified way. This will bump
the limit for the commands that used hardcoded string lengths to 10M.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1152427
(cherry picked from commit 4d1852c485)
2014-11-15 15:27:50 -05:00
John Ferlan
e1a3efdac7 qemu: Fix hot unplug of SCSI_HOST device
https://bugzilla.redhat.com/show_bug.cgi?id=1141732

Introduced by commit id '8f76ad99' the logic to detach a scsi_host
device (SCSI or iSCSI) fails when attempting to remove the 'drive'
because as I found in my investigation - the DelDevice takes care of
that for us.

The investigation turned up commits to adjust the logic for the
qemuMonitorDelDevice and qemuMonitorDriveDel processing for interfaces
(commit id '81f76598'), disk bus=VIRTIO,SCSI,USB (commit id '0635785b'),
and chr devices (commit id '55b21f9b'), but nothing with the host devices.

This commit uses the model for the previous set of changes and applies
it to the hostdev path. The call to qemuDomainDetachHostSCSIDevice will
return to qemuDomainDetachThisHostDevice handling either the audit of
the failure or the wait for the removal and then call into
qemuDomainRemoveHostDevice for the event, removal from the domain hostdev
list, and audit of the removal similar to other paths.

NOTE: For now the 'conn' param to +qemuDomainDetachHostSCSIDevice is left
as ATTRIBUTE_UNUSED.  Removing requires a cascade of other changes to be
left for a future patch.

(cherry picked from commit d2774e54cd)
2014-11-15 15:26:20 -05:00
Martin Kletzander
86d26c425d qemu: unref cfg after TerminateMachine has been called
Commit 4882618ed1 added the code that
requests driver cfg, but forgot to unref it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 9661ac2f46)
2014-11-15 15:25:02 -05:00
Ján Tomko
a91a960f0e Add virCgroupTerminateMachine stub
Fix the build on FreeBSD, broken by commit 4882618.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 99b2b4571d)
2014-11-15 15:24:32 -05:00
Guido Günther
870ea74ed5 qemu: use systemd's TerminateMachine to kill all processes
If we don't properly clean up all processes in the
machine-<vmname>.scope systemd won't remove the cgroup and subsequent vm
starts fail with

  'CreateMachine: File exists'

Additional processes can e.g. be added via

  echo $PID > /sys/fs/cgroup/systemd/machine.slice/machine-${VMNAME}.scope/tasks

but there are other cases like

  http://bugs.debian.org/761521

Invoke TerminateMachine to be on the safe side since systemd tracks the
cgroup anyway. This is a noop if all processes have terminated already.

(cherry picked from commit 4882618ed1)
2014-11-15 15:24:11 -05:00
Martin Kletzander
3d021408c5 util: Prepare URI formatting for libxml2 >= 2.9.2
Since commit 8eb55d782a2b9afacc7938694891cc6fad7b42a5 libxml2 removes
two slashes from the URI when there is no server part.  This is fixed
with beb7281055dbf0ed4d041022a67c6c5cfd126f25, but only if the calling
application calls xmlSaveUri() on URI that xmlURIParse() parsed.  And
that is not the case in virURIFormat().  virURIFormat() accepts
virURIPtr that can be created without parsing it and we do that when we
format network storage paths for gluster for example.  Even though
virStorageSourceParseBackingURI() uses virURIParse(), it throws that data
structure right away.

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

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 8f17d0eaae)
2014-11-15 15:20:42 -05:00
Michal Privoznik
d72e79ed27 security_selinux: Don't relabel /dev/net/tun
https://bugzilla.redhat.com/show_bug.cgi?id=1147057

The code for relabelling the TAP FD is there due to a race. When
libvirt creates a /dev/tapN device it's labeled as
'system_u:object_r:device_t:s0' by default. Later, when
udev/systemd reacts to this device, it's relabelled to the
expected label 'system_u:object_r:tun_tap_device_t:s0'. Hence, we
have a code that relabels the device, to cut the race down. For
more info see ae368ebfcc.

But the problem is, the relabel function is called on all TUN/TAP
devices. Yes, on /dev/net/tun too. This is however a special kind
of device - other processes uses it too. We shouldn't touch it's
label then.

Ideally, there would an API in SELinux that would label just the
passed FD and not the underlying path. That way, we wouldn't need
to care as we would be not labeling /dev/net/tun but the FD
passed to the domain. Unfortunately, there's no such API so we
have to workaround until then.

Tested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit ebc0526396)
2014-11-15 15:20:42 -05:00
Laine Stump
7caed3d4c5 util: eliminate "use after free" in callers of virNetDevLinkDump
virNetDevLinkDump() gets a message from netlink into "resp", then
calls nlmsg_parse() to fill the table "tb" with pointers into resp. It
then returns tb to its caller, but not before freeing the buffer at
resp. That means that all the callers of virNetDevLinkDump() are
examining memory that has already been freed. This can be verified by
filling the buffer at resp with garbage prior to freeing it (or, I
suppose, just running libvirtd under valgrind) then performing some
operation that calls virNetDevLinkDump().

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

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

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

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

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

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

Conflicts:
	src/libvirt-domain.c - file split from older src/libvirt.c
Signed-off-by: Eric Blake <eblake@redhat.com>
2014-11-06 17:19:49 +01:00
Lubomir Rintel
cd1b72fdd8 qemu: x86_64 is good enough for i686
virt-manager on Fedora sets up i686 hosts with "/usr/bin/qemu-kvm" emulator,
which in turn unconditionally execs qemu-system-x86_64 querying capabilities
then fails:

Error launching details: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 748, in _show_vm_helper
    details = self._get_details_dialog(uri, vm.get_connkey())
  File "/usr/share/virt-manager/virtManager/engine.py", line 726, in _get_details_dialog
    obj = vmmDetails(conn.get_vm(connkey))
  File "/usr/share/virt-manager/virtManager/details.py", line 399, in __init__
    self.init_details()
  File "/usr/share/virt-manager/virtManager/details.py", line 784, in init_details
    domcaps = self.vm.get_domain_capabilities()
  File "/usr/share/virt-manager/virtManager/domain.py", line 518, in get_domain_capabilities
    self.get_xmlobj().os.machine, self.get_xmlobj().type)
  File "/usr/lib/python2.7/site-packages/libvirt.py", line 3492, in getDomainCapabilities
    if ret is None: raise libvirtError ('virConnectGetDomainCapabilities() failed', conn=self)
libvirtError: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'

Journal:

Oct 16 21:08:26 goatlord.localdomain libvirtd[1530]: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'

(cherry picked from commit afe8f4200f)
2014-10-30 10:17:13 -04:00
Cole Robinson
e9bf19a4b2 qemu: Don't compare CPU against host for TCG
Right now when building the qemu command line, we try to do various
unconditional validations of the guest CPU against the host CPU. However
this checks are overly applied. The only time we should use the checks
are:

- The user requests host-model/host-passthrough, or

- When KVM is requsted. CPU features requested in TCG mode are always
  emulated by qemu and are independent of the host CPU, so no host CPU
  checks should be performed.

Right now if trying to specify a CPU for arm on an x86 host, it attempts
to do non-sensical validation and falls over.

Switch all the test cases that were intending to test CPU validation to
use KVM, so they continue to test the intended code.

Amend some aarch64 XML tests with a CPU model, to ensure things work
correctly.

(cherry picked from commit cf7fce8f2fd1c930f357fd4ff93ac35f38eb30c6)
2014-10-30 10:15:53 -04:00
Cole Robinson
74e27d1c0e qemu_command: Split qemuBuildCpuArgStr
Move the CPU mode/model handling to its own function. This is just
code movement and re-indentation.

(cherry picked from commit e1d872dc77c80d43036f928f83f560f2e9286148)
2014-10-30 10:15:48 -04:00
3302 changed files with 1289073 additions and 1080997 deletions

10
.gitignore vendored
View File

@@ -18,7 +18,6 @@
*.pyc
*.rej
*.s
*.swp
*~
.#*
.deps
@@ -41,7 +40,6 @@
/build-aux
/build-aux/
/build/
/confdefs.h
/config.cache
/config.guess
/config.h
@@ -52,7 +50,6 @@
/config.sub
/configure
/configure.lineno
/conftest.*
/daemon/*_dispatch.h
/daemon/libvirt_qemud
/daemon/libvirtd
@@ -69,7 +66,6 @@
/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
@@ -83,7 +79,6 @@
/examples/domtop/domtop
/examples/hellolibvirt/hellolibvirt
/examples/openauth/openauth
/examples/rename/rename
/gnulib/lib/*
/gnulib/m4/*
/gnulib/tests/*
@@ -113,8 +108,6 @@
/src/access/viraccessapichecklxc.h
/src/access/viraccessapicheckqemu.c
/src/access/viraccessapicheckqemu.h
/src/admin/admin_client.h
/src/admin/admin_protocol.[ch]
/src/esx/*.generated.*
/src/hyperv/*.generated.*
/src/libvirt*.def
@@ -125,13 +118,10 @@
/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

Submodule .gnulib updated: f39477dba7...9565c3be73

View File

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

View File

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

View File

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

63
HACKING
View File

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

View File

@@ -23,8 +23,8 @@ 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/polkit \
examples/lxcconvert examples/domtop examples/rename
tools/wireshark examples/dommigrate \
examples/lxcconvert examples/domtop
ACLOCAL_AMFLAGS = -I m4
@@ -40,7 +40,6 @@ EXTRA_DIST = \
libvirt.pc.in \
libvirt-qemu.pc.in \
libvirt-lxc.pc.in \
libvirt-admin.pc.in \
autobuild.sh \
Makefile.nonreentrant \
autogen.sh \

View File

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

View File

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

View File

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

View File

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

113
cfg.mk
View File

@@ -1,5 +1,5 @@
# Customize Makefile.maint. -*- makefile -*-
# Copyright (C) 2008-2015 Red Hat, Inc.
# Copyright (C) 2008-2014 Red Hat, Inc.
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -90,7 +90,7 @@ endif
# Files that should never cause syntax check failures.
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
(^(HACKING|docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$
(^(HACKING|docs/(news\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$
# Functions like free() that are no-ops on NULL arguments.
useless_free_options = \
@@ -160,6 +160,7 @@ useless_free_options = \
--name=virNWFilterRuleDefFree \
--name=virNWFilterRuleInstFree \
--name=virNetworkDefFree \
--name=virNetworkObjFree \
--name=virNodeDeviceDefFree \
--name=virNodeDeviceObjFree \
--name=virObjectUnref \
@@ -248,6 +249,8 @@ useless_free_options = \
# y virNetworkDefFree
# n virNetworkFree (returns int)
# n virNetworkFreeName (returns int)
# y virNetworkObjFree
# n virNetworkObjListFree FIXME
# n virNodeDevCapsDefFree FIXME
# y virNodeDeviceDefFree
# n virNodeDeviceFree (returns int)
@@ -300,11 +303,10 @@ sc_flags_debug:
# than d). The existence of long long, and of documentation about
# flags, makes the regex in the third test slightly harder.
sc_flags_usage:
@test "$$(cat $(srcdir)/include/libvirt/libvirt-domain.h \
@test "$$(cat $(srcdir)/include/libvirt/libvirt.h.in \
$(srcdir)/include/libvirt/virterror.h \
$(srcdir)/include/libvirt/libvirt-qemu.h \
$(srcdir)/include/libvirt/libvirt-lxc.h \
$(srcdir)/include/libvirt/libvirt-admin.h \
| grep -c '\(long\|unsigned\) flags')" != 4 && \
{ echo '$(ME): new API should use "unsigned int flags"' 1>&2; \
exit 1; } || :
@@ -565,11 +567,6 @@ 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|,|;)' \
halt='use size_t, not int/unsigned int for loop vars i, j, k' \
@@ -587,12 +584,6 @@ sc_prohibit_loop_var_decl:
halt='declare loop iterators outside the for statement' \
$(_sc_search_regexp)
# Use 'bool', not 'int', when assigning true or false
sc_prohibit_int_assign_bool:
@prohibit='\<int\>.*= *(true|false)' \
halt='use bool type for boolean values' \
$(_sc_search_regexp)
# Many of the function names below came from this filter:
# git grep -B2 '\<_('|grep -E '\.c- *[[:alpha:]_][[:alnum:]_]* ?\(.*[,;]$' \
# |sed 's/.*\.c- *//'|perl -pe 's/ ?\(.*//'|sort -u \
@@ -689,7 +680,7 @@ sc_require_whitespace_in_translation:
# Enforce recommended preprocessor indentation style.
sc_preprocessor_indentation:
@if cppi --version >/dev/null 2>&1; then \
$(VC_LIST_EXCEPT) | grep -E '\.[ch](\.in)?$$' | xargs cppi -a -c \
$(VC_LIST_EXCEPT) | grep '\.[ch]$$' | xargs cppi -a -c \
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
exit 1; }; \
else \
@@ -971,56 +962,6 @@ sc_prohibit_paren_brace:
halt='Put space between closing parenthesis and opening brace' \
$(_sc_search_regexp)
# C guarantees that static variables are zero initialized, and some compilers
# waste space by sticking explicit initializers in .data instead of .bss
sc_prohibit_static_zero_init:
@prohibit='\bstatic\b.*= *(0[^xX0-9]|NULL|false)' \
in_vc_files='\.[chx](\.in)?$$' \
halt='static variables do not need explicit zero initialization'\
$(_sc_search_regexp)
# FreeBSD exports the "devname" symbol which produces a warning.
sc_prohibit_devname:
@prohibit='\bdevname\b' \
exclude='sc_prohibit_devname' \
halt='avoid using 'devname' as FreeBSD exports the symbol' \
$(_sc_search_regexp)
sc_prohibit_system_error_with_vir_err:
@prohibit='\bvirReportSystemError *\(VIR_ERR_' \
halt='do not use virReportSystemError with VIR_ERR_* error codes' \
$(_sc_search_regexp)
# Rule to prohibit usage of virXXXFree within library, daemon, remote, etc.
# functions. There's a corresponding exclude to allow usage within tests,
# docs, examples, tools, src/libvirt-*.c, and include/libvirt/libvirt-*.h
sc_prohibit_virXXXFree:
@prohibit='\bvir(Domain|Network|NodeDevice|StorageVol|StoragePool|Stream|Secret|NWFilter|Interface|DomainSnapshot)Free\b' \
exclude='sc_prohibit_virXXXFree' \
halt='avoid using 'virXXXFree', use 'virObjectUnref' instead' \
$(_sc_search_regexp)
sc_prohibit_sysconf_pagesize:
@prohibit='sysconf\(_SC_PAGESIZE' \
halt='use virGetSystemPageSize[KB] instead of sysconf(_SC_PAGESIZE)' \
$(_sc_search_regexp)
sc_prohibit_pthread_create:
@prohibit='\bpthread_create\b' \
exclude='sc_prohibit_pthread_create' \
halt="avoid using 'pthread_create', use 'virThreadCreate' instead" \
$(_sc_search_regexp)
sc_prohibit_not_streq:
@prohibit='! *STREQ *\(.*\)' \
halt='Use STRNEQ instead of !STREQ' \
$(_sc_search_regexp)
sc_prohibit_not_strneq:
@prohibit='! *STRNEQ *\(.*\)' \
halt='Use STREQ instead of !STRNEQ' \
$(_sc_search_regexp)
# We don't use this feature of maint.mk.
prev_version_file = /dev/null
@@ -1074,31 +1015,25 @@ endif
bracket-spacing-check:
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.c$$'`; \
$(PERL) $(top_srcdir)/build-aux/bracket-spacing.pl $$files || \
{ echo '$(ME): incorrect formatting, see HACKING for rules' 1>&2; \
{ echo '$(ME): incorrect whitespace, see HACKING for rules' 1>&2; \
exit 1; }
# 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
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(vircommand|virfile)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon
_test1=shunloadtest|virnettlscontexttest|virnettlssessiontest|vircgroupmock
exclude_file_name_regexp--sc_avoid_write = \
^(src/($(_src1))|daemon/libvirtd|tools/virsh-console|tests/($(_test1)))\.c$$
@@ -1125,10 +1060,10 @@ exclude_file_name_regexp--sc_prohibit_asprintf = \
^(bootstrap.conf$$|src/util/virstring\.[ch]$$|tests/vircgroupmock\.c$$)
exclude_file_name_regexp--sc_prohibit_strdup = \
^(docs/|examples/|src/util/virstring\.c|tests/vir(netserverclient|cgroup)mock.c$$)
^(docs/|examples/|src/util/virstring\.c|tests/virnetserverclientmock.c$$)
exclude_file_name_regexp--sc_prohibit_close = \
(\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir(cgroup|pci)mock\.c)$$)
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c|tests/vir(cgroup|pci)mock\.c)$$)
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
(^tests/(qemuhelp|nodeinfo|virpcitest)data/|\.diff$$)
@@ -1201,31 +1136,13 @@ 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
exclude_file_name_regexp--sc_prohibit_devname = \
^(tools/virsh.pod|cfg.mk|docs/.*)$$
exclude_file_name_regexp--sc_prohibit_virXXXFree = \
^(docs/|tests/|examples/|tools/|cfg.mk|src/test/test_driver.c|src/libvirt_public.syms|include/libvirt/libvirt-(domain|network|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).h|src/libvirt-(domain|qemu|network|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).c$$)
exclude_file_name_regexp--sc_prohibit_sysconf_pagesize = \
^(cfg\.mk|src/util/virutil\.c)$$
exclude_file_name_regexp--sc_prohibit_pthread_create = \
^(cfg\.mk|src/util/virthread\.c|tests/.*)$$
exclude_file_name_regexp--sc_prohibit_not_streq = \
^tests/.*\.[ch]$$
exclude_file_name_regexp--sc_prohibit_not_strneq = \
^tests/.*\.[ch]$$

View File

@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
dnl Copyright (C) 2005-2015 Red Hat, Inc.
dnl Copyright (C) 2005-2014 Red Hat, Inc.
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.
AC_INIT([libvirt], [1.2.21], [libvir-list@redhat.com], [], [http://libvirt.org])
AC_INIT([libvirt], [1.2.9.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
@@ -252,7 +247,6 @@ LIBVIRT_CHECK_SELINUX
LIBVIRT_CHECK_SSH2
LIBVIRT_CHECK_SYSTEMD_DAEMON
LIBVIRT_CHECK_UDEV
LIBVIRT_CHECK_WIRESHARK
LIBVIRT_CHECK_YAJL
AC_MSG_CHECKING([for CPUID instruction])
@@ -281,7 +275,7 @@ dnl and various less common threadsafe functions
AC_CHECK_FUNCS_ONCE([cfmakeraw fallocate geteuid getgid getgrnam_r \
getmntent_r getpwuid_r getuid kill mmap newlocale posix_fallocate \
posix_memalign prlimit regexec sched_getaffinity setgroups setns \
setrlimit symlink sysctlbyname getifaddrs sched_setscheduler])
setrlimit symlink sysctlbyname getifaddrs])
dnl Availability of pthread functions. Because of $LIB_PTHREAD, we
dnl cannot use AC_CHECK_FUNCS_ONCE. LIB_PTHREAD and LIBMULTITHREAD
@@ -389,11 +383,6 @@ AC_CHECK_TYPE([struct ifreq],
#include <net/if.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.
@@ -402,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],
@@ -436,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],
@@ -453,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])
@@ -563,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@:>@])])
@@ -822,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=""
@@ -873,37 +863,24 @@ 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`
LIBXL_LIBS="$LIBXL_LIBS -lxenctrl"
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 -lxenctrl"
],[
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
LIBS="$old_LIBS"
@@ -914,16 +891,7 @@ if test $fail = 1; then
fi
if test "$with_libxl" = "yes"; then
dnl If building with libxl, use the libxl utility header and lib too
AC_CHECK_HEADERS([libxlutil.h])
LIBXL_LIBS="$LIBXL_LIBS -lxlutil"
AC_DEFINE_UNQUOTED([WITH_LIBXL], 1, [whether libxenlight driver is enabled])
if test "x$LIBXL_FIRMWARE_DIR" != "x"; then
AC_DEFINE_UNQUOTED([LIBXL_FIRMWARE_DIR], ["$LIBXL_FIRMWARE_DIR"], [directory containing Xen firmware blobs])
fi
if test "x$LIBXL_EXECBIN_DIR" != "x"; then
AC_DEFINE_UNQUOTED([LIBXL_EXECBIN_DIR], ["$LIBXL_EXECBIN_DIR"], [directory containing Xen libexec binaries])
fi
fi
AM_CONDITIONAL([WITH_LIBXL], [test "$with_libxl" = "yes"])
@@ -1078,7 +1046,23 @@ 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
@@ -1339,28 +1323,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,
@@ -1409,7 +1389,7 @@ AC_ARG_WITH([firewalld],
if test "x$with_firewalld" = "xcheck" ; then
with_firewalld=$with_dbus
fi
if test "x$with_firewalld" = "xyes" ; then
if test "x$with_firewalld" == "xyes" ; then
if test "x$with_dbus" != "xyes" ; then
AC_MSG_ERROR([You must have dbus enabled for firewalld support])
fi
@@ -1670,6 +1650,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],
@@ -1949,14 +1933,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
@@ -1968,7 +1952,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],
@@ -2188,13 +2172,6 @@ fi
AM_CONDITIONAL([WITH_HYPERV], [test "$with_hyperv" = "yes"])
dnl
dnl check for kernel headers required by btrfs ioctl
dnl
if test "$with_linux" = "yes"; then
AC_CHECK_HEADERS([linux/btrfs.h])
fi
dnl Allow perl/python overrides
AC_PATH_PROGS([PYTHON], [python2 python])
AC_PATH_PROG([PERL], [perl])
@@ -2342,7 +2319,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=
@@ -2373,7 +2349,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
@@ -2389,7 +2364,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])
@@ -2519,9 +2493,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])
AC_DEFINE_UNQUOTED([QEMU_BRIDGE_HELPER], ["$QEMU_BRIDGE_HELPER"], [QEMU bridge helper])
AC_ARG_WITH([macvtap],
[AS_HELP_STRING([--with-macvtap],
@@ -2642,11 +2613,7 @@ if test "$with_linux" = "yes"; then
[whether the netlink v1 library is available])
], [
if test "$with_macvtap" = "yes"; then
if test "$LIBNL_REQUIRED" = "3.0";then
AC_MSG_ERROR([libnl3-devel >= $LIBNL_REQUIRED is required for macvtap support])
else
AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support])
fi
AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support])
fi
])
fi
@@ -2656,11 +2623,74 @@ AM_CONDITIONAL([HAVE_LIBNL], [test "$have_libnl" = "yes"])
AC_SUBST([LIBNL_CFLAGS])
AC_SUBST([LIBNL_LIBS])
dnl wireshark dissector
AC_ARG_WITH([wireshark-dissector],
[AS_HELP_STRING([--with-wireshark-dissector],
[enable wireshark dissector plugin support @<:@default=check@:>@])],
[ with_wireshark_dissector=$withval ],
[ with_wireshark_dissector=check ])
AC_DEFUN([LIBVIRT_WS_HANDLE_ERROR], [
if test "$with_wireshark_dissector" = "yes"; then
AC_MSG_ERROR([$1])
else
with_wireshark_dissector=no
fi
])
if test "$with_wireshark_dissector" != "no"; then
dnl Check for XDR headers existence
AC_CHECK_HEADERS([rpc/types.h])
dnl Check for glib-2.0 existence
PKG_CHECK_MODULES([GLIB], [glib-2.0], [
WS_DISSECTOR_CPPFLAGS="$WS_DISSECTOR_CPPFLAGS `$PKG_CONFIG --cflags glib-2.0`"
], [
LIBVIRT_WS_HANDLE_ERROR([pkg-config 'glib-2.0' is required for wireshark-dissector support])
])
dnl Search for wireshark(or tshark) command
AC_PATH_PROG([WIRESHARK], [wireshark])
AC_PATH_PROG([WIRESHARK], [tshark])
if test -z "$WIRESHARK"; then
LIBVIRT_WS_HANDLE_ERROR([command not found wireshark or tshark])
else
dnl Check for wireshark headers
save_CPPFLAGS="$CPPFLAGS"
WS_DISSECTOR_CPPFLAGS="$WS_DISSECTOR_CPPFLAGS -I`dirname $WIRESHARK`/../include/wireshark"
CPPFLAGS="$CPPFLAGS $WS_DISSECTOR_CPPFLAGS"
AC_CHECK_HEADERS([wireshark/config.h],, [
LIBVIRT_WS_HANDLE_ERROR([wireshark/config.h is required for wireshark-dissector support])
])
AC_CHECK_HEADERS([wireshark/epan/packet.h wireshark/epan/dissectors/packet-tcp.h],, [
LIBVIRT_WS_HANDLE_ERROR([wireshark/epan/{packet,packet-tcp}.h are required for wireshark-dissector support])
], [
#include <wireshark/config.h>
])
CPPFLAGS="$save_CPPFLAGS"
fi
if test "$with_wireshark_dissector" != "no"; then
with_wireshark_dissector=yes
fi
fi
AC_SUBST([WS_DISSECTOR_CPPFLAGS])
AM_CONDITIONAL([WITH_WIRESHARK_DISSECTOR], [test "$with_wireshark_dissector" = "yes"])
AC_ARG_WITH([ws-plugindir],
[AS_HELP_STRING([--with-ws-plugindir],
[wireshark plugins directory for use when installing wireshark plugin])],
[ws_plugindir=$withval])
if test "$with_wireshark_dissector" != "no" && test -z "$ws_plugindir"; then
ws_version=`$WIRESHARK -v | head -1 | cut -f 2 -d' '`
ws_plugindir="$libdir/wireshark/plugins/$ws_version"
fi
AC_SUBST([ws_plugindir])
# Check for Linux vs. BSD ifreq members
AC_CHECK_MEMBERS([struct ifreq.ifr_newname,
struct ifreq.ifr_ifindex,
struct ifreq.ifr_index,
struct ifreq.ifr_hwaddr],
struct ifreq.ifr_index],
[], [],
[#include <sys/socket.h>
#include <net/if.h>
@@ -2743,31 +2773,6 @@ test "x$lv_cv_static_analysis" = xyes && t=1
AC_DEFINE_UNQUOTED([STATIC_ANALYSIS], [$t],
[Define to 1 when performing static analysis.])
AC_ARG_WITH([default-editor],
[AS_HELP_STRING([--with-default-editor],
[Editor to use for interactive commands
@<:@default=vi@:>@])],
[DEFAULT_EDITOR=${withval}],
[DEFAULT_EDITOR=vi])
AC_DEFINE_UNQUOTED([DEFAULT_EDITOR], ["$DEFAULT_EDITOR"], [Default editor to use])
AC_ARG_WITH([loader-nvram],
[AS_HELP_STRING([--with-loader-nvram],
[Pass list of pairs of <loader>:<nvram> paths. Both
pairs and list items are separated by a colon.
@<:default=paths to OVMF and its clones@:>@])],
[if test "$withval" = "no"; then
withval=""
else
l=`echo $withval | tr ':' '\n' | wc -l`
if test "`expr $l % 2`" -ne 0; then
AC_MSG_ERROR([Malformed --with-loader-nvram argument])
fi
fi
AC_DEFINE_UNQUOTED([DEFAULT_LOADER_NVRAM],
["$withval"],
[List of loader:nvram pairs])])
# Some GNULIB base64 symbols clash with a kerberos library
AC_DEFINE_UNQUOTED([isbase64],[libvirt_gl_isbase64],[Hack to avoid symbol clash])
AC_DEFINE_UNQUOTED([base64_encode],[libvirt_gl_base64_encode],[Hack to avoid symbol clash])
@@ -2783,7 +2788,6 @@ AC_CONFIG_FILES([\
libvirt.pc \
libvirt-qemu.pc \
libvirt-lxc.pc \
libvirt-admin.pc \
src/libvirt.pc \
src/libvirt-qemu.pc \
src/libvirt-lxc.pc \
@@ -2801,11 +2805,9 @@ AC_CONFIG_FILES([\
examples/domtop/Makefile \
examples/openauth/Makefile \
examples/hellolibvirt/Makefile \
examples/rename/Makefile \
examples/systemtap/Makefile \
examples/xml/nwfilter/Makefile \
examples/lxcconvert/Makefile \
examples/polkit/Makefile \
tools/wireshark/Makefile \
tools/wireshark/src/Makefile])
AC_OUTPUT
@@ -2828,7 +2830,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])
@@ -2890,7 +2892,6 @@ LIBVIRT_RESULT_SELINUX
LIBVIRT_RESULT_SSH2
LIBVIRT_RESULT_SYSTEMD_DAEMON
LIBVIRT_RESULT_UDEV
LIBVIRT_RESULT_WIRESHARK
LIBVIRT_RESULT_YAJL
AC_MSG_NOTICE([ libxml: $LIBXML_CFLAGS $LIBXML_LIBS])
AC_MSG_NOTICE([ dlopen: $DLOPEN_LIBS])
@@ -2959,8 +2960,8 @@ AC_MSG_NOTICE([pm-utils: $with_pm_utils])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Test suite])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([ Coverage: $enable_coverage])
AC_MSG_NOTICE([ Alloc OOM: $enable_oom])
AC_MSG_NOTICE([ Coverage: $enable_coverage])
AC_MSG_NOTICE([ Alloc OOM: $enable_oom])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Miscellaneous])
AC_MSG_NOTICE([])
@@ -2972,8 +2973,6 @@ AC_MSG_NOTICE([ numad: $with_numad])
AC_MSG_NOTICE([ XML Catalog: $XML_CATALOG_FILE])
AC_MSG_NOTICE([ Init script: $with_init_script])
AC_MSG_NOTICE([Char device locks: $with_chrdev_lock_files])
AC_MSG_NOTICE([ Default Editor: $DEFAULT_EDITOR])
AC_MSG_NOTICE([ Loader/NVRAM: $with_loader_nvram])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Developer Tools])
AC_MSG_NOTICE([])

View File

@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2015 Red Hat, Inc.
## Copyright (C) 2005-2014 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
@@ -25,7 +25,6 @@ INCLUDES = \
-I$(top_srcdir)/src/conf \
-I$(top_srcdir)/src/rpc \
-I$(top_srcdir)/src/remote \
-I$(top_srcdir)/src/admin \
-I$(top_srcdir)/src/access \
$(GETTEXT_CPPFLAGS)
@@ -35,7 +34,6 @@ DAEMON_GENERATED = \
remote_dispatch.h \
lxc_dispatch.h \
qemu_dispatch.h \
admin_dispatch.h \
$(NULL)
DAEMON_SOURCES = \
@@ -51,12 +49,10 @@ 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 \
@@ -66,7 +62,6 @@ EXTRA_DIST = \
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 \
@@ -81,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
@@ -126,27 +114,6 @@ libvirtd_conf_la_LDFLAGS = \
$(NULL)
libvirtd_conf_la_LIBADD = $(LIBXML_LIBS)
noinst_LTLIBRARIES += libvirtd_admin.la
libvirtd_admin_la_SOURCES = \
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
@@ -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 \
@@ -267,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
@@ -299,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::
@@ -319,11 +273,9 @@ endif ! WITH_POLKIT
remote.c: $(DAEMON_GENERATED)
remote.h: $(DAEMON_GENERATED)
admin_server.c: $(DAEMON_GENERATED)
LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
libvirtd.libxl.logrotate libvirtd.uml.logrotate \
libvirtd.logrotate
libvirtd.uml.logrotate libvirtd.logrotate
BUILT_SOURCES += $(LOGROTATE_CONFS)
@@ -345,12 +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' \
@@ -368,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
@@ -377,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 || :
@@ -398,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:

View File

@@ -1,117 +0,0 @@
/*
* admin_server.c:
*
* Copyright (C) 2014-2015 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_server.h"
#include "datatypes.h"
#include "viralloc.h"
#include "virerror.h"
#include "virlog.h"
#include "virnetdaemon.h"
#include "virnetserver.h"
#include "virstring.h"
#include "virthreadjob.h"
#define VIR_FROM_THIS VIR_FROM_ADMIN
VIR_LOG_INIT("daemon.admin");
void
remoteAdmClientFreeFunc(void *data)
{
struct daemonAdmClientPrivate *priv = data;
virMutexDestroy(&priv->lock);
virObjectUnref(priv->dmn);
VIR_FREE(priv);
}
void *
remoteAdmClientInitHook(virNetServerClientPtr client ATTRIBUTE_UNUSED,
void *opaque)
{
struct daemonAdmClientPrivate *priv;
if (VIR_ALLOC(priv) < 0)
return NULL;
if (virMutexInit(&priv->lock) < 0) {
VIR_FREE(priv);
virReportSystemError(errno, "%s", _("unable to init mutex"));
return NULL;
}
/*
* We don't necessarily need to ref this object right now as there
* must be one ref being held throughout the life of the daemon,
* but let's just be safe for future.
*/
priv->dmn = virObjectRef(opaque);
return priv;
}
/* 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;
}
#include "admin_dispatch.h"

View File

@@ -1,36 +0,0 @@
/*
* admin_server.h
*
* Copyright (C) 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/>.
*
* 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,9 +0,0 @@
// Allow any user in the 'libvirt' group to connect to system libvirtd
// without entering a password.
polkit.addRule(function(action, subject) {
if (action.id == "org.libvirt.unix.manage" &&
subject.isInGroup("libvirt")) {
return polkit.Result.YES;
}
});

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
/*
* libvirtd.c: daemon start of day, guest process & i/o management
*
* Copyright (C) 2006-2015 Red Hat, Inc.
* Copyright (C) 2006-2014 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -44,13 +44,12 @@
#include "libvirtd.h"
#include "libvirtd-config.h"
#include "admin_server.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"
@@ -106,6 +105,7 @@
#include "configmake.h"
#include "virdbus.h"
#include "cpu/cpu_map.h"
VIR_LOG_INIT("daemon.libvirtd");
@@ -113,7 +113,6 @@ VIR_LOG_INIT("daemon.libvirtd");
virNetSASLContextPtr saslCtxt = NULL;
#endif
virNetServerProgramPtr remoteProgram = NULL;
virNetServerProgramPtr adminProgram = NULL;
virNetServerProgramPtr qemuProgram = NULL;
virNetServerProgramPtr lxcProgram = NULL;
@@ -255,24 +254,18 @@ static int
daemonUnixSocketPaths(struct daemonConfig *config,
bool privileged,
char **sockfile,
char **rosockfile,
char **admsockfile)
char **rosockfile)
{
if (config->unix_sock_dir) {
if (virAsprintf(sockfile, "%s/libvirt-sock", config->unix_sock_dir) < 0)
goto error;
if (privileged) {
if (virAsprintf(rosockfile, "%s/libvirt-sock-ro", config->unix_sock_dir) < 0)
goto error;
if (virAsprintf(admsockfile, "%s/libvirt-admin-sock", config->unix_sock_dir) < 0)
goto error;
}
if (privileged &&
virAsprintf(rosockfile, "%s/libvirt-sock-ro", config->unix_sock_dir) < 0)
goto error;
} else {
if (privileged) {
if (VIR_STRDUP(*sockfile, LOCALSTATEDIR "/run/libvirt/libvirt-sock") < 0 ||
VIR_STRDUP(*rosockfile, LOCALSTATEDIR "/run/libvirt/libvirt-sock-ro") < 0 ||
VIR_STRDUP(*admsockfile, LOCALSTATEDIR "/run/libvirt/libvirt-admin-sock") < 0)
VIR_STRDUP(*rosockfile, LOCALSTATEDIR "/run/libvirt/libvirt-sock-ro") < 0)
goto error;
} else {
char *rundir = NULL;
@@ -288,8 +281,7 @@ daemonUnixSocketPaths(struct daemonConfig *config,
}
umask(old_umask);
if (virAsprintf(sockfile, "%s/libvirt-sock", rundir) < 0 ||
virAsprintf(admsockfile, "%s/libvirt-admin-sock", rundir) < 0) {
if (virAsprintf(sockfile, "%s/libvirt-sock", rundir) < 0) {
VIR_FREE(rundir);
goto error;
}
@@ -329,7 +321,6 @@ static int daemonErrorLogFilter(virErrorPtr err, int priority)
case VIR_ERR_NO_SECRET:
case VIR_ERR_NO_DOMAIN_SNAPSHOT:
case VIR_ERR_OPERATION_INVALID:
case VIR_ERR_NO_DOMAIN_METADATA:
return VIR_LOG_DEBUG;
}
@@ -343,7 +334,12 @@ static void daemonInitialize(void)
* priority when calling virStateInitialize. We must register the
* network, storage and nodedev drivers before any stateful domain
* driver, since their resources must be auto-started before any
* domains can be auto-started.
* domains can be auto-started. Moreover, some stateless drivers
* implement their own subdrivers (e.g. the vbox driver has its
* own network and storage subdriers) which need to have higher
* priority. Otherwise, when connecting to such driver the generic
* subdriver may be opened instead of the one corresponding to the
* stateless driver.
*/
#ifdef WITH_DRIVER_MODULES
/* We don't care if any of these fail, because the whole point
@@ -351,12 +347,18 @@ static void daemonInitialize(void)
* If they try to open a connection for a module that
* is not loaded they'll get a suitable error at that point
*/
# ifdef WITH_VBOX
virDriverLoadModule("vbox_network");
# endif
# ifdef WITH_NETWORK
virDriverLoadModule("network");
# endif
# ifdef WITH_INTERFACE
virDriverLoadModule("interface");
# endif
# ifdef WITH_VBOX
virDriverLoadModule("vbox_storage");
# endif
# ifdef WITH_STORAGE
virDriverLoadModule("storage");
# endif
@@ -391,12 +393,18 @@ static void daemonInitialize(void)
virDriverLoadModule("bhyve");
# endif
#else
# ifdef WITH_VBOX
vboxNetworkRegister();
# endif
# ifdef WITH_NETWORK
networkRegister();
# endif
# ifdef WITH_INTERFACE
interfaceRegister();
# endif
# ifdef WITH_VBOX
vboxStorageRegister();
# endif
# ifdef WITH_STORAGE
storageRegister();
# endif
@@ -436,16 +444,13 @@ static void daemonInitialize(void)
static int ATTRIBUTE_NONNULL(3)
daemonSetupNetworking(virNetServerPtr srv,
virNetServerPtr srvAdm,
struct daemonConfig *config,
const char *sock_path,
const char *sock_path_ro,
const char *sock_path_adm,
bool ipsock,
bool privileged)
{
virNetServerServicePtr svc = NULL;
virNetServerServicePtr svcAdm = NULL;
virNetServerServicePtr svcRO = NULL;
virNetServerServicePtr svcTCP = NULL;
#if WITH_GNUTLS
@@ -454,35 +459,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,
@@ -496,7 +494,7 @@ daemonSetupNetworking(virNetServerPtr srv,
config->max_queued_clients,
config->max_client_requests,
nfds, &cur_fd)))
goto cleanup;
goto error;
if (sock_path_ro) {
if (!(svcRO = virNetServerServiceNewFDOrUNIX(sock_path_ro,
unix_sock_ro_mask,
@@ -509,37 +507,18 @@ daemonSetupNetworking(virNetServerPtr srv,
config->max_queued_clients,
config->max_client_requests,
nfds, &cur_fd)))
goto cleanup;
goto error;
}
if (virNetServerAddService(srv, svc,
config->mdns_adv && !ipsock ?
"_libvirt._tcp" :
NULL) < 0)
goto cleanup;
goto error;
if (svcRO &&
virNetServerAddService(srv, svcRO, NULL) < 0)
goto cleanup;
/* Temporarily disabled */
if (sock_path_adm && false) {
VIR_DEBUG("Registering unix socket %s", sock_path_adm);
if (!(svcAdm = virNetServerServiceNewUNIX(sock_path_adm,
unix_sock_adm_mask,
unix_sock_gid,
REMOTE_AUTH_NONE,
#if WITH_GNUTLS
NULL,
#endif
true,
config->admin_max_queued_clients,
config->admin_max_client_requests)))
goto cleanup;
if (virNetServerAddService(srvAdm, svcAdm, NULL) < 0)
goto cleanup;
}
goto error;
if (ipsock) {
if (config->listen_tcp) {
@@ -547,7 +526,6 @@ daemonSetupNetworking(virNetServerPtr srv,
config->listen_addr, config->tcp_port);
if (!(svcTCP = virNetServerServiceNewTCP(config->listen_addr,
config->tcp_port,
AF_UNSPEC,
config->auth_tcp,
#if WITH_GNUTLS
NULL,
@@ -555,11 +533,11 @@ daemonSetupNetworking(virNetServerPtr srv,
false,
config->max_queued_clients,
config->max_client_requests)))
goto cleanup;
goto error;
if (virNetServerAddService(srv, svcTCP,
config->mdns_adv ? "_libvirt._tcp" : NULL) < 0)
goto cleanup;
goto error;
}
#if WITH_GNUTLS
@@ -576,14 +554,14 @@ daemonSetupNetworking(virNetServerPtr srv,
(const char *const*)config->tls_allowed_dn_list,
config->tls_no_sanity_certificate ? false : true,
config->tls_no_verify_certificate ? false : true)))
goto cleanup;
goto error;
} else {
if (!(ctxt = virNetTLSContextNewServerPath(NULL,
!privileged,
(const char *const*)config->tls_allowed_dn_list,
config->tls_no_sanity_certificate ? false : true,
config->tls_no_verify_certificate ? false : true)))
goto cleanup;
goto error;
}
VIR_DEBUG("Registering TLS socket %s:%s",
@@ -591,19 +569,18 @@ daemonSetupNetworking(virNetServerPtr srv,
if (!(svcTLS =
virNetServerServiceNewTCP(config->listen_addr,
config->tls_port,
AF_UNSPEC,
config->auth_tls,
ctxt,
false,
config->max_queued_clients,
config->max_client_requests))) {
virObjectUnref(ctxt);
goto cleanup;
goto error;
}
if (virNetServerAddService(srv, svcTLS,
config->mdns_adv &&
!config->listen_tcp ? "_libvirt._tcp" : NULL) < 0)
goto cleanup;
goto error;
virObjectUnref(ctxt);
}
@@ -612,7 +589,7 @@ daemonSetupNetworking(virNetServerPtr srv,
if (config->listen_tls) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("This libvirtd build does not support TLS"));
goto cleanup;
goto error;
}
#endif
}
@@ -627,21 +604,20 @@ daemonSetupNetworking(virNetServerPtr srv,
saslCtxt = virNetSASLContextNewServer(
(const char *const*)config->sasl_allowed_username_list);
if (!saslCtxt)
goto cleanup;
goto error;
}
#endif
ret = 0;
return 0;
cleanup:
error:
#if WITH_GNUTLS
virObjectUnref(svcTLS);
#endif
virObjectUnref(svcTCP);
virObjectUnref(svcRO);
virObjectUnref(svcAdm);
virObjectUnref(svc);
return ret;
virObjectUnref(svcRO);
return -1;
}
@@ -768,13 +744,13 @@ daemonSetupAccessManager(struct daemonConfig *config)
{
virAccessManagerPtr mgr;
const char *none[] = { "none", NULL };
const char **drv = (const char **)config->access_drivers;
const char **driver = (const char **)config->access_drivers;
if (!drv ||
!drv[0])
drv = none;
if (!driver ||
!driver[0])
driver = none;
if (!(mgr = virAccessManagerNewStack(drv)))
if (!(mgr = virAccessManagerNewStack(driver)))
return -1;
virAccessManagerSetDefault(mgr);
@@ -815,22 +791,17 @@ daemonSetupPrivs(void)
#endif
static void daemonShutdownHandler(virNetDaemonPtr dmn,
static void daemonShutdownHandler(virNetServerPtr srv,
siginfo_t *sig ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
virNetDaemonQuit(dmn);
virNetServerQuit(srv);
}
static void daemonReloadHandler(virNetDaemonPtr dmn ATTRIBUTE_UNUSED,
static void daemonReloadHandler(virNetServerPtr srv ATTRIBUTE_UNUSED,
siginfo_t *sig ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
if (!driversInitialized) {
VIR_WARN("Drivers are not initialized, reload ignored");
return;
}
VIR_INFO("Reloading configuration on SIGHUP");
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-",
VIR_HOOK_DAEMON_OP_RELOAD, SIGHUP, "SIGHUP", NULL, NULL);
@@ -838,15 +809,15 @@ static void daemonReloadHandler(virNetDaemonPtr dmn ATTRIBUTE_UNUSED,
VIR_WARN("Error while reloading drivers");
}
static int daemonSetupSignals(virNetDaemonPtr dmn)
static int daemonSetupSignals(virNetServerPtr srv)
{
if (virNetDaemonAddSignalHandler(dmn, SIGINT, daemonShutdownHandler, NULL) < 0)
if (virNetServerAddSignalHandler(srv, SIGINT, daemonShutdownHandler, NULL) < 0)
return -1;
if (virNetDaemonAddSignalHandler(dmn, SIGQUIT, daemonShutdownHandler, NULL) < 0)
if (virNetServerAddSignalHandler(srv, SIGQUIT, daemonShutdownHandler, NULL) < 0)
return -1;
if (virNetDaemonAddSignalHandler(dmn, SIGTERM, daemonShutdownHandler, NULL) < 0)
if (virNetServerAddSignalHandler(srv, SIGTERM, daemonShutdownHandler, NULL) < 0)
return -1;
if (virNetDaemonAddSignalHandler(dmn, SIGHUP, daemonReloadHandler, NULL) < 0)
if (virNetServerAddSignalHandler(srv, SIGHUP, daemonReloadHandler, NULL) < 0)
return -1;
return 0;
}
@@ -854,12 +825,12 @@ static int daemonSetupSignals(virNetDaemonPtr dmn)
static void daemonInhibitCallback(bool inhibit, void *opaque)
{
virNetDaemonPtr dmn = opaque;
virNetServerPtr srv = opaque;
if (inhibit)
virNetDaemonAddShutdownInhibition(dmn);
virNetServerAddShutdownInhibition(srv);
else
virNetDaemonRemoveShutdownInhibition(dmn);
virNetServerRemoveShutdownInhibition(srv);
}
@@ -869,26 +840,26 @@ static DBusConnection *systemBus;
static void daemonStopWorker(void *opaque)
{
virNetDaemonPtr dmn = opaque;
virNetServerPtr srv = opaque;
VIR_DEBUG("Begin stop dmn=%p", dmn);
VIR_DEBUG("Begin stop srv=%p", srv);
ignore_value(virStateStop());
VIR_DEBUG("Completed stop dmn=%p", dmn);
VIR_DEBUG("Completed stop srv=%p", srv);
/* Exit libvirtd cleanly */
virNetDaemonQuit(dmn);
virNetServerQuit(srv);
}
/* We do this in a thread to not block the main loop */
static void daemonStop(virNetDaemonPtr dmn)
static void daemonStop(virNetServerPtr srv)
{
virThread thr;
virObjectRef(dmn);
if (virThreadCreate(&thr, false, daemonStopWorker, dmn) < 0)
virObjectUnref(dmn);
virObjectRef(srv);
if (virThreadCreate(&thr, false, daemonStopWorker, srv) < 0)
virObjectUnref(srv);
}
@@ -897,14 +868,14 @@ handleSessionMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED,
DBusMessage *message,
void *opaque)
{
virNetDaemonPtr dmn = opaque;
virNetServerPtr srv = opaque;
VIR_DEBUG("dmn=%p", dmn);
VIR_DEBUG("srv=%p", srv);
if (dbus_message_is_signal(message,
DBUS_INTERFACE_LOCAL,
"Disconnected"))
daemonStop(dmn);
daemonStop(srv);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
@@ -915,14 +886,14 @@ handleSystemMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED,
DBusMessage *message,
void *opaque)
{
virNetDaemonPtr dmn = opaque;
virNetServerPtr srv = opaque;
VIR_DEBUG("dmn=%p", dmn);
VIR_DEBUG("srv=%p", srv);
if (dbus_message_is_signal(message,
"org.freedesktop.login1.Manager",
"PrepareForShutdown"))
daemonStop(dmn);
daemonStop(srv);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
@@ -931,22 +902,22 @@ handleSystemMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED,
static void daemonRunStateInit(void *opaque)
{
virNetDaemonPtr dmn = opaque;
virNetServerPtr srv = opaque;
virIdentityPtr sysident = virIdentityGetSystem();
virIdentitySetCurrent(sysident);
/* Since driver initialization can take time inhibit daemon shutdown until
we're done so clients get a chance to connect */
daemonInhibitCallback(true, dmn);
daemonInhibitCallback(true, srv);
/* Start the stateful HV drivers
* This is deliberately done after telling the parent process
* we're ready, since it can take a long time and this will
* seriously delay OS bootup process */
if (virStateInitialize(virNetDaemonIsPrivileged(dmn),
if (virStateInitialize(virNetServerIsPrivileged(srv),
daemonInhibitCallback,
dmn) < 0) {
srv) < 0) {
VIR_ERROR(_("Driver state initialization failed"));
/* Ensure the main event loop quits */
kill(getpid(), SIGTERM);
@@ -956,18 +927,18 @@ static void daemonRunStateInit(void *opaque)
driversInitialized = true;
#ifdef HAVE_DBUS
/* Tie the non-privileged libvirtd to the session/shutdown lifecycle */
if (!virNetDaemonIsPrivileged(dmn)) {
/* Tie the non-priviledged libvirtd to the session/shutdown lifecycle */
if (!virNetServerIsPrivileged(srv)) {
sessionBus = virDBusGetSessionBus();
if (sessionBus != NULL)
dbus_connection_add_filter(sessionBus,
handleSessionMessageFunc, dmn, NULL);
handleSessionMessageFunc, srv, NULL);
systemBus = virDBusGetSystemBus();
if (systemBus != NULL) {
dbus_connection_add_filter(systemBus,
handleSystemMessageFunc, dmn, NULL);
handleSystemMessageFunc, srv, NULL);
dbus_bus_add_match(systemBus,
"type='signal',sender='org.freedesktop.login1', interface='org.freedesktop.login1.Manager'",
NULL);
@@ -975,20 +946,20 @@ static void daemonRunStateInit(void *opaque)
}
#endif
/* Only now accept clients from network */
virNetDaemonUpdateServices(dmn, true);
virNetServerUpdateServices(srv, true);
cleanup:
daemonInhibitCallback(false, dmn);
virObjectUnref(dmn);
daemonInhibitCallback(false, srv);
virObjectUnref(srv);
virObjectUnref(sysident);
virIdentitySetCurrent(NULL);
}
static int daemonStateInit(virNetDaemonPtr dmn)
static int daemonStateInit(virNetServerPtr srv)
{
virThread thr;
virObjectRef(dmn);
if (virThreadCreate(&thr, false, daemonRunStateInit, dmn) < 0) {
virObjectUnref(dmn);
virObjectRef(srv);
if (virThreadCreate(&thr, false, daemonRunStateInit, srv) < 0) {
virObjectUnref(srv);
return -1;
}
return 0;
@@ -1010,8 +981,9 @@ static int migrateProfile(void)
if (!(home = virGetUserDirectory()))
goto cleanup;
if (virAsprintf(&old_base, "%s/.libvirt", home) < 0)
if (virAsprintf(&old_base, "%s/.libvirt", home) < 0) {
goto cleanup;
}
/* if the new directory is there or the old one is not: do nothing */
if (!(config_dir = virGetUserConfigDirectory()))
@@ -1026,18 +998,21 @@ static int migrateProfile(void)
}
/* test if we already attempted to migrate first */
if (virAsprintf(&updated, "%s/DEPRECATED-DIRECTORY", old_base) < 0)
if (virAsprintf(&updated, "%s/DEPRECATED-DIRECTORY", old_base) < 0) {
goto cleanup;
if (virFileExists(updated))
}
if (virFileExists(updated)) {
goto cleanup;
}
config_home = virGetEnvBlockSUID("XDG_CONFIG_HOME");
if (config_home && config_home[0] != '\0') {
if (VIR_STRDUP(xdg_dir, config_home) < 0)
goto cleanup;
} else {
if (virAsprintf(&xdg_dir, "%s/.config", home) < 0)
if (virAsprintf(&xdg_dir, "%s/.config", home) < 0) {
goto cleanup;
}
}
old_umask = umask(077);
@@ -1138,10 +1113,9 @@ daemonUsage(const char *argv0, bool privileged)
}
}
#define MAX_LISTEN 5
int main(int argc, char **argv) {
virNetDaemonPtr dmn = NULL;
virNetServerPtr srv = NULL;
virNetServerPtr srvAdm = NULL;
char *remote_config_file = NULL;
int statuswrite = -1;
int ret = 1;
@@ -1149,7 +1123,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;
@@ -1191,8 +1164,9 @@ int main(int argc, char **argv) {
c = getopt_long(argc, argv, "ldf:p:t:vVh", opts, &optidx);
if (c == -1)
if (c == -1) {
break;
}
switch (c) {
case 0:
@@ -1317,15 +1291,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,6 +1360,7 @@ int main(int argc, char **argv) {
config->max_anonymous_clients,
config->keepalive_interval,
config->keepalive_count,
!!config->keepalive_required,
config->mdns_adv ? config->mdns_name : NULL,
remoteClientInitHook,
NULL,
@@ -1398,12 +1370,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.
*/
@@ -1456,45 +1422,13 @@ int main(int argc, char **argv) {
goto cleanup;
}
if (!(srvAdm = virNetServerNew(config->admin_min_workers,
config->admin_max_workers,
0,
config->admin_max_clients,
0,
config->admin_keepalive_interval,
config->admin_keepalive_count,
NULL,
remoteAdmClientInitHook,
NULL,
remoteAdmClientFreeFunc,
dmn))) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
if (virNetDaemonAddServer(dmn, srvAdm) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
if (!(adminProgram = virNetServerProgramNew(ADMIN_PROGRAM,
ADMIN_PROTOCOL_VERSION,
adminProcs,
adminNProcs))) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
if (virNetServerAddProgram(srvAdm, adminProgram) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
if (timeout != -1) {
VIR_DEBUG("Registering shutdown timeout %d", timeout);
virNetDaemonAutoShutdown(dmn, timeout);
virNetServerAutoShutdown(srv,
timeout);
}
if ((daemonSetupSignals(dmn)) < 0) {
if ((daemonSetupSignals(srv)) < 0) {
ret = VIR_DAEMON_ERR_SIGNAL;
goto cleanup;
}
@@ -1509,7 +1443,7 @@ int main(int argc, char **argv) {
VIR_DEBUG("Proceeding without auditing");
}
}
virAuditLog(config->audit_logging > 0);
virAuditLog(config->audit_logging);
/* setup the hooks if any */
if (virHookInitialize() < 0) {
@@ -1529,11 +1463,8 @@ int main(int argc, char **argv) {
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", VIR_HOOK_DAEMON_OP_START,
0, "start", NULL, NULL);
if (daemonSetupNetworking(srv, srvAdm,
config,
sock_file,
sock_file_ro,
sock_file_adm,
if (daemonSetupNetworking(srv, config,
sock_file, sock_file_ro,
ipsock, privileged) < 0) {
ret = VIR_DAEMON_ERR_NETWORK;
goto cleanup;
@@ -1552,7 +1483,7 @@ int main(int argc, char **argv) {
}
/* Initialize drivers & then start accepting new clients from network */
if (daemonStateInit(dmn) < 0) {
if (daemonStateInit(srv) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
@@ -1574,7 +1505,7 @@ int main(int argc, char **argv) {
#endif
/* Run event loop. */
virNetDaemonRun(dmn);
virNetServerRun(srv);
ret = 0;
@@ -1586,11 +1517,8 @@ int main(int argc, char **argv) {
virObjectUnref(remoteProgram);
virObjectUnref(lxcProgram);
virObjectUnref(qemuProgram);
virObjectUnref(adminProgram);
virNetDaemonClose(dmn);
virObjectUnref(dmn);
virNetServerClose(srv);
virObjectUnref(srv);
virObjectUnref(srvAdm);
virNetlinkShutdown();
if (statuswrite != -1) {
if (ret != 0) {
@@ -1607,17 +1535,14 @@ int main(int argc, char **argv) {
VIR_FREE(sock_file);
VIR_FREE(sock_file_ro);
VIR_FREE(sock_file_adm);
VIR_FREE(pid_file);
VIR_FREE(remote_config_file);
VIR_FREE(run_dir);
daemonConfigFree(config);
if (driversInitialized) {
driversInitialized = false;
if (driversInitialized)
virStateCleanup();
}
return ret;
}

View File

@@ -106,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.
@@ -280,7 +272,7 @@
# connection succeeds.
#max_queued_clients = 1000
# The maximum length of queue of accepted but not yet
# The maximum length of queue of accepted but not yet not
# authenticated clients. The default value is zero, meaning
# the feature is disabled.
#max_anonymous_clients = 20
@@ -315,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
@@ -440,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;
@@ -72,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,9 +0,0 @@
@localstatedir@/log/libvirt/libxl/*.log {
weekly
missingok
rotate 4
compress
delaycompress
copytruncate
minsize 100k
}

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -383,7 +383,7 @@ int daemonFreeClientStream(virNetServerClientPtr client,
msg = tmp;
}
virObjectUnref(stream->st);
virStreamFree(stream->st);
VIR_FREE(stream);
return ret;

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-2015 Red Hat, Inc.
## Copyright (C) 2005-2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
@@ -25,22 +25,9 @@ DOC_SOURCE_DIR=../src
DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
apihtml = \
html/index.html \
$(apihtml_generated)
apihtml_generated = \
html/libvirt-libvirt-domain.html \
html/libvirt-libvirt-domain-snapshot.html \
html/libvirt-libvirt-event.html \
html/libvirt-libvirt-host.html \
html/libvirt-libvirt-interface.html \
html/libvirt-libvirt-network.html \
html/libvirt-libvirt-nodedev.html \
html/libvirt-libvirt-nwfilter.html \
html/libvirt-libvirt-secret.html \
html/libvirt-libvirt-storage.html \
html/libvirt-libvirt-stream.html \
apihtml = \
html/index.html \
html/libvirt-libvirt.html \
html/libvirt-virterror.html
apipng = \
@@ -53,6 +40,7 @@ devhelphtml = \
devhelp/libvirt.devhelp \
devhelp/index.html \
devhelp/general.html \
devhelp/libvirt-libvirt.html \
devhelp/libvirt-virterror.html
css = \
@@ -128,15 +116,8 @@ lxc_xml = \
libvirt-lxc-api.xml \
libvirt-lxc-refs.xml
admin_xml = \
libvirt-admin-api.xml \
libvirt-admin-refs.xml
apidir = $(pkgdatadir)/api
api_DATA = \
libvirt-api.xml \
libvirt-qemu-api.xml \
libvirt-lxc-api.xml
api_DATA = libvirt-api.xml libvirt-qemu-api.xml libvirt-lxc-api.xml
fig = \
libvirt-net-logical.fig \
@@ -162,7 +143,7 @@ EXTRA_DIST= \
sitemap.html.in aclperms.htmlinc \
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 +162,6 @@ all-am: web
api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
qemu_api: $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
lxc_api: $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
admin_api: $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
web: $(dot_html) $(internals_html) html/index.html devhelp/index.html \
$(dot_php)
@@ -204,13 +184,13 @@ todo:
rm -f todo.html.in
$(MAKE) todo.html
hvsupport.html: $(srcdir)/hvsupport.html.in
hvsupport.html:: $(srcdir)/hvsupport.html.in
$(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
$(top_srcdir)/src/libvirt_public.syms \
$(top_srcdir)/src/libvirt_qemu.syms $(top_srcdir)/src/libvirt_lxc.syms \
$(top_srcdir)/src/driver.h
$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(top_srcdir)/src > $@ \
$(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl \
$(srcdir)/../src/libvirt_public.syms \
$(srcdir)/../src/libvirt_qemu.syms $(srcdir)/../src/libvirt_lxc.syms \
$(srcdir)/../src/driver.h
$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(srcdir)/../src > $@ \
|| { rm $@ && exit 1; }
.PHONY: todo
@@ -227,7 +207,7 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
$(top_srcdir)/docs/subsite.xsl $< > $@ \
|| { rm $@ && exit 1; }; fi
%.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in $(acl_generated)
%.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in
@if [ -x $(XSLTPROC) ] ; then \
echo "Generating $@"; \
name=`echo $@ | sed -e 's/.tmp//'`; \
@@ -243,7 +223,7 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
$(XMLLINT) --catalogs --nonet --format --valid $< > $(srcdir)/$@ \
|| { rm $(srcdir)/$@ && exit 1; }; \
else echo "missing XHTML1 DTD"; cat $< > $(srcdir)/$@ ; fi ; fi
else echo "missing XHTML1 DTD" ; fi ; fi
%.php.tmp: %.php.in site.xsl page.xsl sitemap.html.in
@if [ -x $(XSLTPROC) ] ; then \
@@ -259,8 +239,6 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
-e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
|| { rm $(srcdir)/$@ && exit 1; }; fi
$(apihtml_generated): html/index.html
html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) --nonet -o $(srcdir)/ \
@@ -271,7 +249,7 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
> /dev/null ; then \
SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
$(XMLLINT) --catalogs --nonet --valid --noout $(srcdir)/html/*.html ; \
else echo "missing XHTML1 DTD"; cat $< > $(srcdir)/$@ ; fi ; fi
else echo "missing XHTML1 DTD" ; fi ; fi
$(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
@@ -280,9 +258,9 @@ $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
python_generated_files = \
$(srcdir)/html/libvirt-libvirt.html \
$(srcdir)/html/libvirt-libvirt-lxc.html \
$(srcdir)/html/libvirt-libvirt-qemu.html \
$(srcdir)/html/libvirt-libvirt-admin.html \
$(srcdir)/html/libvirt-virterror.html \
$(srcdir)/libvirt-api.xml \
$(srcdir)/libvirt-refs.xml \
@@ -290,8 +268,6 @@ python_generated_files = \
$(srcdir)/libvirt-lxc-refs.xml \
$(srcdir)/libvirt-qemu-api.xml \
$(srcdir)/libvirt-qemu-refs.xml \
$(srcdir)/libvirt-admin-api.xml \
$(srcdir)/libvirt-admin-refs.xml \
$(NULL)
APIBUILD=$(srcdir)/apibuild.py
@@ -301,29 +277,16 @@ EXTRA_DIST += $(APIBUILD_STAMP)
$(python_generated_files): $(APIBUILD_STAMP)
$(APIBUILD_STAMP): $(srcdir)/apibuild.py \
$(top_srcdir)/include/libvirt/libvirt.h.in \
$(top_srcdir)/include/libvirt/libvirt-domain-snapshot.h \
$(top_srcdir)/include/libvirt/libvirt-domain.h \
$(top_srcdir)/include/libvirt/libvirt-event.h \
$(top_srcdir)/include/libvirt/libvirt-host.h \
$(top_srcdir)/include/libvirt/libvirt-interface.h \
$(top_srcdir)/include/libvirt/libvirt-network.h \
$(top_srcdir)/include/libvirt/libvirt-nodedev.h \
$(top_srcdir)/include/libvirt/libvirt-nwfilter.h \
$(top_srcdir)/include/libvirt/libvirt-secret.h \
$(top_srcdir)/include/libvirt/libvirt-storage.h \
$(top_srcdir)/include/libvirt/libvirt-stream.h \
$(top_srcdir)/include/libvirt/libvirt-lxc.h \
$(top_srcdir)/include/libvirt/libvirt-qemu.h \
$(top_srcdir)/include/libvirt/libvirt-admin.h \
$(top_srcdir)/include/libvirt/virterror.h \
$(top_srcdir)/src/libvirt.c \
$(top_srcdir)/src/libvirt-lxc.c \
$(top_srcdir)/src/libvirt-qemu.c \
$(top_srcdir)/src/libvirt-admin.c \
$(top_srcdir)/src/util/virerror.c \
$(top_srcdir)/src/util/virevent.c \
$(top_srcdir)/src/util/virtypedparam.c
$(srcdir)/../include/libvirt/libvirt.h.in \
$(srcdir)/../include/libvirt/libvirt-lxc.h \
$(srcdir)/../include/libvirt/libvirt-qemu.h \
$(srcdir)/../include/libvirt/virterror.h \
$(srcdir)/../src/libvirt.c \
$(srcdir)/../src/libvirt-lxc.c \
$(srcdir)/../src/libvirt-qemu.c \
$(srcdir)/../src/util/virerror.c \
$(srcdir)/../src/util/virevent.c \
$(srcdir)/../src/util/virtypedparam.c
$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(APIBUILD)
touch $@
@@ -339,10 +302,9 @@ maintainer-clean-local: clean-local
todo.html.in
rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
rm -rf $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
rm -rf $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
rm -rf $(APIBUILD_STAMP)
rebuild: api qemu_api lxc_api admin_api all
rebuild: api qemu_api lxc_api all
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -167,7 +167,7 @@ numbered incrementally from there.
<p>
Since /dev/ttyN and /dev/console are linked to the pts devices. The
tty device of login program is pts device. The pam module securetty
tty device of login program is pts device. the pam module securetty
may prevent root user from logging in container. If you want root
user to log in container successfully, add the pts device to the file
/etc/securetty of container.
@@ -590,27 +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

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -16,14 +16,11 @@
then it needs to be more recent to support VFIO, while legacy KVM is
achievable just fine with older qemus.</p>
<p>The main difference between
<a href="/html/libvirt-libvirt-host.html#virConnectGetCapabilities">
<code>virConnectGetCapabilities</code>
</a>
and the emulator capabilities API is, the former one aims more on
the host capabilities (e.g. NUMA topology, security models in
effect, etc.) while the latter one specializes on the hypervisor
capabilities.</p>
<p>The main difference between <code
class="docref">virConnectGetCapabilities</code> and the emulator
capabilities API is, the former one aims more on the host capabilities
(e.g. NUMA topology, security models in effect, etc.) while the latter one
specializes on the hypervisor capabilities.</p>
<p>While the <a href="formatcaps.html">Driver Capabilities</a> provides the
host capabilities (e.g NUMA topology, security models in effect, etc.), the
@@ -44,7 +41,7 @@
1.2.7</span>):</p>
<pre>
<a href="/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities">virConnectGetDomainCapabilities</a>
<code class="docref">virConnectGetDomainCapabilities</code>
</pre>
<p>The root element that emulator capability XML document starts with has

View File

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

View File

@@ -122,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
@@ -183,26 +183,6 @@
link. So far, the whole element is just for output,
not setting.
</dd>
<dt><code>feature</code></dt>
<dd>If present, the hw offloads supported by this network
interface. Possible features are:
<dl>
<dt><code>rx</code></dt><dd>rx-checksumming</dd>
<dt><code>tx</code></dt><dd>tx-checksumming</dd>
<dt><code>sg</code></dt><dd>scatter-gather</dd>
<dt><code>tso</code></dt><dd>tcp-segmentation-offload</dd>
<dt><code>ufo</code></dt><dd>udp-fragmentation-offload</dd>
<dt><code>gso</code></dt><dd>generic-segmentation-offload</dd>
<dt><code>gro</code></dt><dd>generic-receive-offload</dd>
<dt><code>lro</code></dt><dd>large-receive-offload</dd>
<dt><code>rxvlan</code></dt><dd>rx-vlan-offload</dd>
<dt><code>txvlan</code></dt><dd>tx-vlan-offload</dd>
<dt><code>ntuple</code></dt><dd>ntuple-filters</dd>
<dt><code>rxhash</code></dt><dd>receive-hashing</dd>
<dt><code>rdma</code></dt><dd>remote-direct-memory-access</dd>
<dt><code>txudptnl</code></dt><dd>tx-udp-tunnel-segmentation</dd>
</dl>
</dd>
<dt><code>capability</code></dt>
<dd>A network protocol exposed by the device, where the
attribute <code>type</code> can be "80203" for IEEE

View File

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

View File

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

View File

@@ -78,9 +78,9 @@
...
&lt;source&gt;
&lt;host name="iscsi.example.com"/&gt;
&lt;device path="iqn.2013-06.com.example:iscsi-pool"/&gt;
&lt;device path="demo-target"/&gt;
&lt;auth type='chap' username='myname'&gt;
&lt;secret usage='mycluster_myname'/&gt;
&lt;secret type='iscsi' usage='mycluster_myname'/&gt;
&lt;/auth&gt;
&lt;vendor name="Acme"/&gt;
&lt;product name="model"/&gt;
@@ -118,20 +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 single 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></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
@@ -162,41 +157,16 @@
compatibility, this attribute is optional <b>only</b> for the
"scsi_host" adapter, but is mandatory for the "fc_host" adapter.
<span class="since">Since 1.0.5</span>
A "fc_host" capable scsi_hostN can be determined by using
<code>virsh nodedev-list --cap fc_host</code>.
<span class="since">Since 1.2.8</span>
<p>
Note: Regardless of whether a "scsi_host" adapter type is defined
using a <code>name</code> or a <code>parentaddr</code>, it
should refer to a real scsi_host adapter as found through a
<code>virsh nodedev-list scsi_host</code> and <code>virsh
nodedev-dumpxml scsi_hostN</code> on one of the scsi_host's
displayed. It should not refer to a "fc_host" capable scsi_hostN
nor should it refer to the vHBA created for some "fc_host"
adapter. For a vHBA the <code>nodedev-dumpxml</code>
output parent setting will be the "fc_host" capable scsi_hostN
value. Additionally, do not refer to an iSCSI scsi_hostN for the
"scsi_host" source. An iSCSI scsi_hostN's
<code>nodedev-dumpxml</code> output parent field is generally
"computer". This is a libvirt created parent value indicating
no parent was defined for the node device.
</p>
</dd>
</dl>
<dl>
<dt><code>wwnn</code> and <code>wwpn</code></dt>
<dt><code>wwwn</code> and <code>wwpn</code></dt>
<dd>The "World Wide Node Name" (<code>wwnn</code>) and "World Wide
Port Name" (<code>wwpn</code>) are used by the "fc_host" adapter
to uniquely identify the device in the Fibre Channel storage fabric
(the device can be either a HBA or vHBA). Both wwnn and wwpn should
be specified. Use the command 'virsh nodedev-dumpxml' to determine
how to set the values for the wwnn/wwpn of a (v)HBA. The wwnn and
wwpn have very specific numerical format requirements based on the
hypervisor being used, thus care should be taken if you decide to
generate your own to follow the standards; otherwise, the pool
will fail to start with an opaque error message indicating failure
to write to the vport_create file during vport create/delete due
to "No such file or directory".
how to set the values for the wwnn/wwpn of a (v)HBA.
<span class="since">Since 1.0.4</span>
</dd>
</dl>
@@ -206,32 +176,9 @@
parent scsi_host device defined in the
<a href="formatnode.html">Node Device</a> database as the
<a href="http://wiki.libvirt.org/page/NPIV_in_libvirt">NPIV</a>
virtual Host Bus Adapter (vHBA). The value provided must be
a vport capable scsi_host. The value is not the scsi_host of
the vHBA created by 'virsh nodedev-create', rather it is
the parent of that vHBA. If the value is not provided, libvirt
will determine the parent based either finding the wwnn,wwpn
defined for an existing scsi_host or by creating a vHBA. Providing
the parent attribute is also useful for the duplicate pool
definition checks. This is more important in environments where
both the "fc_host" and "scsi_host" source adapter pools are being
used in order to ensure a new definition doesn't duplicate using
the scsi_hostN of some existing storage pool.
virtual Host Bus Adapter (vHBA).
<span class="since">Since 1.0.4</span>
</dd>
<dt><code>managed</code></dt>
<dd>An optional attribute to instruct the SCSI storage backend to
manage destroying the vHBA when the pool is destroyed. For
configurations that do not provide an already created vHBA
from a 'virsh nodedev-create', libvirt will set this property
to "yes". For configurations that have already created a vHBA
via 'virsh nodedev-create' and are using the wwnn/wwpn from
that vHBA and optionally the scsi_host parent, setting this
attribute to "yes" will allow libvirt to destroy the node device
when the pool is destroyed. If this attribute is set to "no" or
not defined in the XML, then libvirt will not destroy the vHBA.
<span class="since">Since 1.2.11</span>
</dd>
</dl>
<dl>
<dt><code>parentaddr</code></dt>
@@ -297,15 +244,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
@@ -392,36 +331,26 @@
<dl>
<dt><code>path</code></dt>
<dd>Provides the location at which the pool will be mapped into
the local filesystem namespace, as an absolute path. For a
filesystem/directory based pool it will be a fully qualified name of
the directory in which volumes will be created. For device based pools
it will be a fully qualified name of the directory in which
the local filesystem namespace. For a filesystem/directory based
pool it will be the name of the directory in which volumes will
be created. For device based pools it will be the name of the directory in which
devices nodes exist. For the latter <code>/dev/</code> may seem
like the logical choice, however, devices nodes there are not
guaranteed stable across reboots, since they are allocated on
demand. It is preferable to use a stable location such as one
of the <code>/dev/disk/by-{path|id|uuid|label}</code> locations.
For a Multipath pool (type <code>mpath</code>), the provided
value is ignored and the default value of "/dev/mapper" is used.
of the <code>/dev/disk/by-{path,id,uuid,label</code> locations.
<span class="since">Since 0.4.1</span>
</dd>
<dt><code>permissions</code></dt>
<dd>This is currently only useful for directory or filesystem based
pools, which are mapped as a directory into the local filesystem
namespace. It provides information about the permissions to use for the
final directory when the pool is built. There are 4 child elements.
The <code>mode</code> element contains the octal permission set.
The <code>mode</code> defaults to 0755 when not provided.
The <code>owner</code> element contains the numeric user ID.
The <code>group</code> element contains the numeric group ID.
If <code>owner</code> or <code>group</code> aren't specified when
creating a directory, the values are inherited from the parent
directory. The <code>label</code> element contains the MAC (eg SELinux)
label string.
final directory when the pool is built. The
<code>mode</code> element contains the octal permission set. The
<code>owner</code> element contains the numeric user ID. The <code>group</code>
element contains the numeric group ID. The <code>label</code> element
contains the MAC (eg SELinux) label string.
<span class="since">Since 0.4.1</span>
For running directory or filesystem based pools, these fields
will be filled with the values used by the existing directory.
<span class="since">Since 1.2.16</span>
</dd>
<dt><code>timestamps</code></dt>
<dd>Provides timing information about the volume. Up to four
@@ -486,13 +415,7 @@
<dl>
<dt><code>name</code></dt>
<dd>Providing a name for the volume which is unique to the pool.
This is mandatory when defining a volume. For a disk pool, the
name must be combination of the <code>source</code> device path
device and next partition number to be created. For example, if
the <code>source</code> device path is /dev/sdb and there are no
partitions on the disk, then the name must be sdb1 with the next
name being sdb2 and so on.
<span class="since">Since 0.4.1</span></dd>
This is mandatory when defining a volume. <span class="since">Since 0.4.1</span></dd>
<dt><code>key</code></dt>
<dd>Providing an identifier for the volume which identifies a
single volume. In some cases it's possible to have two distinct keys
@@ -582,9 +505,7 @@
<span class="since">Since 0.4.1</span></dd>
<dt><code>format</code></dt>
<dd>Provides information about the pool specific volume format.
For disk pools it will provide the partition table format type, but is
not preserved after a pool refresh or libvirtd restart. Use extended
in order to create an extended disk extent partition. For filesystem
For disk pools it will provide the partition type. For filesystem
or directory pools it will provide the file format type, eg cow,
qcow, vmdk, raw. If omitted when creating a volume, the pool's
default format will be used. The actual format is specified via
@@ -595,21 +516,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>
@@ -617,9 +532,8 @@
<code>type='qcow2'</code> volumes. Valid values are <code>0.10</code>
and <code>1.1</code> so far, specifying QEMU version the images should
be compatible with. If the <code>feature</code> element is present,
1.1 is used.
<span class="since">Since 1.1.0</span> If omitted, 0.10 is used.
<span class="since">Since 1.1.2</span>
1.1 is used. If omitted, qemu-img default is used.
<span class="since">Since 1.1.0</span>
</dd>
<dt><code>nocow</code></dt>
<dd>Turn off COW of the newly created volume. So far, this is only valid
@@ -677,8 +591,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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

@@ -10,6 +10,11 @@
<!-- The sitemap.html.in page contains the master navigation structure -->
<xsl:variable name="sitemap" select="document('sitemap.html.in')/html:html/html:body/html:div[@id='sitemap']"/>
<xsl:template match="html:code[@class='docref']" mode="content">
<xsl:variable name="name"><xsl:value-of select="."/></xsl:variable>
<a href="html/libvirt-libvirt.html#{$name}"><code><xsl:value-of select="$name"/></code></a>
</xsl:template>
<xsl:template match="node() | @*" mode="content">
<xsl:copy>
<xsl:apply-templates select="node() | @*" mode="content"/>

View File

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

View File

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

View File

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

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

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

@@ -24,11 +24,6 @@
<ref name="virYesNo"/>
</attribute>
</optional>
<optional>
<attribute name="trustGuestRxFilters">
<ref name="virYesNo"/>
</attribute>
</optional>
<interleave>
<!-- The name of the network, used to refer to it through the API
@@ -65,15 +60,6 @@
</attribute>
</optional>
<optional>
<attribute name="macTableManager">
<choice>
<value>kernel</value>
<value>libvirt</value>
</choice>
</attribute>
</optional>
</element>
</optional>
@@ -211,11 +197,6 @@
<ref name="virYesNo"/>
</attribute>
</optional>
<optional>
<attribute name="trustGuestRxFilters">
<ref name="virYesNo"/>
</attribute>
</optional>
<interleave>
<optional>
<ref name="virtualPortProfile"/>
@@ -234,9 +215,6 @@
<optional>
<element name="domain">
<attribute name="name"><ref name="dnsName"/></attribute>
<optional>
<attribute name="localOnly"><ref name="virYesNo"/></attribute>
</optional>
</element>
</optional>
@@ -299,6 +277,17 @@
<optional>
<ref name="vlan"/>
</optional>
<optional>
<element name="link">
<attribute name="state">
<choice>
<value>up</value>
<value>down</value>
</choice>
</attribute>
<empty/>
</element>
</optional>
<!-- <ip> element -->
<zeroOrMore>
@@ -363,7 +352,25 @@
</zeroOrMore>
<!-- <route> element -->
<zeroOrMore>
<ref name="route"/>
<!-- The (static) route element specifies a network address and gateway
address to access that network. Both the network address and
the gateway address must be specified. -->
<element name="route">
<optional>
<attribute name="family"><ref name="addr-family"/></attribute>
</optional>
<attribute name="address"><ref name="ipAddr"/></attribute>
<optional>
<choice>
<attribute name="netmask"><ref name="ipv4Addr"/></attribute>
<attribute name="prefix"><ref name="ipPrefix"/></attribute>
</choice>
</optional>
<attribute name="gateway"><ref name="ipAddr"/></attribute>
<optional>
<attribute name="metric"><ref name="unsignedInt"/></attribute>
</optional>
</element>
</zeroOrMore>
</interleave>
</element>

View File

@@ -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">
@@ -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"/>
@@ -238,26 +224,4 @@
<param name='maxInclusive'>65535</param>
</data>
</define>
<!-- The (static) route element specifies a network address and gateway
address to access that network. Both the network address and
the gateway address must be specified. -->
<define name='route'>
<element name="route">
<optional>
<attribute name="family"><ref name="addr-family"/></attribute>
</optional>
<attribute name="address"><ref name="ipAddr"/></attribute>
<optional>
<choice>
<attribute name="netmask"><ref name="ipv4Addr"/></attribute>
<attribute name="prefix"><ref name="ipPrefix"/></attribute>
</choice>
</optional>
<attribute name="gateway"><ref name="ipAddr"/></attribute>
<optional>
<attribute name="metric"><ref name="unsignedInt"/></attribute>
</optional>
</element>
</define>
</grammar>

View File

@@ -274,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>
@@ -481,6 +467,12 @@
</element>
</define>
<define name='hexuint'>
<data type='string'>
<param name="pattern">(0x)?[0-9a-f]+</param>
</data>
</define>
<define name='mac'>
<data type='string'>
<param name="pattern">([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}</param>

View File

@@ -90,7 +90,6 @@
<ref name="common-ipv6-attributes-p1"/>
<ref name="common-port-attributes"/>
<ref name="ip-attributes"/>
<ref name="icmp-attribute-ranges"/>
<ref name="comment-attribute"/>
</element>
</zeroOrMore>
@@ -589,31 +588,6 @@
</interleave>
</define>
<define name="icmp-attribute-ranges">
<interleave>
<optional>
<attribute name="type">
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
<attribute name="typeend">
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
<attribute name="code">
<ref name="uint8range"/>
</attribute>
</optional>
<optional>
<attribute name="codeend">
<ref name="uint8range"/>
</attribute>
</optional>
</interleave>
</define>
<define name="mac-attributes">
<interleave>
<optional>

View File

@@ -75,7 +75,6 @@
<value>vdi</value>
<value>fat</value>
<value>vhd</value>
<value>ploop</value>
<ref name='storageFormatBacking'/>
</choice>
</define>
@@ -94,39 +93,4 @@
<notAllowed/>
</define>
<define name='permissions'>
<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>
<optional>
<element name='label'>
<text/>
</element>
</optional>
</interleave>
</element>
</optional>
</define>
</grammar>

View File

@@ -3,7 +3,6 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<include href='basictypes.rng'/>
<include href='storagecommon.rng'/>
<start>
<ref name='pool'/>
</start>
@@ -225,6 +224,35 @@
</interleave>
</define>
<define name='permissions'>
<optional>
<element name='permissions'>
<interleave>
<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/>
</element>
</optional>
</interleave>
</element>
</optional>
</define>
<define name='target'>
<element name='target'>
<interleave>
@@ -314,7 +342,7 @@
</element>
</define>
<define name='sourceinfonetrelativepath'>
<define name='sourceinfonetfsgluster'>
<element name='dir'>
<attribute name='path'>
<ref name='dirPath'/>
@@ -400,6 +428,7 @@
<choice>
<value>auto</value>
<value>nfs</value>
<value>cifs</value>
</choice>
</attribute>
</element>
@@ -412,7 +441,7 @@
<element name='format'>
<attribute name='type'>
<choice>
<value>unknown</value>
<value>none</value>
<value>dos</value>
<value>dvh</value>
<value>gpt</value>
@@ -487,13 +516,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

@@ -59,6 +59,29 @@
</interleave>
</define>
<define name='permissions'>
<optional>
<element name='permissions'>
<interleave>
<element name='mode'>
<ref name='octalMode'/>
</element>
<element name='owner'>
<ref name='unsignedInt'/>
</element>
<element name='group'>
<ref name='unsignedInt'/>
</element>
<optional>
<element name='label'>
<text/>
</element>
</optional>
</interleave>
</element>
</optional>
</define>
<define name='timestamps'>
<optional>
<element name='timestamps'>

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

@@ -101,16 +101,6 @@
<li>
<a href="locking.html">Disk locking</a>
<span>Ensuring exclusive guest access to disks</span>
<ul>
<li>
<a href="locking-lockd.html">virtlockd</a>
<span>virtlockd lock manager plugin</span>
</li>
<li>
<a href="locking-sanlock.html">Sanlock</a>
<span>Sanlock lock manager plugin</span>
</li>
</ul>
</li>
<li>
<a href="cgroups.html">CGroups</a>
@@ -259,8 +249,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>
@@ -301,52 +291,12 @@
-->
<ul>
<li>
<a href="html/libvirt-libvirt-domain.html">Domain</a>
<span>domain APIs for the libvirt library</span>
<a href="html/libvirt-libvirt.html">libvirt</a>
<span>core interfaces for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-domain-snapshot.html">Domain snapshot</a>
<span>domain snapshot APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-virterror.html">Error</a>
<span>error handling APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-event.html">Event</a>
<span>event APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-host.html">Host</a>
<span>host APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-interface.html">Interface</a>
<span>interface APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-network.html">Network</a>
<span>network APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-nodedev.html">Node device</a>
<span>node device APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-nwfilter.html">Network filter</a>
<span>network filter APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-secret.html">Secret</a>
<span>secret APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-storage.html">Storage</a>
<span>storage APIs for the libvirt library</span>
</li>
<li>
<a href="html/libvirt-libvirt-stream.html">Stream</a>
<span>stream APIs for the libvirt library</span>
<a href="html/libvirt-virterror.html">virterror</a>
<span>error handling interfaces for the libvirt library</span>
</li>
<li>
<a href="hvsupport.html">Driver support</a>

View File

@@ -291,8 +291,7 @@
the <a href="#StorageBackendGluster">gluster</a> pool.)
</li>
<li>
<code>cifs</code> - use the SMB (samba) or CIFS file system.
The mount will use "-o guest" to mount the directory anonymously.
<code>cifs</code> - use the SMB (samba) or CIFS file system
</li>
</ul>
@@ -347,7 +346,6 @@
on the size and placement of volumes. The 'free extents'
information will detail the regions which are available for creating
new volumes. A volume cannot span across 2 different free extents.
It will default to using <code>msdos</code> as the pool source format.
</p>
<h3>Example pool input</h3>
@@ -440,12 +438,6 @@
to use <code>/dev/disk/by-path</code> or <code>/dev/disk/by-id</code>
for the target path. These provide persistent stable naming for LUNs
</p>
<p>
The libvirt iSCSI storage backend does not resolve the provided
host name or IP address when finding the available target IQN's
on the host; therefore, defining two pools to use the same IQN
on the same host will fail the duplicate source pool checks.
</p>
<h3>Example pool input</h3>
<pre>
@@ -453,7 +445,7 @@
&lt;name&gt;virtimages&lt;/name&gt;
&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;/source&gt;
&lt;target&gt;
&lt;path&gt;/dev/disk/by-path&lt;/path&gt;
@@ -505,8 +497,7 @@
<h2><a name="StorageBackendMultipath">Multipath pools</a></h2>
<p>
This provides a pool that contains all the multipath devices on the
host. Therefore, only one Multipath pool may be configured per host.
Volume creating is not supported via the libvirt APIs.
host. Volume creating is not supported via the libvirt APIs.
The target element is actually ignored, but one is required to appease
the libvirt XML parser.<br/>
<br/>
@@ -560,12 +551,12 @@
&lt;name&gt;myrbdpool&lt;/name&gt;
&lt;source&gt;
&lt;name&gt;rbdpool&lt;/name&gt;
&lt;host name='1.2.3.4' port='6789'/&gt;
&lt;host name='my.ceph.monitor' port='6789'/&gt;
&lt;host name='third.ceph.monitor' port='6789'/&gt;
&lt;auth username='admin' type='ceph'&gt;
&lt;secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/&gt;
&lt;/auth&gt;
&lt;host name='1.2.3.4' port='6789'/&gt;
&lt;host name='my.ceph.monitor' port='6789'/&gt;
&lt;host name='third.ceph.monitor' port='6789'/&gt;
&lt;auth username='admin' type='ceph'&gt;
&lt;secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/&gt;
&lt;/auth&gt;
&lt;/source&gt;
&lt;/pool&gt;</pre>

View File

@@ -19,15 +19,7 @@ documents libvirt URIs.
<h2><a name="URI_libvirt">Specifying URIs to libvirt</a></h2>
<p>
The URI is passed as the <code>name</code> parameter to
<a href="html/libvirt-libvirt-host.html#virConnectOpen">
<code>virConnectOpen</code>
</a>
or
<a href="html/libvirt-libvirt-host.html#virConnectOpenReadOnly">
<code>virConnectOpenReadOnly</code>
</a>.
For example:
The URI is passed as the <code>name</code> parameter to <a href="html/libvirt-libvirt.html#virConnectOpen"><code>virConnectOpen</code></a> or <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly"><code>virConnectOpenReadOnly</code></a>. For example:
</p>
<pre>
virConnectPtr conn = virConnectOpenReadOnly (<b>"test:///default"</b>);
@@ -299,7 +291,7 @@ Notes:
<ol>
<li> The HTTP client does not fully support IPv6. </li>
<li> Many features do not work as expected across HTTP connections, in
particular, <a href="html/libvirt-libvirt-host.html#virConnectGetCapabilities">virConnectGetCapabilities</a>.
particular, <a href="html/libvirt-libvirt.html#virConnectGetCapabilities">virConnectGetCapabilities</a>.
The <a href="remote.html">remote support</a> however does work
correctly. </li>
<li> XenD's new-style XMLRPC interface is not supported by

View File

@@ -59,7 +59,6 @@
# access to firmware's etc
/usr/share/kvm/** r,
/usr/share/qemu/** r,
/usr/share/qemu-kvm/** r,
/usr/share/bochs/** r,
/usr/share/openbios/** r,
/usr/share/openhackware/** r,
@@ -74,7 +73,6 @@
# the various binaries
/usr/bin/kvm rmix,
/usr/bin/qemu rmix,
/usr/bin/qemu-kvm rmix,
/usr/bin/qemu-system-arm rmix,
/usr/bin/qemu-system-cris rmix,
/usr/bin/qemu-system-i386 rmix,
@@ -113,17 +111,13 @@
/usr/bin/qemu-sparc32plus rmix,
/usr/bin/qemu-sparc64 rmix,
/usr/bin/qemu-x86_64 rmix,
/usr/{lib,lib64}/qemu/block-curl.so mr,
/usr/{lib,lib64}/qemu/block-rbd.so mr,
/usr/lib/qemu/block-curl.so mr,
# for save and resume
/bin/dash rmix,
/bin/dd rmix,
/bin/cat rmix,
# for restore
/bin/bash rmix,
# for usb access
/dev/bus/usb/ r,
/etc/udev/udev.conf r,

View File

@@ -1,7 +1,7 @@
# Last Modified: Mon Apr 5 15:10:27 2010
#include <tunables/global>
profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
/usr/lib/libvirt/virt-aa-helper {
#include <abstractions/base>
# needed for searching directories
@@ -20,7 +20,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
/sys/devices/ r,
/sys/devices/** r,
/usr/{lib,lib64}/libvirt/virt-aa-helper mr,
/usr/lib/libvirt/virt-aa-helper mr,
/sbin/apparmor_parser Ux,
/etc/apparmor.d/libvirt/* r,

View File

@@ -13,7 +13,6 @@
capability sys_admin,
capability sys_module,
capability sys_ptrace,
capability sys_pacct,
capability sys_nice,
capability sys_chroot,
capability setuid,
@@ -25,7 +24,6 @@
capability mknod,
capability fsetid,
capability audit_write,
capability ipc_lock,
# Needed for vfio
capability sys_resource,
@@ -35,7 +33,6 @@
network inet6 stream,
network inet6 dgram,
network packet dgram,
network packet raw,
# Very lenient profile for libvirtd since we want to first focus on confining
# the guests. Guests will have a very restricted profile.
@@ -47,8 +44,7 @@
/usr/bin/* PUx,
/usr/sbin/* PUx,
/lib/udev/scsi_id PUx,
/usr/{lib,lib64}/xen-common/bin/xen-toolstack PUx,
/usr/{lib,lib64}/xen/bin/* Ux,
/usr/lib/xen-common/bin/xen-toolstack PUx,
# force the use of virt-aa-helper
audit deny /sbin/apparmor_parser rwxl,
@@ -57,9 +53,7 @@
audit deny /sys/kernel/security/apparmor/matching rwxl,
audit deny /sys/kernel/security/apparmor/.* rwxl,
/sys/kernel/security/apparmor/profiles r,
/usr/{lib,lib64}/libvirt/* PUxr,
/usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
/usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
/usr/lib/libvirt/* PUxr,
/etc/libvirt/hooks/** rmix,
/etc/xen/scripts/** rmix,

View File

@@ -346,8 +346,8 @@ do_top(virConnectPtr conn,
ret = 0;
cleanup:
virTypedParamsFree(now_params, nparams * max_id);
virTypedParamsFree(then_params, nparams * max_id);
virTypedParamsFree(now_params, now_nparams * max_id);
virTypedParamsFree(then_params, then_nparams * max_id);
if (dom)
virDomainFree(dom);
return ret;

View File

@@ -108,14 +108,10 @@ static const char *eventDetailToString(int event, int detail) {
ret = "Added";
else if (detail == VIR_DOMAIN_EVENT_DEFINED_UPDATED)
ret = "Updated";
else if (detail == VIR_DOMAIN_EVENT_DEFINED_RENAMED)
ret = "Renamed";
break;
case VIR_DOMAIN_EVENT_UNDEFINED:
if (detail == VIR_DOMAIN_EVENT_UNDEFINED_REMOVED)
ret = "Removed";
else if (detail == VIR_DOMAIN_EVENT_UNDEFINED_RENAMED)
ret = "Renamed";
break;
case VIR_DOMAIN_EVENT_STARTED:
switch ((virDomainEventStartedDetailType) detail) {
@@ -248,47 +244,6 @@ networkEventToString(int event)
return ret;
}
static const char *
guestAgentLifecycleEventStateToString(int event)
{
const char *ret = "";
switch ((virConnectDomainEventAgentLifecycleState) event) {
case VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED:
ret = "Disconnected";
break;
case VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_CONNECTED:
ret = "Connected";
break;
}
return ret;
}
static const char *
guestAgentLifecycleEventReasonToString(int event)
{
const char *ret = "";
switch ((virConnectDomainEventAgentLifecycleReason) event) {
case VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_UNKNOWN:
ret = "Unknown";
break;
case VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTED:
ret = "Domain started";
break;
case VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_REASON_CHANNEL:
ret = "Channel event";
break;
}
return ret;
}
static int myDomainEventCallback1(virConnectPtr conn ATTRIBUTE_UNUSED,
virDomainPtr dom,
int event,
@@ -554,32 +509,6 @@ myDomainEventTunableCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
return 0;
}
static int
myDomainEventAgentLifecycleCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
virDomainPtr dom,
int state,
int reason,
void *opaque ATTRIBUTE_UNUSED)
{
printf("%s EVENT: Domain %s(%d) guest agent state changed: %s reason: %s\n",
__func__, virDomainGetName(dom), virDomainGetID(dom),
guestAgentLifecycleEventStateToString(state),
guestAgentLifecycleEventReasonToString(reason));
return 0;
}
static int
myDomainEventDeviceAddedCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
virDomainPtr dom,
const char *devAlias,
void *opaque ATTRIBUTE_UNUSED)
{
printf("%s EVENT: Domain %s(%d) device added: %s\n",
__func__, virDomainGetName(dom), virDomainGetID(dom), devAlias);
return 0;
}
static void myFreeFunc(void *opaque)
{
char *str = opaque;
@@ -622,8 +551,6 @@ int main(int argc, char **argv)
int callback15ret = -1;
int callback16ret = -1;
int callback17ret = -1;
int callback18ret = -1;
int callback19ret = -1;
struct sigaction action_stop;
memset(&action_stop, 0, sizeof(action_stop));
@@ -747,16 +674,6 @@ int main(int argc, char **argv)
VIR_DOMAIN_EVENT_ID_TUNABLE,
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventTunableCallback),
strdup("tunable"), myFreeFunc);
callback18ret = virConnectDomainEventRegisterAny(dconn,
NULL,
VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE,
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventAgentLifecycleCallback),
strdup("guest agent lifecycle"), myFreeFunc);
callback19ret = virConnectDomainEventRegisterAny(dconn,
NULL,
VIR_DOMAIN_EVENT_ID_DEVICE_ADDED,
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventDeviceAddedCallback),
strdup("device added"), myFreeFunc);
if ((callback1ret != -1) &&
(callback2ret != -1) &&
@@ -773,9 +690,7 @@ int main(int argc, char **argv)
(callback14ret != -1) &&
(callback15ret != -1) &&
(callback16ret != -1) &&
(callback17ret != -1) &&
(callback18ret != -1) &&
(callback19ret != -1)) {
(callback17ret != -1)) {
if (virConnectSetKeepAlive(dconn, 5, 3) < 0) {
virErrorPtr err = virGetLastError();
fprintf(stderr, "Failed to start keepalive protocol: %s\n",
@@ -808,9 +723,6 @@ int main(int argc, char **argv)
virConnectDomainEventDeregisterAny(dconn, callback15ret);
virConnectNetworkEventDeregisterAny(dconn, callback16ret);
virConnectDomainEventDeregisterAny(dconn, callback17ret);
virConnectDomainEventDeregisterAny(dconn, callback18ret);
virConnectDomainEventDeregisterAny(dconn, callback19ret);
if (callback8ret != -1)
virConnectDomainEventDeregisterAny(dconn, callback8ret);
}
@@ -818,8 +730,9 @@ int main(int argc, char **argv)
virConnectUnregisterCloseCallback(dconn, connectClose);
VIR_DEBUG("Closing connection");
if (dconn && virConnectClose(dconn) < 0)
if (dconn && virConnectClose(dconn) < 0) {
printf("error closing\n");
}
printf("done\n");
return 0;

View File

@@ -132,8 +132,9 @@ showDomains(virConnectPtr conn)
goto out;
}
if (numNames > 0)
if (numNames > 0) {
printf("Inactive domains:\n");
}
for (i = 0; i < numNames; i++) {
printf(" %s\n", *(nameList + i));
@@ -180,8 +181,9 @@ authCallback(virConnectCredentialPtr cred, unsigned int ncred, void *cbdata)
case VIR_CRED_AUTHNAME:
cred[i].result = strdup(authData->username);
if (cred[i].result == NULL)
if (cred[i].result == NULL) {
return -1;
}
cred[i].resultlen = strlen(cred[i].result);
break;
@@ -189,8 +191,9 @@ authCallback(virConnectCredentialPtr cred, unsigned int ncred, void *cbdata)
case VIR_CRED_PASSPHRASE:
cred[i].result = strdup(authData->password);
if (cred[i].result == NULL)
if (cred[i].result == NULL) {
return -1;
}
cred[i].resultlen = strlen(cred[i].result);
break;

View File

@@ -1,17 +0,0 @@
## Copyright (C) 2015 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/>.
EXTRA_DIST = libvirt-acl.rules

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