1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-09-26 01:44:56 +03:00

Compare commits

..

105 Commits

Author SHA1 Message Date
Cole Robinson
1ab886e4fa Prep for release 1.2.18.2 2015-12-23 19:14:59 -05:00
Daniel Veillard
9528a72494 Fix a trailing space in spec file
(cherry picked from commit bd311d3a8a)
2015-12-23 18:34:25 -05:00
Ján Tomko
3e6e96f09a virsh: report errors for empty strings
Several callers were using vshCommandOptString without setting an error.
Use vshCommandOptStringReq which sets the error.

https://bugzilla.redhat.com/show_bug.cgi?id=1281707
(cherry picked from commit 45138725cf)
2015-12-23 18:31:03 -05:00
Ján Tomko
7b977a87a7 bridge: check for invalid MAC in networkGetDHCPLeases
Instead of comparing garbage strings against real MAC addresses,
introduce an error mesage for unparsable ones:

$ virsh net-dhcp-leases default  --mac t12
error: Failed to get leases info for default
error: invalid MAC address: t12

https://bugzilla.redhat.com/show_bug.cgi?id=1261432
(cherry picked from commit 1e6d87bdfc)
2015-12-23 18:31:03 -05:00
Jiri Denemark
c0063662e2 Enhance documentation of virDomainDetachDevice
Link it to virDomainDetachDeviceFlags.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit 63fd27cfa3)
2015-12-23 18:31:03 -05:00
Guido Günther
1ba74670cb apparmor: add missing qemu binaries
This adds the qemu binaries as of 1.2.4 in Debian. It also removes a
duplicate sparc64 entry.

(cherry picked from commit d8ca0cbd4b)
2015-12-23 18:31:03 -05:00
Luyao Huang
d1f13a90a5 qemu: Use live autoNodeset when numatune placement is auto
https://bugzilla.redhat.com/show_bug.cgi?id=1270715

Commit id '9deb96f' removed the code to fetch the nodeset from the
CpusetMems cgroup for a running vm in favor of using the return from
virDomainNumatuneFormatNodeset introduced by commit id '43b67f2e7'.
However, that API will return the value of the passed 'auto_nodeset'
when placement is VIR_DOMAIN_NUMATUNE_PLACEMENT_AUTO, which happens
to be NULL.

Since commit id 'c74d58ad' started using priv->autoNodeset in order
to manage the auto placement value during qemuProcessStart, it should
be passed along in order to return the correct value if the domain
requests the auto placement.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit 4eac55238f)
2015-12-23 18:31:03 -05:00
Shivaprasad G Bhat
76e51193e3 Close the source fd if the destination qemu exits during tunnelled migration
Tunnelled migration can hang if the destination qemu exits despite all the
ABI checks. This happens whenever the destination qemu exits before the
complete transfer is noticed by source qemu. The savevm state checks at
runtime can fail at destination and cause qemu to error out.
The source qemu cant notice it as the EPIPE is not propogated to it.
The qemuMigrationIOFunc() notices the stream being broken from virStreamSend()
and it cleans up the stream alone. The qemuMigrationWaitForCompletion() would
never get to 100% transfer completion.
The qemuMigrationWaitForCompletion() never breaks out as well since
the ssh connection to destination is healthy, and the source qemu also thinks
the migration is ongoing as the Fd to which it transfers, is never
closed or broken. So, the migration will hang forever. Even Ctrl-C on the
virsh migrate wouldn't be honoured. Close the source side FD when there is
an error in the stream. That way, the source qemu updates itself and
qemuMigrationWaitForCompletion() notices the failure.

Close the FD for all kinds of errors to be sure. The error message is not
copied for EPIPE so that the destination error is copied instead later.

Note:
Reproducible with repeated migrations between Power hosts running in different
subcores-per-core modes.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
(cherry picked from commit b39a1fe165)
2015-12-23 18:21:54 -05:00
John Ferlan
5c5ec4ca9e storage: Fix incorrect format for <disk> <auth> XML
https://bugzilla.redhat.com/show_bug.cgi?id=1256999

After creating a copy of the 'authdef' in a pool -> disk translation,
unconditionally clear the 'authType' in the resulting disk auth def
structure since that's used for a storage pool and not a disk.  This
ensures virStorageAuthDefFormat will properly format the <auth> XML
for a <disk> (e.g. it won't have a <auth type='%s'.../>).

(cherry picked from commit 5275c0f4a1)
2015-12-23 18:20:45 -05:00
Daniel P. Berrange
07518f77bd virt-host-validate: distinguish exists vs accessible for devices
Currently we just check that various devices are accessible.
This leads to inaccurate errors reported for /dev/kvm and
/dev/vhost-net if they exist but an unprivileged user lacks
access. Switch existing checks to look for file existance,
and add a separate check for accessibility of /dev/kvm
since some distros don't grant users access by default.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit fd6d506c50)
2015-12-23 18:20:31 -05:00
Cole Robinson
26295a0ea7 spec: Delete .git after applying patches
I'm hitting this little annoyance in fedora's package repo:

$ fedpkg prep
Downloading libvirt-1.2.20.tar.gz
...
+ /usr/bin/gzip -dc /home/crobinso/src/fedora/libvirt/libvirt-1.2.20.tar.gz
$ git clean -xdf
Removing libvirt-1.2.20.tar.gz
Skipping repository libvirt-1.2.20/

We git-ify the libvirt directory as part of applying patches in the spec
file, but 'git clean' will ignore subfolders that appear to be standalone
git repos.

Let's just delete the .git directory after we're done with it.

(cherry picked from commit 62ff210e5d)
2015-12-23 18:19:15 -05:00
Cédric Bosdonnat
079a8dc4e6 apparmor: differentiate between error and unconfined profiles
profile_status function was not making any difference between error
cases and unconfined profiles. The problem with this approach is that
dominfo was throwing an error on unconfined domains.

(cherry picked from commit a1bdf04b27)
2015-12-23 18:18:25 -05:00
John Ferlan
eb9aaa26a8 storage: Adjust calculation of alloc/capacity for disk
https://bugzilla.redhat.com/show_bug.cgi?id=1247987

Calculation of the extended and logical partition values for the disk
pool is complex. As the bz points out an extended partition should have
it's allocation initialized to 0 (zero) and keep the capacity as the size
dictated by the extents read.  Then for each logical partition found,
adjust the allocation of the extended partition.

Finally, previous logic tried to avoid recalculating things if a logical
partition was deleted; however, since we now have special logic to handle
the allocation of the extended partition, just make life easier by reading
the partition table again - rather than doing the reverse adjustment.

(cherry picked from commit 1895b42114)
2015-12-23 18:17:49 -05:00
Andrea Bolognani
770ffbf857 qemu: Add conditions for qemu-kvm use on ppc64
qemu-kvm can be used to run ppc64 guests on ppc64le hosts and vice
versa, since the hardware is actually the same and the endianness
is chosen by the guest kernel.

Up until now, however, libvirt didn't allow the use of qemu-kvm
to run guests if their endianness didn't match the host's.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1267882
(cherry picked from commit 938368f838)
2015-12-23 18:17:06 -05:00
Peter Krempa
f3ac5d6a6c rpc: libssh2: Fix regression in ssh host key verification
Commit 792f81a40e caused a regression in the libssh2 host key
verification code by changing the variable type of 'i' to unsigned.
Since one of the loops used -1 as a special value if the asking
callback was found the conversion made a subsequent test always fail.

The bug was stealth enough to pass review, compilers and coverity.

Refactor the condition to avoid problems.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1047861
(cherry picked from commit 9869f24d08)
2015-12-23 18:16:55 -05:00
Peter Krempa
a6584eb6f7 rpc: libssh2: Add more debugging info
(cherry picked from commit 387c316e11)
2015-12-23 18:16:51 -05:00
Ján Tomko
9a51c50048 Update pool allocation with new values on volume creation
Since commit e0139e3, we update the pool allocation with
the user-provided allocation values.

For qcow2, the allocation is ignored for volume building,
but we still subtracted it from pool's allocation.
This can result in interesting values if the user-provided
allocation is large enough:

Capacity:       104.71 GiB
Allocation:     109.13 GiB
Available:      16.00 EiB

We already do a VolRefresh on volume creation. Also refresh
the volume after creating and use the new value to update the pool.

https://bugzilla.redhat.com/show_bug.cgi?id=1163091
(cherry picked from commit 56a4e9cb61)
2015-12-23 18:15:44 -05:00
Guido Günther
5741803ceb Use daemon log facility for journald
otherwise messages end up in /var/log/kern.log if journald forwards to
syslog.

Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799633
(cherry picked from commit fd00f0e6c7)
2015-12-23 18:15:31 -05:00
Michal Privoznik
64be645161 virDomainCreateXML: Make domain definition transient
https://bugzilla.redhat.com/show_bug.cgi?id=871452

So, you want to create a domain from XML. The domain already
exists in libvirt's database of domains. It's okay, because name
and UUID matches. However, on domain startup, internal
representation of the domain is overwritten with your XML even
though we claim that the XML you've provided is a transient one.
The bug is to be found across nearly all the drivers.
Le sigh.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit c99b8cec82)
2015-12-23 18:14:43 -05:00
Michal Privoznik
e89b42ccc6 virDomainCreateXML: Don't remove persistent domains on error
https://bugzilla.redhat.com/show_bug.cgi?id=871452

Okay, so we allow users to 'virsh create' an already existing
domain, providing completely different XML than the one stored in
Libvirt. Well, as long as name and UUID matches. However, in some
drivers the code that handles errors unconditionally removes the
domain that failed to start even though the domain might have
been persistent. Fortunately, the domain is removed just from the
internal list of domains and the config file is kept around.

Steps to reproduce:

1) virsh dumpxml $dom > /tmp/dom.xml
2) change XML so that it is still parse-able but won't boot, e.g.
change guest agent path to /foo/bar
3) virsh create /tmp/dom.xml
4) virsh dumpxml $dom
5) Observe "No such domain" error

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 37405b9109)
2015-12-23 18:14:21 -05:00
Peter Krempa
c22a4bb523 qemu: Refresh memory size only on fresh starts
Qemu unfortunately doesn't update internal state right after migration
and so the actual balloon size as returned by 'query-balloon' are
invalid for a while after the CPUs are started after migration. If we'd
refresh our internal state at this point we would report invalid current
memory size until the next balloon event would arrive.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1242940
(cherry picked from commit d7a0386e22)
2015-12-23 18:13:59 -05:00
Jiri Denemark
0099781e80 domain: Fix migratable XML with graphics/@listen
As of commit 6992994, we set graphics/@listen attribute according to the
first listen child element even if that element is of type='network'.
This was done for backward compatibility with applications which only
support the original listen attribute. However, by doing so we broke
migration to older libvirt which tried to check that the listen
attribute matches one of the listen child elements but which did not
take type='network' elements into account.

We are not concerned about compatibility with old applications when
formatting domain XML for migration for two reasons. The XML is consumed
only by libvirtd and the IP address associated with type='network'
listen address on the source host is just useless on the destination
host. Thus, we can safely avoid propagating the type='network' IP
address to graphics/@listen attribute when creating migratable XML.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit c0806dc30b)
2015-12-23 18:02:01 -05:00
Stefan Berger
06f7fec561 tpm: adapt sysfs cancel path for new TPM driver
This patch addresses BZ 1244895.

Adapt the sysfs TPM command cancel path for the TPM driver that
does not use a miscdevice anymore since Linux 4.0. Support old
and new paths and check their availability.

Add a mockup for the test cases to avoid the testing for
availability of the cancel path.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
(cherry picked from commit 5ed7afa9de)
2015-12-23 18:00:07 -05:00
Guido Günther
c46e1a92ce libvirt-guests: Disable shutdown timeout
Since we can't know at service start how many VMs will be running we
can't calculate an apropriate shutdown timeout. So instead of killing
off the service just let it use it's own internal timeout mechanism.

References:
    http://bugs.debian.org/803714
    https://bugzilla.redhat.com/show_bug.cgi?id=1195544

(cherry picked from commit ba08d16d6c)
2015-12-23 17:59:49 -05:00
Martin Kletzander
ac3dbf5a68 systemd: Escape only needed characters for machined
Machine name escaping follows the same rules as serice name escape,
except that '.' and '-' must not be escaped in machine names, due
to a bug in systemd-machined.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 0e0149ce91)
2015-12-23 17:54:51 -05:00
Martin Kletzander
c0fa258b3d systemd: Escape machine name for machined
According to the documentation, CreateMachine accepts only 7bit ASCII
characters in the machinename parameter, so let's make sure we can start
machines with unicode names with systemd.  We already have a function
for that, we just forgot to use it.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit e24eda48cf)
2015-12-23 17:54:46 -05:00
Eric Blake
d035796675 CVE-2015-5313: storage: don't allow '/' in filesystem volume names
The libvirt file system storage driver determines what file to
act on by concatenating the pool location with the volume name.
If a user is able to pick names like "../../../etc/passwd", then
they can escape the bounds of the pool.  For that matter,
virStoragePoolListVolumes() doesn't descend into subdirectories,
so a user really shouldn't use a name with a slash.

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

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

This changes things from:

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

to:

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

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 034e47c338)
2015-12-12 20:18:04 -07:00
Dominik Perpeet
4ee196bf30 docs: event impl. registration before hypervisor connection
Event implementations need to be registered before a connection to the
Hypervisor is opened, otherwise event handling can be impaired (e.g.
delayed messages). This fact is referenced in an e-mail [1], but should
also be noted in the documentation of the registration functions.

[1] https://www.redhat.com/archives/libvirt-users/2014-April/msg00011.html

(cherry picked from commit 9bf1cef737)
2015-10-15 19:53:49 -04:00
Cole Robinson
404e42d3c6 spec: Fix some warnings with latest rpmbuild
$ rpmbuild -ba libvirt.spec
warning: Macro expanded in comment on line 5: # If neither fedora nor rhel was defined, try to guess them from %{dist}

warning: Macro %enable_autotools defined but not used within scope
warning: Macro %client_only defined but not used within scope
...

(cherry picked from commit dae1250b24)
2015-10-06 16:01:15 -04:00
Cole Robinson
ee7a60854b qemu: Fix dynamic_ownership qemu.conf setting
Commit 307fb904 (Sep 10) added a 'privileged' variable when creating
the DAC driver:

@@ -153,6 +157,7 @@ virSecurityManagerNewDAC(const char *virtDriver,
                          bool defaultConfined,
                          bool requireConfined,
                          bool dynamicOwnership,
+                         bool privileged,
                          virSecurityManagerDACChownCallback chownCallback)

But argument order is mixed up at the caller, swapping dynamicOwnership
and privileged values. This corrects the argument order

https://bugzilla.redhat.com/show_bug.cgi?id=1266628
(cherry picked from commit 68572de822)
2015-10-06 15:17:00 -04:00
Cole Robinson
a267bb501b Prep for release 1.2.18.1 2015-09-21 20:54:37 -04:00
David Mansfield
7d2cf48532 test driver: don't unlock pool after freeing it
Invalid read of size 4
    at 0x945CA30: __pthread_mutex_unlock_full (in /lib64/libpthread-2.20.so)
    by 0x4F0404B: virMutexUnlock (virthread.c:94)
    by 0x4F7161B: virStoragePoolObjUnlock (storage_conf.c:2603)
    by 0x4FE0476: testStoragePoolUndefine (test_driver.c:4328)
    by 0x4FCF086: virStoragePoolUndefine (libvirt-storage.c:656)
    by 0x15A7F5: cmdPoolUndefine (virsh-pool.c:1721)
    by 0x12F48D: vshCommandRun (vsh.c:1212)
    by 0x132AA7: main (virsh.c:943)
  Address 0xfda56a0 is 16 bytes inside a block of size 104 free'd
    at 0x4C2BA6C: free (vg_replace_malloc.c:473)
    by 0x4EA5C96: virFree (viralloc.c:582)
    by 0x4F70B69: virStoragePoolObjFree (storage_conf.c:412)
    by 0x4F7167B: virStoragePoolObjRemove (storage_conf.c:437)
    by 0x4FE0468: testStoragePoolUndefine (test_driver.c:4323)
    by 0x4FCF086: virStoragePoolUndefine (libvirt-storage.c:656)
    by 0x15A7F5: cmdPoolUndefine (virsh-pool.c:1721)
    by 0x12F48D: vshCommandRun (vsh.c:1212)
    by 0x132AA7: main (virsh.c:943)

(cherry picked from commit 03cf57a37d)
2015-09-21 20:18:06 -04:00
Chunyan Liu
e60d286b8e libxl: fix AttachDeviceConfig on hostdev type
After attach-device a <hostdev> with --config, new device doesn't
show up in dumpxml and in guest.

To fix that, set dev->data.hostdev = NULL after work so that the
pointer is not freed, since vmdef has the pointer and still need it.

Signed-off-by: Chunyan Liu <cyliu@suse.com>
(cherry picked from commit 56945e1374)
2015-09-21 20:18:06 -04:00
Michal Privoznik
a45823210d security_selinux: Take @privileged into account
https://bugzilla.redhat.com/show_bug.cgi?id=1124841

If running in session mode it may happen that we fail to set
correct SELinux label, but the image may still be readable to
the qemu process. Take this into account.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 00e5b96716)
2015-09-21 20:18:06 -04:00
Guido Günther
eb8382fa5f selinux: fix compile errors
Remove unused variable, tag unused parameter and adjust return type.

introduced by 3f48345f7e

CC     security/libvirt_security_manager_la-security_selinux.lo
security/security_selinux.c: In function 'virSecuritySELinuxDomainSetDirLabel':
security/security_selinux.c:2520:5: error: return makes pointer from integer without a cast [-Werror]
security/security_selinux.c:2514:9: error: unused variable 'ret' [-Werror=unused-variable]
security/security_selinux.c:2509:59: error: unused parameter 'mgr' [-Werror=unused-parameter]

(cherry picked from commit 4d4c90dfd5)
2015-09-21 20:18:06 -04:00
Martin Kletzander
82dce08750 security_selinux: Add SetDirLabel support
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 3f48345f7e)
2015-09-21 20:18:06 -04:00
Martin Kletzander
5290876dbc security: Add virSecurityDomainSetDirLabel
That function can be used for setting security labels on arbitrary
directories.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit f65a2a12f4)
2015-09-21 20:18:05 -04:00
Martin Kletzander
6fb8fbad9f security_selinux: Use proper structure to access socket data
In virSecuritySELinuxSetSecurityChardevLabel() we are labelling unix
socket path, but accessing another structure of the union.  This does
not pose a problem currently as both paths are at the same offset, but
this should be fixed for the future.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 4ac6ce38d3)
2015-09-21 20:18:05 -04:00
Michal Privoznik
9a7a699896 security_selinux: Replace SELinuxSCSICallbackData with proper struct
We have plenty of callbacks in the driver. Some of these
callbacks require more than one argument to be passed. For that
we currently have a data type (struct) per each callback. Well,
so far for only one - SELinuxSCSICallbackData. But lets turn it
into more general name so it can be reused in other callbacks too
instead of each one introducing a new, duplicate data type.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 276c409163)
2015-09-21 20:18:05 -04:00
Michal Privoznik
ee89fc6e7a virSecuritySELinuxSetSecurityAllLabel: drop useless virFileIsSharedFSType
The check is done in virSecuritySELinuxSetFilecon itself. There's
no need to check it again.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 370461d1db)
2015-09-21 20:18:05 -04:00
Michal Privoznik
bb8ebbbc08 virSecurityManager: Track if running as privileged
We may want to do some decisions in drivers based on fact if we
are running as privileged user or not. Propagate this info there.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 307fb9044c)
2015-09-21 20:18:05 -04:00
Peter Krempa
66899258e1 qemu: hotplug: Properly clean up drive backend if frontend hotplug fails
Commit 8125113c added code that should remove the disk backend if the
fronted hotplug failed for any reason. The code had a bug though as it
used the disk string for unplug rather than the backend alias. Fix the
code by pre-creating an alias string and using it instead of the disk
string. In cases where qemu does not support QEMU_CAPS_DEVICE, we ignore
the unplug of the backend since we can't really create an alias in that
case.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1262399
(cherry picked from commit 64c6695f1a)
2015-09-21 20:18:05 -04:00
Daniel P. Berrange
9372343f7c xen: fix race in refresh of config cache
The xenXMConfigCacheRefresh method scans /etc/xen and loads
all config files it finds. It then scans its internal hash
table and purges any (previously) loaded config files whose
refresh timestamp does not match the timestamp recorded at
the start of xenXMConfigCacheRefresh(). There is unfortunately
a subtle flaw in this, because if loading the config files
takes longer than 1 second, some of the config files will
have a refresh timestamp that is 1 or more seconds different
(newer) than is checked for. So we immediately purge a bunch
of valid config files we just loaded.

To avoid this flaw, we must pass the timestamp we record at
the start of xenXMConfigCacheRefresh() into the
xenXMConfigCacheAddFile() method, instead of letting the
latter call time(NULL) again.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 427067f7ed)
2015-09-21 20:18:05 -04:00
Ian Campbell
b84e9ef24b libxl: don't end job for ephemeal domain on start failure
commit 4b53d0d4ac "libxl: don't remove persistent domain on start
failure" cleans up the vm object and sets it to NULL if the vm is not
persistent, however at end job vm (now NULL) is dereferenced via the call to
libxlDomainObjEndJob. Avoid this by skipping "endjob" and going
straight to "cleanup" in this case.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
(cherry picked from commit ee7758f09b)
2015-09-21 20:18:04 -04:00
Luyao Huang
328ad9e678 conf: fix crash when parsing a unordered NUMA <cell/>
https://bugzilla.redhat.com/show_bug.cgi?id=1260846

Introduced by 8fedbbdb, if we parse an unordered NUMA cell, will
get a segfault. This is because of a check for overlapping @cpus
sets we have there. However, since the array to hold guest NUMA
cells is allocated upfront and therefore it contains all zeros,
an out of order cell will break our assumption that cell IDs have
increasing character. At this point we try to access yet NULL
bitmap and therefore segfault.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit 83ae3ee39b)
2015-09-21 20:18:04 -04:00
John Ferlan
e5db3c4df2 qemu: Check virGetLastError return value for migration finish failure
Commit id '2e7cea243' added a check for an error from Finish instead
of 'unexpected error'; however, if for some reason there wasn't an
error, then virGetLastError could return NULL resulting in the
NULL pointer deref to err->domain.

(cherry picked from commit ea3c5f25eb)
2015-09-21 20:18:04 -04:00
Jim Fehlig
0206984abb libxl: don't overwrite error from virNetSocketNewConnectTCP()
Remove redundant error reporting in libxlDomainMigrationPerform().
virNetSocketNewConnectTCP() is perfectly capable of reporting
sensible errors.

(cherry picked from commit 6ce939c247)
2015-09-21 20:18:04 -04:00
Pavel Hrdina
999a873db0 domain-conf: escape string for socket attribute
Commit d091518b tried to escape all strings in produced XML, but missed
this one.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit e92e5ba128)
2015-09-21 20:18:04 -04:00
Michal Privoznik
d7eb40d779 src: Check for symbols ordering in ADMIN_SYM_FILES
Like we are checking for the correct order in SYM_FILES, we
should do the same for ADMIN_SYM_FILES.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit a0d2ceb32f)
2015-09-21 20:18:04 -04:00
Michal Privoznik
e2b6bd5032 src: Cleanup libvirt_admin.syms
It's a generated file, so after 'distclean' it should be gone.
But it isn't yet.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 28fa50d226)
2015-09-21 20:18:04 -04:00
Michal Privoznik
00cf7e08e7 src: Check libvirt_admin.syms for exported symbols
We have this check rule in src/Makefile: check-symfile that
should check if all symbols we wanted to export are exported.
Moreover, if we are not exporting something more. Do the same
with libvirt_admin.syms.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 74f11dd25b)
2015-09-21 20:18:03 -04:00
Laine Stump
b64d62c6b8 util: fallback to ioctl(SIOCBRDELBR) if netlink RTM_DELLINK fails
commit 09778e09 switched from using ioctl(SIOCBRDELBR) for bridge
device deletion to using a netlink RTM_DELLINK message, which is the
more modern way to delete a bridge (and also doesn't require the
bridge to be ~IFF_UP to succeed). However, although older kernels
(e.g. 2.6.32, in RHEL6/CentOS6) support deleting *some* link types
with RTM_NEWLINK, they don't support deleting bridges, and there is no
compile-time way to figure this out.

This patch moves the body of the SIOCBRDELBR version of
virNetDevBridgeDelete() into a static function, calls the new function
from the original, and also calls the new function from the
RTM_DELLINK version if the RTM_DELLINK message generates an EOPNOTSUPP
error. Since RTM_DELLINK is done from the subordinate function
virNetlinkDelLink, which is also called for other purposes (deleting a
macvtap interface), a function pointer called "fallback" has been
added to the arglist of virNetlinkDelLink() - if that arg != NULL, the
provided function will be called when (and only when) RTM_DELLINK
fails with EOPNOTSUPP.

Resolves:  https://bugzilla.redhat.com/show_bug.cgi?id=1252780 (part 2)
(cherry picked from commit 97d26e470d)
2015-09-21 20:18:03 -04:00
Laine Stump
e6c69718e2 util: fallback to ioctl(SIOCBRADDBR) if netlink RTM_NEWLINK fails
commit fc7b23db switched from using ioctl(SIOCBRADDBR) for bridge
creation to using a netlink RTM_NEWLINK message with IFLA_INFO_KIND =
"bridge", which is the more modern way to create a bridge. However,
although older kernels (e.g. 2.6.32, in RHEL6/CentOS6) support
creating *some* link types with RTM_NEWLINK, they don't support
creating bridges, and there is no compile-time way to figure this out
(since the "type" isn't an enum, but rather a character string).

This patch moves the body of the SIOCBRADDBR version of
virNetDevBridgeCreate() into a static function, calls the new function
from the original, and also calls the new function from the
RTM_NEWLINK version if the RTM_NEWLINK message generates an EOPNOTSUPP
error.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1252780
(cherry picked from commit 66dcb40937)
2015-09-21 20:18:03 -04:00
Jim Fehlig
14aa9d65c1 libxl: acquire a job when receiving a migrating domain
Commit f86ae403 moved acquiring a job from libxlDomainStart()
to its callers. One spot missed was in libxlDoMigrateReceive().
Acquire a job in libxlDoMigrateReceive() before calling
libxlDomainStart().

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
(cherry picked from commit e80b84a743)
2015-09-21 20:18:03 -04:00
Jim Fehlig
b4fefefc1b libxl: don't attempt to resume domain when suspend fails
Failure of libxl_domain_suspend() does not leave the domain in
a suspended state, so no need to call libxl_domain_resume(),
which btw will fail with "domain not suspended".

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
(cherry picked from commit 15120b8c61)
2015-09-21 20:18:03 -04:00
Jim Fehlig
24d194ad59 libxl: fix ref counting of libxlMigrationDstArgs
This patch fixes some flawed logic around ref counting the
libxlMigrationDstArgs object.

First, when adding sockets to the event loop with
virNetSocketAddIOCallback(), the generic virObjectFreeCallback()
was registered as a free function, with libxlMigrationDstArgs as
its parameter. A reference was also taken on
libxlMigrationDstArgs for each successful call to
virNetSocketAddIOCallback(). The rational behind this logic was
that the libxlMigrationDstArgs object had to out-live the socket
objects. But virNetSocketAddIOCallback() already takes a
reference on socket objects, ensuring their life until removed
from the event loop and unref'ed in virNetSocketEventFree(). We
only need to ensure libxlMigrationDstArgs lives until
libxlDoMigrateReceive() finishes, which can be done by simply
unref'ing libxlMigrationDstArgs at the end of
libxlDoMigrateReceive().

The second flaw was unref'ing the sockets in the failure path of
libxlMigrateReceive() and at the end of libxlDoMigrateReceive().
As mentioned above, the sockets are already unref'ed by
virNetSocketEventFree() when removed from the event loop.
Attempting to unref the socket a second time resulted in a
libvirtd crash since the socket was previously unref'ed and
disposed.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
(cherry picked from commit 44a54eb073)
2015-09-21 20:18:03 -04:00
Michal Privoznik
54032910dc libvirt_lxc: Claim success for --help
So far, if libvirt_lxc binary (usually to be found under
/usr/libexec/) is run with --help, due to a missing line
and our usual functions pattern, an 'uknown' error is returned.
Yeah, the help is printed out, but we should not claim error.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit fb0ef0d511)
2015-09-21 20:18:03 -04:00
Michal Privoznik
acf257deb5 virt-aa-helper: Improve valid_path
So, after some movement in virt-aa-helper, I've noticed the
virt-aa-helper-test failing. I've ran gdb (it took me a while to
realize how to do that) and this showed up immediately:

  Program received signal SIGSEGV, Segmentation fault.
  strlen () at ../sysdeps/x86_64/strlen.S:106
  106     ../sysdeps/x86_64/strlen.S: No such file or directory.
  (gdb) bt
  #0  strlen () at ../sysdeps/x86_64/strlen.S:106
  #1  0x0000555555561a13 in array_starts_with (str=0x5555557ce910 "/tmp/tmp.6nI2Fkv0KL/1.img", arr=0x7fffffffd160, size=-1540438016) at security/virt-aa-helper.c:525
  #2  0x0000555555561d49 in valid_path (path=0x5555557ce910 "/tmp/tmp.6nI2Fkv0KL/1.img", readonly=false) at security/virt-aa-helper.c:617
  #3  0x0000555555562506 in vah_add_path (buf=0x7fffffffd3e0, path=0x5555557cb910 "/tmp/tmp.6nI2Fkv0KL/1.img", perms=0x555555581585 "rw", recursive=false) at security/virt-aa-helper.c:823
  #4  0x0000555555562693 in vah_add_file (buf=0x7fffffffd3e0, path=0x5555557cb910 "/tmp/tmp.6nI2Fkv0KL/1.img", perms=0x555555581585 "rw") at security/virt-aa-helper.c:854
  #5  0x0000555555562918 in add_file_path (disk=0x5555557d4440, path=0x5555557cb910 "/tmp/tmp.6nI2Fkv0KL/1.img", depth=0, opaque=0x7fffffffd3e0) at security/virt-aa-helper.c:931
  #6  0x00007ffff78f18b1 in virDomainDiskDefForeachPath (disk=0x5555557d4440, ignoreOpenFailure=true, iter=0x5555555628a6 <add_file_path>, opaque=0x7fffffffd3e0) at conf/domain_conf.c:23286
  #7  0x0000555555562b5f in get_files (ctl=0x7fffffffd670) at security/virt-aa-helper.c:982
  #8  0x0000555555564100 in vahParseArgv (ctl=0x7fffffffd670, argc=5, argv=0x7fffffffd7e8) at security/virt-aa-helper.c:1277
  #9  0x00005555555643d6 in main (argc=5, argv=0x7fffffffd7e8) at security/virt-aa-helper.c:1332

So I've taken look at valid_path() because it is obviously
calling array_starts_with() with malformed @size. And here's the
result: there are two variables to hold the size of three arrays
and their value is recalculated before each call of
array_starts_with(). What if we just use three variables,
initialize them and do not touch them afterwards?

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 52970dec5b)
2015-09-21 20:18:03 -04:00
Luyao Huang
affa75e640 qemu: Emit correct audit message for memory hot unplug
https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3

If the qemu monitor fails to remove the memory from the guest for
any reason, the auditlog message will incorrectly use the current
actual memory (via virDomainDefGetMemoryActual) instead of the
value we were attempting to reduce to. The result is the 'new-mem'
and 'old-mem' values for the auditlog message would be identical.

This patch creates a local 'newmem' which accounts for the current
memory size minus the memory which is being removed. NB, for the
success case this results in the same value that would be returned
by virDomainDefGetMemoryActual without the need to do the math. This
follows the existing code which would subtract the size for cur_balloon.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit 8f8031df19)
2015-09-21 20:18:02 -04:00
Luyao Huang
fec2c786e7 qemu: Emit correct audit message for memory hot plug
https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3

Prior to this patch, after successfully hot plugging memory
the audit log indicated that the update failed, e.g.:

type=VIRT_RESOURCE ... old-mem=1024000 new-mem=1548288 \
exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=pts/2 res=failed

This patch will adjust where virDomainAuditMemory is called to
ensure the proper 'ret' value is used based on success or failure.

Additionally, the audit message should include the size of the
memory we were attempting to change to rather than the current
actual size. On failure to add, the message showed the same value
for old-mem and new-mem.

In order to do this, introduce a 'newmem' local which will compute
the new size based on the oldmem size plus the size of memory we
are about to add. NB: This would be the same as calling the
virDomainDefGetMemoryActual again on success, but avoids the
overhead of recalculating. Plus cur_balloon is already adjusted
by the same value, so this follows that.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit cb1fbda4a1)
2015-09-21 20:18:02 -04:00
Laine Stump
4a03dc50a3 hostdev: skip ACS check when using VFIO for device assignment
The ACS checks are meaningless when using the more modern VFIO driver
for device assignment since VFIO has its own more complete and exact
checks, but I didn't realize that when I added support for VFIO. This
patch eliminates the ACS check when preparing PCI devices for
assignment if VFIO is being used.

This resolves:

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

(cherry picked from commit 108d591b11)
2015-09-21 20:18:02 -04:00
Martin Kletzander
2c1a8f02bf Start daemon only after filesystems are mounted
When images are on mounted filesystems, there is no guarantee libvirtd
will start before they are mounted.  Since we want to start after both
local and remote filesystems are mounted, we need to add both local-fs
and remote-fs as targets that should precede starting libvirtd service.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 3418e7815a)
2015-09-21 20:18:02 -04:00
Peter Kieser
d598dced1c virt-aa-helper: add NVRAM store file for read/write
This is a cryptographically signed message in MIME format.

Some UEFI firmwares may want to use a non-volatile memory to store some
variables.
If AppArmor is enabled, and NVRAM store file is set currently
virt-aa-helper does
not add the NVRAM store file to the template. Add this file for
read/write when
this functionality is defined in domain XML.

Signed-off-by: Peter Kieser <peter@kieser.ca>
(cherry picked from commit 91fdcefa7f)
2015-09-21 20:18:02 -04:00
Luyao Huang
075f66e304 qemu: Update blkio.weight value after successful set
https://bugzilla.redhat.com/show_bug.cgi?id=1253107

Make a call virCgroupGetBlkioWeight to re-read blkio.weight right
after it is set in order to keep internal data up-to-date.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit bf2788218a)
2015-09-21 20:18:02 -04:00
Vasiliy Tolstov
77fa00888f Eliminate incorrect and unnecessary check for changed IP address
Commit aa2cc7 modified a previously unnecessary but innocuous check
for interface IP address during interface update incorrectly, causing
all attempted updates (e.g. changing link state) to interfaces of
type='ethernet' for QEMU to fail.

This patch fixes the issue by completely removing the check for IP
address, which is pointless since QEMU doesn't support setting
interface IP addresses from the domain interface XML anyway.

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
Signed-off-by: Laine Stump <laine@laine.org>
(cherry picked from commit bbc705d130)
2015-09-21 20:18:02 -04:00
intrigeri
4f4812f8a4 virt-aa-helper: allow access to /usr/share/ovmf/
We forbid access to /usr/share/, but (at least on Debian-based systems)
the Open Virtual Machine Firmware files needed for booting UEFI virtual
machines in QEMU live in /usr/share/ovmf/. Therefore, we need to add
that directory to the list of read only paths.

A similar patch was suggested by Jamie Strandboge <jamie@canonical.com>
on https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1483071.

(cherry picked from commit 2f01cfdf05)
2015-09-21 20:18:01 -04:00
Guido Günther
a8eaab32e1 virt-aa-helper: Simplify restriction logic
First check overrides, then read only files then restricted access
itself.

This allows us to mark files for read only access whose parents were
already restricted for read write.

Based on a proposal by Martin Kletzander

(cherry picked from commit d25a5e087a)
2015-09-21 20:18:01 -04:00
Guido Günther
e50d84614a virt-aa-helper: document --probing and --dry-run
(cherry picked from commit 26c5fa3a9b)
2015-09-21 20:18:01 -04:00
Martin Kletzander
51521556b0 Add generated libvirt_admin.syms into .gitignore
Commit a2c5d16a70 switched to generating
libvirt_admin.syms, but forgot to add the generated file into
.gitignore, hence causing tree pollution post-build.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 14d84db863)
2015-09-21 20:18:01 -04:00
Guido Günther
83c279a74c libvirt-admin: Generate symbols file
Since we're linking this into libvirtd we need some symbols to be public
but not part of the public API so mark them as
LIBVIRT_ADMIN_PRIVATE_<VERSION> as we do with libvirt.

Making all other symbols local makes sure we don't accidentally leak
unwanted ones.

(cherry picked from commit a2c5d16a70)
2015-09-21 20:18:01 -04:00
Guido Günther
f0cb1b96cf daemon: Use $(NULL) for libvird_admin's flags
This makes it consistent with the other FLAGS in this file and reduced
clutter in the diff when adding new entries.

(cherry picked from commit 6d71d54812)
2015-09-21 20:18:01 -04:00
John Ferlan
3ed4dba49d qemu: Add check for invalid iothread_id in qemuDomainChgIOThread
https://bugzilla.redhat.com/show_bug.cgi?id=1251886

Since iothread_id == 0 is an invalid value for QEMU let's point
that out specifically.  For the IOThreadDel code, the failure would
have ended up being a failure to find the IOThread ID; however, for
the IOThreadAdd code - an IOThread 0 was added and that isn't good.

It seems during many reviews/edits to the code the check for
iothread_id = 0 being invalid was lost - it could have originally
been in the API code, but requested to be moved - I cannot remember.

(cherry picked from commit 32c6b1908b)
2015-09-21 20:18:01 -04:00
Luyao Huang
4a3bd30e50 virsh: Reset global error after successfull domain lookup
When looking up a domain, we try to look up by ID, UUID and NAME
consequently while not really caring which of those lookups succeeds.
The problem is that if any of them fails, we dispatch the error from the
driver and that means setting both threadlocal and global error. Let's
say the last lookup (by NAME) succeeds and resets the threadlocal error as any
other API does, however leaving the global error unchanged. If the underlying
virsh command does not succeed afterwards, our cleanup routine in
vshCommandRun ensures that no libvirt error will be forgotten and that's
exactly where this global error comes in incorrectly.

 # virsh domif-setlink 123 vnet1 up
 error: interface (target: vnet1) not found
 error: Domain not found: no domain with matching id 123

This patch also resets the global error which would otherwise cause some
minor confusion in reported error messages.

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

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
(cherry picked from commit 70f56dd72c)
2015-09-21 20:18:00 -04:00
Eric Blake
9e5c5fbdc6 build: fix mingw build
Ever since commit e44b0269, 64-bit mingw compilation fails with:

../../src/util/virprocess.c: In function 'virProcessGetPids':
../../src/util/virprocess.c:628:50: error: passing argument 4 of 'virStrToLong_i' from incompatible pointer type [-Werror=incompatible-pointer-types]
         if (virStrToLong_i(ent->d_name, NULL, 10, &tmp_pid) < 0)
                                                  ^
In file included from ../../src/util/virprocess.c:59:0:
../../src/util/virstring.h:53:5: note: expected 'int *' but argument is of type 'pid_t * {aka long long int *}'
 int virStrToLong_i(char const *s,
     ^
cc1: all warnings being treated as errors

Although mingw won't be using this function, it does compile the
file, and the fix is relatively simple.

* src/util/virprocess.c (virProcessGetPids): Don't assume pid_t
fits in int.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 0a617b53d4)
2015-09-21 20:18:00 -04:00
Guido Günther
2eef8aa8ec Detect location of qemu-bridge-helper
RedHat and Debian based distros use different locations

Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790935
(cherry picked from commit 0e4972fe48)
2015-09-21 20:18:00 -04:00
Guido Günther
ca20811984 Check if qemu-bridge-helper exists and is executable
Otherwise the error is just

    error: Failed to create domain from test1.xml
    error: failed to retrieve file descriptor for interface: Transport endpoint is not connected

since we don't get a sensible error after the fork.

(cherry picked from commit 151ba02293)
2015-09-21 20:18:00 -04:00
Martin Kletzander
779742f4b5 qemu: Use numad information when getting pin information
Pinning information returned for emulatorpin and vcpupin calls is being
returned from our data without querying cgroups for some time.  However,
not all the data were utilized.  When automatic placement is used the
information is not returned for the calls mentioned above.  Since the
numad hint in private data is properly saved/restored, we can safely use
it to return true information.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 776924e376)
2015-09-21 20:18:00 -04:00
Martin Kletzander
a4b924b579 qemu: Keep numad hint after daemon restart
The numad hint stored in priv->autoNodeset is information that gets lost
during daemon restart.  And because we would like to use that
information in the future, we also need to save it in the status XML.
For the sake of tests, we need to initialize nnumaCell_max to some
value, so that the restoration doesn't fail in our test suite.  There is
no need to fill in the actual numa cell data since the recalculating
function virCapabilitiesGetCpusForNodemask() will not fail, it will just
skip filling the data in the bitmap which we don't use in tests anyway.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 8ce86722d7)
2015-09-21 20:18:00 -04:00
Martin Kletzander
10283d240c conf: Pass private data to Parse function of XML options
This needs a reorder of XML option definitions.  It might come in handy
one day.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 7c8028cda9)
2015-09-21 20:17:59 -04:00
Martin Kletzander
edf314d710 qemu: Fix segfault when parsing private domain data
When parsing private domain data, there are two paths that are flawed.
They are both error paths, just from different parts of the function.
One of them can call free() on an uninitialized pointer.  Initialization
to NULL is enough here.  The other one is a bit trickier to explain, but
as easy as the first one to fix.  We create capabilities, parse them and
then assign them into the private data pointer inside the domain object.
If, however, we get to fail from now on, the error path calls unrefs the
capabilities and then, when the domain object is being cleaned,
qemuDomainObjPrivateFree() tries to unref them as well.  That causes a
segfault.  Settin the pointer to NULL upon successful addition to the
private data is enough.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 92ddffdbd3)
2015-09-21 20:17:59 -04:00
Cole Robinson
79be4dbecb domain: Fix crash if trying to live update disk <serial>
If you pass <disk><serial> XML to UpdateDevice, and the original device
didn't have a <serial> block, libvirtd crashes trying to read the original
NULL serial string.

Use _NULLABLE string comparisons to avoid the crash. A couple other
properties needed the change too.

(cherry picked from commit c7790408d7)
2015-09-21 20:17:59 -04:00
Guido Günther
85cf1ad5aa virNetSocketCheckProtocols: handle EAI_NONAME as IPv6 unavailable
When running the test suite using "unshare -n" we might have IPv6 but no
configured addresses. Due to AI_ADDRCONFIG getaddrinfo then fails with
EAI_NONAME which we should then treat as IPv6 unavailable.

(cherry picked from commit fbb27088ee)
2015-09-21 20:17:59 -04:00
Laine Stump
58211ca54d util: don't overwrite stack when getting ethtool gfeatures
This fixes the crash described here:

 https://www.redhat.com/archives/libvir-list/2015-August/msg00162.html

In short, we were calling ioctl(SIOCETHTOOL) pointing to a too-short
object that was a local on the stack, resulting in the memory past the
end of the object being overwritten. This was because the struct used
by the ETHTOOL_GFEATURES command of SIOCETHTOOL ends with a 0-length
array, but we were telling ethtool that it could use 2 elements on the
array.

The fix is to allocate the necessary memory with VIR_ALLOC_VAR(),
including the extra length needed for a 2 element array at the end.

(cherry picked from commit bfaaa2b681)
2015-09-21 20:17:59 -04:00
Martin Kletzander
93fb942198 conf: Don't try formating non-existing addresses
Commit a6f9af8292 added checking for address colisions between
starting and ending addresses of forwarding addresses, but forgot that
there might be no addresses set at all.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 1f24c1494a)
2015-09-21 20:17:59 -04:00
Erik Skultety
4b4c101232 admin: Drop 'internal.h' include from libvirt-admin.h
This is a public library, it shouldn't include anything that is
internal. Including the library in it's current state to an example
application fails the preprocessor phase.

(cherry picked from commit eefec56b47)
2015-09-21 20:17:59 -04:00
Laine Stump
27ae007f9f qemu: fail on attempts to use <filterref> for non-tap network connections
nwfilter uses iptables and ebtables, which only work properly on
tap-based network connections (*not* on macvtap, for example), but we
just ignore any <filterref> elements for other types of networks,
potentially giving users a false sense of security.

This patch checks the network type and fails/logs an error if any
domain <interface> has a <filterref> when the connection isn't using a
tap device.

This resolves:

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

(cherry picked from commit f4f1d18dc4)
2015-09-21 20:17:58 -04:00
Laine Stump
3f06ae4171 network: validate network NAT range
This patch modifies virSocketAddrGetRange() to function properly when
the containing network/prefix of the address range isn't known, for
example in the case of the NAT range of a virtual network (since it is
a range of addresses on the *host*, not within the network itself). We
then take advantage of this new functionality to validate the NAT
range of a virtual network.

Extra test cases are also added to verify that virSocketAddrGetRange()
works properly in both positive and negative cases when the network
pointer is NULL.

This is the *real* fix for:

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

Commits 1e334a and 48e8b9 had earlier been pushed as fixes for that
bug, but I had neglected to read the report carefully, so instead of
fixing validation for the NAT range, I had fixed validation for the
DHCP range. sigh.

(cherry picked from commit a6f9af8292)
2015-09-21 20:17:58 -04:00
Michal Privoznik
96a808f476 virNetDevBandwidthParseRate: Reject negative values
https://bugzilla.redhat.com/show_bug.cgi?id=1022292

The following XML really does not make any sense:

<inbound average="-1" burst="-2" peak="-3" floor="-4"/>

There can't be a negative packet rate. Well, so far we haven't
assigned any meaning to it. So reject it unless users harm themselves,
because otherwise we turn the negative numbers into really big values.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 2a5d3f227d)
2015-09-21 20:17:58 -04:00
Laine Stump
06cea21924 network: verify proper address family in updates to <host> and <range>
By specifying parentIndex in a call to virNetworkUpdate(), it was
possible to direct libvirt to add a dhcp range or static host of a
non-matching address family to the <dhcp> element of an <ip>. For
example, given:

 <ip address='192.168.122.1' netmask='255.255.255.0'/>
 <ip family='ipv6' address='2001:db6:ca3:45::1' prefix='64'/>

you could provide a static host entry with an IPv4 address, and
specify that it be added to the 2nd <ip> element (index 1):

  virsh net-update default add ip-dhcp-host --parent-index 1 \
  '<host mac="52:54:00:00:00:01" ip="192.168.122.45"/>'

This would be happily added with no error (and no concern of any
possible future consequences).

This patch checks that any dhcp range or host element being added to a
network ip's <dhcp> subelement has addresses of the same family as the
ip element they are being added to.

This resolves:

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

(cherry picked from commit 6a21bc119e)
2015-09-21 20:17:58 -04:00
Laine Stump
b2e6de689f conf: more useful error message when pci function is out of range
If a pci address had a function number out of range, the error message
would be:

  Insufficient specification for PCI address

which is logged by virDevicePCIAddressParseXML() after
virDevicePCIAddressIsValid returns a failure.

This patch enhances virDevicePCIAddressIsValid() to optionally report
the error itself (since it is the place that decides which part of the
address is "invalid"), and uses that feature when calling from
virDevicePCIAddressParseXML(), so that the error will be more useful,
e.g.:

  Invalid PCI address function=0x8, must be <= 7

Previously, virDevicePCIAddressIsValid didn't check for the
theoretical limits of domain or bus, only for slot or function. While
adding log messages, we also correct that ommission. (The RNG for PCI
addresses already enforces this limit, which by the way means that we
can't add any negative tests for this - as far as I know our
domainschematest has no provisions for passing XML that is supposed to
fail).

Note that virDevicePCIAddressIsValid() can only check against the
absolute maximum attribute values for *any* possible PCI controller,
not for the actual maximums of the specific controller that this
device is attaching to; fortunately there is later more specific
validation for guest-side PCI addresses when building the set of
assigned PCI addresses. For host-side PCI addresses (e.g. for
<hostdev> and for network device pools), we rely on the error that
will be logged when it is found that the device doesn't actually
exist.

This resolves:

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

(cherry picked from commit f8fe8f0345)
2015-09-21 20:17:58 -04:00
Michal Privoznik
643c549734 virDomainDefParseXML: Check for malicious cpu ids in <numa/>
https://bugzilla.redhat.com/show_bug.cgi?id=1176020

Some users think this is a good idea:

      <vcpu placement='static'>4</vcpu>
      <cpu mode='host-model'>
        <model fallback='allow'/>
        <numa>
          <cell id='0' cpus='0-1' memory='1048576' unit='KiB'/>
          <cell id='1' cpus='9-10' memory='2097152' unit='KiB'/>
        </numa>
      </cpu>

It's not. Lets therefore introduce a check and discourage them in
doing so.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 82af954c52)
2015-09-21 20:17:58 -04:00
Michal Privoznik
819d2168d8 numa_conf: Introduce virDomainNumaGetMaxCPUID
This function should return the greatest CPU number set in
/domain/cpu/numa/cell/@cpus. The idea is that we should compare
the returned value against /domain/vcpu value. Yes, there exist
users who think the following is a good idea:

  <vcpu placement='static'>4</vcpu>
  <cpu mode='host-model'>
    <model fallback='allow'/>
    <numa>
      <cell id='0' cpus='0-1' memory='1048576' unit='KiB'/>
      <cell id='1' cpus='9-10' memory='2097152' unit='KiB'/>
    </numa>
  </cpu>

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 8f2535dec1)
2015-09-21 20:17:58 -04:00
Shivaprasad G Bhat
87bacf5df2 Allow vfio hotplug of a device to the domain which owns the iommu
The commit 7e72de4 didn't consider the hotplug scenarios. The patch addresses
the hotplug case whereby if atleast one of the pci function is owned by a
guest, the hotplug of other functions/devices in the same iommu group to the
same guest goes through successfully.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
(cherry picked from commit e3810db34f)
2015-09-21 19:25:58 -04:00
Peter Krempa
9e41bdf4d0 qemu: Forbid image pre-creation for non-shared storage migration
Libvirt doesn't reliably know the location of the backing chain when
pre-creating images for non-shared migration. This isn't a problem for
full copy, but incremental copy requires the information.

Forbid pre-creating the image in cases where incremental migration is
required. This limitation can perhaps be lifted once libvirt will fully
support loading of backing chain information from the XML.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1249587
(cherry picked from commit 6da3b694cc)
2015-09-21 19:25:18 -04:00
Luyao Huang
93e5f04e19 virsh: fix domfsinfo output in quiet mode
https://bugzilla.redhat.com/show_bug.cgi?id=1250287

When run domfsinfo in quiet mode, we cannot get any
useful information (just get \n), this is because
we didn't use vshPrint to print useful information.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit ee6160b549)
2015-09-21 19:24:56 -04:00
Daniel P. Berrange
0712608387 tests: extend workaround for gnutls private key loading failure
In gnutls 3.4.3 there is a regression in the loading of private
keys via gnutls_x509_privkey_import. We already have a workaround
to deal with failures on older gnutls, but the error code that
the new gnutls returns is different. Extend the workaround so that
is checks for GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE too.

See also gnutls https://bugzilla.redhat.com/show_bug.cgi?id=1250020

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 3433180ec8)
2015-09-21 19:24:49 -04:00
Luyao Huang
e1d8f411f7 qemu: fix some api cannot work when disable cpuset in conf
If cpuset is disabled or not available, it libvirt must not use it.
Mainly for actions that do not need it and can use sched_setaffinity()
or numa_membind() instead, because they will fail without good reason.

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

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit 1439eb32af)
2015-09-21 19:22:40 -04:00
Guido Günther
93fd967f38 storage: only run safezero if allocation is > 0
While a zero allocation in safezero should be fine it isn't when we use
posix_fallocate which returns EINVAL on a zero allocation.

While we could skip the zero allocation in safezero_posix_fallocate it's
an optimization to do it for all allocations.

This fixes vm installation via virtinst for me which otherwise aborts
like:

   Starting install...
   Retrieving file linux...               | 5.9 MB     00:01 ...
   Retrieving file initrd.gz...           |  29 MB     00:07 ...
   ERROR    Couldn't create storage volume 'virtinst-linux.sBgds4': 'cannot fill file '/var/lib/libvirt/boot/virtinst-linux.sBgds4': Invalid argument'

The error was introduced by e30297b0 as spotted by Chunyan Liu

(cherry picked from commit 269d39afe5)
2015-09-21 19:22:00 -04:00
Cole Robinson
d9d3a88cb7 qemu: command: Report stderr from qemu-bridge-helper
There's a couple reports of things failing in this area (bug 1259070),
but it's tough to tell what's going wrong without stderr from
qemu-bridge-helper. So let's report stderr in the error message

Couple new examples:

virbr0 is inactive:
internal error: /usr/libexec/qemu-bridge-helper --use-vnet --br=virbr0 --fd=21: failed to communicate with bridge helper: Transport endpoint is not connected
stderr=failed to get mtu of bridge `virbr0': No such device

bridge isn't on the ACL:
internal error: /usr/libexec/qemu-bridge-helper --use-vnet --br=br0 --fd=21: failed to communicate with bridge helper: Transport endpoint is not connected
stderr=access denied by acl file

(cherry picked from commit db35beaa1d)
2015-09-21 19:21:45 -04:00
Peter Krempa
26c8c3ed35 qemu: Fix reporting of physical capacity for block devices
Qemu reports physical size 0 for block devices. As 15fa84acbb
changed the behavior of qemuDomainGetBlockInfo to just query the monitor
this created a regression since we didn't report the size correctly any
more.

This patch adds code to refresh the physical size of a block device by
opening it and seeking to the end and uses it both in
qemuDomainGetBlockInfo and also in qemuDomainGetStatsOneBlock that was
broken since it was introduced in this respect.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1250982
(cherry picked from commit 8dc2725925)
2015-09-21 19:21:20 -04:00
Michal Privoznik
17f509a4d4 remoteClientCloseFunc: Don't mangle connection object refcount
Well, in 8ad126e6 we tried to fix a memory corruption problem.
However, the fix was not as good as it could be. I mean, the
commit has one line more than it should. I've noticed this output
just recently:

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

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

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

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit e689300770)
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-09-03 17:46:15 +02:00
John Ferlan
e63b32e22d storage: Correct the 'mode' check
Commit id '7c2d65dde2' changed the default value of mode to be -1 if not
supplied in the XML, which should cause creation of the volume using the
default mode of VIR_STORAGE_DEFAULT_VOL_PERM_MODE; however, the check
made was whether mode was '0' or not to use default or provided value.

This patch fixes the issue to check if the 'mode' was provided in the XML
and use that value.

(cherry picked from commit 691dd388ae)
2015-09-02 18:57:24 -04:00
John Ferlan
075eb526c9 storage: Handle failure from refreshVol
Commit id '155ca616' added the 'refreshVol' API. In an NFS root-squash
environment it was possible that if the just created volume from XML wasn't
properly created with the right uid/gid and/or mode, then the followup
refreshVol will fail to open the volume in order to get the allocation/
capacity values. This would leave the volume still on the server and
cause a libvirtd crash because 'voldef' would be in the pool list, but
the cleanup code would free it.

(cherry picked from commit db9277a39b)
2015-09-02 18:57:20 -04:00
John Ferlan
966cc92222 virfile: Introduce virFileUnlink
In an NFS root-squashed environment the 'vol-delete' command will fail to
'unlink' the target volume since it was created under a different uid:gid.

This code continues the concepts introduced in virFileOpenForked and
virDirCreate[NoFork] with respect to running the unlink command under
the uid/gid of the child. Unlike the other two, don't retry on EACCES
(that's why we're here doing this now).

(cherry picked from commit 35847860f6)
2015-09-02 18:57:15 -04:00
Jim Fehlig
271250831b Revert "LXC: show used memory as 0 when domain is not active"
This reverts commit 1ce7c1d20c,
which introduced a significant semantic change to the
virDomainGetInfo() API. Additionally, the change was only
made to 2 of the 15 virt drivers.

Conflicts:
	src/qemu/qemu_driver.c

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
(cherry picked from commit 60acb38abb)
2015-08-28 11:28:18 -06:00
3660 changed files with 657146 additions and 791772 deletions

11
.gitignore vendored
View File

@@ -83,11 +83,10 @@
/examples/domtop/domtop
/examples/hellolibvirt/hellolibvirt
/examples/openauth/openauth
/examples/rename/rename
/gnulib/lib/*
/gnulib/m4/*
/gnulib/tests/*
/include/libvirt/libvirt-common.h
/include/libvirt/libvirt.h
/libtool
/libvirt-*.tar.gz
/libvirt-[0-9]*
@@ -137,8 +136,6 @@
/src/locking/qemu-lockd.conf
/src/locking/qemu-sanlock.conf
/src/locking/test_libvirt_sanlock.aug
/src/logging/log_daemon_dispatch_stubs.h
/src/logging/log_protocol.[ch]
/src/lxc/lxc_controller_dispatch.h
/src/lxc/lxc_monitor_dispatch.h
/src/lxc/lxc_monitor_protocol.c
@@ -152,17 +149,12 @@
/src/rpc/virnetprotocol.[ch]
/src/test_libvirt*.aug
/src/test_virtlockd.aug
/src/test_virtlogd.aug
/src/util/virkeymaps.h
/src/virt-aa-helper
/src/virtlockd
/src/virtlockd.8
/src/virtlockd.8.in
/src/virtlockd.init
/src/virtlogd
/src/virtlogd.8
/src/virtlogd.8.in
/src/virtlogd.init
/tests/*.log
/tests/*.pid
/tests/*.trs
@@ -183,7 +175,6 @@
/tools/virt-login-shell
/tools/virsh
/tools/virsh-*-edit.c
/tools/virt-admin
/tools/virt-*-validate
/tools/virt-sanlock-cleanup
/tools/wireshark/src/plugin.c

Submodule .gnulib updated: 6cc32c63e8...f39477dba7

View File

@@ -8,13 +8,13 @@ Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
The primary maintainers and people with commit access rights:
Alex Jia <ajia@redhat.com>
Andrea Bolognani <abologna@redhat.com>
Cédric Bosdonnat <cbosdonnat@suse.com>
Christophe Fergeau <cfergeau@redhat.com>
Claudio Bley <claudio.bley@gmail.com>
Cole Robinson <crobinso@redhat.com>
Daniel Berrange <berrange@redhat.com>
Daniel Veillard <veillard@redhat.com>
Dmitry Guryanov <dguryanov@parallels.com>
Doug Goldstein <cardoe@gentoo.org>
Eric Blake <eblake@redhat.com>
Erik Skultety <eskultet@redhat.com>
@@ -28,7 +28,6 @@ Laine Stump <laine@redhat.com>
Mark McLoughlin <markmc@redhat.com>
Martin Kletzander <mkletzan@redhat.com>
Matthias Bolte <matthias.bolte@googlemail.com>
Maxim Nestratov <mnestratov@virtuozzo.com>
Michal Prívozník <mprivozn@redhat.com>
Pavel Hrdina <phrdina@redhat.com>
Peter Krempa <pkrempa@redhat.com>
@@ -45,7 +44,6 @@ Chris Lalancette <clalance@redhat.com>
Dan Smith <danms@us.ibm.com>
Dave Allan <dallan@redhat.com>
Dave Leskovec <dlesko@linux.vnet.ibm.com>
Dmitry Guryanov <dguryanov@parallels.com>
Guannan Ren <gren@redhat.com>
Jim Meyering <meyering@redhat.com>
John Levon <john.levon@sun.com>

View File

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

View File

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

View File

@@ -4,7 +4,7 @@ scriptversion=2014-12-08.12; # UTC
# Bootstrap this package from checked-out sources.
# Copyright (C) 2003-2016 Free Software Foundation, Inc.
# Copyright (C) 2003-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@@ -196,7 +196,10 @@ local_gl_dir=gnulib/local
# Build prerequisites
# Note that some of these programs are only required for 'make dist' to
# succeed from a fresh git checkout; not all of these programs are
# required to run 'make dist' on a tarball.
# required to run 'make dist' on a tarball. As a special case, we want
# to require the equivalent of the Fedora python-devel package, but
# RHEL 5 lacks the witness python-config package; we hack around that
# old environment below.
buildreq="\
autoconf 2.59
automake 1.9.6
@@ -209,11 +212,19 @@ patch -
perl 5.5
perl::XML::XPath -
pkg-config -
python-config -
rpcgen -
tar -
xmllint -
xsltproc -
"
# Use rpm as a fallback to bypass the bootstrap probe for python-config,
# for the sake of RHEL 5; without requiring it on newer systems that
# have python-config to begin with.
if `(${PYTHON_CONFIG-python-config} --version;
test $? -lt 126 || rpm -q python-devel) >/dev/null 2>&1`; then
PYTHON_CONFIG=true
fi
# Automake requires that ChangeLog and AUTHORS exist.
touch AUTHORS ChangeLog || exit 1

66
cfg.mk
View File

@@ -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 = \
@@ -572,7 +572,6 @@ sc_prohibit_int_index:
sc_prohibit_int_ijk:
@prohibit='\<(int|unsigned) ([^(=]* )*(i|j|k)\>(\s|,|;)' \
exclude='exempt from syntax-check' \
halt='use size_t, not int/unsigned int for loop vars i, j, k' \
$(_sc_search_regexp)
@@ -776,7 +775,7 @@ sc_prohibit_gettext_markup:
# lower-level code must not include higher-level headers.
cross_dirs=$(patsubst $(srcdir)/src/%.,%,$(wildcard $(srcdir)/src/*/.))
cross_dirs_re=($(subst / ,/|,$(cross_dirs)))
mid_dirs=access|conf|cpu|locking|logging|network|node_device|rpc|security|storage
mid_dirs=access|conf|cpu|locking|network|node_device|rpc|security|storage
sc_prohibit_cross_inclusion:
@for dir in $(cross_dirs); do \
case $$dir in \
@@ -920,15 +919,6 @@ sc_require_space_before_label:
halt="Top-level labels should be indented by one space" \
$(_sc_search_regexp)
# Allow for up to three spaces before the label: this is to avoid running
# into situations where neither this rule nor require_space_before_label
# would apply, eg. a line matching ^[a-zA-Z0-9]+ :$
sc_prohibit_space_in_label:
@prohibit='^ {0,3}[_a-zA-Z0-9]+ +:$$' \
in_vc_files='\.[ch]$$' \
halt="There should be no space between label name and colon" \
$(_sc_search_regexp)
# Doesn't catch all cases of mismatched braces across if-else, but it helps
sc_require_if_else_matching_braces:
@prohibit='( else( if .*\))? {|} else( if .*\))?$$)' \
@@ -1021,22 +1011,6 @@ sc_prohibit_pthread_create:
halt="avoid using 'pthread_create', use 'virThreadCreate' instead" \
$(_sc_search_regexp)
sc_prohibit_not_streq:
@prohibit='! *STREQ *\(.*\)' \
halt='Use STRNEQ instead of !STREQ' \
$(_sc_search_regexp)
sc_prohibit_not_strneq:
@prohibit='! *STRNEQ *\(.*\)' \
halt='Use STREQ instead of !STRNEQ' \
$(_sc_search_regexp)
sc_prohibit_verbose_strcat:
@prohibit='strncat\([^,]*,\s+([^,]*),\s+strlen\(\1\)\)' \
in_vc_files='\.[ch]$$' \
halt='Use strcat(a, b) instead of strncat(a, b, strlen(b))' \
$(_sc_search_regexp)
# We don't use this feature of maint.mk.
prev_version_file = /dev/null
@@ -1084,7 +1058,7 @@ _autogen:
# regenerate HACKING as part of the syntax-check
ifneq ($(_gl-Makefile),)
syntax-check: $(top_srcdir)/HACKING bracket-spacing-check test-wrap-argv
syntax-check: $(top_srcdir)/HACKING bracket-spacing-check
endif
bracket-spacing-check:
@@ -1093,20 +1067,6 @@ bracket-spacing-check:
{ echo '$(ME): incorrect formatting, see HACKING for rules' 1>&2; \
exit 1; }
test-wrap-argv:
$(AM_V_GEN)files=`$(VC_LIST) | grep -E '\.(ldargs|args)'`; \
for file in $$files ; \
do \
$(PERL) $(top_srcdir)/tests/test-wrap-argv.pl $$file > $${file}-t ; \
diff $$file $${file}-t; \
res=$$? ; \
rm $${file}-t ; \
test $$res == 0 || { \
echo "$(ME): Incorrect line wrapping in $$file" 1>&2; \
echo "$(ME): Use test-wrap-argv.pl to wrap test data files" 1>&2; \
exit 1; } \
done
# sc_po_check can fail if generated files are not built first
sc_po_check: \
$(srcdir)/daemon/remote_dispatch.h \
@@ -1126,9 +1086,9 @@ $(srcdir)/src/admin/admin_client.h: $(srcdir)/src/admin/admin_protocol.x
$(MAKE) -C src admin/admin_client.h
# List all syntax-check exemptions:
exclude_file_name_regexp--sc_avoid_strcase = ^tools/vsh\.h$$
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.h$$
_src1=libvirt-stream|fdstream|qemu/qemu_monitor|util/(vircommand|virfile)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon|logging/log_daemon
_src1=libvirt-stream|fdstream|qemu/qemu_monitor|util/(vircommand|virfile)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon
_test1=shunloadtest|virnettlscontexttest|virnettlssessiontest|vircgroupmock
exclude_file_name_regexp--sc_avoid_write = \
^(src/($(_src1))|daemon/libvirtd|tools/virsh-console|tests/($(_test1)))\.c$$
@@ -1139,7 +1099,7 @@ exclude_file_name_regexp--sc_copyright_usage = \
^COPYING(|\.LESSER)$$
exclude_file_name_regexp--sc_flags_usage = \
^(docs/|src/util/virnetdevtap\.c$$|tests/(vir(cgroup|pci|usb)|nss|qemuxml2argv)mock\.c$$)
^(docs/|src/util/virnetdevtap\.c$$|tests/vir(cgroup|pci|usb)mock\.c$$)
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
^(src/rpc/gendispatch\.pl$$|tests/)
@@ -1158,12 +1118,12 @@ exclude_file_name_regexp--sc_prohibit_strdup = \
^(docs/|examples/|src/util/virstring\.c|tests/vir(netserverclient|cgroup)mock.c$$)
exclude_file_name_regexp--sc_prohibit_close = \
(\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir.+mock\.c)$$)
(\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir(cgroup|pci)mock\.c)$$)
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
(^tests/(qemuhelp|nodeinfo|virpcitest)data/|\.diff$$)
_src2=src/(util/vircommand|libvirt|lxc/lxc_controller|locking/lock_daemon|logging/log_daemon)
_src2=src/(util/vircommand|libvirt|lxc/lxc_controller|locking/lock_daemon)
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
(^($(_src2)|tests/testutils|daemon/libvirtd)\.c$$)
@@ -1193,8 +1153,6 @@ exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virstring\.c$$
exclude_file_name_regexp--sc_prohibit_strtol = ^examples/dom.*/.*\.c$$
exclude_file_name_regexp--sc_prohibit_gethostby = ^docs/nss.html.in$$
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/virxml\.c$$
exclude_file_name_regexp--sc_prohibit_xmlURI = ^src/util/viruri\.c$$
@@ -1224,7 +1182,7 @@ exclude_file_name_regexp--sc_prohibit_include_public_headers_quote = \
^(src/internal\.h$$|tools/wireshark/src/packet-libvirt.h$$)
exclude_file_name_regexp--sc_prohibit_include_public_headers_brackets = \
^(tools/|examples/|include/libvirt/(virterror|libvirt(-(admin|qemu|lxc))?)\.h$$)
^(tools/|examples/|include/libvirt/(virterror|libvirt-(qemu|lxc))\.h$$)
exclude_file_name_regexp--sc_prohibit_int_ijk = \
^(src/remote_protocol-structs|src/remote/remote_protocol.x|cfg.mk|include/)$
@@ -1255,9 +1213,3 @@ exclude_file_name_regexp--sc_prohibit_sysconf_pagesize = \
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

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

View File

@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.
AC_INIT([libvirt], [1.3.3], [libvir-list@redhat.com], [], [http://libvirt.org])
AC_INIT([libvirt], [1.2.18.2], [libvir-list@redhat.com], [], [http://libvirt.org])
AC_CONFIG_SRCDIR([src/libvirt.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
@@ -175,13 +175,12 @@ dnl are also linux specific. The "network" and storage_fs drivers are known
dnl to not work on MacOS X presently, so we also make a note if compiling
dnl for that
with_linux=no with_osx=no with_freebsd=no with_win=no with_cygwin=no
with_linux=no with_osx=no with_freebsd=no
case $host in
*-*-linux*) with_linux=yes ;;
*-*-darwin*) with_osx=yes ;;
*-*-freebsd*) with_freebsd=yes ;;
*-*-mingw* | *-*-msvc* ) with_win=yes ;;
*-*-cygwin*) with_cygwin=yes ;;
esac
if test $with_linux = no; then
@@ -193,12 +192,9 @@ if test $with_linux = no; then
fi
if test $with_freebsd = yes; then
want_ifconfig=yes
with_firewalld=no
fi
want_ifconfig=yes
if test $with_cygwin = yes; then
with_vbox=no
with_firewalld=no
fi
AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" = "yes"])
@@ -257,7 +253,6 @@ LIBVIRT_CHECK_SSH2
LIBVIRT_CHECK_SYSTEMD_DAEMON
LIBVIRT_CHECK_UDEV
LIBVIRT_CHECK_WIRESHARK
LIBVIRT_CHECK_NSS
LIBVIRT_CHECK_YAJL
AC_MSG_CHECKING([for CPUID instruction])
@@ -284,7 +279,7 @@ AC_CHECK_SIZEOF([long])
dnl Availability of various common functions (non-fatal if missing),
dnl and various less common threadsafe functions
AC_CHECK_FUNCS_ONCE([cfmakeraw fallocate geteuid getgid getgrnam_r \
getmntent_r getpwuid_r getrlimit getuid kill mmap newlocale posix_fallocate \
getmntent_r getpwuid_r getuid kill mmap newlocale posix_fallocate \
posix_memalign prlimit regexec sched_getaffinity setgroups setns \
setrlimit symlink sysctlbyname getifaddrs sched_setscheduler])
@@ -324,7 +319,7 @@ fi
LIBS=$old_libs
dnl Availability of various common headers (non-fatal if missing).
AC_CHECK_HEADERS([pwd.h regex.h sys/un.h \
AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/un.h \
sys/poll.h syslog.h mntent.h net/ethernet.h linux/magic.h \
sys/un.h sys/syscall.h sys/sysctl.h netinet/tcp.h ifaddrs.h \
libtasn1.h sys/ucred.h sys/mount.h])
@@ -394,12 +389,6 @@ AC_CHECK_TYPE([struct ifreq],
#include <net/if.h>
]])
AC_CHECK_TYPE([struct sockpeercred],
[AC_DEFINE([HAVE_STRUCT_SOCKPEERCRED], [1],
[Defined if struct sockpeercred is available])],
[], [[#include <sys/socket.h>
]])
AC_CHECK_DECLS([ETH_FLAG_TXVLAN, ETH_FLAG_NTUPLE, ETH_FLAG_RXHASH, ETH_FLAG_LRO,
ETHTOOL_GGSO, ETHTOOL_GGRO, ETHTOOL_GFLAGS, ETHTOOL_GFEATURES],
[], [], [[#include <linux/ethtool.h>
@@ -894,6 +883,7 @@ 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
@@ -906,7 +896,7 @@ if test "$with_libxl" != "no" ; then
LIBS="$LIBS $LIBXL_LIBS"
AC_CHECK_LIB([xenlight], [libxl_ctx_alloc], [
with_libxl=yes
LIBXL_LIBS="$LIBXL_LIBS -lxenlight"
LIBXL_LIBS="$LIBXL_LIBS -lxenlight -lxenctrl"
],[
if test "$with_libxl" = "yes"; then
fail=1
@@ -934,14 +924,6 @@ if test "$with_libxl" = "yes"; then
if test "x$LIBXL_EXECBIN_DIR" != "x"; then
AC_DEFINE_UNQUOTED([LIBXL_EXECBIN_DIR], ["$LIBXL_EXECBIN_DIR"], [directory containing Xen libexec binaries])
fi
dnl Check if the xtl_* infrastructure is in libxentoollog
dnl (since Xen 4.7) if not then assume it is in libxenctrl
dnl (as it was for 4.6 and earler)
AC_CHECK_LIB([xentoollog], [xtl_createlogger_stdiostream], [
LIBXL_LIBS="$LIBXL_LIBS -lxentoollog"
],[
LIBXL_LIBS="$LIBXL_LIBS -lxenctrl"
])
fi
AM_CONDITIONAL([WITH_LIBXL], [test "$with_libxl" = "yes"])
@@ -1092,14 +1074,6 @@ if test "$with_lxc" = "yes" ; then
fi
AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
dnl
dnl Check for virt-login-shell
dnl
LIBVIRT_CHECK_LOGIN_SHELL
AM_CONDITIONAL([WITH_SETUID_RPC_CLIENT], [test "$with_lxc$with_login_shell" != "nono"])
dnl
dnl Checks for the Parallels driver
dnl
@@ -1112,6 +1086,56 @@ dnl
LIBVIRT_DRIVER_CHECK_BHYVE
dnl
dnl check for shell that understands <> redirection without truncation,
dnl needed by src/qemu/qemu_monitor_{text,json}.c.
dnl
if test "$with_qemu" = yes; then
lv_wrapper_shell=
AC_CACHE_CHECK([for shell that supports <> redirection],
[lv_cv_wrapper_shell],
[
# If cross-compiling, guess that /bin/sh is good enough except for
# Linux, where it might be dash 0.5.5 which is known broken; and on
# Linux, we have a good chance that /bin/bash will exist.
# If we guess wrong, a user can override the cache variable.
# Going through /bin/bash is a slight slowdown if /bin/sh works.
if test "$cross_compiling" = yes; then
case $host_os in
linux*) lv_cv_wrapper_shell=/bin/bash ;;
*) lv_cv_wrapper_shell=/bin/sh ;;
esac
else
for lv_cv_wrapper_shell in /bin/sh bash ksh zsh none; do
test $lv_cv_wrapper_shell = none &&
AC_MSG_ERROR([could not find decent shell])
echo a > conftest.a
($lv_cv_wrapper_shell -c ': 1<>conftest.a') 2>/dev/null &&
case `cat conftest.a`.$lv_cv_wrapper_shell in
a./*) break;; dnl /bin/sh is good enough
a.*) dnl bash, ksh, and zsh all understand 'command', use that
dnl to determine the absolute path of the shell
lv_cv_wrapper_shell=`$lv_cv_wrapper_shell -c \
"command -v $lv_cv_wrapper_shell"`
case $lv_cv_wrapper_shell in
/*) break;;
esac
;;
esac
done
rm -f conftest.a
fi
])
if test "x$lv_cv_wrapper_shell" != x/bin/sh; then
lv_wrapper_shell=$lv_cv_wrapper_shell
fi
if test "x$lv_wrapper_shell" != x; then
AC_DEFINE_UNQUOTED([VIR_WRAPPER_SHELL], ["$lv_wrapper_shell"],
[Define to the absolute path of a shell that does not truncate on
<> redirection, if /bin/sh does not fit the bill])
fi
fi
dnl
dnl check for kernel headers required by src/bridge.c
@@ -1646,6 +1670,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],
@@ -1962,6 +1990,14 @@ if test "$with_storage_gluster" = "yes"; then
fi
AM_CONDITIONAL([WITH_STORAGE_GLUSTER], [test "$with_storage_gluster" = "yes"])
if test "$with_storage_zfs" = "check"; then
with_storage_zfs=$with_freebsd
fi
if test "$with_storage_zfs" = "yes" && test "$with_freebsd" = "no"; then
AC_MSG_ERROR([The ZFS storage driver can be enabled on FreeBSD only.])
fi
if test "$with_storage_zfs" = "yes" ||
test "$with_storage_zfs" = "check"; then
AC_PATH_PROG([ZFS], [zfs], [], [$PATH:/sbin:/usr/sbin])
@@ -2488,7 +2524,7 @@ AC_DEFINE_UNQUOTED([QEMU_USER], ["$QEMU_USER"], [QEMU user account])
AC_DEFINE_UNQUOTED([QEMU_GROUP], ["$QEMU_GROUP"], [QEMU group account])
AC_PATH_PROG([QEMU_BRIDGE_HELPER], [qemu-bridge-helper], [/usr/libexec/qemu-bridge-helper],
[/usr/libexec:/usr/lib/qemu:/usr/lib])
[/usr/libexec:/usr/lib/qemu])
AC_DEFINE_UNQUOTED([QEMU_BRIDGE_HELPER], ["$QEMU_BRIDGE_HELPER"], [QEMU bridge helper])
AC_ARG_WITH([macvtap],
@@ -2745,6 +2781,7 @@ AC_CONFIG_FILES([run],
[chmod +x,-w run])
AC_CONFIG_FILES([\
Makefile src/Makefile include/Makefile docs/Makefile \
docs/schemas/Makefile \
gnulib/lib/Makefile \
gnulib/tests/Makefile \
libvirt.pc \
@@ -2756,11 +2793,23 @@ AC_CONFIG_FILES([\
src/libvirt-lxc.pc \
libvirt.spec mingw-libvirt.spec \
po/Makefile.in \
include/libvirt/libvirt-common.h \
include/libvirt/Makefile include/libvirt/libvirt.h \
daemon/Makefile \
examples/Makefile \
tools/Makefile \
tests/Makefile \
tools/Makefile])
examples/apparmor/Makefile \
examples/object-events/Makefile \
examples/domsuspend/Makefile \
examples/dominfo/Makefile \
examples/dommigrate/Makefile \
examples/domtop/Makefile \
examples/openauth/Makefile \
examples/hellolibvirt/Makefile \
examples/systemtap/Makefile \
examples/xml/nwfilter/Makefile \
examples/lxcconvert/Makefile \
tools/wireshark/Makefile \
tools/wireshark/src/Makefile])
AC_OUTPUT
AC_MSG_NOTICE([])
@@ -2844,7 +2893,6 @@ LIBVIRT_RESULT_SSH2
LIBVIRT_RESULT_SYSTEMD_DAEMON
LIBVIRT_RESULT_UDEV
LIBVIRT_RESULT_WIRESHARK
LIBVIRT_RESULT_NSS
LIBVIRT_RESULT_YAJL
AC_MSG_NOTICE([ libxml: $LIBXML_CFLAGS $LIBXML_LIBS])
AC_MSG_NOTICE([ dlopen: $DLOPEN_LIBS])
@@ -2928,7 +2976,6 @@ AC_MSG_NOTICE([ Init script: $with_init_script])
AC_MSG_NOTICE([Char device locks: $with_chrdev_lock_files])
AC_MSG_NOTICE([ Default Editor: $DEFAULT_EDITOR])
AC_MSG_NOTICE([ Loader/NVRAM: $with_loader_nvram])
AC_MSG_NOTICE([ virt-login-shell: $with_login_shell])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Developer Tools])
AC_MSG_NOTICE([])

View File

@@ -128,7 +128,7 @@ libvirtd_conf_la_LIBADD = $(LIBXML_LIBS)
noinst_LTLIBRARIES += libvirtd_admin.la
libvirtd_admin_la_SOURCES = \
admin.c admin.h admin_server.c admin_server.h
admin_server.c admin_server.h
libvirtd_admin_la_CFLAGS = \
$(AM_CFLAGS) \
@@ -319,8 +319,7 @@ endif ! WITH_POLKIT
remote.c: $(DAEMON_GENERATED)
remote.h: $(DAEMON_GENERATED)
admin.c: $(DAEMON_GENERATED)
admin.h: $(DAEMON_GENERATED)
admin_server.c: $(DAEMON_GENERATED)
LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
libvirtd.libxl.logrotate libvirtd.uml.logrotate \

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
/*
* admin_server.c: admin methods to manage daemons and clients
* admin_server.c:
*
* Copyright (C) 2016 Red Hat, Inc.
* 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
@@ -17,12 +17,16 @@
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Authors: Erik Skultety <eskultet@redhat.com>
* Martin Kletzander <mkletzan@redhat.com>
* 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"
@@ -31,40 +35,83 @@
#include "virnetdaemon.h"
#include "virnetserver.h"
#include "virstring.h"
#include "virthreadjob.h"
#define VIR_FROM_THIS VIR_FROM_ADMIN
VIR_LOG_INIT("daemon.admin_server");
VIR_LOG_INIT("daemon.admin");
int
adminConnectListServers(virNetDaemonPtr dmn,
virNetServerPtr **servers,
unsigned int flags)
void
remoteAdmClientFreeFunc(void *data)
{
int ret = -1;
virNetServerPtr *srvs = NULL;
struct daemonAdmClientPrivate *priv = data;
virCheckFlags(0, -1);
virMutexDestroy(&priv->lock);
virObjectUnref(priv->dmn);
VIR_FREE(priv);
}
if ((ret = virNetDaemonGetServers(dmn, &srvs)) < 0)
goto cleanup;
void *
remoteAdmClientInitHook(virNetServerClientPtr client ATTRIBUTE_UNUSED,
void *opaque)
{
struct daemonAdmClientPrivate *priv;
if (servers) {
*servers = srvs;
srvs = NULL;
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)
virObjectListFreeCount(srvs, ret);
if (ret < 0)
virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock);
return ret;
}
virNetServerPtr
adminConnectLookupServer(virNetDaemonPtr dmn,
const char *name,
unsigned int flags)
static int
adminDispatchConnectClose(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientPtr client,
virNetMessagePtr msg ATTRIBUTE_UNUSED,
virNetMessageErrorPtr rerr ATTRIBUTE_UNUSED)
{
virCheckFlags(flags, NULL);
return virNetDaemonGetServer(dmn, name);
virNetServerClientDelayedClose(client);
return 0;
}
#include "admin_dispatch.h"

View File

@@ -1,7 +1,7 @@
/*
* admin_server.h: admin methods to manage daemons and clients
* admin_server.h
*
* Copyright (C) 2016 Red Hat, Inc.
* 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
@@ -17,22 +17,20 @@
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Authors: Erik Skultety <eskultet@redhat.com>
* Martin Kletzander <mkletzan@redhat.com>
* Author: Martin Kletzander <mkletzan@redhat.com>
*/
#ifndef __LIBVIRTD_ADMIN_SERVER_H__
# define __LIBVIRTD_ADMIN_SERVER_H__
#ifndef __LIBVIRTD_ADMIN_H__
# define __LIBVIRTD_ADMIN_H__
# include "rpc/virnetdaemon.h"
# include "rpc/virnetserver.h"
# include "rpc/virnetserverprogram.h"
# include "rpc/virnetserverclient.h"
int adminConnectListServers(virNetDaemonPtr dmn,
virNetServerPtr **servers,
unsigned int flags);
virNetServerPtr adminConnectLookupServer(virNetDaemonPtr dmn,
const char *name,
unsigned int flags);
extern virNetServerProgramProc adminProcs[];
extern size_t adminNProcs;
#endif /* __LIBVIRTD_ADMIN_SERVER_H__ */
void remoteAdmClientFreeFunc(void *data);
void *remoteAdmClientInitHook(virNetServerClientPtr client, void *opaque);
#endif /* __ADMIN_REMOTE_H__ */

View File

@@ -280,7 +280,6 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
data->min_workers = 5;
data->max_workers = 20;
data->max_clients = 5000;
data->max_queued_clients = 1000;
data->max_anonymous_clients = 20;
data->prio_workers = 5;
@@ -293,6 +292,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
data->keepalive_interval = 5;
data->keepalive_count = 5;
data->keepalive_required = 0;
data->admin_min_workers = 5;
data->admin_max_workers = 20;
@@ -302,6 +302,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
data->admin_keepalive_interval = 5;
data->admin_keepalive_count = 5;
data->admin_keepalive_required = 0;
localhost = virGetHostname();
if (localhost == NULL) {
@@ -470,9 +471,11 @@ daemonConfigLoadOptions(struct daemonConfig *data,
GET_CONF_INT(conf, filename, keepalive_interval);
GET_CONF_UINT(conf, filename, keepalive_count);
GET_CONF_UINT(conf, filename, keepalive_required);
GET_CONF_INT(conf, filename, admin_keepalive_interval);
GET_CONF_UINT(conf, filename, admin_keepalive_count);
GET_CONF_UINT(conf, filename, admin_keepalive_required);
return 0;

View File

@@ -81,6 +81,7 @@ struct daemonConfig {
int keepalive_interval;
unsigned int keepalive_count;
int keepalive_required;
int admin_min_workers;
int admin_max_workers;
@@ -90,6 +91,7 @@ struct daemonConfig {
int admin_keepalive_interval;
unsigned int admin_keepalive_count;
int admin_keepalive_required;
};

View File

@@ -44,7 +44,7 @@
#include "libvirtd.h"
#include "libvirtd-config.h"
#include "admin.h"
#include "admin_server.h"
#include "viruuid.h"
#include "remote_driver.h"
#include "viralloc.h"
@@ -1382,14 +1382,14 @@ int main(int argc, char **argv) {
goto cleanup;
}
if (!(srv = virNetServerNew("libvirtd",
config->min_workers,
if (!(srv = virNetServerNew(config->min_workers,
config->max_workers,
config->prio_workers,
config->max_clients,
config->max_anonymous_clients,
config->keepalive_interval,
config->keepalive_count,
!!config->keepalive_required,
config->mdns_adv ? config->mdns_name : NULL,
remoteClientInitHook,
NULL,
@@ -1457,14 +1457,14 @@ int main(int argc, char **argv) {
goto cleanup;
}
if (!(srvAdm = virNetServerNew("admin",
config->admin_min_workers,
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,
!!config->admin_keepalive_required,
NULL,
remoteAdmClientInitHook,
NULL,

View File

@@ -344,16 +344,10 @@
# The format for a filter is one of:
# x:name
# x:+name
# where name is a string which is matched against the category
# given in the VIR_LOG_INIT() at the top of each libvirt source
# file, e.g., "remote", "qemu", or "util.json" (the name in the
# filter can be a substring of the full category name, in order
# to match multiple similar categories), the optional "+" prefix
# tells libvirt to log stack trace for each message matching
# name, and x is the minimal level where matching messages should
# be logged:
# where name is a string which is matched against source file name,
# e.g., "remote", "qemu", or "util/json", the optional "+" prefix
# tells libvirt to log stack trace for each message matching name,
# and x is the minimal level where matching messages should be logged:
# 1: DEBUG
# 2: INFO
# 3: WARNING
@@ -446,15 +440,14 @@
#
#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
#
#admin_keepalive_required = 1

View File

@@ -60,7 +60,6 @@ struct daemonClientPrivate {
size_t nnetworkEventCallbacks;
daemonClientEventCallbackPtr *qemuEventCallbacks;
size_t nqemuEventCallbacks;
bool closeRegistered;
# if WITH_SASL
virNetSASLSessionPtr sasl;
@@ -73,6 +72,7 @@ struct daemonClientPrivate {
virConnectPtr conn;
daemonClientStreamPtr streams;
bool keepalive_supported;
};
/* Separate private data for admin connection */

View File

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

View File

@@ -22,5 +22,3 @@ Restart=on-failure
[Install]
WantedBy=multi-user.target
Also=virtlockd.socket
Also=virtlogd.socket

File diff suppressed because it is too large Load Diff

View File

@@ -58,6 +58,6 @@ module Test_libvirtd =
{ "keepalive_interval" = "5" }
{ "keepalive_count" = "5" }
{ "keepalive_required" = "1" }
{ "admin_keepalive_required" = "1" }
{ "admin_keepalive_interval" = "5" }
{ "admin_keepalive_count" = "5" }
{ "admin_keepalive_required" = "1" }

View File

@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2016 Red Hat, Inc.
## Copyright (C) 2005-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
@@ -16,6 +16,8 @@
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
SUBDIRS= schemas
PERL = perl
# The directory containing the source code (if it contains documentation).
@@ -70,6 +72,8 @@ devhelpxsl = devhelp/devhelp.xsl devhelp/html.xsl
png = \
32favicon.png \
footer_corner.png \
footer_pattern.png \
libvirt-header-bg.png \
libvirt-header-logo.png \
libvirtLogo.png \
@@ -79,6 +83,7 @@ png = \
libvirt-driver-arch.png \
libvirt-object-model.png \
madeWith.png \
et.png \
migration-managed-direct.png \
migration-managed-p2p.png \
migration-native.png \
@@ -145,9 +150,6 @@ fig = \
migration-tunnel.fig \
migration-unmanaged-direct.fig
schemadir = $(pkgdatadir)/schemas
schema_DATA = $(wildcard $(srcdir)/schemas/*.rng)
EXTRA_DIST= \
apibuild.py genaclperms.pl \
site.xsl newapi.xsl news.xsl page.xsl \
@@ -158,8 +160,7 @@ EXTRA_DIST= \
$(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\
$(internals_html_in) $(internals_html) \
sitemap.html.in aclperms.htmlinc \
todo.pl hvsupport.pl todo.cfg-example \
$(schema_DATA)
todo.pl hvsupport.pl todo.cfg-example
acl_generated = aclperms.htmlinc
@@ -203,7 +204,7 @@ 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 \
@@ -217,21 +218,21 @@ $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
%.png: %.fig
convert -rotate 90 $< $@
%.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
sitemap.html.in $(acl_generated)
internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
@if [ -x $(XSLTPROC) ] ; then \
echo "Generating $@"; \
$(MKDIR_P) internals; \
name=`echo $@ | sed -e 's/.tmp//'`; \
$(XSLTPROC) --stringparam pagename $$name --nonet \
$(top_srcdir)/docs/subsite.xsl $< > $@ \
|| { rm $@ && exit 1; }; fi
%.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in $(acl_generated)
@if [ -x $(XSLTPROC) ] ; then \
echo "Generating $@"; \
name=`echo $@ | sed -e 's/.tmp//'`; \
dir=`dirname $@` ; \
if test "$$dir" = "."; \
then \
style=site.xsl; \
else \
$(MKDIR_P) $$dir; \
style=subsite.xsl; \
fi; \
$(XSLTPROC) --stringparam pagename $$name --nonet \
$(top_srcdir)/docs/$$style $< > $@ \
$(top_srcdir)/docs/site.xsl $< > $@ \
|| { rm $@ && exit 1; }; fi
%.html: %.html.tmp
@@ -300,8 +301,7 @@ EXTRA_DIST += $(APIBUILD_STAMP)
$(python_generated_files): $(APIBUILD_STAMP)
$(APIBUILD_STAMP): $(srcdir)/apibuild.py \
$(top_srcdir)/include/libvirt/libvirt.h \
$(top_srcdir)/include/libvirt/libvirt-common.h.in \
$(top_srcdir)/include/libvirt/libvirt.h.in \
$(top_srcdir)/include/libvirt/libvirt-domain-snapshot.h \
$(top_srcdir)/include/libvirt/libvirt-domain.h \
$(top_srcdir)/include/libvirt/libvirt-event.h \
@@ -363,8 +363,8 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/libvirtLogo.png $(DESTDIR)$(pkgdatadir)
uninstall-local:
for h in $(apihtml); do rm -f $(DESTDIR)$(HTML_DIR)/$$h; done
for p in $(apipng); do rm -f $(DESTDIR)$(HTML_DIR)/$$p; done
for h in $(apihtml); do rm $(DESTDIR)$(HTML_DIR)/$$h; done
for p in $(apipng); do rm $(DESTDIR)$(HTML_DIR)/$$p; done
for f in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
rm -f $(DESTDIR)$(DEVHELP_DIR)/$$(basename $$f); \
rm $(DESTDIR)$(DEVHELP_DIR)/$$(basename $$f); \
done

View File

@@ -348,12 +348,6 @@
<code>lookup</code> method.
</p>
<p>
See
<a href="http://libvirt.org/git/?p=libvirt.git;a=tree;f=examples/polkit;hb=HEAD">source code</a>
for a more complex example.
</p>
<h3><a name="exconnect">Example: restricting ability to connect to drivers</a></h3>
<p>

View File

@@ -330,7 +330,7 @@
daemon through the <a href="remote.html">remote</a> driver via an
<a href="internals/rpc.html">RPC</a>. Some hypervisors do support
client-side connections and responses, such as Test, OpenVZ, VMware,
Power VM (phyp), VirtualBox (vbox), ESX, Hyper-V, Xen, and Virtuozzo.
Power VM (phyp), VirtualBox (vbox), ESX, Hyper-V, Xen, and Parallels.
The libvirtd daemon service is started on the host at system boot
time and can also be restarted at any time by a properly privileged
user, such as root. The libvirtd daemon uses the same libvirt API

View File

@@ -262,16 +262,6 @@
using a dashboard. Compute part uses libvirt to manage VM
life-cycle, monitoring and so on.
</dd>
<dt><a href="https://github.com/gustavfranssonnyvell/cherrypop">Cherrypop</a></dt>
<dd>
A cloud software with no masters or central points. Nodes
autodetect other nodes and autodistribute virtual
machines and autodivide up the workload. Also there is no
minimum limit for hosts, well, one might be nice. It's
perfect for setting up low-end servers in a cloud or a
cloud where you want the most bang for the bucks.
</dd>
</dl>
<h2><a name="libraries">Libraries</a></h2>
@@ -441,19 +431,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

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

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

@@ -590,27 +590,6 @@ Note that allowing capabilities that are normally dropped by default can serious
affect the security of the container and the host.
</p>
<h2><a name="share">Inherit namespaces</a></h2>
<p>
Libvirt allows you to inherit the namespace from container/process just like lxc tools
or docker provides to share the network namespace. The following can be used to share
required namespaces. If we want to share only one then the other namespaces can be ignored.
The netns option is specific to sharenet. It can be used in cases we want to use existing network namespace
rather than creating new network namespace for the container. In this case privnet option will be
ignored.
</p>
<pre>
&lt;domain type='lxc' xmlns:lxc='http://libvirt.org/schemas/domain/lxc/1.0'&gt;
...
&lt;lxc:namespace&gt;
&lt;lxc:sharenet type='netns' value='red'/&gt;
&lt;lxc:shareuts type='name' value='container1'/&gt;
&lt;lxc:shareipc type='pid' value='12345'/&gt;
&lt;/lxc:namespace&gt;
&lt;/domain&gt;
</pre>
<h2><a name="usage">Container usage / management</a></h2>
<p>

View File

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

View File

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

BIN
docs/et.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
docs/footer_corner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
docs/footer_pattern.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

View File

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

View File

@@ -1460,16 +1460,11 @@
&lt;relaxed state='on'/&gt;
&lt;vapic state='on'/&gt;
&lt;spinlocks state='on' retries='4096'/&gt;
&lt;vpindex state='on'/&gt;
&lt;runtime state='on'/&gt;
&lt;synic state='on'/&gt;
&lt;reset state='on'/&gt;
&lt;vendor_id state='on' value='KVM Hv'/&gt;
&lt;/hyperv&gt;
&lt;kvm&gt;
&lt;hidden state='on'/&gt;
&lt;/kvm&gt;
&lt;pvspinlock state='on'/&gt;
&lt;pvspinlock/&gt;
&lt;gic version='2'/&gt;
&lt;/features&gt;
@@ -1499,10 +1494,8 @@
Interrupt) for the guest.
</dd>
<dt><code>hap</code></dt>
<dd>Depending on the <code>state</code> attribute (values <code>on</code>,
<code>off</code>) enable or disable use of Hardware Assisted Paging.
The default is <code>on</code> if the hypervisor detects availability
of Hardware Assisted Paging.
<dd>Enable use of Hardware Assisted Paging if available in
the hardware.
</dd>
<dt><code>viridian</code></dt>
<dd>Enable Viridian hypervisor extensions for paravirtualizing
@@ -1528,55 +1521,19 @@
<td>relaxed</td>
<td>Relax constraints on timers</td>
<td> on, off</td>
<td><span class="since">1.0.0 (QEMU 2.0)</span></td>
<td><span class="since">1.0.0 (QEMU only)</span></td>
</tr>
<tr>
<td>vapic</td>
<td>Enable virtual APIC</td>
<td>on, off</td>
<td><span class="since">1.1.0 (QEMU 2.0)</span></td>
<td><span class="since">1.1.0 (QEMU only)</span></td>
</tr>
<tr>
<td>spinlocks</td>
<td>Enable spinlock support</td>
<td>on, off; retries - at least 4095</td>
<td><span class="since">1.1.0 (QEMU 2.0)</span></td>
</tr>
<tr>
<td>vpindex</td>
<td>Virtual processor index</td>
<td> on, off</td>
<td><span class="since">1.3.3 (QEMU 2.5)</span></td>
</tr>
<tr>
<td>runtime</td>
<td>Processor time spent on running guest code and on behalf of guest code</td>
<td> on, off</td>
<td><span class="since">1.3.3 (QEMU 2.5)</span></td>
</tr>
<tr>
<td>synic</td>
<td>Enable Synthetic Interrupt Controller (SyNIC)</td>
<td> on, off</td>
<td><span class="since">1.3.3 (QEMU 2.5)</span></td>
</tr>
<tr>
<td>stimer</td>
<td>Enable SyNIC timers</td>
<td> on, off</td>
<td><span class="since">1.3.3 (QEMU 2.5)</span></td>
</tr>
<tr>
<td>reset</td>
<td>Enable hypervisor reset</td>
<td> on, off</td>
<td><span class="since">1.3.3 (QEMU 2.5)</span></td>
</tr>
<tr>
<td>vendor_id</td>
<td>Set hypervisor vendor id</td>
<td>on, off; value - string, up to 12 characters</td>
<td><span class="since">1.3.3 (QEMU 2.5)</span></td>
<td><span class="since">1.1.0 (QEMU only)</span></td>
</tr>
</table>
</dd>
@@ -1612,7 +1569,7 @@
<dt><code>vmport</code></dt>
<dd>Depending on the <code>state</code> attribute (values <code>on</code>,
<code>off</code>, default <code>on</code>) enable or disable
the emulation of VMware IO port, for vmmouse etc.
the emulation of VMWare IO port, for vmmouse etc.
<span class="since">Since 1.2.16</span>
</dd>
<dt><code>gic</code></dt>
@@ -1621,9 +1578,8 @@
For example, the 'aarch64' architecture uses
<code>gic</code> instead of <code>apic</code>. The optional
attribute <code>version</code> specifies the GIC version;
however, it may not be supported by all hypervisors. Accepted
values are <code>2</code>, <code>3</code> and <code>host</code>.
<span class="since">Since 1.2.16</span>
however, it may not be supported by all hypervisors. <span
class="since">Since 1.2.16</span>
</dd>
</dl>
@@ -2017,9 +1973,7 @@
valid when the <code>type</code> is "block" or "network" for
<code>protocol='iscsi'</code> or when the <code>type</code>
is "volume" when using an iSCSI source <code>pool</code>
for <code>mode</code> "host" or as an
<a href="http://wiki.libvirt.org/page/NPIV_in_libvirt">NPIV</a>
virtual Host Bus Adapter (vHBA) using a Fibre Channel storage pool.
for <code>mode</code> "host".
Configured in this manner, the LUN behaves identically to "disk",
except that generic SCSI commands from the guest are accepted
and passed through to the physical device. Also note that
@@ -2195,7 +2149,7 @@
<td> rbd </td>
<td> monitor servers of RBD </td>
<td> one or more </td>
<td> librados default </td>
<td> 6789 </td>
</tr>
<tr>
<td> sheepdog </td>
@@ -2819,7 +2773,7 @@
attribute provides the format type. For example, LXC
supports a type of "loop", with a format of "raw" or
"nbd" with any format. QEMU supports a type of "path"
or "handle", but no formats. Virtuozzo driver supports
or "handle", but no formats. Parallels driver supports
a type of "ploop" with a format of "ploop".
</li>
</ul>
@@ -3044,14 +2998,6 @@
a sector is 512 bytes.
<span class="since">Since 1.2.7 (QEMU and KVM only)</span>
</dd>
<dt><code>ioeventfd</code></dt>
<dd>
The optional <code>ioeventfd</code> attribute specifies
whether the controller should use
<a href='https://patchwork.kernel.org/patch/43390/'>
I/O asynchronous handling</a> or not. Accepted values are
"on" and "off". <span class="since">Since 1.2.18</span>
</dd>
</dl>
<p>
USB companion controllers have an optional
@@ -3083,13 +3029,10 @@
<p>
PCI controllers have an optional <code>model</code> attribute with
possible values <code>pci-root</code>, <code>pcie-root</code>,
<code>pcie-root-port</code>, <code>pci-bridge</code>,
<code>dmi-to-pci-bridge</code>, <code>pcie-switch-upstream-port</code>, or
<code>pcie-switch-downstream-port</code>.
<code>pci-bridge</code>, or <code>dmi-to-pci-bridge</code>.
(pci-root and pci-bridge <span class="since">since 1.0.5</span>,
pcie-root and dmi-to-pci-bridge <span class="since">since
1.1.2</span>, pcie-root-port, pcie-switch-upstream-port, and
pcie-switch-downstream-port <span class="since">since 1.2.19</span>)
1.1.2</span>)
The root controllers (<code>pci-root</code> and <code>pcie-root</code>)
have an optional <code>pcihole64</code> element specifying how big
(in kilobytes, or in the unit specified by <code>pcihole64</code>'s
@@ -3098,61 +3041,6 @@
are recent enough to support 64-bit PCI holes, unless this is disabled
(set to 0). <span class="since">Since 1.1.2 (QEMU only)</span>
</p>
<p>
PCI controllers also have an optional
subelement <code>&lt;model&gt;</code> with an attribute
<code>name</code>. The name attribute holds the name of the
specific device that qemu is emulating (e.g. "i82801b11-bridge")
rather than simply the class of device ("dmi-to-pci-bridge",
"pci-bridge"), which is set in the controller element's
model <b>attribute</b>. In almost all cases, you should not
manually add a <code>&lt;model&gt;</code> subelement to a
controller, nor should you modify one that is automatically
generated by libvirt. <span class="since">Since 1.2.19 (QEMU
only).</span>
</p>
<p>
PCI controllers also have an optional
subelement <code>&lt;target&gt;</code> with the attributes
listed below. These are configurable items that 1) are visible
to the guest OS so must be preserved for guest ABI
compatibility, and 2) are usually left to default values or
derived automatically by libvirt. In almost all cases, you
should not manually add a <code>&lt;target&gt;</code> subelement
to a controller, nor should you modify the values in the those
that are automatically generated by
libvirt. <span class="since">Since 1.2.19 (QEMU only).</span>
</p>
<dl>
<dt><code>chassisNr</code></dt>
<dd>
PCI controllers that have attribute model="pci-bridge", can
also have a <code>chassisNr</code> attribute in
the <code>&lt;target&gt;</code> subelement, which is used to
control QEMU's "chassis_nr" option for the pci-bridge device
(normally libvirt automatically sets this to the same value as
the index attribute of the pci controller). If set, chassisNr
must be between 0 and 255.
</dd>
<dt><code>chassis</code></dt>
<dd>
pcie-root-port and pcie-switch-downstream-port controllers can
also have a <code>chassis</code> attribute in
the <code>&lt;target&gt;</code> subelement, which is used to
set the controller's "chassis" configuration value, which is
visible to the virtual machine. If set, chassis must be
between 0 and 255.
</dd>
<dt><code>port</code></dt>
<dd>
pcie-root-port and pcie-switch-downstream-port controllers can
also have a <code>port</code> attribute in
the <code>&lt;target&gt;</code> subelement, which
is used to set the controller's "port" configuration value,
which is visible to the virtual machine. If set, port must be
between 0 and 255.
</dd>
</dl>
<p>
For machine types which provide an implicit PCI bus, the pci-root
controller with index=0 is auto-added and required to use PCI devices.
@@ -3198,35 +3086,6 @@
auto-determined by libvirt will be placed on this pci-bridge
device. (<span class="since">since 1.1.2</span>).
</p>
<p>
Domains with an implicit pcie-root can also add controllers
with <code>model='pcie-root-port'</code>,
<code>model='pcie-switch-upstream-port'</code>,
and <code>model='pcie-switch-downstream-port'</code>. pcie-root-port
is a simple type of bridge device that can connect only to one
of the 31 slots on the pcie-root bus on its upstream side, and
makes a single (PCIe, hotpluggable) port available on the
downstream side (at slot='0'). pcie-root-port can be used to
provide a single slot to later hotplug a PCIe device (but is not
itself hotpluggable - it must be in the configuration when the
domain is started).
(<span class="since">since 1.2.19</span>)
</p>
<p>
pcie-switch-upstream-port is a more flexible (but also more
complex) device that can only plug into a pcie-root-port or
pcie-switch-downstream-port on the upstream side (and only
before the domain is started - it is not hot-pluggable), and
provides 32 ports on the downstream side (slot='0' - slot='31')
that accept only pcie-switch-downstream-port devices; each
pcie-switch-downstream-port device can only plug into a
pcie-switch-upstream-port on its upstream side (again, not
hot-pluggable), and on its downstream side provides a single
hotpluggable pcie port that can accept any standard pci or pcie
device (or another pcie-switch-upstream-port), i.e. identical in
function to a pcie-root-port. (<span class="since">since
1.2.19</span>)
</p>
<pre>
...
&lt;devices&gt;
@@ -3496,8 +3355,8 @@
(starting with 0x) or octal (starting with 0) form.
For PCI devices the element carries 4 attributes allowing to designate
the device as can be found with the <code>lspci</code> or
with <code>virsh nodedev-list</code>. For SCSI devices a 'drive'
address type must be used. <a href="#elementsAddress">See above</a> for
with <code>virsh
nodedev-list</code>. <a href="#elementsAddress">See above</a> for
more details on the address element.</dd>
<dt><code>driver</code></dt>
<dd>
@@ -4302,30 +4161,6 @@
&lt;source address='192.168.0.1' port='5558'/&gt;
&lt;/interface&gt;
&lt;/devices&gt;
...</pre>
<h5><a name="elementsNICSUDP">UDP unicast tunnel</a></h5>
<p>
A UDP unicast architecture provides a virtual network which enables
connections between QEMU instances using QEMU's UDP infrastructure.
The xml "source" address is the endpoint address to which the UDP socket
packets will be sent from the host running QEMU.
The xml "local" address is the address of the interface from which the
UDP socket packets will originate from the QEMU host.
<span class="since">Since 1.2.20</span></p>
<pre>
...
&lt;devices&gt;
&lt;interface type='udp'&gt;
&lt;mac address='52:54:00:22:c9:42'/&gt;
&lt;source address='127.0.0.1' port='11115'&gt;
&lt;local address='127.0.0.1' port='11116'/&gt;
&lt;/source&gt;
&lt;/interface&gt;
&lt;/devices&gt;
...</pre>
<h5><a name="elementsNICSModel">Setting the NIC model</a></h5>
@@ -4550,10 +4385,10 @@ qemu-kvm -net nic,model=? /dev/null
<p>
If no target is specified, certain hypervisors will
automatically generate a name for the created tun device. This
name can be manually specified, however the name <i>should not
name can be manually specified, however the name <i>must not
start with either 'vnet' or 'vif'</i>, which are prefixes
reserved by libvirt and certain hypervisors. Manually specified
targets using these prefixes may be ignored.
targets using these prefixes will be ignored.
</p>
<p>
@@ -4845,26 +4680,18 @@ qemu-kvm -net nic,model=? /dev/null
&lt;devices&gt;
&lt;input type='mouse' bus='usb'/&gt;
&lt;input type='keyboard' bus='usb'/&gt;
&lt;input type='mouse' bus='virtio'/&gt;
&lt;input type='keyboard' bus='virtio'/&gt;
&lt;input type='tablet' bus='virtio'/&gt;
&lt;input type='passthrough' bus='virtio'&gt;
&lt;source evdev='/dev/input/event1/&gt;
&lt;/input&gt;
&lt;/devices&gt;
...</pre>
<dl>
<dt><code>input</code></dt>
<dd>The <code>input</code> element has one mandatory attribute,
the <code>type</code> whose value can be 'mouse', 'tablet',
(<span class="since">since 1.2.2</span>) 'keyboard' or
(<span class="since">since 1.3.0</span>) 'passthrough'.
the <code>type</code> whose value can be 'mouse', 'tablet' or
(<span class="since">since 1.2.2</span>) 'keyboard'.
The tablet provides absolute cursor movement,
while the mouse uses relative movement. The optional
<code>bus</code> attribute can be used to refine the exact device type.
It takes values "xen" (paravirtualized), "ps2" and "usb" or
(<span class="since">since 1.3.0</span>) "virtio".</dd>
It takes values "xen" (paravirtualized), "ps2" and "usb".</dd>
</dl>
<p>
@@ -4872,10 +4699,6 @@ qemu-kvm -net nic,model=? /dev/null
sub-element <code>&lt;address&gt;</code> which can tie the
device to a particular PCI
slot, <a href="#elementsAddress">documented above</a>.
For type <code>passthrough</code>, the mandatory sub-element <code>source</code>
must have an <code>evdev</code> attribute containing the absolute path to the
event device passed through to guests. (KVM only)
</p>
<h4><a name="elementsHub">Hub devices</a></h4>
@@ -4934,8 +4757,7 @@ qemu-kvm -net nic,model=? /dev/null
<dl>
<dt><code>graphics</code></dt>
<dd>The <code>graphics</code> element has a mandatory <code>type</code>
attribute which takes the value "sdl", "vnc", "spice", "rdp" or
"desktop":
attribute which takes the value "sdl", "vnc", "rdp" or "desktop":
<dl>
<dt><code>"sdl"</code></dt>
<dd>
@@ -5045,7 +4867,6 @@ qemu-kvm -net nic,model=? /dev/null
&lt;clipboard copypaste='no'/&gt;
&lt;mouse mode='client'/&gt;
&lt;filetransfer enable='no'/&gt;
&lt;gl enable='yes'/&gt;
&lt;/graphics&gt;</pre>
<p>
Spice supports variable compression settings for audio,
@@ -5092,13 +4913,6 @@ qemu-kvm -net nic,model=? /dev/null
<code>enable</code> property to <code>no</code> ,
since <span class="since">since 1.2.2</span>.
</p>
<p>
Spice may provide accelerated server-side rendering with
OpenGL. You can enable or disable OpenGL support explicitly with
the <code>gl</code> element, by setting the
<code>enable</code> property. (QEMU
only, <span class="since">since 1.3.2</span>).
</p>
</dd>
<dt><code>"rdp"</code></dt>
<dd>
@@ -5218,33 +5032,30 @@ qemu-kvm -net nic,model=? /dev/null
<p>
The <code>model</code> element has a mandatory <code>type</code>
attribute which takes the value "vga", "cirrus", "vmvga", "xen",
"vbox", "qxl" (<span class="since">since 0.8.6</span>) or
"virtio" (<span class="since">since 1.3.0</span>)
depending on the hypervisor features available.
"vbox", or "qxl" (<span class="since">since 0.8.6</span>) depending
on the hypervisor features available.
</p>
<p>
You can provide the amount of video memory in kibibytes (blocks of
1024 bytes) using <code>vram</code>. This is supported only for guest
type of "libxl", "vz", "qemu", "vbox", "vmx" and "xen". If no
type of "libxl", "parallels", "qemu", "vbox", "vmx" and "xen". If no
value is provided the default is used. If the size is not a power of
two it will be rounded to closest one.
</p>
<p>
The number of screen can be set using <code>heads</code>. This is
supported only for guests type of "vz", "kvm", "vbox" and "vmx".
supported only for guests type of "parallels", "kvm", "vbox" and "vmx".
</p>
<p>
For guest type of "kvm" or "qemu" and model type "qxl" there are
optional attributes. Attribute <code>ram</code> (<span class="since">
since 1.0.2</span>) specifies the size of the primary bar, while the
For guest type of kvm the optional attribute <code>ram</code>
(<span class="since">since 1.0.2</span>) is allowed for "qxl" type
only and specifies the size of the primary bar, while the optional
attribute <code>vram</code> specifies the secondary bar size.
If <code>ram</code> or <code>vram</code> are not supplied a default
value is used. The <code>ram</code> should also be rounded to power of
two as <code>vram</code>. There is also optional attribute
<code>vgamem</code> (<span class="since">since 1.2.11</span>) to set
the size of VGA framebuffer for fallback mode of QXL device.
Attribute <code>vram64</code> (<span class="since">since 1.3.3</span>)
extends secondary bar and makes it addressable as 64bit memory.
If "ram" or "vram" are not supplied a default value is used. The ram
should also be rounded to power of two as vram. There is also optional
attribute <code>vgamem</code> (<span class="since">since 1.2.11 (QEMU
only)</span>) to set the size of VGA framebuffer for fallback mode of
QXL device.
</p>
</dd>
@@ -5282,7 +5093,7 @@ qemu-kvm -net nic,model=? /dev/null
&lt;target port='0'/&gt;
&lt;/serial&gt;
&lt;serial type='file'&gt;
&lt;source path='/tmp/file' append='on'&gt;
&lt;source path='/tmp/file'&gt;
&lt;seclabel model='dac' relabel='no'/&gt;
&lt;/source&gt;
&lt;target port='0'/&gt;
@@ -5318,28 +5129,6 @@ qemu-kvm -net nic,model=? /dev/null
the per-domain setting</a>.
</p>
<p>
If the interface <code>type</code> presented to the host is "file",
then the <code>source</code> element may contain an optional attribute
<code>append</code> that specifies whether or not the information in
the file should be preserved on domain restart. Allowed values are
"on" and "off" (default). <span class="since">Since 1.3.1</span>.
</p>
<p>
Regardless of the<code>type</code>, character devices can
have an optional log file associated with them. This is
expressed via a <code>log</code> sub-element, with a
<code>file</code> attribute. There can also be a <code>append</code>
attribute which takes teh same values described above.
<span class="since">1.3.3</span>.
</p>
<pre>
...
&lt;log file="/var/log/libvirt/qemu/guestname-serial0.log" append="off"/&gt;
...</pre>
<p>
Each character device element has an optional
sub-element <code>&lt;address&gt;</code> which can tie the
@@ -6031,16 +5820,6 @@ qemu-kvm -net nic,model=? /dev/null
<li>'xen' &mdash; default with Xen</li>
</ul>
</dd>
<dt><code>autodeflate</code></dt>
<dd>
<p>
The optional <code>autodeflate</code> attribute allows to
enable/disable (values "on"/"off", respectively) the ability of the
QEMU virtio memory balloon to release some memory at the last moment
before a guest's process get killed by Out of Memory killer.
<span class="since">Since 1.3.1, QEMU and KVM only</span>
</p>
</dd>
<dt><code>period</code></dt>
<dd>
<p>
@@ -6252,34 +6031,19 @@ qemu-kvm -net nic,model=? /dev/null
<pre>
...
&lt;devices&gt;
&lt;panic model='hyperv'/&gt;
&lt;panic model='isa'&gt;
&lt;panic&gt;
&lt;address type='isa' iobase='0x505'/&gt;
&lt;/panic&gt;
&lt;/devices&gt;
...
</pre>
<dl>
<dt><code>model</code></dt>
<dd>
<p>
The optional <code>model</code> attribute specifies what type
of panic device is provided. The panic model used when this attribute
is missing depends on the hypervisor and guest arch.
</p>
<ul>
<li>'isa' &mdash; for ISA pvpanic device</li>
<li>'pseries' &mdash; default and valid only for pSeries guests.</li>
<li>'hyperv' &mdash; for Hyper-V crash CPU feature.
<span class="since">Since 1.3.0, QEMU and KVM only</span></li>
</ul>
</dd>
<dt><code>address</code></dt>
<dd>
<p>
address of panic. The default ioport is 0x505. Most users
don't need to specify an address, and doing so is forbidden
altogether for pseries and hyperv models.
altogether for pSeries guests.
</p>
</dd>
</dl>
@@ -6415,9 +6179,8 @@ qemu-kvm -net nic,model=? /dev/null
added memory as a scaled integer.
</p>
<p>
The <code>node</code> subelement configures the guest NUMA node to
attach the memory to. The element shall be used only if the guest has
NUMA nodes configured.
The mandatory <code>node</code> subelement configures the guest NUMA
node to attach the memory to.
</p>
</dd>
</dl>

View File

@@ -97,38 +97,18 @@
<dd>
This optional element can occur multiple times. If it
exists, it has a mandatory <code>type</code> attribute
which will be set to:
<dl>
<dt><code>physical_function</code></dt>
<dd>
That means there will be a single <code>address</code>
subelement which contains the PCI address of the SRIOV
Physical Function (PF) that is the parent of this device
(and this device is, by implication, an SRIOV Virtual
Function (VF)).
</dd>
<dt><code>virtual_function</code></dt>
<dd>
In this case this device is an SRIOV PF, and the capability
element will have a list of <code>address</code>
subelements, one for each VF on this PF. If the host system
supports reporting it (via the "sriov_maxvfs" file in the
device's sysfs directory) the capability element will also
have an attribute named <code>maxCount</code> which is the
maximum number of SRIOV VFs supported by this device, which
could be higher than the number of VFs that are curently
active <span class="since">since 1.3.0</span>; in this case,
even if there are currently no active VFs the
virtual_functions capabililty will still be shown.
</dd>
<dt><code>pci-bridge</code> or <code>cardbus-bridge</code></dt>
<dd>
This shows merely that the lower 7 bits of PCI header type
have either value of 1 or 2 respectively. Usually this
means such device cannot be used for PCI passthrough.
<span class="since">Since 1.3.3</span>
</dd>
</dl>
which will be set to
either <code>physical_function</code>
or <code>virtual_functions</code>. If the type
is <code>physical_function</code>, there will be a
single <code>address</code> subelement which contains
the PCI address of the SRIOV Physical Function (PF)
that is the parent of this device (and this device is,
by implication, an SRIOV Virtual Function (VF)). If
the type is <code>virtual_functions</code>, then this
device is an SRIOV PF, and the capability element will
have a list of <code>address</code> subelements, one
for each VF on this PF.
</dd>
<dt><code>numa</code></dt>
<dd>

View File

@@ -87,14 +87,6 @@
&lt;/source&gt;
...</pre>
<pre>
...
&lt;source&gt;
&lt;device path='/dev/mapper/mpatha' part_separator='no'/&gt;
&lt;format type='gpt'/&gt;
&lt;/source&gt;
...</pre>
<pre>
...
&lt;source&gt;
@@ -126,28 +118,10 @@
(pool types <code>fs</code>, <code>logical</code>, <code>disk</code>,
<code>iscsi</code>, <code>zfs</code>).
May be repeated multiple times depending on backend driver. Contains
a required attribute <code>path</code> which is either the fully
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>
<p>An optional attribute <code>part_separator</code> for each
<code>path</code> may be supplied. Valid values for the attribute
may be either "yes" or "no". This attribute is to be used for a
<code>disk</code> pool type using a <code>path</code> to a
device mapper multipath device configured to utilize either
'user_friendly_names' or a custom 'alias' name in the
/etc/multipath.conf. The attribute directs libvirt to not
generate device volume names with the partition character "p".
By default, when libvirt generates the partition names for
device mapper multipath devices it will add a "p" path separator
to the device name before adding the partition number. For example,
a <code>device path</code> of '/dev/mapper/mpatha' libvirt would
generate partition names of '/dev/mapper/mpathap1',
'/dev/mapper/mpathap2', etc. for each partition found. With
this attribute set to "no", libvirt will not append the "p" to
the name unless it ends with a number thus generating names
of '/dev/mapper/mpatha1', '/dev/mapper/mpatha2', etc.
<span class="since">Since 1.3.1</span></p></dd>
<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>),

View File

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

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

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

@@ -243,6 +243,36 @@ p.image {
background: #c5dbd8;
}
#footer {
clear: both;
position: relative;
margin: 0px;
padding: 0px;
border: 0px;
width: 100%;
height: 180px;
background: #FFFFFF;
/* background: #757575; */
}
/* This is hidden from IE <= 6 because it can't do transparency */
/* body > #footer {
background: #757575 url(footer_pattern.png) repeat-x;
} */
#footer p {
position: absolute;
top: 0px;
left: 0px;
margin: 0px;
border: 0px solid red;
width: 220px;
text-align: center;
}
#footer p a img {
border: 0px;
}
#projects {
margin: 0px;
border: 0px;
@@ -261,6 +291,10 @@ p.image {
top: 0px;
left: 0px;
}
/* This is hidden from IE <= 6 because it can't do transparency */
head:first-child+body #projects dl {
background: url(footer_corner.png) no-repeat ! important;
}
#projects #p1 {
margin-left: 25%;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@@ -163,6 +163,12 @@
<xsl:apply-templates select="/html:html/html:body/*" mode="content"/>
</div>
</div>
<div id="footer">
<p id="sponsor">
Sponsored by:<br/>
<a href="http://et.redhat.com/"><img src="{$href_base}et.png" alt="Project sponsored by Red Hat Emerging Technology"/></a>
</p>
</div>
</body>
</html>
</xsl:template>

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

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

View File

@@ -30,8 +30,8 @@
<define name="domain">
<element name="domain">
<ref name="hvs"/>
<ref name="ids"/>
<interleave>
<ref name="ids"/>
<optional>
<ref name="title"/>
</optional>
@@ -55,9 +55,6 @@
<optional>
<ref name="pm"/>
</optional>
<optional>
<ref name="perf"/>
</optional>
<optional>
<ref name="idmap"/>
</optional>
@@ -70,9 +67,6 @@
<optional>
<ref name='qemucmdline'/>
</optional>
<optional>
<ref name='lxcsharens'/>
</optional>
<optional>
<ref name='keywrap'/>
</optional>
@@ -206,7 +200,7 @@
<value>hyperv</value>
<value>vbox</value>
<value>phyp</value>
<value>vz</value>
<value>parallels</value>
<value>bhyve</value>
</choice>
</attribute>
@@ -395,30 +389,6 @@
</element>
</define>
<!--
Enable or disable perf events for the domain. For each
of the events the following rules apply:
on: the event will be forcefully enabled
off: the event will be forcefully disabled
not specified: the event will be disabled by default
-->
<define name="perf">
<element name="perf">
<oneOrMore>
<element name="event">
<attribute name="name">
<choice>
<value>cmt</value>
</choice>
</attribute>
<attribute name="enabled">
<ref name="virYesNo"/>
</attribute>
</element>
</oneOrMore>
</element>
</define>
<!--
The Identifiers can be:
- an optional id attribute with a number on the domain element
@@ -696,16 +666,6 @@
<ref name="cpushares"/>
</element>
</optional>
<optional>
<element name="global_period">
<ref name="cpuperiod"/>
</element>
</optional>
<optional>
<element name="global_quota">
<ref name="cpuquota"/>
</element>
</optional>
<optional>
<element name="period">
<ref name="cpuperiod"/>
@@ -1633,7 +1593,6 @@
<define name="driverCache">
<attribute name="cache">
<choice>
<value>default</value>
<value>none</value>
<value>writeback</value>
<value>writethrough</value>
@@ -1772,45 +1731,6 @@
<attribute name="type">
<value>pci</value>
</attribute>
<optional>
<element name="model">
<attribute name="name">
<choice>
<!-- implementations of 'pci-bridge' -->
<value>pci-bridge</value>
<!-- implementations of 'dmi-to-pci-bridge' -->
<value>i82801b11-bridge</value>
<!-- implementations of 'pcie-root-port' -->
<value>ioh3420</value>
<!-- implementations of 'pcie-switch-upstream-port' -->
<value>x3130-upstream</value>
<!-- implementations of 'pcie-switch-downstream-port' -->
<value>xio3130-downstream</value>
</choice>
</attribute>
<empty/>
</element>
</optional>
<optional>
<element name="target">
<optional>
<attribute name='chassisNr'>
<ref name='uint8range'/>
</attribute>
</optional>
<optional>
<attribute name="chassis">
<ref name='uint8range'/>
</attribute>
</optional>
<optional>
<attribute name="port">
<ref name='uint8range'/>
</attribute>
</optional>
<empty/>
</element>
</optional>
<!-- *-root controllers have an optional element "pcihole64"-->
<choice>
<group>
@@ -1831,9 +1751,6 @@
<choice>
<value>pci-bridge</value>
<value>dmi-to-pci-bridge</value>
<value>pcie-root-port</value>
<value>pcie-switch-upstream-port</value>
<value>pcie-switch-downstream-port</value>
</choice>
</attribute>
</group>
@@ -1873,9 +1790,6 @@
<ref name="unsignedInt"/>
</attribute>
</optional>
<optional>
<ref name="ioeventfd"/>
</optional>
</element>
</optional>
</interleave>
@@ -2217,33 +2131,6 @@
<ref name="interface-options"/>
</interleave>
</group>
<group>
<attribute name="type">
<choice>
<value>udp</value>
</choice>
</attribute>
<interleave>
<element name="source">
<attribute name="address">
<ref name="ipv4Addr"/>
</attribute>
<attribute name="port">
<ref name="PortNumber"/>
</attribute>
<element name="local">
<attribute name="address">
<ref name="ipv4Addr"/>
</attribute>
<attribute name="port">
<ref name="PortNumber"/>
</attribute>
<empty/>
</element>
</element>
<ref name="interface-options"/>
</interleave>
</group>
<group>
<attribute name="type">
<value>server</value>
@@ -2861,14 +2748,6 @@
<empty/>
</element>
</optional>
<optional>
<element name="gl">
<attribute name="enable">
<ref name="virYesNo"/>
</attribute>
<empty/>
</element>
</optional>
</interleave>
</group>
<group>
@@ -2967,7 +2846,6 @@
<value>vmvga</value>
<value>xen</value>
<value>vbox</value>
<value>virtio</value>
</choice>
</attribute>
<group>
@@ -2984,11 +2862,6 @@
<ref name="unsignedInt"/>
</attribute>
</optional>
<optional>
<attribute name="vram64">
<ref name="unsignedInt"/>
</attribute>
</optional>
</group>
</choice>
<optional>
@@ -3303,11 +3176,6 @@
<optional>
<attribute name="slave"/>
</optional>
<optional>
<attribute name="append">
<ref name="virOnOff"/>
</attribute>
</optional>
<zeroOrMore>
<ref name='devSeclabel'/>
</zeroOrMore>
@@ -3327,18 +3195,6 @@
</optional>
</element>
</optional>
<optional>
<element name="log">
<attribute name="file">
<ref name="absFilePath"/>
</attribute>
<optional>
<attribute name="append">
<ref name="virOnOff"/>
</attribute>
</optional>
</element>
</optional>
</define>
<!--
The description for a console
@@ -3483,11 +3339,6 @@
<value>none</value>
</choice>
</attribute>
<optional>
<attribute name="autodeflate">
<ref name="virOnOff"/>
</attribute>
</optional>
<interleave>
<optional>
<ref name="alias"/>
@@ -3652,40 +3503,22 @@
<define name="input">
<element name="input">
<choice>
<group>
<attribute name="type">
<choice>
<value>tablet</value>
<value>mouse</value>
<value>keyboard</value>
</choice>
</attribute>
<optional>
<attribute name="bus">
<choice>
<value>ps2</value>
<value>usb</value>
<value>xen</value>
<value>virtio</value>
</choice>
</attribute>
</optional>
</group>
<group>
<attribute name="type">
<value>passthrough</value>
</attribute>
<attribute name="bus">
<value>virtio</value>
</attribute>
<element name="source">
<attribute name="evdev">
<ref name="absFilePath"/>
</attribute>
</element>
</group>
</choice>
<attribute name="type">
<choice>
<value>tablet</value>
<value>mouse</value>
<value>keyboard</value>
</choice>
</attribute>
<optional>
<attribute name="bus">
<choice>
<value>ps2</value>
<value>usb</value>
<value>xen</value>
</choice>
</attribute>
</optional>
<optional>
<ref name="alias"/>
</optional>
@@ -4136,9 +3969,9 @@
<optional>
<ref name="nvram"/>
</optional>
<zeroOrMore>
<optional>
<ref name="panic"/>
</zeroOrMore>
</optional>
</interleave>
</element>
</define>
@@ -4171,11 +4004,7 @@
</optional>
<optional>
<element name="hap">
<optional>
<attribute name="state">
<ref name="virOnOff"/>
</attribute>
</optional>
<empty/>
</element>
</optional>
<optional>
@@ -4221,11 +4050,7 @@
<element name="gic">
<optional>
<attribute name="version">
<choice>
<value>host</value>
<value>2</value>
<value>3</value>
</choice>
<ref name="positiveInteger"/>
</attribute>
</optional>
</element>
@@ -4632,11 +4457,9 @@
<element name="size">
<ref name="scaledInteger"/>
</element>
<optional>
<element name="node">
<ref name="unsignedInt"/>
</element>
</optional>
<element name="node">
<ref name="unsignedInt"/>
</element>
</interleave>
</element>
</define>
@@ -4929,43 +4752,6 @@
</optional>
</element>
</optional>
<optional>
<element name="vpindex">
<ref name="featurestate"/>
</element>
</optional>
<optional>
<element name="runtime">
<ref name="featurestate"/>
</element>
</optional>
<optional>
<element name="synic">
<ref name="featurestate"/>
</element>
</optional>
<optional>
<element name="stimer">
<ref name="featurestate"/>
</element>
</optional>
<optional>
<element name="reset">
<ref name="featurestate"/>
</element>
</optional>
<optional>
<element name="vendor_id">
<ref name="featurestate"/>
<optional>
<attribute name="value">
<data type="string">
<param name='pattern'>[^,]{0,12}</param>
</data>
</attribute>
</optional>
</element>
</optional>
</interleave>
</element>
</define>
@@ -5226,45 +5012,6 @@
</element>
</define>
<!--
Optional hypervisor extensions in their own namespace:
LXC
-->
<define name="lxcsharens">
<element name="namespace" ns="http://libvirt.org/schemas/domain/lxc/1.0">
<zeroOrMore>
<element name="sharenet">
<attribute name="type">
<choice>
<value>netns</value>
<value>name</value>
<value>pid</value>
</choice>
</attribute>
<attribute name='value'/>
</element>
<element name="shareipc">
<attribute name="type">
<choice>
<value>name</value>
<value>pid</value>
</choice>
</attribute>
<attribute name='value'/>
</element>
<element name="shareuts">
<attribute name="type">
<choice>
<value>name</value>
<value>pid</value>
</choice>
</attribute>
<attribute name='value'/>
</element>
</zeroOrMore>
</element>
</define>
<define name="metadata">
<element name="metadata">
<zeroOrMore>
@@ -5336,7 +5083,9 @@
</define>
<!-- Memory as an attribute is in KiB, no way to express a unit -->
<define name="memoryKB">
<data type="unsignedLong"/>
<data type="unsignedInt">
<param name="pattern">[0-9]+</param>
</data>
</define>
<define name="domainName">
<data type="string">
@@ -5356,10 +5105,9 @@
</data>
</define>
<define name="addrIPorName">
<choice>
<ref name="ipAddr"/>
<ref name="dnsName"/>
</choice>
<data type="string">
<param name="pattern">(([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9])|(([0-9a-fA-F]+|:)+[0-9a-fA-F]+)|([a-zA-Z0-9_\.\+\-]*)</param>
</data>
</define>
<define name="usbIdDefault">
<data type="string">
@@ -5496,15 +5244,6 @@
</define>
<define name="panic">
<element name="panic">
<optional>
<attribute name="model">
<choice>
<value>isa</value>
<value>pseries</value>
<value>hyperv</value>
</choice>
</attribute>
</optional>
<optional>
<ref name="address"/>
</optional>

View File

@@ -40,7 +40,6 @@
<ref name="capusbinterface"/>
<ref name="capnet"/>
<ref name="capscsihost"/>
<ref name="capscsitarget"/>
<ref name="capscsi"/>
<ref name="capstorage"/>
</choice>
@@ -169,17 +168,6 @@
</element>
</optional>
<optional>
<element name='capability'>
<attribute name='type'>
<choice>
<value>pci-bridge</value>
<value>cardbus-bridge</value>
</choice>
</attribute>
</element>
</optional>
<optional>
<element name='pci-express'>
<zeroOrMore>
@@ -383,16 +371,6 @@
</optional>
</define>
<define name='capscsitarget'>
<attribute name='type'>
<value>scsi_target</value>
</attribute>
<element name='target'>
<text/>
</element>
</define>
<define name='capscsi'>
<attribute name='type'>
<value>scsi</value>

View File

@@ -278,11 +278,6 @@
<empty/>
<ref name='devextents'/>
</choice>
<optional>
<attribute name="part_separator">
<ref name="virYesNo"/>
</attribute>
</optional>
</element>
</define>

View File

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

View File

@@ -161,7 +161,7 @@
<li><code>qcow</code>: QEMU v1 disk image format</li>
<li><code>qcow2</code>: QEMU v2 disk image format</li>
<li><code>qed</code>: QEMU Enhanced Disk image format</li>
<li><code>vmdk</code>: VMware disk image format</li>
<li><code>vmdk</code>: VMWare disk image format</li>
<li><code>vpc</code>: VirtualPC disk image format</li>
</ul>
<p>
@@ -550,9 +550,7 @@
backend supports cephx authentication for communication with the
Ceph cluster. Storing the cephx authentication key is done with
the libvirt secret mechanism. The UUID in the example pool input
refers to the UUID of the stored secret.<br />
The port attribute for a Ceph monitor does not have to be provided.
If not provided librados will use the default Ceph monitor port.
refers to the UUID of the stored secret.
<span class="since">Since 0.9.13</span>
</p>
@@ -562,8 +560,8 @@
&lt;name&gt;myrbdpool&lt;/name&gt;
&lt;source&gt;
&lt;name&gt;rbdpool&lt;/name&gt;
&lt;host name='1.2.3.4'/&gt;
&lt;host name='my.ceph.monitor'/&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;
@@ -755,10 +753,8 @@
<h2><a name="StorageBackendZFS">ZFS pools</a></h2>
<p>
This provides a pool based on the ZFS filesystem. Initially it was developed
for FreeBSD, and <span class="since">since 1.3.2</span> experimental support
for <a href="http://zfsonlinux.org/">ZFS on Linux</a> version 0.6.4 or newer
is available.
This provides a pool based on the ZFS filesystem. It is currently
supported on FreeBSD only.
</p>
<p>A pool could either be created manually using the <code>zpool create</code>

View File

@@ -1,89 +0,0 @@
## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2016 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
FILTERS = $(wildcard $(srcdir)/xml/nwfilter/*.xml)
EXTRA_DIST = \
apparmor/TEMPLATE.qemu \
apparmor/TEMPLATE.lxc \
apparmor/libvirt-qemu \
apparmor/libvirt-lxc \
apparmor/usr.lib.libvirt.virt-aa-helper \
apparmor/usr.sbin.libvirtd \
lxcconvert/virt-lxc-convert \
polkit/libvirt-acl.rules \
systemtap/events.stp \
systemtap/rpc-monitor.stp \
$(FILTERS) \
$(wildcard $(srcdir)/xml/storage/*.xml) \
$(wildcard $(srcdir)/xml/test/*.xml)
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir) \
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib
LDADD = $(STATIC_BINARIES) $(WARN_CFLAGS) $(COVERAGE_LDFLAGS) \
$(top_builddir)/src/libvirt.la $(top_builddir)/gnulib/lib/libgnu.la
noinst_PROGRAMS=dominfo/info1 dommigrate/dommigrate domsuspend/suspend \
domtop/domtop hellolibvirt/hellolibvirt object-events/event-test \
openauth/openauth rename/rename
dominfo_info1_SOURCES = dominfo/info1.c
dommigrate_dommigrate_SOURCES = dommigrate/dommigrate.c
domsuspend_suspend_SOURCES = domsuspend/suspend.c
domtop_domtop_SOURCES = domtop/domtop.c
hellolibvirt_hellolibvirt_SOURCES = hellolibvirt/hellolibvirt.c
object_events_event_test_SOURCES = object-events/event-test.c
openauth_openauth_SOURCES = openauth/openauth.c
rename_rename_SOURCES = rename/rename.c
if WITH_APPARMOR_PROFILES
apparmordir = $(sysconfdir)/apparmor.d/
apparmor_DATA = \
apparmor/usr.lib.libvirt.virt-aa-helper \
apparmor/usr.sbin.libvirtd \
$(NULL)
abstractionsdir = $(apparmordir)/abstractions
abstractions_DATA = \
apparmor/libvirt-qemu \
apparmor/libvirt-lxc \
$(NULL)
templatesdir = $(apparmordir)/libvirt
templates_DATA = \
apparmor/TEMPLATE.qemu \
apparmor/TEMPLATE.lxc \
$(NULL)
endif WITH_APPARMOR_PROFILES
if WITH_NWFILTER
NWFILTER_DIR = "$(DESTDIR)$(sysconfdir)/libvirt/nwfilter"
install-data-local:
$(MKDIR_P) "$(NWFILTER_DIR)"
for f in $(FILTERS); do \
$(INSTALL_DATA) $$f "$(NWFILTER_DIR)"; \
done
uninstall-local::
for f in $(FILTERS); do \
rm -f "$(NWFILTER_DIR)/`basename $$f`"; \
done
-test -z $(shell ls $(NWFILTER_DIR)) || rmdir $(NWFILTER_DIR)
endif WITH_NWFILTER

View File

@@ -0,0 +1,43 @@
## Copyright (C) 2005-2011, 2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
EXTRA_DIST= \
TEMPLATE.qemu \
TEMPLATE.lxc \
libvirt-qemu \
libvirt-lxc \
usr.lib.libvirt.virt-aa-helper \
usr.sbin.libvirtd
if WITH_APPARMOR_PROFILES
apparmordir = $(sysconfdir)/apparmor.d/
apparmor_DATA = \
usr.lib.libvirt.virt-aa-helper \
usr.sbin.libvirtd \
$(NULL)
abstractionsdir = $(apparmordir)/abstractions
abstractions_DATA = \
libvirt-qemu \
libvirt-lxc \
$(NULL)
templatesdir = $(apparmordir)/libvirt
templates_DATA = \
TEMPLATE.qemu \
TEMPLATE.lxc \
$(NULL)
endif WITH_APPARMOR_PROFILES

View File

@@ -0,0 +1,25 @@
## Copyright (C) 2005-2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
LDADDS = $(STATIC_BINARIES) $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \
$(COVERAGE_LDFLAGS)
noinst_PROGRAMS=info1
info1_SOURCES=info1.c
info1_LDFLAGS=
info1_LDADD= $(LDADDS)

View File

@@ -0,0 +1,5 @@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)
noinst_PROGRAMS = dommigrate
dommigrate_CFLAGS = $(WARN_CFLAGS)
dommigrate_SOURCES = dommigrate.c
dommigrate_LDADD = $(top_builddir)/src/libvirt.la

View File

@@ -0,0 +1,27 @@
## Process this file with automake to produce Makefile.in
## Copyright (C) 2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
LDADDS = $(STATIC_BINARIES) $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \
$(COVERAGE_LDFLAGS)
noinst_PROGRAMS=suspend
suspend_SOURCES=suspend.c
suspend_LDFLAGS=
suspend_LDADD= $(LDADDS)

View File

@@ -21,8 +21,6 @@
* Author: Michal Privoznik <mprivozn@redhat.com>
*/
#include <config.h>
#include <errno.h>
#include <getopt.h>
#include <libvirt/libvirt.h>
@@ -34,21 +32,6 @@
static int debug;
/* On mingw, there's a header file that poisons the well:
*
*
* CC domtop.o
*domtop.c:40:0: warning: "ERROR" redefined [enabled by default]
* #define ERROR(...) \
* ^
*In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:71:0,
* from /usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:23,
* from ../../gnulib/lib/unistd.h:48,
* from domtop.c:35:
* /usr/i686-w64-mingw32/sys-root/mingw/include/wingdi.h:75:0: note: this is the location of the previous definition
* #define ERROR 0
*/
#undef ERROR
#define ERROR(...) \
do { \
fprintf(stderr, "ERROR %s:%d : ", __FUNCTION__, __LINE__); \

View File

@@ -0,0 +1,29 @@
## Process this file with automake to produce Makefile.in
## 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/>.
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
-I$(top_srcdir)
LDADDS = $(STATIC_BINARIES) $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \
$(top_builddir)/gnulib/lib/libgnu.la $(COVERAGE_LDFLAGS)
noinst_PROGRAMS=domtop
domtop_SOURCES=domtop.c
domtop_LDFLAGS=
domtop_LDADD= $(LDADDS)

View File

@@ -0,0 +1,21 @@
## Copyright (C) 2005-2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)
noinst_PROGRAMS = hellolibvirt
hellolibvirt_CFLAGS = $(WARN_CFLAGS)
hellolibvirt_SOURCES = hellolibvirt.c
hellolibvirt_LDADD = $(top_builddir)/src/libvirt.la

View File

@@ -0,0 +1,18 @@
## Copyright (C) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
##
## 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= \
virt-lxc-convert

View File

@@ -0,0 +1,24 @@
## Copyright (C) 2005-2011, 2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
-I$(top_srcdir)
noinst_PROGRAMS = event-test
event_test_CFLAGS = $(WARN_CFLAGS)
event_test_SOURCES = event-test.c
event_test_LDADD = $(top_builddir)/src/libvirt.la \
$(top_builddir)/gnulib/lib/libgnu.la

View File

@@ -108,16 +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";
else if (detail == VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT)
ret = "Snapshot";
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) {
@@ -161,12 +155,6 @@ static const char *eventDetailToString(int event, int detail) {
case VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR:
ret = "API error";
break;
case VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY:
ret = "Post-copy";
break;
case VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED:
ret = "Post-copy Error";
break;
}
break;
case VIR_DOMAIN_EVENT_RESUMED:
@@ -180,9 +168,6 @@ static const char *eventDetailToString(int event, int detail) {
case VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT:
ret = "Snapshot";
break;
case VIR_DOMAIN_EVENT_RESUMED_POSTCOPY:
ret = "Post-copy";
break;
}
break;
case VIR_DOMAIN_EVENT_STOPPED:
@@ -616,8 +601,6 @@ static void stop(int sig)
int main(int argc, char **argv)
{
int ret = EXIT_FAILURE;
virConnectPtr dconn = NULL;
int callback1ret = -1;
int callback2ret = -1;
int callback3ret = -1;
@@ -645,34 +628,32 @@ int main(int argc, char **argv)
if (argc > 1 && STREQ(argv[1], "--help")) {
usage(argv[0]);
goto cleanup;
return -1;
}
if (virInitialize() < 0) {
fprintf(stderr, "Failed to initialize libvirt");
goto cleanup;
return -1;
}
if (virEventRegisterDefaultImpl() < 0) {
virErrorPtr err = virGetLastError();
fprintf(stderr, "Failed to register event implementation: %s\n",
err && err->message ? err->message: "Unknown error");
goto cleanup;
return -1;
}
virConnectPtr dconn = NULL;
dconn = virConnectOpenAuth(argc > 1 ? argv[1] : NULL,
virConnectAuthPtrDefault,
VIR_CONNECT_RO);
if (!dconn) {
printf("error opening\n");
goto cleanup;
return -1;
}
if (virConnectRegisterCloseCallback(dconn,
connectClose, NULL, NULL) < 0) {
fprintf(stderr, "Unable to register close callback\n");
goto cleanup;
}
virConnectRegisterCloseCallback(dconn,
connectClose, NULL, NULL);
sigaction(SIGTERM, &action_stop, NULL);
sigaction(SIGINT, &action_stop, NULL);
@@ -773,75 +754,69 @@ int main(int argc, char **argv)
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventDeviceAddedCallback),
strdup("device added"), myFreeFunc);
if ((callback1ret == -1) ||
(callback2ret == -1) ||
(callback3ret == -1) ||
(callback4ret == -1) ||
(callback5ret == -1) ||
(callback6ret == -1) ||
(callback7ret == -1) ||
(callback9ret == -1) ||
(callback10ret == -1) ||
(callback11ret == -1) ||
(callback12ret == -1) ||
(callback13ret == -1) ||
(callback14ret == -1) ||
(callback15ret == -1) ||
(callback16ret == -1) ||
(callback17ret == -1) ||
(callback18ret == -1) ||
(callback19ret == -1))
goto cleanup;
if (virConnectSetKeepAlive(dconn, 5, 3) < 0) {
virErrorPtr err = virGetLastError();
fprintf(stderr, "Failed to start keepalive protocol: %s\n",
err && err->message ? err->message : "Unknown error");
run = 0;
}
while (run) {
if (virEventRunDefaultImpl() < 0) {
if ((callback1ret != -1) &&
(callback2ret != -1) &&
(callback3ret != -1) &&
(callback4ret != -1) &&
(callback5ret != -1) &&
(callback6ret != -1) &&
(callback7ret != -1) &&
(callback9ret != -1) &&
(callback10ret != -1) &&
(callback11ret != -1) &&
(callback12ret != -1) &&
(callback13ret != -1) &&
(callback14ret != -1) &&
(callback15ret != -1) &&
(callback16ret != -1) &&
(callback17ret != -1) &&
(callback18ret != -1) &&
(callback19ret != -1)) {
if (virConnectSetKeepAlive(dconn, 5, 3) < 0) {
virErrorPtr err = virGetLastError();
fprintf(stderr, "Failed to run event loop: %s\n",
fprintf(stderr, "Failed to start keepalive protocol: %s\n",
err && err->message ? err->message : "Unknown error");
run = 0;
}
while (run) {
if (virEventRunDefaultImpl() < 0) {
virErrorPtr err = virGetLastError();
fprintf(stderr, "Failed to run event loop: %s\n",
err && err->message ? err->message : "Unknown error");
}
}
VIR_DEBUG("Deregistering event handlers");
virConnectDomainEventDeregister(dconn, myDomainEventCallback1);
virConnectDomainEventDeregisterAny(dconn, callback2ret);
virConnectDomainEventDeregisterAny(dconn, callback3ret);
virConnectDomainEventDeregisterAny(dconn, callback4ret);
virConnectDomainEventDeregisterAny(dconn, callback5ret);
virConnectDomainEventDeregisterAny(dconn, callback6ret);
virConnectDomainEventDeregisterAny(dconn, callback7ret);
virConnectDomainEventDeregisterAny(dconn, callback9ret);
virConnectDomainEventDeregisterAny(dconn, callback10ret);
virConnectDomainEventDeregisterAny(dconn, callback11ret);
virConnectDomainEventDeregisterAny(dconn, callback12ret);
virConnectDomainEventDeregisterAny(dconn, callback13ret);
virConnectDomainEventDeregisterAny(dconn, callback14ret);
virConnectDomainEventDeregisterAny(dconn, callback15ret);
virConnectNetworkEventDeregisterAny(dconn, callback16ret);
virConnectDomainEventDeregisterAny(dconn, callback17ret);
virConnectDomainEventDeregisterAny(dconn, callback18ret);
virConnectDomainEventDeregisterAny(dconn, callback19ret);
if (callback8ret != -1)
virConnectDomainEventDeregisterAny(dconn, callback8ret);
}
VIR_DEBUG("Deregistering event handlers");
virConnectDomainEventDeregister(dconn, myDomainEventCallback1);
virConnectDomainEventDeregisterAny(dconn, callback2ret);
virConnectDomainEventDeregisterAny(dconn, callback3ret);
virConnectDomainEventDeregisterAny(dconn, callback4ret);
virConnectDomainEventDeregisterAny(dconn, callback5ret);
virConnectDomainEventDeregisterAny(dconn, callback6ret);
virConnectDomainEventDeregisterAny(dconn, callback7ret);
virConnectDomainEventDeregisterAny(dconn, callback9ret);
virConnectDomainEventDeregisterAny(dconn, callback10ret);
virConnectDomainEventDeregisterAny(dconn, callback11ret);
virConnectDomainEventDeregisterAny(dconn, callback12ret);
virConnectDomainEventDeregisterAny(dconn, callback13ret);
virConnectDomainEventDeregisterAny(dconn, callback14ret);
virConnectDomainEventDeregisterAny(dconn, callback15ret);
virConnectNetworkEventDeregisterAny(dconn, callback16ret);
virConnectDomainEventDeregisterAny(dconn, callback17ret);
virConnectDomainEventDeregisterAny(dconn, callback18ret);
virConnectDomainEventDeregisterAny(dconn, callback19ret);
if (callback8ret != -1)
virConnectDomainEventDeregisterAny(dconn, callback8ret);
virConnectUnregisterCloseCallback(dconn, connectClose);
ret = EXIT_SUCCESS;
VIR_DEBUG("Closing connection");
if (dconn && virConnectClose(dconn) < 0)
printf("error closing\n");
cleanup:
if (dconn) {
VIR_DEBUG("Closing connection");
if (virConnectClose(dconn) < 0)
printf("error closing\n");
printf("done\n");
}
return ret;
printf("done\n");
return 0;
}

View File

@@ -0,0 +1,21 @@
## Copyright (C) 2005-2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)
noinst_PROGRAMS = openauth
openauth_CFLAGS = $(WARN_CFLAGS)
openauth_SOURCES = openauth.c
openauth_LDADD = $(top_builddir)/src/libvirt.la

View File

@@ -1,130 +0,0 @@
/*
* This example defines two groups of roles any user/group can be assigned to.
* An "admin" role which grants full access to all APIs on all objects to its
* members, and other roles which allows their members to all APIs defined in
* restrictedActions on domains matching a regular expressions assigned to
* each role. (Jump below the Role class definition to see them.) Users who
* belong to an "operator" role can act on any domain (matching ".*" RE),
* while members of "userA", "userB", and "userC" roles are limited by more
* specific REs.
*
* A virtualization host admin would define domains with names prefixed by
* customer names and create a separate role for each customer restricting
* its members to manage only domains with the corresponding prefix.
*/
function Role(name) {
this.name = name;
this.users = [];
this.groups = [];
this.check = function(subject, api, domain) {
var validUser = false
if (this.users.indexOf(subject.user) >= 0) {
validUser = true;
} else {
for (var i = 0; i < subject.groups.length; i++) {
if (this.groups.indexOf(subject.groups[i]) >= 0) {
validUser = true;
break;
}
}
}
if (validUser &&
(this.name == "admin" ||
!domain ||
(this.domains && domain.match(this.domains)))) {
var msg = "Access granted: " +
"user = " + subject.user +
", groups = [" + subject.groups + "]" +
", role = " + this.name +
", api = " + api;
if (domain)
msg += ", domain = " + domain;
polkit.log(msg);
return true
}
return false;
};
}
/* Basic operations and monitoring on a limited set of domains. */
var userA = new Role("userA");
userA.domains = /^a/;
userA.users = ["userA1", "userA2", "userA3", "multiUser"];
userA.groups = ["groupA1", "groupA2"];
var userB = new Role("userB");
userB.domains = /^b/;
userB.users = ["userB1", "userB2", "userB3", "multiUser"];
userB.groups = ["groupB1", "groupB2", "multiGroup"];
var userC = new Role("userC");
userC.domains = /^c/;
userC.users = ["userC1", "userC2", "userC3"];
userC.groups = ["groupC1", "groupC2", "multiGroup"];
/* Same as users but on any domain. */
var operator = new Role("operator");
operator.domains = /.*/;
operator.users = ["powerUser1", "powerUser2"];
operator.groups = ["powerGroup1", "powerGroup2", "powerGroup3"];
var users = [operator, userA, userB, userC];
/* Full access. */
var admin = new Role("admin");
admin.users = ["adminUser1"];
admin.groups = ["adminGroup1"];
restrictedActions = [
"domain.core-dump",
"domain.fs-freeze",
"domain.fs-trim",
"domain.getattr",
"domain.hibernate",
"domain.init-control",
"domain.inject-nmi",
"domain.open-device",
"domain.open-graphics",
"domain.pm-control",
"domain.read",
"domain.reset",
"domain.save",
"domain.screenshot",
"domain.send-input",
"domain.send-signal",
"domain.set-password",
"domain.set-time",
"domain.snapshot",
"domain.start",
"domain.stop",
"domain.suspend"
];
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.libvirt.api.") != 0)
return polkit.Result.NOT_HANDLED;
var api = action.id.replace("org.libvirt.api.", "");
var domain = action.lookup("domain_name");
if (admin.check(subject, api, domain))
return polkit.Result.YES;
if (restrictedActions.indexOf(api) < 0)
return polkit.Result.NOT_HANDLED;
for (var i = 0; i < users.length; i++) {
if (users[i].check(subject, api, domain))
return polkit.Result.YES;
}
return polkit.Result.NO;
});

View File

@@ -1,73 +0,0 @@
/*
* rename.c
*
* 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/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include <libvirt/libvirt.h>
int main(int argc, char **argv)
{
virConnectPtr conn = NULL; /* the hypervisor connection */
virDomainPtr dom = NULL; /* the domain being checked */
int ret = EXIT_FAILURE;
if (argc != 3) {
fprintf(stderr, "Usage: %s <current_domname> <temporary_domname>\n",
argv[0]);
goto error;
}
conn = virConnectOpen(NULL);
if (conn == NULL) {
fprintf(stderr, "Failed to connect to hypervisor\n");
goto error;
}
dom = virDomainLookupByName(conn, argv[1]);
if (dom == NULL) {
fprintf(stderr, "Failed to find domain\n");
goto error;
}
printf("Before first rename: %s\n", virDomainGetName(dom));
/* Get the information */
ret = virDomainRename(dom, argv[2], 0);
if (ret < 0) {
fprintf(stderr, "Failed to rename domain\n");
goto error;
}
printf("After first rename: %s\n", virDomainGetName(dom));
/* Get the information */
ret = virDomainRename(dom, argv[1], 0);
if (ret < 0) {
fprintf(stderr, "Failed to rename domain\n");
goto error;
}
printf("After second rename: %s\n", virDomainGetName(dom));
error:
if (dom != NULL)
virDomainFree(dom);
if (conn != NULL)
virConnectClose(conn);
return ret;
}

View File

@@ -0,0 +1,19 @@
## Copyright (C) 2005-2011, 2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
EXTRA_DIST = \
events.stp \
rpc-monitor.stp

View File

@@ -0,0 +1,54 @@
## Copyright (C) 2005-2011, 2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
FILTERS = \
allow-arp.xml \
allow-dhcp-server.xml \
allow-dhcp.xml \
allow-incoming-ipv4.xml \
allow-ipv4.xml \
clean-traffic.xml \
no-arp-spoofing.xml \
no-arp-ip-spoofing.xml \
no-arp-mac-spoofing.xml \
no-ip-multicast.xml \
no-ip-spoofing.xml \
no-mac-broadcast.xml \
no-mac-spoofing.xml \
no-other-l2-traffic.xml \
no-other-rarp-traffic.xml \
qemu-announce-self.xml \
qemu-announce-self-rarp.xml
EXTRA_DIST=$(FILTERS)
confdir = $(sysconfdir)/libvirt
NWFILTER_DIR = "$(DESTDIR)$(sysconfdir)/libvirt/nwfilter"
if WITH_NWFILTER
install-data-local:
$(MKDIR_P) "$(NWFILTER_DIR)"
for f in $(FILTERS); do \
$(INSTALL_DATA) $(srcdir)/$$f "$(NWFILTER_DIR)"; \
done
uninstall-local::
for f in $(FILTERS); do \
rm -f "$(NWFILTER_DIR)/$$f"; \
done
-test -z $(shell ls $(NWFILTER_DIR)) || rmdir $(NWFILTER_DIR)
endif WITH_NWFILTER

View File

@@ -5,7 +5,7 @@ index 209d64c..5ea72a1 100644
@@ -1,4 +1,4 @@
-# ssize_t.m4 serial 5 (gettext-0.18.2)
+# ssize_t.m4 serial 6 (gettext-0.18.2)
dnl Copyright (C) 2001-2003, 2006, 2010-2016 Free Software Foundation, Inc.
dnl Copyright (C) 2001-2003, 2006, 2010-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,21 @@ AC_DEFUN([gt_TYPE_SSIZE_T],

View File

@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2011, 2013-2016 Red Hat, Inc.
## Copyright (C) 2005-2011, 2013 Red Hat, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
@@ -16,17 +16,4 @@
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
virincdir = $(includedir)/libvirt
allheaders = $(wildcard $(srcdir)/libvirt/*.h)
virinc_HEADERS = $(filter-out $(srcdir)/libvirt/libvirt-admin.h \
$(srcdir)/libvirt/libvirt-common.h, $(allheaders))
virinc_HEADERS += libvirt/libvirt-common.h
EXTRA_DIST = libvirt/libvirt-common.h.in
# Temporarily disabled, but we need it for building
EXTRA_DIST += libvirt/libvirt-admin.h
install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(virincdir)
SUBDIRS=libvirt

View File

@@ -0,0 +1,43 @@
## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2011, 2013-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/>.
virincdir = $(includedir)/libvirt
virinc_HEADERS = libvirt.h \
libvirt-domain.h \
libvirt-domain-snapshot.h \
libvirt-event.h \
libvirt-host.h \
libvirt-interface.h \
libvirt-network.h \
libvirt-nodedev.h \
libvirt-nwfilter.h \
libvirt-secret.h \
libvirt-storage.h \
libvirt-stream.h \
libvirt-lxc.h \
libvirt-qemu.h \
virterror.h
install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(virincdir)
EXTRA_DIST = libvirt.h.in
# Temporarily disabled, but we need it for building
EXTRA_DIST += libvirt-admin.h

View File

@@ -30,9 +30,6 @@
extern "C" {
# endif
# define __VIR_ADMIN_H_INCLUDES__
# include <libvirt/libvirt-common.h>
# undef __VIR_ADMIN_H_INCLUDES__
/**
* virAdmConnect:
@@ -42,14 +39,6 @@ extern "C" {
*/
typedef struct _virAdmConnect virAdmConnect;
/**
* virAdmServer:
*
* a virAdmServer is a private structure and client-side representation of
* a remote server object
*/
typedef struct _virAdmServer virAdmServer;
/**
* virAdmConnectPtr:
*
@@ -59,56 +48,10 @@ typedef struct _virAdmServer virAdmServer;
*/
typedef virAdmConnect *virAdmConnectPtr;
/**
* virAdmServerPtr:
*
* a virAdmServerPtr is a pointer to a virAdmServer structure,
* this is the type used to reference client-side representation of a
* remote server object throughout all the APIs.
*/
typedef virAdmServer *virAdmServerPtr;
virAdmConnectPtr virAdmConnectOpen(const char *name, unsigned int flags);
int virAdmConnectClose(virAdmConnectPtr conn);
int virAdmConnectRef(virAdmConnectPtr conn);
int virAdmConnectIsAlive(virAdmConnectPtr conn);
int virAdmServerFree(virAdmServerPtr srv);
int virAdmConnectListServers(virAdmConnectPtr dmn,
virAdmServerPtr **servers,
unsigned int flags);
int virAdmGetVersion(unsigned long long *libVer);
char *virAdmConnectGetURI(virAdmConnectPtr conn);
int virAdmConnectGetLibVersion(virAdmConnectPtr conn,
unsigned long long *libVer);
/**
* virAdmConnectCloseFunc:
* @conn: virAdmConnect connection
* @reason: reason why the connection was closed (see virConnectCloseReason)
* @opaque: opaque client data
*
* A callback to be registered, in case a connection was closed.
*/
typedef void (*virAdmConnectCloseFunc)(virAdmConnectPtr conn,
int reason,
void *opaque);
int virAdmConnectRegisterCloseCallback(virAdmConnectPtr conn,
virAdmConnectCloseFunc cb,
void *opaque,
virFreeCallback freecb);
int virAdmConnectUnregisterCloseCallback(virAdmConnectPtr conn,
virAdmConnectCloseFunc cb);
const char *virAdmServerGetName(virAdmServerPtr srv);
virAdmServerPtr virAdmConnectLookupServer(virAdmConnectPtr conn,
const char *name,
unsigned int flags);
# ifdef __cplusplus
}

View File

@@ -90,7 +90,6 @@ typedef enum {
VIR_DOMAIN_RUNNING_WAKEUP = 8, /* returned from pmsuspended due to
wakeup event */
VIR_DOMAIN_RUNNING_CRASHED = 9, /* resumed from crashed */
VIR_DOMAIN_RUNNING_POSTCOPY = 10, /* running in post-copy migration mode */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_RUNNING_LAST
@@ -118,8 +117,6 @@ typedef enum {
VIR_DOMAIN_PAUSED_SNAPSHOT = 9, /* paused while creating a snapshot */
VIR_DOMAIN_PAUSED_CRASHED = 10, /* paused due to a guest crash */
VIR_DOMAIN_PAUSED_STARTING_UP = 11, /* the domain is being started */
VIR_DOMAIN_PAUSED_POSTCOPY = 12, /* paused for post-copy migration */
VIR_DOMAIN_PAUSED_POSTCOPY_FAILED = 13, /* paused after failed post-copy */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_PAUSED_LAST
@@ -314,22 +311,6 @@ typedef enum {
*/
# define VIR_DOMAIN_SCHEDULER_CPU_SHARES "cpu_shares"
/**
* VIR_DOMAIN_SCHEDULER_GLOBAL_PERIOD:
*
* Macro represents the enforcement period for a quota, in microseconds,
* for whole domain, when using the posix scheduler, as a ullong.
*/
# define VIR_DOMAIN_SCHEDULER_GLOBAL_PERIOD "global_period"
/**
* VIR_DOMAIN_SCHEDULER_GLOBAL_QUOTA:
*
* Macro represents the maximum bandwidth to be used within a period for
* whole domain, when using the posix scheduler, as an llong.
*/
# define VIR_DOMAIN_SCHEDULER_GLOBAL_QUOTA "global_quota"
/**
* VIR_DOMAIN_SCHEDULER_VCPU_PERIOD:
*
@@ -678,7 +659,6 @@ typedef enum {
VIR_MIGRATE_ABORT_ON_ERROR = (1 << 12), /* abort migration on I/O errors happened during migration */
VIR_MIGRATE_AUTO_CONVERGE = (1 << 13), /* force convergence */
VIR_MIGRATE_RDMA_PIN_ALL = (1 << 14), /* RDMA memory pinning */
VIR_MIGRATE_POSTCOPY = (1 << 15), /* enable (but do not start) post-copy migration */
} virDomainMigrateFlags;
@@ -777,16 +757,6 @@ typedef enum {
*/
# define VIR_MIGRATE_PARAM_MIGRATE_DISKS "migrate_disks"
/**
* VIR_MIGRATE_PARAM_DISKS_PORT:
*
* virDomainMigrate* params field: port that destination server should use
* for incoming disks migration. Type is VIR_TYPED_PARAM_INT. If set to 0 or
* omitted, libvirt will choose a suitable default. At the moment this is only
* supported by the QEMU driver.
*/
# define VIR_MIGRATE_PARAM_DISKS_PORT "disks_port"
/* Domain migration. */
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
unsigned long flags, const char *dname,
@@ -837,9 +807,6 @@ int virDomainMigrateGetMaxSpeed(virDomainPtr domain,
unsigned long *bandwidth,
unsigned int flags);
int virDomainMigrateStartPostCopy(virDomainPtr domain,
unsigned int flags);
char * virConnectGetDomainCapabilities(virConnectPtr conn,
const char *emulatorbin,
const char *arch,
@@ -1367,13 +1334,6 @@ int virDomainInterfaceStats (virDomainPtr dom,
*/
# define VIR_DOMAIN_BANDWIDTH_IN_BURST "inbound.burst"
/**
* VIR_DOMAIN_BANDWIDTH_IN_FLOOR:
*
* Macro represents the inbound floor of NIC bandwidth, as a uint.
*/
# define VIR_DOMAIN_BANDWIDTH_IN_FLOOR "inbound.floor"
/**
* VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE:
*
@@ -1804,7 +1764,6 @@ typedef enum {
VIR_DOMAIN_STATS_VCPU = (1 << 3), /* return domain virtual CPU info */
VIR_DOMAIN_STATS_INTERFACE = (1 << 4), /* return domain interfaces info */
VIR_DOMAIN_STATS_BLOCK = (1 << 5), /* return domain block info */
VIR_DOMAIN_STATS_PERF = (1 << 6), /* return domain perf event info */
} virDomainStatsTypes;
typedef enum {
@@ -1835,24 +1794,6 @@ int virDomainListGetStats(virDomainPtr *doms,
void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats);
/*
* Perf Event API
*/
/**
* VIR_PERF_PARAM_CMT:
*
* Macro for typed parameter name that represents CMT perf event.
*/
# define VIR_PERF_PARAM_CMT "cmt"
int virDomainGetPerfEvents(virDomainPtr dom,
virTypedParameterPtr *params,
int *nparams);
int virDomainSetPerfEvents(virDomainPtr dom,
virTypedParameterPtr params,
int nparams);
/*
* BlockJob API
*/
@@ -2381,8 +2322,6 @@ typedef enum {
typedef enum {
VIR_DOMAIN_EVENT_DEFINED_ADDED = 0, /* Newly created config file */
VIR_DOMAIN_EVENT_DEFINED_UPDATED = 1, /* Changed config file */
VIR_DOMAIN_EVENT_DEFINED_RENAMED = 2, /* Domain was renamed */
VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT = 3, /* Config was restored from a snapshot */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_DEFINED_LAST
@@ -2396,7 +2335,6 @@ typedef enum {
*/
typedef enum {
VIR_DOMAIN_EVENT_UNDEFINED_REMOVED = 0, /* Deleted the config file */
VIR_DOMAIN_EVENT_UNDEFINED_RENAMED = 1, /* Domain was renamed */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_UNDEFINED_LAST
@@ -2433,8 +2371,6 @@ typedef enum {
VIR_DOMAIN_EVENT_SUSPENDED_RESTORED = 4, /* Restored from paused state file */
VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT = 5, /* Restored from paused snapshot */
VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR = 6, /* suspended after failure during libvirt API call */
VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY = 7, /* suspended for post-copy migration */
VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED = 8, /* suspended after failed post-copy */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_SUSPENDED_LAST
@@ -2450,8 +2386,6 @@ typedef enum {
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED = 0, /* Normal resume due to admin unpause */
VIR_DOMAIN_EVENT_RESUMED_MIGRATED = 1, /* Resumed for completion of migration */
VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT = 2, /* Resumed from snapshot */
VIR_DOMAIN_EVENT_RESUMED_POSTCOPY = 3, /* Resumed, but migration is still
running in post-copy mode */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_RESUMED_LAST
@@ -2781,25 +2715,6 @@ int virDomainAbortJob(virDomainPtr dom);
*/
# define VIR_DOMAIN_JOB_MEMORY_BPS "memory_bps"
/** VIR_DOMAIN_JOB_MEMORY_DIRTY_RATE:
*
* virDomainGetJobStats field: number of memory pages dirtied by the guest
* per second, as VIR_TYPED_PARAM_ULLONG. This statistics makes sense only
* when live migration is running.
*/
# define VIR_DOMAIN_JOB_MEMORY_DIRTY_RATE "memory_dirty_rate"
/**
* VIR_DOMAIN_JOB_MEMORY_ITERATION:
*
* virDomainGetJobStats field: current iteration over domain's memory
* during live migration, as VIR_TYPED_PARAM_ULLONG. This is set to zero
* when memory starts to be transferred and the value is increased by one
* every time a new iteration is started to transfer memory pages dirtied
* since the last iteration.
*/
# define VIR_DOMAIN_JOB_MEMORY_ITERATION "memory_iteration"
/**
* VIR_DOMAIN_JOB_DISK_TOTAL:
*
@@ -3340,50 +3255,6 @@ typedef void (*virConnectDomainEventDeviceAddedCallback)(virConnectPtr conn,
const char *devAlias,
void *opaque);
/**
* virConnectDomainEventMigrationIterationCallback:
* @conn: connection object
* @dom: domain on which the event occurred
* @iteration: current iteration over domain's memory
* @opaque: application specific data
*
* This callback occurs during live migration when a new iteration over
* domain's memory starts. The @iteration value is increased by one every
* time a new iteration is started to transfer memory pages dirtied since
* the last iteration.
*
* The callback signature to use when registering for an event of type
* VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION with
* virConnectDomainEventRegisterAny().
*/
typedef void (*virConnectDomainEventMigrationIterationCallback)(virConnectPtr conn,
virDomainPtr dom,
int iteration,
void *opaque);
/**
* virConnectDomainEventJobCompletedCallback:
* @conn: connection object
* @dom: domain on which the event occurred
* @params: job statistics stored as an array of virTypedParameter
* @nparams: size of the params array
* @opaque: application specific data
*
* This callback occurs when a job (such as migration) running on the domain
* is completed. The params array will contain statistics of the just completed
* job as virDomainGetJobStats would return. The callback must not free @params
* (the array will be freed once the callback finishes).
*
* The callback signature to use when registering for an event of type
* VIR_DOMAIN_EVENT_ID_JOB_COMPLETED with
* virConnectDomainEventRegisterAny().
*/
typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn,
virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
void *opaque);
/**
* VIR_DOMAIN_TUNABLE_CPU_VCPUPIN:
*
@@ -3418,22 +3289,6 @@ typedef void (*virConnectDomainEventJobCompletedCallback)(virConnectPtr conn,
*/
# define VIR_DOMAIN_TUNABLE_CPU_CPU_SHARES "cputune.cpu_shares"
/**
* VIR_DOMAIN_TUNABLE_CPU_GLOBAL_PERIOD:
*
* Macro represents the enforcement period for a quota, in microseconds,
* for whole domain, when using the posix scheduler, as VIR_TYPED_PARAM_ULLONG.
*/
# define VIR_DOMAIN_TUNABLE_CPU_GLOBAL_PERIOD "cputune.global_period"
/**
* VIR_DOMAIN_TUNABLE_CPU_GLOBAL_QUOTA:
*
* Macro represents the maximum bandwidth to be used within a period for
* whole domain, when using the posix scheduler, as VIR_TYPED_PARAM_LLONG.
*/
# define VIR_DOMAIN_TUNABLE_CPU_GLOBAL_QUOTA "cputune.global_quota"
/**
* VIR_DOMAIN_TUNABLE_CPU_VCPU_PERIOD:
*
@@ -3683,8 +3538,6 @@ typedef enum {
VIR_DOMAIN_EVENT_ID_TUNABLE = 17, /* virConnectDomainEventTunableCallback */
VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE = 18,/* virConnectDomainEventAgentLifecycleCallback */
VIR_DOMAIN_EVENT_ID_DEVICE_ADDED = 19, /* virConnectDomainEventDeviceAddedCallback */
VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION = 20, /* virConnectDomainEventMigrationIterationCallback */
VIR_DOMAIN_EVENT_ID_JOB_COMPLETED = 21, /* virConnectDomainEventJobCompletedCallback */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_ID_LAST
@@ -3984,8 +3837,4 @@ int virDomainSetUserPassword(virDomainPtr dom,
const char *password,
unsigned int flags);
int virDomainRename(virDomainPtr dom,
const char *new_name,
unsigned int flags);
#endif /* __VIR_LIBVIRT_DOMAIN_H__ */

View File

@@ -29,6 +29,24 @@
# endif
/*
* virFreeCallback:
* @opaque: opaque user data provided at registration
*
* Type for a callback cleanup function to be paired with a callback. This
* function will be called as a final chance to clean up the @opaque
* registered with the primary callback, at the time when the primary
* callback is deregistered.
*
* It is forbidden to call any other libvirt APIs from an
* implementation of this callback, since it can be invoked
* from a context which is not re-entrant safe. Failure to
* abide by this requirement may lead to application deadlocks
* or crashes.
*/
typedef void (*virFreeCallback)(void *opaque);
/**
* virConnect:
*
@@ -737,6 +755,18 @@ char * virConnectGetSysinfo (virConnectPtr conn,
int virConnectSetKeepAlive(virConnectPtr conn,
int interval,
unsigned int count);
typedef enum {
VIR_CONNECT_CLOSE_REASON_ERROR = 0, /* Misc I/O error */
VIR_CONNECT_CLOSE_REASON_EOF = 1, /* End-of-file from server */
VIR_CONNECT_CLOSE_REASON_KEEPALIVE = 2, /* Keepalive timer triggered */
VIR_CONNECT_CLOSE_REASON_CLIENT = 3, /* Client requested it */
# ifdef VIR_ENUM_SENTINELS
VIR_CONNECT_CLOSE_REASON_LAST
# endif
} virConnectCloseReason;
/**
* virConnectCloseFunc:
* @conn: virConnect connection

View File

@@ -4,7 +4,7 @@
* Description: Provides APIs for the management of storage pools and volumes
* Author: Daniel Veillard <veillard@redhat.com>
*
* Copyright (C) 2006-2016 Red Hat, Inc.
* Copyright (C) 2006-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
@@ -57,6 +57,7 @@ typedef enum {
# endif
} virStoragePoolState;
typedef enum {
VIR_STORAGE_POOL_BUILD_NEW = 0, /* Regular build from scratch */
VIR_STORAGE_POOL_BUILD_REPAIR = (1 << 0), /* Repair / reinitialize */
@@ -70,23 +71,6 @@ typedef enum {
VIR_STORAGE_POOL_DELETE_ZEROED = 1 << 0, /* Clear all data to zeros (slow) */
} virStoragePoolDeleteFlags;
typedef enum {
VIR_STORAGE_POOL_CREATE_NORMAL = 0,
/* Create the pool and perform pool build without any flags */
VIR_STORAGE_POOL_CREATE_WITH_BUILD = 1 << 0,
/* Create the pool and perform pool build using the
* VIR_STORAGE_POOL_BUILD_OVERWRITE flag. This is mutually
* exclusive to VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE */
VIR_STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITE = 1 << 1,
/* Create the pool and perform pool build using the
* VIR_STORAGE_POOL_BUILD_NO_OVERWRITE flag. This is mutually
* exclusive to VIR_STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITE */
VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE = 1 << 2,
} virStoragePoolCreateFlags;
typedef struct _virStoragePoolInfo virStoragePoolInfo;
struct _virStoragePoolInfo {
@@ -131,7 +115,6 @@ typedef enum {
typedef enum {
VIR_STORAGE_VOL_DELETE_NORMAL = 0, /* Delete metadata only (fast) */
VIR_STORAGE_VOL_DELETE_ZEROED = 1 << 0, /* Clear all data to zeros (slow) */
VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS = 1 << 1, /* Force removal of volume, even if in use */
} virStorageVolDeleteFlags;
typedef enum {
@@ -153,9 +136,6 @@ typedef enum {
VIR_STORAGE_VOL_WIPE_ALG_RANDOM = 8, /* 1-pass random */
VIR_STORAGE_VOL_WIPE_ALG_TRIM = 9, /* 1-pass, trim all data on the
volume by using TRIM or DISCARD */
# ifdef VIR_ENUM_SENTINELS
VIR_STORAGE_VOL_WIPE_ALG_LAST
/*

View File

@@ -1,54 +0,0 @@
/* -*- c -*-
* libvirt.h: Core interfaces for the libvirt library
* Summary: core interfaces for the libvirt library
* Description: Provides the interfaces of the libvirt library to handle
* virtualized domains
*
* Copyright (C) 2005-2006, 2010-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: Daniel Veillard <veillard@redhat.com>
*/
#ifndef __VIR_VIRLIB_H__
# define __VIR_VIRLIB_H__
# include <sys/types.h>
# ifdef __cplusplus
extern "C" {
# endif
# define __VIR_LIBVIRT_H_INCLUDES__
# include <libvirt/libvirt-common.h>
# include <libvirt/libvirt-host.h>
# include <libvirt/libvirt-domain.h>
# include <libvirt/libvirt-domain-snapshot.h>
# include <libvirt/libvirt-event.h>
# include <libvirt/libvirt-interface.h>
# include <libvirt/libvirt-network.h>
# include <libvirt/libvirt-nodedev.h>
# include <libvirt/libvirt-nwfilter.h>
# include <libvirt/libvirt-secret.h>
# include <libvirt/libvirt-storage.h>
# include <libvirt/libvirt-stream.h>
# undef __VIR_LIBVIRT_H_INCLUDES__
# ifdef __cplusplus
}
# endif
#endif /* __VIR_VIRLIB_H__ */

View File

@@ -1,10 +1,10 @@
/* -*- c -*-
* libvirt-common.h
* Summary: common macros and enums for the libvirt and libvirt-admin library
* Description: Provides common macros and enums needed by both libvirt and
* libvirt-admin libraries
* libvirt.h: Core interfaces for the libvirt library
* Summary: core interfaces for the libvirt library
* Description: Provides the interfaces of the libvirt library to handle
* virtualized domains
*
* Copyright (C) 2015 Red Hat, Inc.
* Copyright (C) 2005-2006, 2010-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
@@ -20,15 +20,11 @@
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*
* Author: Erik Skultety <eskultet@redhat.com>
* Author: Daniel Veillard <veillard@redhat.com>
*/
#if !defined __VIR_LIBVIRT_H_INCLUDES__ && !defined __VIR_ADMIN_H_INCLUDES__
# error "Don't include this file directly"
#endif
#ifndef __VIR_VIRCOMMON_H__
# define __VIR_VIRCOMMON_H__
#ifndef __VIR_VIRLIB_H__
# define __VIR_VIRLIB_H__
# include <sys/types.h>
@@ -92,36 +88,22 @@ extern "C" {
# define LIBVIR_CHECK_VERSION(major, minor, micro) \
((major) * 1000000 + (minor) * 1000 + (micro) <= LIBVIR_VERSION_NUMBER)
/*
* virFreeCallback:
* @opaque: opaque user data provided at registration
*
* Type for a callback cleanup function to be paired with a callback. This
* function will be called as a final chance to clean up the @opaque
* registered with the primary callback, at the time when the primary
* callback is deregistered.
*
* It is forbidden to call any other libvirt APIs from an
* implementation of this callback, since it can be invoked
* from a context which is not re-entrant safe. Failure to
* abide by this requirement may lead to application deadlocks
* or crashes.
*/
typedef void (*virFreeCallback)(void *opaque);
typedef enum {
VIR_CONNECT_CLOSE_REASON_ERROR = 0, /* Misc I/O error */
VIR_CONNECT_CLOSE_REASON_EOF = 1, /* End-of-file from server */
VIR_CONNECT_CLOSE_REASON_KEEPALIVE = 2, /* Keepalive timer triggered */
VIR_CONNECT_CLOSE_REASON_CLIENT = 3, /* Client requested it */
# ifdef VIR_ENUM_SENTINELS
VIR_CONNECT_CLOSE_REASON_LAST
# endif
} virConnectCloseReason;
# define __VIR_LIBVIRT_H_INCLUDES__
# include <libvirt/libvirt-host.h>
# include <libvirt/libvirt-domain.h>
# include <libvirt/libvirt-domain-snapshot.h>
# include <libvirt/libvirt-event.h>
# include <libvirt/libvirt-interface.h>
# include <libvirt/libvirt-network.h>
# include <libvirt/libvirt-nodedev.h>
# include <libvirt/libvirt-nwfilter.h>
# include <libvirt/libvirt-secret.h>
# include <libvirt/libvirt-storage.h>
# include <libvirt/libvirt-stream.h>
# undef __VIR_LIBVIRT_H_INCLUDES__
# ifdef __cplusplus
}
# endif
#endif /* __VIR_VIRCOMMON_H__ */
#endif /* __VIR_VIRLIB_H__ */

View File

@@ -4,7 +4,7 @@
* Description: Provides the interfaces of the libvirt library to handle
* errors raised while using the library.
*
* Copyright (C) 2006-2016 Red Hat, Inc.
* Copyright (C) 2006-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
@@ -127,10 +127,6 @@ typedef enum {
VIR_FROM_POLKIT = 60, /* Error from polkit code */
VIR_FROM_THREAD = 61, /* Error from thread utils */
VIR_FROM_ADMIN = 62, /* Error from admin backend */
VIR_FROM_LOGGING = 63, /* Error from log manager */
VIR_FROM_XENXL = 64, /* Error from Xen xl config code */
VIR_FROM_PERF = 65, /* Error from perf */
# ifdef VIR_ENUM_SENTINELS
VIR_ERR_DOMAIN_LAST
@@ -312,8 +308,6 @@ typedef enum {
CPU*/
VIR_ERR_XML_INVALID_SCHEMA = 92, /* XML document doesn't validate against schema */
VIR_ERR_MIGRATE_FINISH_OK = 93, /* Finish API succeeded but it is expected to return NULL */
VIR_ERR_AUTH_UNAVAILABLE = 94, /* authentication unavailable */
VIR_ERR_NO_SERVER = 95, /* Server was not found */
} virErrorNumber;
/**

View File

@@ -155,7 +155,6 @@
# Non-server/HV driver defaults which are always enabled
%define with_sasl 0%{!?_without_sasl:1}
%define with_audit 0%{!?_without_audit:1}
%define with_nss_plugin 0%{!?_without_nss_plugin:1}
# Finally set the OS / architecture specific special cases
@@ -191,7 +190,7 @@
%endif
# RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor,
# VMware, libxenserver (xenapi), libxenlight (Xen 4.1 and newer),
# VMWare, libxenserver (xenapi), libxenlight (Xen 4.1 and newer),
# or HyperV.
%if 0%{?rhel}
%define with_openvz 0
@@ -648,8 +647,8 @@ BuildRequires: util-linux
BuildRequires: nfs-utils
%endif
%if %{with_firewalld} || %{with_polkit}
# Communication with the firewall and polkit daemons use DBus
%if %{with_firewalld}
# Communication with the firewall daemon uses DBus
BuildRequires: dbus-devel
%endif
@@ -1171,7 +1170,7 @@ virtualization capabilities of recent versions of Linux (and other OSes).
%package wireshark
Summary: Wireshark dissector plugin for libvirt RPC transactions
Group: Development/Libraries
Requires: wireshark >= 1.12.6-4
Requires: wireshark
Requires: %{name}-client = %{version}-%{release}
%description wireshark
@@ -1219,16 +1218,6 @@ Includes the Sanlock lock manager plugin for the QEMU
driver
%endif
%if %{with_nss_plugin}
%package nss
Summary: Libvirt plugin for Name Service Switch
Group: Development/Libraries
Requires: libvirt-daemon-driver-network = %{version}-%{release}
%description nss
Libvirt plugin for NSS for translating domain names into IP addresses.
%endif
%prep
%setup -q
@@ -1462,10 +1451,6 @@ rm -rf .git
%define _without_pm_utils --without-pm-utils
%endif
%if ! %{with_nss_plugin}
%define _without_nss_plugin --without-nss-plugin
%endif
%define when %(date +"%%F-%%T")
%define where %(hostname)
%define who %{?packager}%{!?packager:Unknown}
@@ -1543,7 +1528,6 @@ rm -f po/stamp-po
%{?_without_wireshark} \
%{?_without_systemd_daemon} \
%{?_without_pm_utils} \
%{?_without_nss_plugin} \
%{with_packager} \
%{with_packager_version} \
--with-qemu-user=%{qemu_user} \
@@ -1563,8 +1547,10 @@ rm -fr %{buildroot}
# on RHEL 5, thus we need to expand it here.
make install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir}
make -C examples distclean
for i in object-events dominfo domsuspend hellolibvirt openauth xml/nwfilter systemtap dommigrate domtop
do
(cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in)
done
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la
@@ -1575,15 +1561,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a
%endif
%if %{with_wireshark}
rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.la
mv $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.so \
$RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/libvirt.so
%endif
# Temporarily get rid of not-installed admin-related files
# Temporarily get rid of not-installed libvirt-admin.so
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt-admin.so
rm -f $RPM_BUILD_ROOT%{_bindir}/virt-admin
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-admin.1*
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libvirt-admin.conf
%if %{with_network}
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/
@@ -1707,13 +1688,12 @@ exit 0
%if %{with_systemd}
%if %{with_systemd_macros}
%systemd_post virtlockd.socket virtlogd.socket libvirtd.service libvirtd.socket
%systemd_post virtlockd.socket libvirtd.service libvirtd.socket
%else
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl enable \
virtlockd.socket \
virtlogd.socket \
libvirtd.service >/dev/null 2>&1 || :
fi
%endif
@@ -1729,29 +1709,24 @@ fi
%endif
/sbin/chkconfig --add libvirtd
/sbin/chkconfig --add virtlogd
/sbin/chkconfig --add virtlockd
%endif
%preun daemon
%if %{with_systemd}
%if %{with_systemd_macros}
%systemd_preun libvirtd.socket libvirtd.service virtlogd.socket virtlogd.service virtlockd.socket virtlockd.service
%systemd_preun libvirtd.socket libvirtd.service virtlockd.socket virtlockd.service
%else
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable \
libvirtd.socket \
libvirtd.service \
virtlogd.socket \
virtlogd.service \
virtlockd.socket \
virtlockd.service > /dev/null 2>&1 || :
/bin/systemctl stop \
libvirtd.socket \
libvirtd.service \
virtlogd.socket \
virtlogd.service \
virtlockd.socket \
virtlockd.service > /dev/null 2>&1 || :
fi
@@ -1760,8 +1735,6 @@ fi
if [ $1 = 0 ]; then
/sbin/service libvirtd stop 1>/dev/null 2>&1
/sbin/chkconfig --del libvirtd
/sbin/service virtlogd stop 1>/dev/null 2>&1
/sbin/chkconfig --del virtlogd
/sbin/service virtlockd stop 1>/dev/null 2>&1
/sbin/chkconfig --del virtlockd
fi
@@ -1772,13 +1745,11 @@ fi
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
/bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || :
/bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || :
/bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
fi
%else
if [ $1 -ge 1 ]; then
/sbin/service virtlockd reload > /dev/null 2>&1 || :
/sbin/service virtlogd reload > /dev/null 2>&1 || :
/sbin/service libvirtd condrestart > /dev/null 2>&1
fi
%endif
@@ -1788,30 +1759,10 @@ fi
%triggerpostun daemon -- libvirt-daemon < 1.2.1
if [ "$1" -ge "1" ]; then
/sbin/service virtlockd reload > /dev/null 2>&1 || :
/sbin/service virtlogd reload > /dev/null 2>&1 || :
/sbin/service libvirtd condrestart > /dev/null 2>&1
fi
%endif
# In upgrade scenario we must explicitly enable virtlockd/virtlogd
# sockets, if libvirtd is already enabled and start them if
# libvirtd is running, otherwise you'll get failures to start
# guests
%triggerpostun daemon -- libvirt-daemon < 1.3.0
if [ $1 -ge 1 ] ; then
%if %{with_systemd}
/bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 &&
/bin/systemctl enable virtlogd.socket || :
/bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 &&
/bin/systemctl start virtlogd.socket || :
%else
/sbin/chkconfig libvirtd 1>/dev/null 2>&1 &&
/sbin/chkconfig virtlogd on || :
/sbin/service libvirtd status 1>/dev/null 2>&1 &&
/sbin/service virtlogd start || :
%endif
fi
%if %{with_network}
%post daemon-config-network
if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
@@ -1964,21 +1915,16 @@ exit 0
%if %{with_systemd}
%{_unitdir}/libvirtd.service
%{_unitdir}/libvirtd.socket
%{_unitdir}/virtlogd.service
%{_unitdir}/virtlogd.socket
%{_unitdir}/virtlockd.service
%{_unitdir}/virtlockd.socket
%else
%{_sysconfdir}/rc.d/init.d/libvirtd
%{_sysconfdir}/rc.d/init.d/virtlogd
%{_sysconfdir}/rc.d/init.d/virtlockd
%endif
%doc daemon/libvirtd.upstart
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
%config(noreplace) %{_sysconfdir}/sysconfig/virtlogd
%config(noreplace) %{_sysconfdir}/sysconfig/virtlockd
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
%if 0%{?fedora} || 0%{?rhel} >= 6
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
@@ -2000,8 +1946,6 @@ exit 0
%{_datadir}/augeas/lenses/libvirtd.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
%{_datadir}/augeas/lenses/virtlogd.aug
%{_datadir}/augeas/lenses/tests/test_virtlogd.aug
%{_datadir}/augeas/lenses/virtlockd.aug
%{_datadir}/augeas/lenses/tests/test_virtlockd.aug
%{_datadir}/augeas/lenses/libvirt_lockd.aug
@@ -2028,11 +1972,9 @@ exit 0
%endif
%attr(0755, root, root) %{_sbindir}/libvirtd
%attr(0755, root, root) %{_sbindir}/virtlogd
%attr(0755, root, root) %{_sbindir}/virtlockd
%{_mandir}/man8/libvirtd.8*
%{_mandir}/man8/virtlogd.8*
%{_mandir}/man8/virtlockd.8*
%if ! %{with_driver_modules}
@@ -2061,7 +2003,7 @@ exit 0
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
@@ -2097,8 +2039,6 @@ exit 0
%endif
%endif # ! %{with_driver_modules}
%doc examples/polkit/*.rules
%if %{with_network}
%files daemon-config-network
%defattr(-, root, root)
@@ -2168,7 +2108,7 @@ exit 0
%config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
@@ -2337,12 +2277,7 @@ exit 0
%if %{with_wireshark}
%files wireshark
%{_libdir}/wireshark/plugins/libvirt.so
%endif
%if %{with_nss_plugin}
%files nss
%{_libdir}/libnss_libvirt.so.2
%{_libdir}/wireshark/plugins/*/libvirt.so
%endif
%if %{with_lxc}
@@ -2361,7 +2296,6 @@ exit 0
%dir %{_includedir}/libvirt
%{_includedir}/libvirt/virterror.h
%{_includedir}/libvirt/libvirt.h
%{_includedir}/libvirt/libvirt-common.h
%{_includedir}/libvirt/libvirt-domain.h
%{_includedir}/libvirt/libvirt-domain-snapshot.h
%{_includedir}/libvirt/libvirt-event.h
@@ -2394,40 +2328,14 @@ exit 0
%doc examples/dommigrate
%doc examples/openauth
%doc examples/xml
%doc examples/rename
%doc examples/systemtap
%changelog
* Tue Mar 1 2016 Daniel Veillard <veillard@redhat.com> - 1.3.2-1
- Various improvements for the Xen libxl driver
- virt-admin improvement
- Various improvements for the RDB volumes
- many bug fixes and improvements
* Wed Dec 23 2015 Cole Robinson <crobinso@redhat.com> - 1.2.18.2-1
- Maintenance release 1.2.18.2
* Sun Jan 17 2016 Daniel Veillard <veillard@redhat.com> - 1.3.1-1
- Various improvements for the Xen libxl driver
- rbd: Add support for wiping and cloning images to storage driver
- PCI hostdev improvements and fixes
- many bug fixes and improvements
* Wed Dec 9 2015 Daniel Veillard <veillard@redhat.com> - 1.3.0-1
- virt-admin and administration API
- various improvements in virtio devices support
- log daemon, logging improvements and protocol
- many bug fixes and improvements
* Wed Nov 4 2015 Daniel Veillard <veillard@redhat.com> - 1.2.21-1
- a number of improvements and bug fixes
* Fri Oct 2 2015 Daniel Veillard <veillard@redhat.com> - 1.2.20-1
- security fixes for CVE-2015-5247
- a number of improvements and bug fixes
* Wed Sep 2 2015 Daniel Veillard <veillard@redhat.com> - 1.2.19-1
- Big improvements on ppc64 support
- New virDomainRename API
- Support for QEMU new pci emulations
- a number of improvements and bug fixes
* Mon Sep 21 2015 Cole Robinson <crobinso@redhat.com> - 1.2.18.1-1
- Maintenance release 1.2.18.1
* Mon Aug 3 2015 Daniel Veillard <veillard@redhat.com> - 1.2.18-1
- libxl: support dom0

View File

@@ -26,7 +26,7 @@ AC_DEFUN([LIBVIRT_COMPILE_PIE],[
;; dnl All code is position independent on Win32 target
*)
gl_COMPILER_OPTION_IF([-fPIE -DPIE -pie], [
PIE_CFLAGS="-fPIE -DPIE"
PIE_CFLAGS="-fPIE -DPIE -pie"
PIE_LDFLAGS="-pie"
])
esac

View File

@@ -1,39 +0,0 @@
dnl Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
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
dnl License as published by the Free Software Foundation; either
dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
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_DEFUN([LIBVIRT_CHECK_LOGIN_SHELL], [
AC_ARG_WITH([login_shell],
[AS_HELP_STRING([--with-login-shell],
[build virt-login-shell @<:@default=check@:>@])])
m4_divert_text([DEFAULTS], [with_login_shell=check])
if test "x$with_login_shell" != "xno"; then
if test "x$with_win" = "xyes"; then
if "x$with_login_shell" = "yes"; then
AC_MSG_ERROR([virt-login-shell is not supported on Windows])
else
with_login_shell=no;
fi
else
with_login_shell=yes;
fi
fi
if test "x$with_login_shell" = "xyes" ; then
AC_DEFINE_UNQUOTED([WITH_LOGIN_SHELL], 1, [whether virt-login-shell is built])
fi
AM_CONDITIONAL([WITH_LOGIN_SHELL], [test "$with_login_shell" = "yes"])
])

View File

@@ -1,51 +0,0 @@
dnl The libvirt nsswitch plugin
dnl
dnl Copyright (C) 2016 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
dnl License as published by the Free Software Foundation; either
dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
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/>.
dnl
AC_DEFUN([LIBVIRT_CHECK_NSS],[
AC_ARG_WITH([nss-plugin],
[AS_HELP_STRING([--with-nss-plugin],
[enable Name Servie Switch plugin for resolving guest IP addresses])],
[], [with_nss_plugin=check])
fail=0
if test "x$with_nss_plugin" != "xno" ; then
AC_CHECK_HEADERS([nss.h], [
with_nss_plugin=yes
],[
if test "x$with_nss_plugin" = "xyes" ; then
fail = 1
fi
])
if test $fail = 1 ; then
AC_MSG_ERROR([Can't build nss plugin without nss.h])
fi
if test "x$with_nss_plugin" = "xyes" ; then
AC_DEFINE_UNQUOTED([NSS], 1, [whether nss plugin is enabled])
fi
fi
AM_CONDITIONAL(WITH_NSS, [test "x$with_nss_plugin" = "xyes"])
])
AC_DEFUN([LIBVIRT_RESULT_NSS],[
LIBVIRT_RESULT([nss], [$with_nss_plugin])
])

View File

@@ -46,13 +46,6 @@ AC_DEFUN([LIBVIRT_CHECK_SANLOCK],[
[whether sanlock supports sanlock_inq_lockspace])
fi
AC_CHECK_LIB([sanlock_client], [sanlock_add_lockspace_timeout],
[sanlock_add_lockspace_timeout=yes], [sanlock_add_lockspace_timeout=no])
if test "x$sanlock_add_lockspace_timeout" = "xyes" ; then
AC_DEFINE_UNQUOTED([HAVE_SANLOCK_ADD_LOCKSPACE_TIMEOUT], 1,
[whether Sanlock supports sanlock_add_lockspace_timeout])
fi
CPPFLAGS="$old_cppflags"
LIBS="$old_libs"
fi

View File

@@ -1,6 +1,6 @@
dnl The libselinux.so library
dnl
dnl Copyright (C) 2012-2014, 2016 Red Hat, Inc.
dnl Copyright (C) 2012-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
@@ -41,21 +41,6 @@ int setcon(char *context);
AC_DEFINE_UNQUOTED([VIR_SELINUX_CTX_CONST], [$lv_cv_setcon_const],
[Define to empty or 'const' depending on how SELinux qualifies its
security context parameters])
# ...and again for 2.5
AC_CACHE_CHECK([for selinux selabel_open parameter type],
[lv_cv_selabel_open_const],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <selinux/selinux.h>
#include <selinux/label.h>
struct selabel_handle *selabel_open(unsigned, struct selinux_opt *, unsigned);
]])],
[lv_cv_selabel_open_const=''],
[lv_cv_selabel_open_const='const'])])
AC_DEFINE_UNQUOTED([VIR_SELINUX_OPEN_CONST], [$lv_cv_selabel_open_const],
[Define to empty or 'const' depending on how SELinux qualifies its
selabel_open parameter])
AC_MSG_CHECKING([SELinux mount point])
if test "$with_selinux_mount" = "check" || test -z "$with_selinux_mount"; then

View File

@@ -28,20 +28,15 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
dnl Check for system location of wireshark plugins
if test "x$with_wireshark_dissector" != "xno" ; then
if test "x$with_ws_plugindir" = "xcheck" ; then
plugindir="$($PKG_CONFIG --variable plugindir wireshark)"
if test "x$ws_plugindir" = "x" ; then
dnl On some systems the plugindir variable may not be stored within pkg config.
dnl Fall back to older style of constructing the plugin dir path.
plugindir="$libdir/wireshark/plugins/$($PKG_CONFIG --modversion wireshark)"
fi
ws_plugindir="$libdir/wireshark/plugins/$($PKG_CONFIG --modversion wireshark)"
elif test "x$with_ws_plugindir" = "xno" || test "x$with_ws_plugindir" = "xyes"; then
AC_MSG_ERROR([ws-plugindir must be used only with valid path])
else
plugindir=$with_ws_plugindir
ws_plugindir=$with_ws_plugindir
fi
fi
AC_SUBST([plugindir])
AC_SUBST([ws_plugindir])
])
AC_DEFUN([LIBVIRT_RESULT_WIRESHARK],[

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