]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
8 years agodocs: remove outdated or duplicated content
Daniel P. Berrange [Mon, 31 Oct 2016 11:23:50 +0000 (11:23 +0000)]
docs: remove outdated or duplicated content

Remove a bunch of pages which are either outdated, have no
content, or duplicate content better described elsewhere
in the site or wiki.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: remove navigation sidebar from pages
Daniel P. Berrange [Mon, 31 Oct 2016 11:25:26 +0000 (11:25 +0000)]
docs: remove navigation sidebar from pages

A combination of the index page, top nav bar and docs.html page
provide links to all pages on the site. The left hand nav bar
is thus redundant and can be removed to provide a simpler style
for the site.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: fill out docs page with useful links
Daniel P. Berrange [Mon, 31 Oct 2016 11:29:21 +0000 (11:29 +0000)]
docs: fill out docs page with useful links

The docs page is currently completely empty. Fill it in with
links to the various documentation, categorized as to whether
it is targetting people deploying libvirt, application
developers using libvirt, or people working on libvirt
itself.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add some improved styling to contact page
Daniel P. Berrange [Mon, 31 Oct 2016 11:36:20 +0000 (11:36 +0000)]
docs: add some improved styling to contact page

Change the contact page styling to better distinguish the
various mailing lists.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: expand downloads page to cover all modules
Daniel P. Berrange [Mon, 31 Oct 2016 11:27:27 +0000 (11:27 +0000)]
docs: expand downloads page to cover all modules

Previously the download page only covered the main libvirt
module and the app dev guide. Expand it to provide direct
links to all artifacts published by the project, whether
the main library, language bindings, docs, or testing.

Tweak the top table styling to better fit in with new
branding.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: rewrite content on front page to be more useful
Daniel P. Berrange [Wed, 26 Oct 2016 08:37:06 +0000 (10:37 +0200)]
docs: rewrite content on front page to be more useful

The front page contains a bunch of content that is either
outdated (eg links to libvirt qpid) or not particularly
useful (links to vendor hypervisor sites).

This rewrites it to be more directly useful to visitors,
providing a updated intro to libvirt project, direct
links to key pieces of website content (new contributors
guide, security process, bug reporting, XML formats), and
feed showing recent 5 blog posts on the virt tools planet.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoRevert "syntax-check: Enforce <code> inside <dt> elements"
Daniel P. Berrange [Mon, 31 Oct 2016 12:04:54 +0000 (12:04 +0000)]
Revert "syntax-check: Enforce <code> inside <dt> elements"

This reverts commit 1f29f3da065ef12d3ec39c3c673186f8ea6d764e.

Assuming <dt> is always used to document symbols is way too
broad, requiring far too many exemptions to be marked to
avoid syntax check rules.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: remove related links page
Daniel P. Berrange [Tue, 25 Oct 2016 15:32:37 +0000 (17:32 +0200)]
docs: remove related links page

The related links page is either horribly outdated, or duplicating
stuff already linked elsewhere.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: remove todo page
Daniel P. Berrange [Tue, 25 Oct 2016 15:31:32 +0000 (17:31 +0200)]
docs: remove todo page

The todo page used to be auto-generated from bugzilla but is
no longer used.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add three core links in the header bar
Daniel P. Berrange [Tue, 25 Oct 2016 15:27:10 +0000 (17:27 +0200)]
docs: add three core links in the header bar

Add links to download, communicate and learn in the
header bar, as the main jumping off points for
navigation.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add page describing contribution to libvirt
Daniel P. Berrange [Mon, 31 Oct 2016 11:48:12 +0000 (11:48 +0000)]
docs: add page describing contribution to libvirt

Add a page that describes what contributions libvirt is
looking for and how to get involved.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: simplify style for headers
Daniel P. Berrange [Tue, 25 Oct 2016 15:26:25 +0000 (17:26 +0200)]
docs: simplify style for headers

Remove the 1px border underneath all headers and make them
use black text to simplify visual appearance

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add footer to all pages
Daniel P. Berrange [Tue, 25 Oct 2016 14:56:50 +0000 (16:56 +0200)]
docs: add footer to all pages

Add a footer to all pages containing a blurb about the
code of conduct, and links to various communication
channels / social media / user self-help sites.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: provide new style logos for the apps page
Daniel P. Berrange [Mon, 7 Nov 2016 16:41:23 +0000 (16:41 +0000)]
docs: provide new style logos for the apps page

Replace the old "Made with libvirt" logo with links to the
new "Libvirt powered" logos, providing various sizes.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: redo style of front page
Daniel P. Berrange [Tue, 25 Oct 2016 14:55:39 +0000 (16:55 +0200)]
docs: redo style of front page

Use a large logo banner across the front page. Tile the
three lists of links into three panels

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: switch to new website banner
Daniel P. Berrange [Tue, 25 Oct 2016 14:16:29 +0000 (16:16 +0200)]
docs: switch to new website banner

Use a dark banner whose color matches the dark green used in
the logo. Introduce a newly rendered version of the header
logo derived from new SVG file, instead of old one from
(now lost) Adobe Illustrator file.

The top banner logo now links to the front page as is common
practice for most websites.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add master SVG for libvirt logo
Daniel P. Berrange [Mon, 31 Oct 2016 12:20:53 +0000 (12:20 +0000)]
docs: add master SVG for libvirt logo

Add the SVG files for the libvirt logo, along with corresponding
pre-rendered PNG bitmaps at key sizes. Also add a README file
describing how to modify the logos and their intended usages.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: use overpass font for website
Daniel P. Berrange [Tue, 25 Oct 2016 13:55:17 +0000 (15:55 +0200)]
docs: use overpass font for website

The original libvirt logo was built using what appears to be
either Overpass font, or one stylistically very similar (the
slanted top of letters like 'l', 't', etc). The newly recreated
libvirt logo will use Overpass. Use this font for the website
text too, to provide a consistent style.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoqemu: Generate memory device aliases according to slot number
Peter Krempa [Tue, 1 Nov 2016 05:21:36 +0000 (06:21 +0100)]
qemu: Generate memory device aliases according to slot number

The memory device alias needs to be treated as machine ABI as qemu is
using it in the migration stream for section labels. To simplify this
generate the alias from the slot number unless an existing broken
configuration is detected.

With this patch the aliases are predictable and even certain
configurations which would not be migratable previously are fixed.

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

8 years agoqemu: Assign slots to memory devices prior to usage
Peter Krempa [Tue, 1 Nov 2016 05:07:09 +0000 (06:07 +0100)]
qemu: Assign slots to memory devices prior to usage

As with other devices assign the slot number right away when adding the
device. This will make the slot numbers static as we do with other
addressing elements and it will ultimately simplify allocation of the
alias in a static way which does not break with qemu.

8 years agoqemu: process: detect if dimm aliases are broken on reconnect
Peter Krempa [Mon, 31 Oct 2016 15:49:49 +0000 (16:49 +0100)]
qemu: process: detect if dimm aliases are broken on reconnect

Detect on reconnect to a running qemu VM whether the alias of a
hotpluggable memory device (dimm) does not match the dimm slot number
where it's connected to. This is necessary as qemu is actually
considering the alias as machine ABI used to connect the backend object
to the dimm device.

This will require us to keep them consistent so that we can reliably
restore them on migration. In some situations it was currently possible
to create a mismatched configuration and qemu would refuse to restore
the migration stream.

To avoid breaking existing VMs we'll need to keep the old algorithm
though.

8 years agoconf: Allow specifying only the slot number for hotpluggable memory
Peter Krempa [Thu, 13 Oct 2016 12:55:47 +0000 (14:55 +0200)]
conf: Allow specifying only the slot number for hotpluggable memory

Simplify handling of the 'dimm' address element by allowing to specify
the slot number only. This will allow libvirt to allocate slot numbers
before starting qemu.

8 years agoconfigure: remove fallback check for parted
Daniel P. Berrange [Wed, 9 Nov 2016 17:29:20 +0000 (17:29 +0000)]
configure: remove fallback check for parted

Since we no longer support building on RHEL-5, we can
drop the non-pkg-config based check for parted.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoxen: remove legacy hack for RHEL-5 Xen
Daniel P. Berrange [Wed, 9 Nov 2016 17:27:50 +0000 (17:27 +0000)]
xen: remove legacy hack for RHEL-5 Xen

We dropped support for RHEL-5 vintage Xen a while ago,
but forgot to remove some of the hacks for it.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoqemu: Remove erroneously placed comments for numerical ordering
John Ferlan [Thu, 10 Nov 2016 14:47:50 +0000 (09:47 -0500)]
qemu: Remove erroneously placed comments for numerical ordering

Commit id '74bbb8c2ec' seems to have mismerged a bit - adding 240 comments
out of place.  Just clean that up.

8 years agoqemuDomainAttachNetDevice: Enable multiqueue for vhost-user
Michal Privoznik [Tue, 25 Oct 2016 10:18:23 +0000 (12:18 +0200)]
qemuDomainAttachNetDevice: Enable multiqueue for vhost-user

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

We have everything ready. Actually the only limitation was our
check that denied hotplug of vhost-user.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemuDomainAttachNetDevice: Don't overwrite error on rollback
Michal Privoznik [Tue, 25 Oct 2016 10:16:36 +0000 (12:16 +0200)]
qemuDomainAttachNetDevice: Don't overwrite error on rollback

If there is an error hotpluging a net device (for whatever
reason) a rollback operation is performed. However, whilst doing
so various helper functions that are called report errors on
their own. This results in the original error to be overwritten
and thus misleading the user.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Make sure shmem memory is shared
Martin Kletzander [Thu, 10 Nov 2016 07:20:07 +0000 (08:20 +0100)]
qemu: Make sure shmem memory is shared

Even though using /dev/shm/asdf as the backend, we still need to make
the mapping shared.  The original patch forgot to add that parameter.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agolxc.conf: s/QEMU/LXC/
Michal Privoznik [Wed, 9 Nov 2016 17:13:45 +0000 (18:13 +0100)]
lxc.conf: s/QEMU/LXC/

There's one copy paste error where a comment mentions QEMU
instead of LXC driver.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu_capabilities: fix build with for old gcc
Pavel Hrdina [Wed, 9 Nov 2016 17:40:14 +0000 (18:40 +0100)]
qemu_capabilities: fix build with for old gcc

../../src/qemu/qemu_capabilities.c:3757: error: declaration of
'basename' shadows a global declaration [-Wshadow]

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agoqemu: Fix double free when live-attaching shmem
Martin Kletzander [Wed, 9 Nov 2016 16:40:17 +0000 (17:40 +0100)]
qemu: Fix double free when live-attaching shmem

Function qemuDomainAttachShmemDevice() steals the device data if the
hotplug was successful, but the condition checked for unsuccessful
execution otherwise.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: command: Add debug option for gluster volumes
Prasanna Kumar Kalever [Fri, 14 Oct 2016 03:37:45 +0000 (05:37 +0200)]
qemu: command: Add debug option for gluster volumes

Propagate the selected or default level to qemu if it's supported.

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

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: conf: add option for tuning debug logging level
Prasanna Kumar Kalever [Wed, 21 Sep 2016 19:34:18 +0000 (01:04 +0530)]
qemu: conf: add option for tuning debug logging level

This helps in selecting log level of the gluster gfapi, output to stderr.
The option is 'gluster_debug_level', can be tuned by editing
'/etc/libvirt/qemu.conf'

Debug levels ranges 0-9, with 9 being the most verbose, and 0
representing no debugging output.  The default is the same as it was
before, which is a level of 4.  The current logging levels defined in
the gluster gfapi are:

    0 - None
    1 - Emergency
    2 - Alert
    3 - Critical
    4 - Error
    5 - Warning
    6 - Notice
    7 - Info
    8 - Debug
    9 - Trace

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv3
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv3

Add QMP schema data query for aarch64. The gic capabilities are
unfortunately queried after the QMP schema and thus this patch needs to
undo the temporary removal of the declared support for query-qmp-schema.

Note that as a gicv3 machine was not available the schema data is taken
from the gicv2 case. It should be identical since qemu would be built
from the same source.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv2
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv2

Add QMP schema data query for aarch64. The gic capabilities are
unfortunately queried after the QMP schema and thus this patch needs to
undo the temporary removal of the declared support for query-qmp-schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: capabilities: Detect support for gluster debug setting
Prasanna Kumar Kalever [Wed, 21 Sep 2016 19:34:19 +0000 (01:04 +0530)]
qemu: capabilities: Detect support for gluster debug setting

Teach qemu driver to detect whether qemu supports specifying debug level
for gluster volumes.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: capabilities: Add support for QMP schema introspection
Peter Krempa [Wed, 19 Oct 2016 12:40:53 +0000 (14:40 +0200)]
qemu: capabilities: Add support for QMP schema introspection

Allow detecting capabilities according to the qemu QMP schema. This is
necessary as sometimes the availability of certain options depends on
the presence of a field in the schema.

This patch adds support for loading the QMP schema when detecting qemu
capabilities and adds a very simple query language to allow traversing
the schema and selecting a certain element from it.

The infrastructure in this patch uses a query path to set a specific
capability flag according to the availability of the given element in
the schema.

8 years agotests: qemucaps: Temporarily remove 'query-qmp-schema' from test data
Peter Krempa [Thu, 20 Oct 2016 08:11:05 +0000 (10:11 +0200)]
tests: qemucaps: Temporarily remove 'query-qmp-schema' from test data

Remove the command from the supported commands list temporarily so that
QMP introspection code can be added without breaking tests and having to
tweak the test data in the same commit.

This will be later reverted and test data will be added. The aarch64
code is special as it calls additional commands and thus the test data
can't be added upfront.

8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on ppc64le
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on ppc64le

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.7.0 on x86
Pavel Hrdina [Wed, 19 Oct 2016 14:53:22 +0000 (16:53 +0200)]
tests: qemucaps: Add QMP introspection data for qemu 2.7.0 on x86

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on x86
Pavel Hrdina [Wed, 19 Oct 2016 14:53:13 +0000 (16:53 +0200)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on x86

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.5.0 on x86
Pavel Hrdina [Wed, 19 Oct 2016 14:52:02 +0000 (16:52 +0200)]
tests: qemucaps: Add QMP introspection data for qemu 2.5.0 on x86

Add output of 'query-qmp-schema' to the capabilities test.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Update aarch64 gicv2 replies for qemu 2.6.0 release
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Update aarch64 gicv2 replies for qemu 2.6.0 release

Sync up to the released version of qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Update ppc64 replies for qemu 2.6.0 release
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Update ppc64 replies for qemu 2.6.0 release

Sync up to the released version of qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: monitor: Add code to retrieve and store QMP schema data
Peter Krempa [Mon, 17 Oct 2016 12:20:42 +0000 (14:20 +0200)]
qemu: monitor: Add code to retrieve and store QMP schema data

Call 'query-qmp-schema' and store the returned types in a hash table
keyed by the 'name' field so that the capabilities code can traverse it.

8 years agoutil: json: add helper to iterate and steal members of json array
Peter Krempa [Mon, 17 Oct 2016 11:44:16 +0000 (13:44 +0200)]
util: json: add helper to iterate and steal members of json array

Simplifies cases where JSON array members need to be transferred to a
different structure.

8 years agotest driver: Deny some operations on inactive domains
Michal Privoznik [Tue, 8 Nov 2016 08:49:22 +0000 (09:49 +0100)]
test driver: Deny some operations on inactive domains

Some operations like reboot, save, coreDump, blockStats,
ifaceStats make sense iff domain is running. While it is
technically possible for our test driver to return success
regardless of domain state, we should copy constraints from
other drivers and thus deny these operations over inactive
domains.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Only allow 'raw' format for scsi-block using virtio-scsi
John Ferlan [Mon, 31 Oct 2016 19:44:34 +0000 (15:44 -0400)]
qemu: Only allow 'raw' format for scsi-block using virtio-scsi

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

Add check in qemuCheckDiskConfig for an invalid combination
of using the 'scsi' bus for a block 'lun' device and any disk
source format other than 'raw'.

8 years agoAdd vbox 5.1 driver file
Daniel P. Berrange [Tue, 8 Nov 2016 11:19:02 +0000 (11:19 +0000)]
Add vbox 5.1 driver file

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add note about when lxc: XML namespace was added
Daniel P. Berrange [Tue, 8 Nov 2016 09:59:41 +0000 (09:59 +0000)]
docs: add note about when lxc: XML namespace was added

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agovbox: hookup the 5.1 C API to the unified driver
Dawid Zamirski [Tue, 8 Nov 2016 09:56:33 +0000 (09:56 +0000)]
vbox: hookup the 5.1 C API to the unified driver

8 years agovbox: add vbox 5.1 C API header file.
Dawid Zamirski [Thu, 20 Oct 2016 20:13:45 +0000 (16:13 -0400)]
vbox: add vbox 5.1 C API header file.

extracted from VirutalBox SDK and reindented with cppi.

8 years agotest driver: error out when domain destroy twice
Félix Bouliane [Mon, 7 Nov 2016 20:09:26 +0000 (15:09 -0500)]
test driver: error out when domain destroy twice

Fixes the behavior when destroying a domain more than once.
VIR_ERR_OPERATION_INVALID should be raised when destroying an
already destroyed domain.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoUnbreak rebuilding docs with release tarballs
Guido Günther [Fri, 4 Nov 2016 17:30:16 +0000 (18:30 +0100)]
Unbreak rebuilding docs with release tarballs

Release tarballs ship the include/libvirt/libvirt-common.h.

when srcdir != builddir we end up including libvirt-common.h twice: from
$top_srcdir/include/libvirt-common.h and from
$builddir/include/libvirt-common.h leading to

  function virTypedParamsGetUInt from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h
  function virTypedParamsAddBoolean from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h
   …

Only add the builddir to the search list if there is no pregenerated
libvirt-common.h.

Reuse the existing check that predates the libvirt.h → libvirt-common.h
split and that probably was meant for exactly that.

References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842452

8 years agospec: Run all make jobs in parallel
Andrea Bolognani [Mon, 7 Nov 2016 15:09:17 +0000 (16:09 +0100)]
spec: Run all make jobs in parallel

Commit e8861f69714f changed our spec file to compile and run
tests in parallel. That's a very good step forward, but why
stop there? Let's run *all* make jobs in parallel and really
put those expensive cores to use!

On my laptop, this shaves ~10s off 'make rpm'.

8 years agowireshark: Use ${exec_prefix} instead of ${prefix}
Andrea Bolognani [Wed, 26 Oct 2016 14:27:05 +0000 (16:27 +0200)]
wireshark: Use ${exec_prefix} instead of ${prefix}

${exec_prefix} and ${prefix} point to the same directory in
most setups, but when that's not the case the former should
be used for architecture-dependent data such as shared objects,
which makes it the best fit for our Wireshark dissector.

While at it, change all uses of $(var) to ${var}: they are
absolutely identicaly as far as make's concerned, but autoconf
itself seems to prefer the latter form so we might as well
follow suit.

8 years agowireshark: Make fallback path construction more reliable
Andrea Bolognani [Thu, 27 Oct 2016 12:43:00 +0000 (14:43 +0200)]
wireshark: Make fallback path construction more reliable

We only need to strip $ws_prefix from $ws_plugindir if we've
retrieved it from pkg-config: if we're building it ourselves
from $libdir, we can just use it without further processing.

8 years agowireshark: Don't redefine ws_plugindir
Andrea Bolognani [Wed, 26 Oct 2016 14:06:18 +0000 (16:06 +0200)]
wireshark: Don't redefine ws_plugindir

autoconf already defines the variable for us, and prints out
a warning if we try to do it a second time. So let's not :)

8 years agoqemu: Fix build on RHEL-6
Jiri Denemark [Fri, 4 Nov 2016 12:16:44 +0000 (13:16 +0100)]
qemu: Fix build on RHEL-6

Commit c29e6d4805 cause build failure on RHEL-6:

../../src/qemu/qemu_capabilities.c: In function 'virQEMUCapsIsValid':
../../src/qemu/qemu_capabilities.c:4085: error: declaration of 'ctime'
shadows a global declaration [-Wshadow]
/usr/include/time.h:258: error: shadowed declaration is here [-Wshadow]

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agovshReadlineParse: Remove unused variable
Michal Privoznik [Fri, 4 Nov 2016 08:07:04 +0000 (09:07 +0100)]
vshReadlineParse: Remove unused variable

After 06a7b1ff4 the @&opts_need_arg is not used anywhere. Well,
it is set but never read:

vsh.c: In function 'vshReadlineParse':
vsh.c:2658:14: warning: variable 'opts_need_arg' set but not used [-Wunused-but-set-variable]
     uint64_t opts_need_arg, opts_seen;
              ^~~~~~~~~~~~~

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agodocs: Add Qt Virtual machines manager and Qt Remote viewer
Alexander Vasilenko [Thu, 3 Nov 2016 12:44:20 +0000 (15:44 +0300)]
docs: Add Qt Virtual machines manager and Qt Remote viewer

8 years agoqemu: Unify cached caps validity checks
Jiri Denemark [Thu, 27 Oct 2016 09:13:28 +0000 (11:13 +0200)]
qemu: Unify cached caps validity checks

Let's keep all run time validation of cached QEMU capabilities in
virQEMUCapsIsValid and call it whenever we access the cache.
virQEMUCapsInitCached should keep only the checks which do not make
sense once the cache is loaded in memory.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoqemu: Store loaded QEMU binary ctime in qemuCaps
Jiri Denemark [Thu, 27 Oct 2016 08:54:13 +0000 (10:54 +0200)]
qemu: Store loaded QEMU binary ctime in qemuCaps

virQEMUCapsLoadCache loads QEMU capabilities from a file, but strangely
enough it returns the loaded QEMU binary ctime in qemuctime parameter
instead of storing it in qemuCaps.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoconfigure: check gnutls related stuff only if gnutls was found
Pavel Hrdina [Thu, 3 Nov 2016 14:38:09 +0000 (15:38 +0100)]
configure: check gnutls related stuff only if gnutls was found

This fixes a build issue with old gnutls.
Broken by commit 680d2f49da.

Reported-by: Olga Krishtal <okrishtal@virtuozzo.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agolibvirt.spec: Build & run tests in parallel
Michal Privoznik [Thu, 3 Nov 2016 12:34:53 +0000 (20:34 +0800)]
libvirt.spec: Build & run tests in parallel

So far, the main code is built in parallel, which makes it pretty
fast. But with a lots of tests we have now I've noticed this part
takes too much time to build. The problem was that tests were
build and run in a single job.

Also, 'make' in the first hunk is useless. The test suite is not
built due to 'make all' because there's no .git in the sources
unpacked from a tar.xz archive. It's 'make check' which triggers
tests build.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoloopback is not always just lo
Pavel Timofeev [Tue, 1 Nov 2016 15:15:59 +0000 (18:15 +0300)]
loopback is not always just lo

 On BSD family OSes (Free/Net/Open/DragonFlyBSD, Mac OS) and
 Solaris loopback interface is called 'lo0' instead of just 'lo'.

8 years agoqemu: Add support for hot/cold-(un)plug of shmem devices
Martin Kletzander [Mon, 12 Sep 2016 13:40:48 +0000 (15:40 +0200)]
qemu: Add support for hot/cold-(un)plug of shmem devices

This is needed in order to migrate a domain with shmem devices as that
is not allowed to migrate.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: Support newer ivshmem device variants
Martin Kletzander [Wed, 10 Aug 2016 09:15:22 +0000 (11:15 +0200)]
qemu: Support newer ivshmem device variants

QEMU added support for ivshmem-plain and ivshmem-doorbell.  Those are
reworked varians of legacy ivshmem that are compatible from the guest
POV, but not from host's POV and have sane specification and handling.

Details about the newer device type can be found in qemu's commit
5400c02b90bb:

  http://git.qemu.org/?p=qemu.git;a=commit;h=5400c02b90bb

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: Save various defaults for shmem
Martin Kletzander [Wed, 3 Aug 2016 15:34:51 +0000 (17:34 +0200)]
qemu: Save various defaults for shmem

We're keeping some things at default and that's not something we want to
do intentionally.  Let's save some sensible defaults upfront in order to
avoid having problems later.  The details for the defaults (of the newer
implementation) can be found in qemu's commit 5400c02b90bb:

  http://git.qemu.org/?p=qemu.git;a=commit;h=5400c02b90bb

Since we are merely saving the defaults it will not change the guest ABI
and thanks to the fact that we're doing it in the PostParse callback it
will not break the ABI stability checks.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: Add capabilities for ivshmem-{plain,doorbell}
Martin Kletzander [Tue, 2 Aug 2016 06:48:45 +0000 (08:48 +0200)]
qemu: Add capabilities for ivshmem-{plain,doorbell}

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoconf, qemu: Add newer shmem models
Martin Kletzander [Fri, 19 Aug 2016 12:58:35 +0000 (14:58 +0200)]
conf, qemu: Add newer shmem models

The old ivshmem is deprecated in QEMU, so let's use the better
ivshmem-{plain,doorbell} variants instead.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoconf, qemu: Add support for shmem model
Martin Kletzander [Fri, 19 Aug 2016 12:57:07 +0000 (14:57 +0200)]
conf, qemu: Add support for shmem model

Just the default one now, new ones will be added in following commits.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: Reset post-copy capability after migration
Jiri Denemark [Wed, 2 Nov 2016 13:20:42 +0000 (14:20 +0100)]
qemu: Reset post-copy capability after migration

Unlike other migration capabilities, post-copy is also set on the
destination host which means it doesn't disappear once domain is
migrated. As a result of that other functionality which internally uses
migration to a file (virDomainManagedSave, virDomainSave,
virDomainCoreDump) may fail after migration because the post-copy
capability is still set.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agom4/virt-gnutls: remove code for gnutls < 2.2.0
Pavel Hrdina [Fri, 21 Oct 2016 21:17:08 +0000 (23:17 +0200)]
m4/virt-gnutls: remove code for gnutls < 2.2.0

Commit d8a8af3492 changed the minimal required version of gnutls
so it's safe to remove the code for older versions.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agoconfigure: move gnutls check into virt-gnutls.m4
Pavel Hrdina [Fri, 21 Oct 2016 21:09:53 +0000 (23:09 +0200)]
configure: move gnutls check into virt-gnutls.m4

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agoPost-release version bump to 2.5.0
Jiri Denemark [Wed, 2 Nov 2016 09:10:02 +0000 (10:10 +0100)]
Post-release version bump to 2.5.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoRelease of libvirt-2.4.0
Daniel Veillard [Tue, 1 Nov 2016 20:47:10 +0000 (21:47 +0100)]
Release of libvirt-2.4.0

* docs/news.html.in: update for the release
* po/*.po*: regenerated

8 years agodocs: remove obsolete library.xen file
Daniel P. Berrange [Mon, 31 Oct 2016 13:39:34 +0000 (13:39 +0000)]
docs: remove obsolete library.xen file

The library.xen file contains a braindump of thoughts dating
from the very first days of libvirt, when it was briefly
called libxen. This is not useful and potentially misleading
or confusing for people.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agovsh: Pass correct values for command line completion
John Ferlan [Fri, 28 Oct 2016 20:59:58 +0000 (16:59 -0400)]
vsh: Pass correct values for command line completion

Commit id 'dcfdf341' passes 'opts_need_arg' and 'opts_seen' to
vshCmddefGetData, but that seems to be incorrect as those values
are not initialized properly (something at least one compiler found).
Instead the static 'const_opts_need_arg' and 'const_opts_seen' values
should be passed.

By passing unitialized values leads to not finding possible options
for simpler commands (domfsfreeze for example), where if you're in
a virsh shell using command line completion - you'll get a list of
files in your current directory instead of two options --domain and
--mountpoint (as would happen with this patch applied.

8 years agovsh: Using VSH_REQUIRE_OPTION rather than virReportError
Kothapally Madhu Pavan [Tue, 18 Oct 2016 17:33:11 +0000 (13:33 -0400)]
vsh: Using VSH_REQUIRE_OPTION rather than virReportError

Correcting the error reporting method by using VSH_REQUIRE_OPTION
instead of virReportError

Signed-off-by: Kothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
8 years agonetwork: fix endless loop when starting network with multiple IPs and no dhcp
Laine Stump [Fri, 28 Oct 2016 15:43:56 +0000 (11:43 -0400)]
network: fix endless loop when starting network with multiple IPs and no dhcp

commit 9065cfaa added the ability to disable DNS services for a
libvirt virtual network. If neither DNS nor DHCP is needed for a
network, then we don't need to start dnsmasq, so code was added to
check for this.

Unfortunately, it was written with a great lack of attention to detail
(I can say that, because I was the author), and the loop that checked
if DHCP is needed for the network would never end if the network had
multiple IP addresses and the first <ip> had no <dhcp> subelement
(which would have contained a <range> or <host> subelement, thus
requiring DHCP services).

This patch rewrites the check to be more compact and (more
importantly) finite.

This bug was present in release 2.2.0 and 2.3.0, so will need to be
backported to any relevant maintainence branches.

Reported here:
  https://www.redhat.com/archives/libvirt-users/2016-October/msg00032.html
  https://www.redhat.com/archives/libvirt-users/2016-October/msg00045.html

8 years agoqemu_driver: unlink new domain cfg file when rollback
Chen Hanxiao [Fri, 28 Oct 2016 00:45:41 +0000 (08:45 +0800)]
qemu_driver: unlink new domain cfg file when rollback

If we failed to unlink old dom cfg file, we goto rollback.
But inside rollback, we fogot to unlink the new dom cfg file.
This patch fixes this issue.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Minimalize global driver accesses
Michal Privoznik [Wed, 26 Oct 2016 10:56:01 +0000 (12:56 +0200)]
qemu: Minimalize global driver accesses

Whilst working on another issue, I've noticed that in some
functions we have a local @driver variable among with access to
global @qemu_driver variable. This makes no sense.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Fix crash during qemuStateCleanup
Nikolay Shirokovskiy [Tue, 4 Oct 2016 14:27:45 +0000 (17:27 +0300)]
qemu: Fix crash during qemuStateCleanup

Rather than waiting until we've free'd up all the resources, cause the
'workerPool' thread pool to flush as soon as possible during stateCleanup.
Otherwise, it's possible something waiting to run will SEGV such as is the
case during race conditions of simultaneous exiting libvirtd and qemu process.
Resolves the following crash:

[1] crash backtrace: (bt is shortened a bit):

0  0x00007ffff7282f2b in virClassIsDerivedFrom
   (klass=0xdeadbeef, parent=0x55555581d650) at util/virobject.c:169
1  0x00007ffff72835fd in virObjectIsClass
   (anyobj=0x7fffd024f580, klass=0x55555581d650) at util/virobject.c:365
2  0x00007ffff7283498 in virObjectLock
   (anyobj=0x7fffd024f580) at util/virobject.c:317
3  0x00007ffff722f0a3 in virCloseCallbacksUnset
   (closeCallbacks=0x7fffd024f580, vm=0x7fffd0194db0,
    cb=0x7fffdf1af765 <qemuProcessAutoDestroy>)
   at util/virclosecallbacks.c:164
4  0x00007fffdf1afa7b in qemuProcessAutoDestroyRemove
   (driver=0x7fffd00f3a60, vm=0x7fffd0194db0) at qemu/qemu_process.c:6365
5  0x00007fffdf1adff1 in qemuProcessStop
   (driver=0x7fffd00f3a60, vm=0x7fffd0194db0, reason=VIR_DOMAIN_SHUTOFF_CRASHED,
    asyncJob=QEMU_ASYNC_JOB_NONE, flags=0)
   at qemu/qemu_process.c:5877
6  0x00007fffdf1f711c in processMonitorEOFEvent
   (driver=0x7fffd00f3a60, vm=0x7fffd0194db0) at qemu/qemu_driver.c:4545
7  0x00007fffdf1f7313 in qemuProcessEventHandler
   (data=0x555555832710, opaque=0x7fffd00f3a60) at qemu/qemu_driver.c:4589
8  0x00007ffff72a84c4 in virThreadPoolWorker
   (opaque=0x555555805da0) at util/virthreadpool.c:167

Thread 1 (Thread 0x7ffff7fb1880 (LWP 494472)):
1  0x00007ffff72a7898 in virCondWait
   (c=0x7fffd01c21f8, m=0x7fffd01c21a0) at util/virthread.c:154
2  0x00007ffff72a8a22 in virThreadPoolFree
   (pool=0x7fffd01c2160) at util/virthreadpool.c:290
3  0x00007fffdf1edd44 in qemuStateCleanup ()
   at qemu/qemu_driver.c:1102
4  0x00007ffff736570a in virStateCleanup ()
   at libvirt.c:807
5  0x000055555556f991 in main (argc=1, argv=0x7fffffffe458) at libvirtd.c:1660

8 years agodaemon: Fix crash during daemon cleanup
Nikolay Shirokovskiy [Tue, 4 Oct 2016 14:27:44 +0000 (17:27 +0300)]
daemon: Fix crash during daemon cleanup

Do not dereference the 'dmn' until after the virStateCleanup is completed.

During initialization, virStateInitialize requires/uses the "dmn" as the
argument to/for the daemonInhibitCallback functions. Thus, cleanup cannot
dereference 'dmn' until after calling the virStateCleanup which calls the
the daemonInhibitCallback using 'dmn'; otherwise, the following crash occurs:

backtrace (shortened a bit)

1  0x00007fd3a791b2e6 in virCondWait (c=<optimized out>, m=<optimized out>)
   at util/virthread.c:154
2  0x00007fd3a791bcb0 in virThreadPoolFree (pool=0x7fd38024ee00)
   at util/virthreadpool.c:266
3  0x00007fd38edaa00e in qemuStateCleanup () at qemu/qemu_driver.c:1116
4  0x00007fd3a79abfeb in virStateCleanup () at libvirt.c:808
5  0x00007fd3a85f2c9e in main (argc=<optimized out>, argv=<optimized out>)
    at libvirtd.c:1660

Thread 1 (Thread 0x7fd38722d700 (LWP 32256)):
0  0x00007fd3a7900910 in virClassIsDerivedFrom
   (klass=0xdfd36058d4853, parent=0x7fd3a8f394d0) at util/virobject.c:169
1  0x00007fd3a7900c4e in virObjectIsClass
   (anyobj=anyobj@entry=0x7fd3a8f2f850, klass=<optimized out>)
   at util/virobject.c:365
2  0x00007fd3a7900c74 in virObjectLock (anyobj=0x7fd3a8f2f850)
   at util/virobject.c:317
3  0x00007fd3a7a24d5d in virNetDaemonRemoveShutdownInhibition
   (dmn=0x7fd3a8f2f850) at rpc/virnetdaemon.c:547
4  0x00007fd38ed722cf in qemuProcessStop
   (driver=driver@entry=0x7fd380103810, vm=vm@entry=0x7fd38025b6d0,
    reason=reason@entry=VIR_DOMAIN_SHUTOFF_SHUTDOWN,
    asyncJob=asyncJob@entry=QEMU_ASYNC_JOB_NONE, flags=flags@entry=0)
   at qemu/qemu_process.c:5786
5  0x00007fd38edd9428 in processMonitorEOFEvent
   (vm=0x7fd38025b6d0, driver=0x7fd380103810) at qemu/qemu_driver.c:4588
6  qemuProcessEventHandler (data=<optimized out>, opaque=0x7fd380103810)
   at qemu/qemu_driver.c:4632
7  0x00007fd3a791bb55 in virThreadPoolWorker
   (opaque=opaque@entry=0x7fd3a8f1e4c0) at util/virthreadpool.c:145

8 years agovz: remove Bridged network name and rename Routed
Maxim Nestratov [Mon, 5 Sep 2016 16:39:32 +0000 (19:39 +0300)]
vz: remove Bridged network name and rename Routed

It's funny, but Routed network name was incorrect. We should use
host-routed instead.

8 years agovz: support type=bridge network interface type correctly
Maxim Nestratov [Mon, 5 Sep 2016 16:39:31 +0000 (19:39 +0300)]
vz: support type=bridge network interface type correctly

Recently, libprlsdk got a separate flag PNA_BRIDGE corresponding to
type=bridge libvirt network interfaces. Let's use it and get rid of
all workarounds previously added to  support it.

Signed-off-by: Maxim Nestratov <mnestratov@virtuozzo.com>
8 years agoqemu: Forbid pinning vCPUs for TCG domain
Chen Hanxiao [Sat, 22 Oct 2016 09:49:38 +0000 (17:49 +0800)]
qemu: Forbid pinning vCPUs for TCG domain

We don't support cpu pinning for TCG domains because QEMU runs them in
one thread only.  But vcpupin command was able to set them, which
resulted in a failed startup, so make sure that doesn't happen.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
8 years agoRecreate the USB address cache at reconnect
Ján Tomko [Fri, 21 Oct 2016 11:09:04 +0000 (13:09 +0200)]
Recreate the USB address cache at reconnect

When starting a new domain, we allocate the USB addresses and keep
an address cache in the domain object's private data.

However this data is lost on libvirtd restart.

Also generate the address cache if all the addresses have been
specified, so that devices hotplugged after libvirtd restart
also get theirs assigned.

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

8 years agoDo not try to release virtio serial addresses
Ján Tomko [Fri, 21 Oct 2016 12:18:54 +0000 (14:18 +0200)]
Do not try to release virtio serial addresses

Return 0 instead of 1, so that qemuDomainAttachChrDevice does not
assume the address neeeds to be released on error.

No functional change, since qemuDomainReleaseDeviceAddress has been a noop
for virtio serial addresses since the address cache was removed
in commit 19a148b.

8 years agoFix crash on usb-serial hotplug
Ján Tomko [Fri, 21 Oct 2016 12:23:54 +0000 (14:23 +0200)]
Fix crash on usb-serial hotplug

For domains with no USB address cache, we should not attempt
to generate a USB address.

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

8 years agoReturn directly from qemuDomainAttachChrDeviceAssignAddr
Ján Tomko [Fri, 21 Oct 2016 12:17:31 +0000 (14:17 +0200)]
Return directly from qemuDomainAttachChrDeviceAssignAddr

This function should never need a cleanup section.

8 years agoIntroduce virDomainVirtioSerialAddrAutoAssign again
Ján Tomko [Fri, 21 Oct 2016 11:09:36 +0000 (13:09 +0200)]
Introduce virDomainVirtioSerialAddrAutoAssign again

This time do not require an address cache as a parameter.

Simplify qemuDomainAttachChrDeviceAssignAddr to not generate
the virtio serial address cache for devices of other types.

Partially reverts commit 925fa4b.

8 years agoAdd 'FromCache' to virDomainVirtioSerialAddrAutoAssign
Ján Tomko [Fri, 21 Oct 2016 10:58:54 +0000 (12:58 +0200)]
Add 'FromCache' to  virDomainVirtioSerialAddrAutoAssign

Commit 19a148b dropped the cache from QEMU's private domain object.
Assume the callers do not have the cache by default and use
a longer name for the internal ones that do.

This makes the shorter 'virDomainVirtioSerialAddrAutoAssign'
name availabe for a function that will not require the cache.

8 years agovirsh: Fix on_shutdown to on_poweroff
Martin Kletzander [Thu, 27 Oct 2016 06:33:45 +0000 (08:33 +0200)]
virsh: Fix on_shutdown to on_poweroff

The 'on_shutdown' was the name in Xen, there was never such option in
libvirt's domain XML.

Reported-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu, lxc: Raise error message when resuming running domain
Sławek Kapłoński [Sat, 22 Oct 2016 10:30:01 +0000 (12:30 +0200)]
qemu, lxc: Raise error message when resuming running domain

When user tries to resume already running domain (Qemu or LXC)
VIR_ERR_OPERATION_INVALID error should be raised with message that
domain is already running.

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

8 years agowireshark: Rename plugindir to ws_plugindir
Andrea Bolognani [Wed, 26 Oct 2016 12:00:16 +0000 (14:00 +0200)]
wireshark: Rename plugindir to ws_plugindir

Since we're using autoconf to substitute the right value in
Makefile.am now, we can use a less generic name without running
into circular dependencies.

8 years agowireshark: Inject $(prefix) at the right time
Andrea Bolognani [Wed, 26 Oct 2016 11:56:52 +0000 (13:56 +0200)]
wireshark: Inject $(prefix) at the right time

Adding $(prefix) in Makefile.am, as we were doing, means that
it would be prepended even when using --with-ws-plugindir,
which is something we don't want to happen.

Instead, we add it beforehand but take care that it doesn't
get expanded until make is called.

8 years agowireshark: Strip prefix correctly
Andrea Bolognani [Wed, 26 Oct 2016 11:52:08 +0000 (13:52 +0200)]
wireshark: Strip prefix correctly

Even when we're building $plugindir ourselves because we can't
retrieve it using pkg-config, we still want to strip the prefix,
except in that case it would be the same prefix we're using for
building libvirt.

The fact that $plugindir is missing also doesn't tell us
anything about $ws_prefix, so we have to handle the two variables
separately.

8 years agowireshark: Hoist $ws_prefix declaration
Andrea Bolognani [Wed, 26 Oct 2016 12:19:12 +0000 (14:19 +0200)]
wireshark: Hoist $ws_prefix declaration

Keep all variable declarations close together.