]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
10 years agoqemu: qemuMonitorQueryRxFilter - retrieve guest netdev rx-filter
Laine Stump [Mon, 22 Sep 2014 16:19:41 +0000 (12:19 -0400)]
qemu: qemuMonitorQueryRxFilter - retrieve guest netdev rx-filter

This function can be called at any time to get the current status of a
guest's network device rx-filter. In particular it is useful to call
after libvirt recieves a NIC_RX_FILTER_CHANGED event - this event only
tells you that something has changed in the rx-filter, the details are
retrieved with the query-rx-filter monitor command (only available in
the json monitor). The command sent to the qemu monitor looks like this:

  {"execute":"query-rx-filter", "arguments": {"name":"net2"} }'

and the results will look something like this:

{
    "return": [
        {
            "promiscuous": false,
            "name": "net2",
            "main-mac": "52:54:00:98:2d:e3",
            "unicast": "normal",
            "vlan": "normal",
            "vlan-table": [
                42,
                0
            ],
            "unicast-table": [

            ],
            "multicast": "normal",
            "multicast-overflow": false,
            "unicast-overflow": false,
            "multicast-table": [
                "33:33:ff:98:2d:e3",
                "01:80:c2:00:00:21",
                "01:00:5e:00:00:fb",
                "33:33:ff:98:2d:e2",
                "01:00:5e:00:00:01",
                "33:33:00:00:00:01"
            ],
            "broadcast-allowed": false
        }
    ],
    "id": "libvirt-14"
}

This is all parsed from JSON into a virNetDevRxFilter object for
easier consumption. (unicast-table is usually empty, but is also an
array of mac addresses similar to multicast-table).

(NB: LIBNL_CFLAGS was added to tests/Makefile.am because virnetdev.h
now includes util/virnetlink.h, which includes netlink/msg.h when
appropriate. Without LIBNL_CFLAGS, gcc can't find that file (if
libnl/netlink isn't available, LIBNL_CFLAGS will be empty and
virnetlink.h won't try to include netlink/msg.h anyway).)

10 years agoutil: define virNetDevRxFilter and basic utility functions
Laine Stump [Sat, 20 Sep 2014 18:39:44 +0000 (14:39 -0400)]
util: define virNetDevRxFilter and basic utility functions

This same structure will be used to retrieve RX filter info for
interfaces on the host via netlink messages, and RX filter info for
interfaces on the guest via the qemu "query-rx-filter" command.

10 years agonetwork: set interface actual trustGuestRxFilters from network/portgroup
Laine Stump [Tue, 23 Sep 2014 18:54:16 +0000 (14:54 -0400)]
network: set interface actual trustGuestRxFilters from network/portgroup

As is done with other items such as vlan, virtualport, and bandwidth,
set the actual trustGuestRxFilters value to be used by a domain
interface according to a merge of the same attribute in the interface,
portgroup, and network in use. the interface setting always takes
precedence (if specified), followed by portgroup, and finally the
setting in the network is used if it's not specified in the interface
or portgroup.

10 years agoconf: add trustGuestRxFilters attribute to network and domain interface
Laine Stump [Tue, 23 Sep 2014 18:19:08 +0000 (14:19 -0400)]
conf: add trustGuestRxFilters attribute to network and domain interface

This new attribute will control whether or not libvirt will pay
attention to guest notifications about changes to network device mac
addresses and receive filters. The default for this is 'no' (for
security reasons). If it is set to 'yes' *and* the specified device
model and connection support it (currently only macvtap+virtio) then
libvirt will watch for NIC_RX_FILTER_CHANGED events, and when it
receives one, it will issue a query-rx-filter command, retrieve the
result, and modify the host-side macvtap interface's mac address and
unicast/multicast filters accordingly.

The functionality behind this attribute will be in a later patch. This
patch merely adds the attribute to the top-level of a domain's
<interface> as well as to <network> and <portgroup>, and adds
documentation and schema/xml2xml tests. Rather than adding even more
test files, I've just added the net attribute in various applicable
places of existing test files.

10 years agoqemu: Remove possible NULL deref in debug output
John Ferlan [Wed, 24 Sep 2014 12:30:09 +0000 (08:30 -0400)]
qemu: Remove possible NULL deref in debug output

Check for !dev->info.alias was done after a VIR_DEBUG() statement
that already tried to print - just flip sequence

10 years agoqemu: Remove need for virConnectPtr in hotunplug detach host, net
John Ferlan [Wed, 24 Sep 2014 12:31:32 +0000 (08:31 -0400)]
qemu: Remove need for virConnectPtr in hotunplug detach host, net

Prior patch removed the need for the virConnectPtr in the unplug
detach host path which caused ripple effect to remove in multiple
callers.  The previous patch just left things as ATTRIBUTE_UNUSED -
this patch will remove the variable.

10 years agoqemu: Fix hot unplug of SCSI_HOST device
John Ferlan [Tue, 23 Sep 2014 22:53:25 +0000 (18:53 -0400)]
qemu: Fix hot unplug of SCSI_HOST device

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

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

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

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

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

10 years agomaint: update .mailmap
Eric Blake [Mon, 6 Oct 2014 14:23:47 +0000 (08:23 -0600)]
maint: update .mailmap

Consolidate several commits made by James:
https://www.redhat.com/archives/libvir-list/2014-September/msg01156.html

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoInclude .libs in libdir in source tree pkg-config files
Ján Tomko [Wed, 1 Oct 2014 12:46:54 +0000 (14:46 +0200)]
Include .libs in libdir in source tree pkg-config files

This lets me build against an uninstalled source tree without
libtool.

10 years agodocs: fix a typo in drvlxc
Chen Hanxiao [Mon, 6 Oct 2014 09:28:40 +0000 (17:28 +0800)]
docs: fix a typo in drvlxc

s/the/The

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
10 years agominor shmem clean-ups
Martin Kletzander [Sat, 4 Oct 2014 08:46:22 +0000 (10:46 +0200)]
minor shmem clean-ups

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agoutil: Prepare URI formatting for libxml2 >= 2.9.2
Martin Kletzander [Fri, 3 Oct 2014 16:27:01 +0000 (18:27 +0200)]
util: Prepare URI formatting for libxml2 >= 2.9.2

Since commit 8eb55d782a2b9afacc7938694891cc6fad7b42a5 libxml2 removes
two slashes from the URI when there is no server part.  This is fixed
with beb7281055dbf0ed4d041022a67c6c5cfd126f25, but only if the calling
application calls xmlSaveUri() on URI that xmlURIParse() parsed.  And
that is not the case in virURIFormat().  virURIFormat() accepts
virURIPtr that can be created without parsing it and we do that when we
format network storage paths for gluster for example.  Even though
virStorageSourceParseBackingURI() uses virURIParse(), it throws that data
structure right away.

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

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agovbox: remove unused code that causes build failures
Martin Kletzander [Fri, 3 Oct 2014 17:06:33 +0000 (19:06 +0200)]
vbox: remove unused code that causes build failures

Since 87dea4fcffb2d1b120e7841adc0e3d8ea97ed777 vboxGetDrivers() is not
used for getting the vbox network driver.  The only call the code does
is using NULL as the @networkDriver_ret param , but the code still used
vbox[0-9][0-9]NetworkDriver that didn't exist anymore.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agoqemu: Build command line for ivshmem device
Martin Kletzander [Thu, 25 Sep 2014 07:00:47 +0000 (09:00 +0200)]
qemu: Build command line for ivshmem device

This patch implements support for the ivshmem device in QEMU.

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agoqemu: add capability probing for ivshmem device
Maxime Leroy [Fri, 22 Aug 2014 10:47:02 +0000 (12:47 +0200)]
qemu: add capability probing for ivshmem device

Ivshmem is supported by QEMU since 0.13 release.

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agodocs, conf, schema: add support for shmem device
Martin Kletzander [Mon, 22 Sep 2014 08:49:39 +0000 (10:49 +0200)]
docs, conf, schema: add support for shmem device

This patch adds parsing/formatting code as well as documentation for
shared memory devices.  This will currently be only accessible in QEMU
using it's ivshmem device, but is designed as generic as possible to
allow future expansion for other hypervisors.

In the devices section in the domain XML users may specify:

- For shmem device using a server:

 <shmem name='shmem0'>
   <server path='/tmp/socket-ivshmem0'/>
   <size unit='M'>32</size>
   <msi vectors='32' ioeventfd='on'/>
 </shmem>

- For ivshmem device not using an ivshmem server:

 <shmem name='shmem1'>
   <size unit='M'>32</size>
 </shmem>

Most of the configuration is made optional so it also allows
specifications like:

 <shmem name='shmem1/>
 <shmem name='shmem2'>
   <server/>
 </shmem>

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
10 years agoqemu: support nospace reason in io error event
Eric Blake [Fri, 3 Oct 2014 14:46:25 +0000 (08:46 -0600)]
qemu: support nospace reason in io error event

Aeons ago (commit 34dcbbb4, v0.8.2), we added a new libvirt event
(VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON) in order to tell the user WHY
the guest halted.  This is because at least VDSM wants to react
differently to ENOSPC events (resize the lvm partition to be larger,
and resume the guest as if nothing had happened) from all other events
(I/O is hosed, throw up our hands and flag things as broken).  At the
time this was done, downstream RHEL qemu added a vendor extension
'__com.redhat_reason', which would be exactly one of these strings:
"enospc", "eperm", "eio", and "eother".  In our stupidity, we exposed
those exact strings to clients, rather than an enum, and we also
return "" if we did not have access to a reason (which was the case
for upstream qemu).

Fast forward to now: upstream qemu commit c7c2ff0c (will be qemu 2.2)
FINALLY adds a 'nospace' boolean, after discussion with multiple
projects determined that VDSM really doesn't care about distinction
between any other error types.  So this patch converts 'nospace' into
the string "enospc" for compatibility with RHEL clients that were
already used to the downstream extension, while leaving the reason
blank for all other cases (no change from the status quo).

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

* src/qemu/qemu_monitor_json.c (qewmuMonitorJSONHandleIOError):
Parse reason field from modern qemu.
* include/libvirt/libvirt.h.in
(virConnectDomainEventIOErrorReasonCallback): Document it.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoqemu: Don't compare CPU against host for TCG
Cole Robinson [Tue, 23 Sep 2014 17:07:09 +0000 (13:07 -0400)]
qemu: Don't compare CPU against host for TCG

Right now when building the qemu command line, we try to do various
unconditional validations of the guest CPU against the host CPU. However
this checks are overly applied. The only time we should use the checks
are:

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

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

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

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

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

10 years agoqemu_command: Split qemuBuildCpuArgStr
Cole Robinson [Tue, 23 Sep 2014 15:35:57 +0000 (11:35 -0400)]
qemu_command: Split qemuBuildCpuArgStr

Move the CPU mode/model handling to its own function. This is just
code movement and re-indentation.

10 years agoconfigure: improve misleading libnl3-devel missing error message
Shanzhi Yu [Fri, 26 Sep 2014 05:50:13 +0000 (13:50 +0800)]
configure: improve misleading libnl3-devel missing error message

When building libvirt from source with netcf-devel installed, the
configure script reports error "libnl-devel >=3.0 is required for
macvtap support", while actually libnl3-devel is required.

Signed-off-by: Shanzhi Yu <shyu@redhat.com>
10 years agoqemu: Improve domainSetTime error info report
Shanzhi Yu [Tue, 30 Sep 2014 13:36:23 +0000 (21:36 +0800)]
qemu: Improve domainSetTime error info report

check domain's status before call virQEMUCapsGet to report a accurate
error when domain is shut off

Resolve: https://bugzilla.redhat.com/show_bug.cgi?id=1147847
Signed-off-by: Shanzhi Yu <shyu@redhat.com>
10 years agoMakefile: Fix build without driver modules
Michal Privoznik [Fri, 3 Oct 2014 11:59:12 +0000 (13:59 +0200)]
Makefile: Fix build without driver modules

After 87dea4fcf one can observe a build failure:

./autogen.sh --system --without-driver-modules && make

  CCLD     libvirtd
../src/.libs/libvirt_driver_vbox.a(libvirt_driver_vbox_impl_la-vbox_driver.o):
In function `vboxNetworkRegister':
/home/jtomko/work/libvirt/libvirt.git/src/vbox/vbox_driver.c:168: undefined
reference to `vboxGetNetworkDriver'
collect2: error: ld returned 1 exit status
make[3]: *** [libvirtd] Error 1

The problem is that when building without driver modules the VBOX
network driver is not linked into the the VBOX driver.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovbox: New network driver
Taowei [Thu, 2 Oct 2014 03:30:38 +0000 (11:30 +0800)]
vbox: New network driver

This patch seperate the domain driver and the network driver.

libvirt_driver_vbox_impl.la has been linked in the network driver.
So that the version specified codes in vbox_V*.c would only be
compiled once.

The vboxGetNetworkDriver provides a simple interface to get vbox
network driver.

10 years agovbox: Rewrite vboxNetworkGetXMLDesc
Taowei [Thu, 2 Oct 2014 03:30:37 +0000 (11:30 +0800)]
vbox: Rewrite vboxNetworkGetXMLDesc

10 years agovbox: Rewrite vboxNetworkCreate
Taowei [Thu, 2 Oct 2014 03:30:36 +0000 (11:30 +0800)]
vbox: Rewrite vboxNetworkCreate

10 years agovbox: Rewrite vboxNetworkUndefineDestroy
Taowei [Thu, 2 Oct 2014 03:30:35 +0000 (11:30 +0800)]
vbox: Rewrite vboxNetworkUndefineDestroy

This patch rewrites two public APIs. They are vboxNetworkUndefine
and vboxNetworkDestroy. They use the same core function
vboxNetworkUndefineDestroy. I merged it in one patch.

10 years agovbox: Rewrite vboxNetworkDefineCreateXML
Taowei [Thu, 2 Oct 2014 03:30:34 +0000 (11:30 +0800)]
vbox: Rewrite vboxNetworkDefineCreateXML

This patch actually contains two public API, virNetworkDefineXML
and virNetworkCreateXML. They use the same core function
vboxNetworkDefineCreateXML. So I merged it together.

10 years agovbox: Rewrite vboxNetworkLookupByName
Taowei [Thu, 2 Oct 2014 03:30:33 +0000 (11:30 +0800)]
vbox: Rewrite vboxNetworkLookupByName

10 years agovbox: Rewrite vboxNetworkLookupByUUID
Taowei [Thu, 2 Oct 2014 03:30:32 +0000 (11:30 +0800)]
vbox: Rewrite vboxNetworkLookupByUUID

10 years agovbox: Rewrite vboxConnectListDefinedNetworks
Taowei [Thu, 2 Oct 2014 03:30:31 +0000 (11:30 +0800)]
vbox: Rewrite vboxConnectListDefinedNetworks

10 years agovbox: Rewrite vboxConnectNumOfDefinedNetworks
Taowei [Thu, 2 Oct 2014 03:30:30 +0000 (11:30 +0800)]
vbox: Rewrite vboxConnectNumOfDefinedNetworks

10 years agovbox: Rewrite vboxConnectListNetworks
Taowei [Thu, 2 Oct 2014 03:30:29 +0000 (11:30 +0800)]
vbox: Rewrite vboxConnectListNetworks

10 years agovbox: Rewrite vboxConnectNumOfNetworks
Taowei [Thu, 2 Oct 2014 03:30:28 +0000 (11:30 +0800)]
vbox: Rewrite vboxConnectNumOfNetworks

10 years agovbox: Rewrite vboxNetworkClose
Taowei [Thu, 2 Oct 2014 03:30:27 +0000 (11:30 +0800)]
vbox: Rewrite vboxNetworkClose

10 years agovbox: Rewrite vboxNetworkOpen
Taowei [Thu, 2 Oct 2014 03:30:26 +0000 (11:30 +0800)]
vbox: Rewrite vboxNetworkOpen

10 years agovbox: Interfaces for register per parties
Taowei [Thu, 2 Oct 2014 03:30:25 +0000 (11:30 +0800)]
vbox: Interfaces for register per parties

The patch dbb4cbf532fa by Michal has splited the vbox driver into
three parties. This modification brings a more suitable interface
to the previous patch.

The new function vboxGetDriver is introduced to get the
corresponding vbox domain driver directly thought the vbox version.

Functions like vboxGetNetworkDriver and vboxGetStorageDriver
will be introduced after rewriting it's drivers.

This patch, by the way, fixed the align problem for vbox in
Makefile.am

10 years agoqemu: Fix updating balloon period in live XML
Erik Skultety [Thu, 2 Oct 2014 12:48:02 +0000 (14:48 +0200)]
qemu: Fix updating balloon period in live XML

Up until now, we set memballoon period in monitor successfully, however
we did not update domain definition structure, thus dumpxml was omitting
period attribute in memballoon element

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

10 years agoqemu: Fix updating bandwidth limits in live XML
Erik Skultety [Thu, 2 Oct 2014 12:48:01 +0000 (14:48 +0200)]
qemu: Fix updating bandwidth limits in live XML

When trying to update bandwidth limits on a running domain, limits get
updated in our internal structures, however XML parser reads
bandwidth limits from network 'actual' definition. Committing this patch
it is now available to update bandwidth 'actual' definition as well,
thus updating domain runtime XML.

10 years agoAdd virCgroupTerminateMachine stub
Ján Tomko [Thu, 2 Oct 2014 09:05:50 +0000 (11:05 +0200)]
Add virCgroupTerminateMachine stub

Fix the build on FreeBSD, broken by commit 4882618.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
10 years agobuild: fix build on non-Linux
Eric Blake [Thu, 2 Oct 2014 03:18:52 +0000 (21:18 -0600)]
build: fix build on non-Linux

A cygwin build of 1.2.9 fails with:

util/virprocess.c:87:27: fatal error: sys/syscall.h: No such file or directory
 #  include <sys/syscall.h>

But in reality, the ONLY user of setns() is lxc, which is Linux-only.
It's easiest to just limit the setns workarounds to Linux.

* src/util/virprocess.c (setns): Limit definition to Linux.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agoMake editor used for 'virsh edit' configurable
Guido Günther [Sun, 28 Sep 2014 08:34:03 +0000 (10:34 +0200)]
Make editor used for 'virsh edit' configurable

Debian wants to use 'sensible-editor' instead of vi other distros might
want to use other defaults. This avoids distro specific patches.

10 years agoqemu: use systemd's TerminateMachine to kill all processes
Guido Günther [Thu, 25 Sep 2014 11:32:58 +0000 (13:32 +0200)]
qemu: use systemd's TerminateMachine to kill all processes

If we don't properly clean up all processes in the
machine-<vmname>.scope systemd won't remove the cgroup and subsequent vm
starts fail with

  'CreateMachine: File exists'

Additional processes can e.g. be added via

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

but there are other cases like

  http://bugs.debian.org/761521

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

10 years agomaint: Prohibit "devname" by a syntax check rules
Peter Krempa [Wed, 1 Oct 2014 14:07:46 +0000 (16:07 +0200)]
maint: Prohibit "devname" by a syntax check rules

and tweak the code to avoid using it.

10 years agoqemu: monitor: Avoid shadowing variable "devname" on FreeBSD. Again.
Peter Krempa [Wed, 1 Oct 2014 12:39:23 +0000 (14:39 +0200)]
qemu: monitor: Avoid shadowing variable "devname" on FreeBSD. Again.

FreeBSD's compiler complains that we shadow the symbol. Sigh.

s/devname/dev_name/

10 years agoqemu: json: Fix missing break in error reporting function
Peter Krempa [Wed, 1 Oct 2014 12:33:09 +0000 (14:33 +0200)]
qemu: json: Fix missing break in error reporting function

Otherwise we'd report a different error.

Reported by John Ferlan's coverity run.

10 years agoqemu: bulk stats: add block allocation information
Francesco Romani [Mon, 15 Sep 2014 15:42:52 +0000 (17:42 +0200)]
qemu: bulk stats: add block allocation information

Management software wants to be able to allocate disk space on demand.
To support this they need keep track of the space occupation of the
block device.  This information is reported by qemu as part of block
stats.

This patch extend the block information in the bulk stats with the
allocation information.

To keep the same behaviour a helper is extracted from
qemuMonitorJSONGetBlockExtent in order to get per-device allocation
information.

Signed-off-by: Francesco Romani <fromani@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
10 years agoqemu: monitor: Add helper function to fill physical/virtual image size
Peter Krempa [Thu, 25 Sep 2014 10:03:26 +0000 (12:03 +0200)]
qemu: monitor: Add helper function to fill physical/virtual image size

While our code gathers block stats via "query-blockstats" some
information need to be gathered via "query-block". Add a helper function
that will update the blockstats structure if requested.

10 years agoBump version to 1.2.10 for new dev cycle
Peter Krempa [Wed, 1 Oct 2014 08:47:14 +0000 (10:47 +0200)]
Bump version to 1.2.10 for new dev cycle

10 years agoRelease of libvirt-1.2.9
Daniel Veillard [Wed, 1 Oct 2014 08:45:32 +0000 (16:45 +0800)]
Release of libvirt-1.2.9

* docs/news.html.in libvirt.spec.in: update for release
* po/*.po*: updated localizations and regenerated

10 years agodomain_conf: fix domain deadlock
Pavel Hrdina [Mon, 22 Sep 2014 16:19:07 +0000 (18:19 +0200)]
domain_conf: fix domain deadlock

If you use public api virConnectListAllDomains() with second parameter
set to NULL to get only the number of domains you will lock out all
other operations with domains.

Introduced by commit 2c680804.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agoAllow setting migration max downtime any time
Chris St. Pierre [Mon, 29 Sep 2014 13:45:28 +0000 (13:45 +0000)]
Allow setting migration max downtime any time

This removes the artificial and unnecessary restriction that
virDomainSetMaxDowntime() only be called while a migration is in
progress.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
10 years agoqemu: monitor: Avoid shadowing variable "devname" on FreeBSD
Peter Krempa [Tue, 30 Sep 2014 09:41:43 +0000 (11:41 +0200)]
qemu: monitor: Avoid shadowing variable "devname" on FreeBSD

FreeBSD's compiler complains that we shadow the symbol. Sigh.

s/devname/dev_name/

10 years agoqemu: monitor: return block stats data as a hash to avoid disk mixup
Peter Krempa [Thu, 25 Sep 2014 08:12:15 +0000 (10:12 +0200)]
qemu: monitor: return block stats data as a hash to avoid disk mixup

The current block stats code matched up the disk name with the actual
stats by the order in the data returned from qemu. This unfortunately
isn't right as qemu may return the disks in any order. Fix this by
returning a hash of stats and index them by the disk alias.

10 years agoAlso filter out non-migratable features out of host-passthrough
Ján Tomko [Mon, 29 Sep 2014 10:44:43 +0000 (12:44 +0200)]
Also filter out non-migratable features out of host-passthrough

Commit de0aeaf filtered them out from the host-model features,
to allow host-model to be migratable by default.

Even though they are not passed to QEMU for host-passthrough,
(and not enabled by default) filter them out too
so the user does not think the domain has them.

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

10 years agoDon't verify CPU features with host-passthrough
Ján Tomko [Mon, 29 Sep 2014 13:58:38 +0000 (15:58 +0200)]
Don't verify CPU features with host-passthrough

Commit fba6bc4 introduced the non-migratable invtsc feature,
breaking save/migration with host-model and host-passthrough.

On hosts with this feature present it was automatically included
in the CPU definition, regardless of QEMU support.

Commit de0aeaf stopped including it by default for host-model,
but failed to fix host-passthrough.

This commit ignores checking of CPU features with host-passthrough,
since we don't pass them to QEMU (only -cpu host is passed),
allowing domains using host-passthrough that were saved with
the broken version of libvirtd to be restored.

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

10 years agoFix crash cpu_shares change event crash on domain startup
Ján Tomko [Mon, 29 Sep 2014 11:47:44 +0000 (13:47 +0200)]
Fix crash cpu_shares change event crash on domain startup

Introduced by commit 0dce260.

qemuDomainEventQueue was called with qemuDomainObjPrivatePtr instead
of virQEMUDriverPtr.

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

10 years agostorage: Fix logical pool fmt type
Erik Skultety [Thu, 25 Sep 2014 14:26:18 +0000 (16:26 +0200)]
storage: Fix logical pool fmt type

According to our documentation logical pool supports formats 'auto' and
'lvm2'. However, in storage_conf.c we previously defined storage pool
formats: unknown, lvm2. Due to backward compatibility reasons
we must continue refer to pool format type 'unknown' instead of 'auto'.

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

10 years agovirsh: Fix help message of allocpages
Tomoki Sekiyama [Fri, 26 Sep 2014 22:57:22 +0000 (18:57 -0400)]
virsh: Fix help message of allocpages

Fix info in the command definition of allocpages, which is currently
pointing info for 'capabilities'.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
10 years agoqemu: remove capabilities.monitor.sock when done
Guido Günther [Thu, 25 Sep 2014 08:30:58 +0000 (10:30 +0200)]
qemu: remove capabilities.monitor.sock when done

Prompted by

   http://bugs.debian.org/761131

10 years agoconf: report error in virCPUDefParseXML
Jincheng Miao [Thu, 25 Sep 2014 11:28:33 +0000 (19:28 +0800)]
conf: report error in virCPUDefParseXML

When detected invalid 'memAccess', virCPUDefParseXML should report error.

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

Signed-off-by: Jincheng Miao <jmiao@redhat.com>
10 years agoCheck for NULL in qemu monitor event filter
Ján Tomko [Mon, 22 Sep 2014 11:54:52 +0000 (13:54 +0200)]
Check for NULL in qemu monitor event filter

When virConnectDomainQemuMonitorEventRegister is called with the
VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_REGEX flag,
ignore the flag instead of crashing.

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

10 years agoFix typo s/EMULATORIN/EMULATORPIN/
Daniel P. Berrange [Fri, 26 Sep 2014 10:20:56 +0000 (11:20 +0100)]
Fix typo s/EMULATORIN/EMULATORPIN/

Fix the typo in VIR_DOMAIN_TUNABLE_CPU_EMULATORIN

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
10 years agoRename tunable event constants
Daniel P. Berrange [Thu, 25 Sep 2014 16:48:01 +0000 (17:48 +0100)]
Rename tunable event constants

For the new VIR_DOMAIN_EVENT_ID_TUNABLE event we have a bunch of
constants added

   VIR_DOMAIN_EVENT_CPUTUNE_<blah>
   VIR_DOMAIN_EVENT_BLKDEVIOTUNE_<blah>

This naming convention is bad for two reasons

  - There is no common prefix unique for the events to both
    relate them, and distinguish them from other event
    constants

  - The values associated with the constants were chosen
    to match the names used with virConnectGetAllDomainStats
    so having EVENT in the constant name is not applicable in
    that respect

This patch proposes renaming the constants to

    VIR_DOMAIN_TUNABLE_CPU_<blah>
    VIR_DOMAIN_TUNABLE_BLKDEV_<blah>

ie, given them a common VIR_DOMAIN_TUNABLE prefix.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
10 years agolxc_monitor_protocol: Redefine xdr_uint64_t if needed
Michal Privoznik [Tue, 23 Sep 2014 08:44:42 +0000 (10:44 +0200)]
lxc_monitor_protocol: Redefine xdr_uint64_t if needed

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

On some systems (using libtirpc instead of glibc's
implementation), xdr_uint64_t exists rather under different name:
xdr_u_int64_t. This makes compilation fail then:

libvirt_lxc-lxc_monitor_protocol.o: In function `xdr_virLXCMonitorInitEventMsg':
/usr/local/src/libvirt/libvirt-1.1.1/src/./lxc/lxc_monitor_protocol.c:31: undefined reference to `xdr_uint64_t'

Therefore we rather mirror the d707c866 commit and redefine
xdr_uint64_t if needed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoqemuPrepareNVRAM: Save domain after NVRAM path generation
Michal Privoznik [Thu, 25 Sep 2014 12:39:19 +0000 (14:39 +0200)]
qemuPrepareNVRAM: Save domain after NVRAM path generation

On a domain startup, the variable store path is generated if needed.
The path is intended to be generated only once. However, the updated
domain definition is not saved into config dir rather than state XML
only. So later, whenever the domain is destroyed and the daemon is
restarted, the generated path is forgotten and the file may be left
behind on virDomainUndefine() call.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoremoteNodeGetFreePages: Don't alloc args.pages.pages_val
Michal Privoznik [Thu, 25 Sep 2014 09:18:50 +0000 (11:18 +0200)]
remoteNodeGetFreePages: Don't alloc args.pages.pages_val

There's no one to free() it anyway. Instead, we can just pass the
provided array pointer directly.

==20039== 48 bytes in 4 blocks are definitely lost in loss record 658 of 787
==20039==    at 0x4C2A700: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20039==    by 0x4EA661F: virAllocN (viralloc.c:191)
==20039==    by 0x50386EF: remoteNodeGetFreePages (remote_driver.c:7625)
==20039==    by 0x5003504: virNodeGetFreePages (libvirt.c:21379)
==20039==    by 0x154625: cmdFreepages (virsh-host.c:374)
==20039==    by 0x12F718: vshCommandRun (virsh.c:1935)
==20039==    by 0x1339FB: main (virsh.c:3747)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agonodeinfo: fix version of nodeAllocPages
Tomoki Sekiyama [Thu, 25 Sep 2014 20:02:21 +0000 (16:02 -0400)]
nodeinfo: fix version of nodeAllocPages

Fix comments about the version in which '.nodeAllocPages' are added.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
10 years agoqemu: Always re-detect backing chain
Peter Krempa [Thu, 25 Sep 2014 15:30:28 +0000 (17:30 +0200)]
qemu: Always re-detect backing chain

Since 363e9a68 we track backing chain metadata when creating snapshots
the right way even for the inactive configuration. As we did not yet
update other code paths that modify the backing chain (blockpull) the
newDef backing chain gets out of sync.

After stopping of a VM the new definition gets copied to the next start
one. The new VM then has incorrect backing chain info. This patch
switches the backing chain detector to always purge the existing backing
chain and forces re-detection to avoid this issue until we'll have full
backing chain tracking support.

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

10 years agoevent_example: cleanup example code for tunable event
Pavel Hrdina [Thu, 25 Sep 2014 13:03:46 +0000 (15:03 +0200)]
event_example: cleanup example code for tunable event

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agovirNodeAllocPages: Disallow RO connection
Michal Privoznik [Thu, 25 Sep 2014 15:12:46 +0000 (17:12 +0200)]
virNodeAllocPages: Disallow RO connection

Due to a missing check the API can be successfully called even if
the connection is ReadOnly. Fortunately, the API hasn't been
released yet, so there's no need for a CVE.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoparallels: login to parallels SDK
Dmitry Guryanov [Thu, 11 Sep 2014 16:24:03 +0000 (20:24 +0400)]
parallels: login to parallels SDK

Add files parallels_sdk.c and parallels_sdk.h for code
which works with SDK, so libvirt's code will not mix with
dealing with parallels SDK.

To use Parallels SDK you must first call PrlApi_InitEx function,
and then you will be able to connect to a server with
PrlSrv_LoginLocalEx function. When you've done you must call
PrlApi_Deinit. So let's call PrlApi_InitEx on first .connectOpen,
count number of connections and deinitialize, when this counter
becomes zero.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
10 years agoparallels: build with parallels SDK
Dmitry Guryanov [Thu, 11 Sep 2014 16:24:02 +0000 (20:24 +0400)]
parallels: build with parallels SDK

Executing prlctl command is not an optimal way to interact with
Parallels Cloud Server (PCS), it's better to use parallels SDK,
which is a remote API to paralles dispatcher service.

We prepared opensource version of this SDK and published it on
github, it's distributed under LGPL license. Here is a git repo:
https://github.com/Parallels/parallels-sdk.

To build with parallels SDK user should get compiler and linker
options from pkg-config 'parallels-sdk' file. So fix checks in
configure script and build with parallels SDK, if that pkg-config
file exists and add gcc options to makefile.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
10 years agovirnetserver: Raise log level of max_clients related messages
Michal Privoznik [Thu, 25 Sep 2014 09:50:04 +0000 (11:50 +0200)]
virnetserver: Raise log level of max_clients related messages

We have these configuration knobs, like max_clients and
max_anonymous_clients. They limit the number of clients
connected.  Whenever the limit is reached, the daemon stops
accepting new ones and resumes if one of the connected clients
disconnects. If that's the case, a debug message is printed into
the logs. And when the daemon starts over to accept new clients
too. However, the problem is the messages have debug priority.
This may be unfortunate, because if the daemon stops accepting
new clients all of a sudden, and users don't have debug logs
enabled they have no idea what's going on. Raise the messages
level to INFO at least.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agopolkit_driver: fix possible segfault
Pavel Hrdina [Thu, 25 Sep 2014 09:13:29 +0000 (11:13 +0200)]
polkit_driver: fix possible segfault

The changes in commit c7542573 introduced possible segfault. Looking
deeper into the code and the original code before the patch series were
applied I think that we should report error for each function failure
and also we shouldn't call some of the function twice.

Found by coverity.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agoblkdeviotune: trigger tunable event for blkdeviotune updates
Pavel Hrdina [Thu, 25 Sep 2014 09:30:57 +0000 (11:30 +0200)]
blkdeviotune: trigger tunable event for blkdeviotune updates

Use the universal tunable event to report changes to user. All
blkdeviotune values are prefixed with "blkdeviotune".

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agoblkdeviotune: fix bug with saving values into live XML
Pavel Hrdina [Thu, 25 Sep 2014 09:28:25 +0000 (11:28 +0200)]
blkdeviotune: fix bug with saving values into live XML

When you updated some blkdeviotune values for running domain the values
were stored only internally, but not saved into the live XML so they
won't survive restarting the libvirtd.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agoFix build without polkit
Pavel Hrdina [Thu, 25 Sep 2014 08:57:24 +0000 (10:57 +0200)]
Fix build without polkit

The commit 1b854c76 introduced a new function 'virPolkitCheckAuth' and
in the #else section when you don't have polkit all attributes should be
follwed by ATTRIBUTE_UNUSED.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agotunable_event: extend debug message and tweak limit for remote message
Pavel Hrdina [Wed, 24 Sep 2014 07:43:31 +0000 (09:43 +0200)]
tunable_event: extend debug message and tweak limit for remote message

It would be nice to also print a params pointer and number of params in
the debug message and the previous limit for number of params in the rpc
message was too large. The 2048 params will be enough for future events.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agovirsh: Expose virNodeAllocPages
Michal Privoznik [Wed, 17 Sep 2014 13:53:42 +0000 (15:53 +0200)]
virsh: Expose virNodeAllocPages

The new virsh command is named 'allocpages'.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agonodeinfo: Implement nodeAllocPages
Michal Privoznik [Thu, 18 Sep 2014 07:47:07 +0000 (09:47 +0200)]
nodeinfo: Implement nodeAllocPages

And add stubs to other drivers like: lxc, qemu, uml and vbox.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agovirnuma: Introduce virNumaSetPagePoolSize
Michal Privoznik [Thu, 18 Sep 2014 07:24:16 +0000 (09:24 +0200)]
virnuma: Introduce virNumaSetPagePoolSize

This internal API can be used to allocate or free some pages in
the huge pages pool.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoIntroduce virNodeAllocPages
Michal Privoznik [Tue, 16 Sep 2014 16:17:22 +0000 (18:17 +0200)]
Introduce virNodeAllocPages

A long time ago in a galaxy far, far away it has been decided
that libvirt will manage not only domains but host as well. And
with my latest work on qemu driver supporting huge pages, we miss
the cherry on top: an API to allocate huge pages on the run.
Currently users are forced to log into the host and adjust the
huge pages pool themselves.  However, with this API the problem
is gone - they can both size up and size down the pool.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agonodeGetFreePages: Push forgotten change
Michal Privoznik [Wed, 24 Sep 2014 13:10:18 +0000 (15:10 +0200)]
nodeGetFreePages: Push forgotten change

In the previous patch I've changed the for loop bounds but forgot
to 'git add' changes that adapt the rest of the code.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agosecurity: Fix labelling host devices (bz 1145968)
Cole Robinson [Wed, 24 Sep 2014 15:47:46 +0000 (11:47 -0400)]
security: Fix labelling host devices (bz 1145968)

The check for ISCSI devices was missing a check of subsys type, which
meant we could skip labelling of other host devices as well. This fixes
USB hotplug on F21

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

10 years agoFix MinGW build
Pavel Hrdina [Wed, 24 Sep 2014 09:07:08 +0000 (11:07 +0200)]
Fix MinGW build

When building on mingw the format string for long long/unsigned long
long have to be I64d/I64u instead of lld/llu.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agoConvert polkit code to use DBus API instead of CLI helper
Daniel P. Berrange [Wed, 10 Sep 2014 13:52:48 +0000 (14:52 +0100)]
Convert polkit code to use DBus API instead of CLI helper

Spawning the pkcheck program every time a permission check is
required is hugely expensive on CPU. The pkcheck program is just
a dumb wrapper for the DBus API, so rewrite the code to use the
DBus API directly. This also simplifies error handling a bit.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
10 years agoSupport passing dict by reference for dbus messages
Daniel P. Berrange [Tue, 9 Sep 2014 14:19:58 +0000 (15:19 +0100)]
Support passing dict by reference for dbus messages

Currently DBus dict values must be passed inline

   virDBusMessageEncode("a{ss}",
                        3,
                        "key1", "val1",
                        "key2", "val2",
                        "key3", "val3");
   virDBusMessageDecode("a{ss}",
                        3,
                        &key1, &val1,
                        &key2, &val2,
                        &key3, &val3);

This allows them to be passed by reference

   const char **dictin = {
      "key1", "val1",
      "key2", "val2",
      "key3", "val3"
   };
   char **dictout;
   size_t ndictout;

   virDBusMessageEncode("a&{ss}",
                        ARRAY_CARDINALITY(dict) / 2,
                        dictin);
   virDBusMessageDecode("a&{ss}",
                        &ndictout,
                        &dictout);

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
10 years agoConvert remote daemon & acl code to use polkit API
Daniel P. Berrange [Thu, 22 Aug 2013 16:09:03 +0000 (17:09 +0100)]
Convert remote daemon & acl code to use polkit API

Convert the remote daemon auth check and the access control
code to use the common polkit API for checking auth.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
10 years agoConvert callers to use typesafe APIs for getting identity attrs
Daniel P. Berrange [Thu, 22 Aug 2013 16:02:40 +0000 (17:02 +0100)]
Convert callers to use typesafe APIs for getting identity attrs

Convert virAccessDriverPolkitFormatProcess to use typesafe API
for getting process ID attribute.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
10 years agoConvert callers to use typesafe APIs for setting identity attrs
Daniel P. Berrange [Thu, 22 Aug 2013 15:58:58 +0000 (16:58 +0100)]
Convert callers to use typesafe APIs for setting identity attrs

Update virNetServerClientCreateIdentity and virIdentityGetSystem
to use the new typesafe APIs for setting identity attributes

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
10 years agoAdd typesafe APIs for virIdentity attributes
Daniel P. Berrange [Thu, 22 Aug 2013 15:43:35 +0000 (16:43 +0100)]
Add typesafe APIs for virIdentity attributes

Instead of requiring the caller to format to/from strings,
add typesafe APIs todo this work.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
10 years agoAdd common API for doing polkit authentication
Daniel P. Berrange [Thu, 22 Aug 2013 13:27:19 +0000 (14:27 +0100)]
Add common API for doing polkit authentication

There are now two places in libvirt which use polkit. Currently
they use pkexec, which is set to be replaced by direct DBus API
calls. Add a common API which they will both be able to use for
this purpose.

No tests are added at this time, since the impl will be gutted
in favour of a DBus API call shortly.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
10 years agoqemu: wire up virtio-net segment offloading options
Ján Tomko [Thu, 11 Sep 2014 10:58:04 +0000 (12:58 +0200)]
qemu: wire up virtio-net segment offloading options

Format the segment offloading options specified by
<driver>
  <host .../>
  <guest .../>
</driver>
on virtio-net command line.

10 years agoconf: add options for disabling segment offloading
Ján Tomko [Thu, 11 Sep 2014 10:56:31 +0000 (12:56 +0200)]
conf: add options for disabling segment offloading

Add options for tuning segment offloading:
<driver>
  <host csum='off' gso='off' tso4='off' tso6='off'
        ecn='off' ufo='off'/>
  <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/>
</driver>
which control the respective host_ and guest_ properties
of the virtio-net device.

10 years agonodeinfo: fix nodeGetFreePages when max node is zero
Jincheng Miao [Wed, 24 Sep 2014 05:45:30 +0000 (13:45 +0800)]
nodeinfo: fix nodeGetFreePages when max node is zero

In nodeGetFreePages, if startCell is given by '0',
and the max node number is '0' too. The for-loop
wouldn't be executed.
So convert it to while-loop.

Before:
> virsh freepages --cellno 0 --pagesize 4
error: internal error: no suitable info found

After:
> virsh freepages --cellno 0 --pagesize 4
4KiB: 472637

Signed-off-by: Jincheng Miao <jmiao@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoLXC: emphasis uid start of idmap only accept '0' in docs
Chen Hanxiao [Tue, 23 Sep 2014 03:40:03 +0000 (11:40 +0800)]
LXC: emphasis uid start of idmap only accept '0' in docs

We don't accept any other values except '0'.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
10 years agoFix bug with loading bridge name for active domain during libvirtd start
Pavel Hrdina [Thu, 18 Sep 2014 13:06:44 +0000 (15:06 +0200)]
Fix bug with loading bridge name for active domain during libvirtd start

If you have a bridge network in running domain and libvirtd is restarted
the information about host bridge interface is lost from live xml.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agostorage: Improve error message when traversing backing chains
Peter Krempa [Thu, 11 Sep 2014 17:09:48 +0000 (19:09 +0200)]
storage: Improve error message when traversing backing chains

Report also the name of the parent file and uid/gid used to access it to
help debugging broken storage configurations.

10 years agoqemu: Report better errors from broken backing chains
Peter Krempa [Thu, 11 Sep 2014 16:59:32 +0000 (18:59 +0200)]
qemu: Report better errors from broken backing chains

Request erroring out from the backing chain traveller and drop qemu's
internal backing chain integrity tester.

The backing chain traveller reports errors by itself with possibly more
detail than qemuDiskChainCheckBroken ever could.

We also need to make sure that we reconnect to existing qemu instances
even at the cost of losing the backing chain info (this really should be
stored in the XML rather than reloaded from disk, but that needs some
work).

10 years agoqemu: Sanitize argument names and empty disk check in qemuDomainDetermineDiskChain
Peter Krempa [Thu, 18 Sep 2014 09:21:10 +0000 (11:21 +0200)]
qemu: Sanitize argument names and empty disk check in qemuDomainDetermineDiskChain

Reuse virStorageSourceIsEmpty and rename "force" argument to
"force_probe".