]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
7 years agoqemu: Implement pcie-to-pci-bridge controller
Andrea Bolognani [Thu, 11 Jan 2018 16:28:43 +0000 (17:28 +0100)]
qemu: Implement pcie-to-pci-bridge controller

The new controller will not yet be used automatically by
libvirt, but at this point it's already possible to configure
a guest to use it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: Add QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE
Andrea Bolognani [Tue, 9 Jan 2018 17:05:30 +0000 (18:05 +0100)]
qemu: Add QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE

This capability will be set when the pcie-pci-bridge device
is available in the QEMU binary.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoconf: Rename virDomainPCIAddressSet.areMultipleRootsSupported
Andrea Bolognani [Wed, 28 Mar 2018 10:28:38 +0000 (12:28 +0200)]
conf: Rename virDomainPCIAddressSet.areMultipleRootsSupported

We're going to add a similarly-named attribute later, and we'd
like to be consistent.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agotests: Add aarch64-traditional-pci test
Andrea Bolognani [Tue, 9 Jan 2018 17:42:51 +0000 (18:42 +0100)]
tests: Add aarch64-traditional-pci test

This test shows what happens when you add a traditional PCI
device such as pci-serial to a pure PCIe machine type such
as aarch64/virt.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agodocs: Tweak PCI controller model documentation
Andrea Bolognani [Wed, 28 Mar 2018 13:12:53 +0000 (15:12 +0200)]
docs: Tweak PCI controller model documentation

Instead of first listing the models on their own, and then
listing them again grouped by the libvirt release they were
introduced in, have a single list.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoutil: fix spelling in virSocketAddrParseAny docs
Jim Fehlig [Thu, 5 Apr 2018 20:57:16 +0000 (14:57 -0600)]
util: fix spelling in virSocketAddrParseAny docs

s/netork/network/

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
7 years agoutil: introduce virSocketAddrParseAny
Jim Fehlig [Mon, 26 Mar 2018 18:53:05 +0000 (12:53 -0600)]
util: introduce virSocketAddrParseAny

When preparing for migration, the libxl driver creates a new TCP listen
socket for the incoming migration by calling virNetSocketNewListenTCP,
passing the destination host name. virNetSocketNewListenTCP calls
virSocketAddrParse to check if the host name is a wildcard address, in
which case it avoids adding the AI_ADDRCONFIG flag to the hints passed to
getaddrinfo. If the host name is not an IP address, virSocketAddrParse
reports an error

error : virSocketAddrParseInternal:121 : Cannot parse socket address
'myhost.example.com': Name or service not known

But virNetSocketNewListenTCP succeeds regardless and the overall migration
operation succeeds.

Introduce virSocketAddrParseAny and use it when simply testing if a host
name/addr is parsable.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoutil: honor reportError parameter in virSocketAddrParseInternal
Jim Fehlig [Mon, 26 Mar 2018 19:00:25 +0000 (13:00 -0600)]
util: honor reportError parameter in virSocketAddrParseInternal

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agonews: Document device mapper fix
Michal Privoznik [Mon, 26 Mar 2018 05:11:42 +0000 (07:11 +0200)]
news: Document device mapper fix

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoqemu_cgroup: Handle device mapper targets properly
Michal Privoznik [Thu, 5 Apr 2018 07:34:25 +0000 (09:34 +0200)]
qemu_cgroup: Handle device mapper targets properly

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

Problem with device mapper targets is that there can be several
other devices 'hidden' behind them. For instance, /dev/dm-1 can
consist of /dev/sda, /dev/sdb and /dev/sdc. Therefore, when
setting up devices CGroup and namespaces we have to take this
into account.

This bug was exposed after Linux kernel was fixed. Initially,
kernel used different functions for getting block device in
open() and ioctl(). While CGroup permissions were checked in the
former case, due to a bug in kernel they were not checked in the
latter case. This changed with the upstream commit of
519049afead4f7c3e6446028c41e99fde958cc04 (v4.16-rc5~11^2~4).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoutil: Introduce virDevMapperGetTargets
Michal Privoznik [Mon, 26 Mar 2018 12:48:07 +0000 (14:48 +0200)]
util: Introduce virDevMapperGetTargets

This helper fetches dependencies for given device mapper target.

At the same time, we need to provide a dummy log function because
by default libdevmapper prints out error messages to stderr which
we need to suppress.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agovirjsontest: Use a more stable floating point number for testing
Ján Tomko [Thu, 11 Jan 2018 13:41:58 +0000 (14:41 +0100)]
virjsontest: Use a more stable floating point number for testing

We store all JSON numbers as strings. To allow using json libraries
that store them in numeric types, use a more predictable and normalized
value.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
7 years agotest: Use virDomainObjListFindByIDRef
John Ferlan [Tue, 27 Mar 2018 17:16:38 +0000 (13:16 -0400)]
test: Use virDomainObjListFindByIDRef

Rather than using virDomainObjListFindByID, let's be more consistent
and return a reffed and locked object. Since we're using the Ref API,
use virDomainObjEndAPI on @dom and not just virObjectUnlock.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
7 years agotest: Use virDomainObjListFindByUUIDRef
John Ferlan [Fri, 9 Mar 2018 15:37:52 +0000 (10:37 -0500)]
test: Use virDomainObjListFindByUUIDRef

Rather than using virDomainObjListFindByUUID, let's be more consistent
and return a reffed and locked object. Since we're using the Ref API,
use virDomainObjEndAPI on @dom and not just virObjectUnlock.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
7 years agotest: Need to relock afer virDomainObjListRemove
John Ferlan [Tue, 27 Mar 2018 17:39:52 +0000 (13:39 -0400)]
test: Need to relock afer virDomainObjListRemove

For all @dom's fetched from a testDomObjFromDomain because
virDomainObjListRemove will return an unlocked domain object
we should relock it prior to the cleanup label which will use
virDomainObjEndAPI which would Unlock and Unref the passed
object (and we should avoid unlocking an unlocked object).

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
7 years agotests: utils: Fix out-of-bounds access to memory in virTestCompareToFile
Peter Krempa [Tue, 3 Apr 2018 14:16:52 +0000 (16:16 +0200)]
tests: utils: Fix out-of-bounds access to memory in virTestCompareToFile

Similarly to 3506f1ecfde, the contents of 'cmpcontent' may be an empty
string so the following code would access memory out of the array.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agorpm: add deps on rpcgen/libtirpc-devel
Daniel P. Berrangé [Tue, 3 Apr 2018 12:41:46 +0000 (13:41 +0100)]
rpm: add deps on rpcgen/libtirpc-devel

Since RPC support moved out of glibc we need to have explicit deps on
the new packages providing this functionality

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoqemu: domain: Move initialization of disk cachemode for <shareable> disks
Peter Krempa [Tue, 27 Mar 2018 09:11:26 +0000 (11:11 +0200)]
qemu: domain: Move initialization of disk cachemode for <shareable> disks

The qemu command line generator code set disk caching of shareable disks
to 'none' when formatting the command line silently. Move this code to a
common place when preparing the domain definition for startup so that it
does not have to be duplicated.

The new test case shows that the actual cache mode will now be recorded
in the live XML definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agotests: qemuxml2argv: Allow testing of config processed at startup
Peter Krempa [Tue, 27 Mar 2018 09:11:01 +0000 (11:11 +0200)]
tests: qemuxml2argv: Allow testing of config processed at startup

Add a new kind of XML output test for the files in qemuxml2argvtest
where we can validate setup and defaults applied when starting up the
VM.

This is achieved by formatting of the definition processed by the
qemuxml2argvtest into a XML and it's compared against files in
qemuxml2startupxmloutdata. This test is automatically executed if the
output file is present and it's skipped otherwise.

The first example test case is created from 'disk-drive-shared' test
case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agotests: qemu: Test QCOW2 + LUKS support
Peter Krempa [Wed, 28 Mar 2018 13:39:35 +0000 (15:39 +0200)]
tests: qemu: Test QCOW2 + LUKS support

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: command: Add support for qcow2 + luks
Peter Krempa [Wed, 28 Mar 2018 10:21:31 +0000 (12:21 +0200)]
qemu: command: Add support for qcow2 + luks

The old qcow2 encryption format was buggy, so the new approach is to use
luks inside qcow2. As it turns out, it didn't require that many changes.

It was necessary to fix the command line formatter to stop mangling the
format when secrets are present and specify the encryption format and
secret in correct format.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: domain: Validate support for LUKS encryption of QCOW2 images
Peter Krempa [Thu, 29 Mar 2018 06:50:30 +0000 (08:50 +0200)]
qemu: domain: Validate support for LUKS encryption of QCOW2 images

Reject configurations when qemu would not support the image.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: caps: Add capability for LUKS encrypted qcow2 image support
Peter Krempa [Wed, 28 Mar 2018 11:29:11 +0000 (13:29 +0200)]
qemu: caps: Add capability for LUKS encrypted qcow2 image support

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: domain: Forbid VIR_STORAGE_FILE_ISO as a disk format
Peter Krempa [Thu, 29 Mar 2018 06:49:08 +0000 (08:49 +0200)]
qemu: domain: Forbid VIR_STORAGE_FILE_ISO as a disk format

This format is used by the storage driver and other hypervisors but qemu
does not have notion of the 'iso' format and libvirt does not translate
it to anything useful, so it would not work anyways. Users should use
'raw' instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: domain: Forbid VIR_STORAGE_FILE_DIR as a disk format
Peter Krempa [Thu, 29 Mar 2018 06:47:10 +0000 (08:47 +0200)]
qemu: domain: Forbid VIR_STORAGE_FILE_DIR as a disk format

This is a storage driver type, which is not handled in qemu driver
properly. For accessing directories, disk type 'dir' is used instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: domain: Forbid storage type 'cow' in qemu
Peter Krempa [Fri, 23 Mar 2018 13:08:36 +0000 (14:08 +0100)]
qemu: domain: Forbid storage type 'cow' in qemu

QEMU does not support it so save us the hassle and forbid it right away.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: domain: Add helper to initialize detected parts of the backing chain
Peter Krempa [Tue, 5 Dec 2017 15:40:27 +0000 (16:40 +0100)]
qemu: domain: Add helper to initialize detected parts of the backing chain

It will be necessary to initialize various aspects for the detected
members of the backing chain. Add a function that will handle it and
call it from qemuDomainPrepareDiskSource and qemuDomainDetermineDiskChain

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoconf: Extract logic for updating 'detect_zeroes' mode
Peter Krempa [Wed, 29 Nov 2017 14:17:10 +0000 (15:17 +0100)]
conf: Extract logic for updating 'detect_zeroes' mode

For some reason we've decided to silently translate the disk
detect_zeroes mode if it would be invalid. Extract the
logic so that it does not need to be copypasta'd across the code base.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoconf: Don't require 'def' in virDomainDiskDefParse
Peter Krempa [Fri, 16 Mar 2018 14:32:09 +0000 (15:32 +0100)]
conf: Don't require 'def' in virDomainDiskDefParse

In some use cases (mostly in tests) it is not required to check the
seclabel definition validity. Add possibility to call
virDomainDiskDefParse without the domain definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoconf: Refactor/rename virDomainDiskDefSourceParse
Peter Krempa [Fri, 16 Mar 2018 11:43:23 +0000 (12:43 +0100)]
conf: Refactor/rename virDomainDiskDefSourceParse

Make the function more usable by returning the full disk definition and
fix the only caller for the new semantics. The new name for the function
is virDomainDiskDefParse.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agotests: utils: Tolerate NULL actual data in virTestCompareToFile
Peter Krempa [Tue, 27 Mar 2018 16:14:12 +0000 (18:14 +0200)]
tests: utils: Tolerate NULL actual data in virTestCompareToFile

The function docs state that 'strcontent' may be NULL. This was added in
8b3a0b28ba2 but that commit neglected to fix rest of the function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu_monitor_json: Properly check "return" type
Jiri Denemark [Wed, 28 Mar 2018 10:45:21 +0000 (12:45 +0200)]
qemu_monitor_json: Properly check "return" type

My commit 2e0d6cdec41 claimed qemuMonitorJSONCheckError guarantees
"return" object exists in the JSON reply. But it only makes sure the key
is there, while the type of the value is not checked. A lot of callers
do not care since they only want to see whether their QMP command failed
or not, but any caller which needs to read some data from the reply
wants to make sure the correct data type was returned.

This patch adds a new API called qemuMonitorJSONCheckReply which calls
qemuMonitorJSONCheckError and checks "return" contains a value of the
specified type.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7 years agoutil: json: Privatize struct _virJSONValue and sub-structs
Peter Krempa [Thu, 29 Mar 2018 18:36:56 +0000 (20:36 +0200)]
util: json: Privatize struct _virJSONValue and sub-structs

Enforce usage of accessors by hiding the implementation in the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: monitor: Don't resist stealing 'actions' in qemuMonitorJSONTransaction
Peter Krempa [Fri, 30 Mar 2018 10:35:52 +0000 (12:35 +0200)]
qemu: monitor: Don't resist stealing 'actions' in qemuMonitorJSONTransaction

Rather than trying to prevent stealing of the 'actions' virJSONValue
into the monitor command replace the code so that it does the same
thing, since 'actions' was actually not really used after calling the
monitor.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoutil: qemu: Don't access virJSONValue directly in virQEMUBuildCommandLineJSONRecurse
Peter Krempa [Thu, 29 Mar 2018 18:41:07 +0000 (20:41 +0200)]
util: qemu: Don't access virJSONValue directly in virQEMUBuildCommandLineJSONRecurse

Use the accessors instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoutil: json: Add accessor for geting a VIR_JSON_TYPE_NUMBER as string
Peter Krempa [Thu, 29 Mar 2018 18:38:35 +0000 (20:38 +0200)]
util: json: Add accessor for geting a VIR_JSON_TYPE_NUMBER as string

Sometimes it's desired to get a JSON number as string. Add a helper.
This will help in cases where we'd want to convert the internal type from
string to something else.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agojson: Replace access to virJSONValue->type by virJSONValueGetType
Peter Krempa [Thu, 29 Mar 2018 18:30:05 +0000 (20:30 +0200)]
json: Replace access to virJSONValue->type by virJSONValueGetType

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: agent: Avoid unnecessary JSON object type check
Peter Krempa [Thu, 29 Mar 2018 18:34:57 +0000 (20:34 +0200)]
qemu: agent: Avoid unnecessary JSON object type check

Use virJSONValueObjectGetArray instead of virJSONValueObjectGet so that
it's not necessary to check whether it's an array.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: monitor: Use virJSONValueObjectKeysNumber in qemuMonitorJSONGetCPUModelExpansion
Peter Krempa [Fri, 30 Mar 2018 08:40:51 +0000 (10:40 +0200)]
qemu: monitor: Use virJSONValueObjectKeysNumber in qemuMonitorJSONGetCPUModelExpansion

Replace direct access to virJSONValue members by accessor.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agotests: json: Validate that attribute values are properly stolen
Peter Krempa [Fri, 30 Mar 2018 10:18:50 +0000 (12:18 +0200)]
tests: json: Validate that attribute values are properly stolen

Make sure that the 'a' and 'A' modifiers for virJSONValueObjectAddVArgs
behave correctly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoutil: json: Fix freeing of objects appended to virJSONValue
Peter Krempa [Fri, 30 Mar 2018 09:12:57 +0000 (11:12 +0200)]
util: json: Fix freeing of objects appended to virJSONValue

It was not possible to determine whether virJSONValueObjectAddVArgs and
the functions using it would consume a virJSONValue or not when used
with the 'a' or 'A' modifier depending on when the loop failed.

Fix this by passing in a pointer to the pointer so that it can be
cleared once it's successfully consumed and the callers don't have to
second-guess leaving a chance of leaking or double freeing the value
depending on the ordering.

Fix all callers to pass a double pointer too.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agolxc_container: Set source file description
Radostin Stoyanov [Mon, 2 Apr 2018 07:55:00 +0000 (08:55 +0100)]
lxc_container: Set source file description

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
7 years agonews: Update release news with mediated devices hot {plug,unplug}
Erik Skultety [Mon, 26 Mar 2018 12:36:27 +0000 (14:36 +0200)]
news: Update release news with mediated devices hot {plug,unplug}

Signed-off-by: Erik Skultety <eskultet@redhat.com>
7 years agoqemu: hotplug: Introduce hot unplug for mediated devices
Erik Skultety [Mon, 26 Mar 2018 08:06:07 +0000 (10:06 +0200)]
qemu: hotplug: Introduce hot unplug for mediated devices

Mediated devices support hot-{plug,unplug} since their introduction in
kernel 4.10, however libvirt has still been missing support for this.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
7 years agoqemu: hotplug: Introduce hot plug support for mediated devices
Erik Skultety [Mon, 26 Mar 2018 07:38:47 +0000 (09:38 +0200)]
qemu: hotplug: Introduce hot plug support for mediated devices

Mediated devices support hot-{plug,unplug} since their introduction in
kernel 4.10, however libvirt has still been missing support for this.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
7 years agolxc: Use virDomainObjEndAPI after FindByName
John Ferlan [Sat, 10 Mar 2018 13:47:44 +0000 (08:47 -0500)]
lxc: Use virDomainObjEndAPI after FindByName

For consistency, rather than open coding the Unref and Unlock,
just use the virDomainObjEndAPI API.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agodocs: formatdomain: Clarify CPU feature policy option "require"
Kashyap Chamarthy [Mon, 26 Mar 2018 10:53:12 +0000 (12:53 +0200)]
docs: formatdomain: Clarify CPU feature policy option "require"

Using the 'require' value for the 'policy' attribute indicates
that the guest will have the feature so the host CPU does not
need to support it if the hypervisor can emulate it.

E.g. 'x2apic' is emulated by QEMU even if the host does not support it:

    <feature policy='require' name='x2apic'/>

Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
7 years agoqemu: s/acceptible/acceptable/
Ján Tomko [Sat, 31 Mar 2018 18:02:09 +0000 (20:02 +0200)]
qemu: s/acceptible/acceptable/

Prefer the contemporary spelling.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
7 years agoqemuDomainRemoveDevice: add qemuDomainRemoveWatchdog
Ján Tomko [Sat, 31 Mar 2018 08:12:17 +0000 (10:12 +0200)]
qemuDomainRemoveDevice: add qemuDomainRemoveWatchdog

qemuDomainDetachWatchdog uses the infrastructure for waiting
for the DEVICE_DELETED event, but the asynchronous delete
was not implemented.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
7 years agoReplace QEmu with QEMU
Ján Tomko [Sat, 31 Mar 2018 14:51:14 +0000 (16:51 +0200)]
Replace QEmu with QEMU

QEMU is the preferred spelling used on QEMU website.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
7 years agovmx: convert any amount of NICs
Pino Toscano [Wed, 28 Mar 2018 11:40:21 +0000 (13:40 +0200)]
vmx: convert any amount of NICs

Scan the parsed VMX file, and gather the biggest index of the network
interfaces there: this way, it is possible to parse all the available
network interfaces, instead of just 4 maximum.

Add the VMX file attached to RHBZ#1560917 as testcase esx-in-the-wild-8.

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

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
7 years agointernal: add STRCASEPREFIX
Pino Toscano [Wed, 28 Mar 2018 11:40:20 +0000 (13:40 +0200)]
internal: add STRCASEPREFIX

Simple macro to check the prefix of a string in a case-insensitive way.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
7 years agovmx: allocate space for network interfaces if needed
Pino Toscano [Wed, 28 Mar 2018 11:40:19 +0000 (13:40 +0200)]
vmx: allocate space for network interfaces if needed

Dynamically grow the array of network interfaces for each interface
read, instead of using a single array of size 4.  This way, in the
future it will be easier to not limit the number of network interfaces
(which this patch still does not change).

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
7 years agovmx: check for present/enabled devices earlier
Pino Toscano [Wed, 28 Mar 2018 11:40:18 +0000 (13:40 +0200)]
vmx: check for present/enabled devices earlier

When parsing filesystems, network interfaces, serial ports, and
parallel ports, check earlier whether they are present/enabled, delaying
the allocation of the objects.

This is mostly a small optimization, with no behaviour change.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
7 years agoqemu: Use dynamic buffer for storing PTY aliases
Michal Privoznik [Thu, 29 Mar 2018 06:50:01 +0000 (08:50 +0200)]
qemu: Use dynamic buffer for storing PTY aliases

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

For historical reasons we've used 32 bytes long static buffer for
storing PTY aliases. This breaks users scenario where they try to
start a machine with user alias consisting of "ua-$uuid".

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoPost-release version bump to 4.3.0
Michal Privoznik [Sun, 1 Apr 2018 10:32:36 +0000 (12:32 +0200)]
Post-release version bump to 4.3.0

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoRelease of libvirt-4.2.0
Daniel Veillard [Sun, 1 Apr 2018 08:07:38 +0000 (10:07 +0200)]
Release of libvirt-4.2.0

* docs/news.xml: updated
* po/*.po*: regenerated

Signed-off-by: Daniel Veillard <veillard@redhat.com>
7 years agovirsh: add missing help info of --source to domifaddr
Chen Hanxiao [Fri, 16 Mar 2018 02:03:15 +0000 (10:03 +0800)]
virsh: add missing help info of --source to domifaddr

commit b4b5c82ce forgot to add this.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
7 years agoremote: remove outdated comment about Solaris
Daniel P. Berrangé [Wed, 28 Mar 2018 15:11:53 +0000 (16:11 +0100)]
remote: remove outdated comment about Solaris

When removing a conditional in:

  commit da1ade7a52e040192c5e9396c15ec9225a0a2c48
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Fri Mar 23 10:50:59 2018 +0000

    remote: remove some __sun conditionals

the corresponding comment was mistakenly left behind.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoopenvz: Cleanup indention
John Ferlan [Mon, 23 Oct 2017 16:04:43 +0000 (12:04 -0400)]
openvz: Cleanup indention

Some of the indents were only 2 spaces, make consistent w/ 4 spaces.
Also some indents didn't align properly. Fix them all up.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
7 years agoqemu: do not drop implicit controllers with non-implicit attributes
Ján Tomko [Sun, 25 Mar 2018 18:54:07 +0000 (20:54 +0200)]
qemu: do not drop implicit controllers with non-implicit attributes

If someone set a user alias or pcihole64 on an implicit controller,
we need to format it to migrate the domain properly.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reported-by: Joseph Richard <Joseph.Richard@windriver.com>
7 years agovirDomainDeviceAliasIsUserAlias: tolerate NULL
Ján Tomko [Sun, 25 Mar 2018 19:14:21 +0000 (21:14 +0200)]
virDomainDeviceAliasIsUserAlias: tolerate NULL

Do not crash in virDomainDeviceInfoParseXML if someone provides
an 'alias' element without a 'name' attribute.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
7 years agopolkit: reintroduce check for pkcheck
Ján Tomko [Fri, 23 Mar 2018 18:10:35 +0000 (19:10 +0100)]
polkit: reintroduce check for pkcheck

Commit 2499d1a0 was too eager and possibly enabled polkit
on all platforms with D-Bus, regardless of whether they use polkit.

Reintroduce the usage of pkcheck as a witness for --with-polkit=check,
but do not require it for --with-polkit=yes.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reported-by: Jiří Denemark <jdenemar@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
7 years agobuild: Remove --with-xml-catalog-file option
Rainer Müller [Fri, 23 Mar 2018 20:36:34 +0000 (21:36 +0100)]
build: Remove --with-xml-catalog-file option

After validation against XHTML 1.0 was dropped in f802c9de0,
the XML_CATALOG_FILE is not in use anymore. Therefore the checks in
configure can be removed.

Signed-off-by: Rainer Müller <raimue@codingfarm.de>
7 years agotests: qemucapabilities: Drop mostly duplicated data
Andrea Bolognani [Fri, 23 Mar 2018 12:31:14 +0000 (13:31 +0100)]
tests: qemucapabilities: Drop mostly duplicated data

When GIC support was introduced (QEMU 2.6 timeframe) we needed
to make sure both GICv2 hardware and GICv3 hardware were handled
correctly, and that was achieved by having separate capabilities
data for each.

Now that we have capabilities data for several QEMU versions we
can stop storing data for GICv2 and GICv3 hardware separately,
and instead have GICv2 data for QEMU <= 2.10 and GICv3 data for
QEMU >= 2.12, without losing any coverage.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7 years agotests: domaincaps: Add QEMU 2.12
Andrea Bolognani [Fri, 23 Mar 2018 12:58:42 +0000 (13:58 +0100)]
tests: domaincaps: Add QEMU 2.12

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7 years agotests: domaincaps: Order by architecture
Andrea Bolognani [Fri, 23 Mar 2018 12:38:32 +0000 (13:38 +0100)]
tests: domaincaps: Order by architecture

Test cases in qemucapabilitiestest are ordered by architecture
first, then by QEMU version. Use the same order here.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7 years agonews: Update for virtio-gpu-ccw and virtio input ccw devices
Farhan Ali [Fri, 23 Mar 2018 17:22:43 +0000 (13:22 -0400)]
news: Update for virtio-gpu-ccw and virtio input ccw devices

Document support for the virtio-gpu-ccw and
virtio-{keyboard, mouse, tablet}-ccw devices.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
7 years agoqemu: Add support for virtio input ccw devices
Farhan Ali [Fri, 23 Mar 2018 17:22:42 +0000 (13:22 -0400)]
qemu: Add support for virtio input ccw devices

QEMU on S390 (since v2.11) can support virtio input ccw devices.
So build the qemu command line for ccw devices.

Also add test cases for virtio-{keyboard, mouse, tablet}-ccw.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
7 years agoqemu: Introduce capabilities for virtio input ccw devices
Farhan Ali [Fri, 23 Mar 2018 17:22:41 +0000 (13:22 -0400)]
qemu: Introduce capabilities for virtio input ccw devices

QEMU on S390 (since v2.11) can support virtio input ccw devices.
Introduce qemu capabilities for these devices.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
7 years agoqemu: Change default video model type to virtio for S390
Farhan Ali [Fri, 23 Mar 2018 17:22:40 +0000 (13:22 -0400)]
qemu: Change default video model type to virtio for S390

S390 guests can only support a virtio-gpu-ccw device as a video
device. So set default video model type to VIR_DOMAIN_VIDEO_TYPE_VIRTIO
for S390 guests.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
7 years agoqemu: Add support for virtio-gpu-ccw video device on S390
Farhan Ali [Fri, 23 Mar 2018 17:22:39 +0000 (13:22 -0400)]
qemu: Add support for virtio-gpu-ccw video device on S390

QEMU on S390 (since v2.11) can support the virtio-gpu-ccw device,
which can be used as a video device.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
7 years agoqemu: Introduce a new capability for virtio-gpu-ccw
Farhan Ali [Fri, 23 Mar 2018 17:22:38 +0000 (13:22 -0400)]
qemu: Introduce a new capability for virtio-gpu-ccw

QEMU on S390 (since v2.11) can support virtio-gpu-ccw device.
Let's introduce a new qemu capability for the device.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
7 years agoconf: avoid reporting errors when network driver is disabled
Daniel P. Berrangé [Fri, 23 Mar 2018 11:43:53 +0000 (11:43 +0000)]
conf: avoid reporting errors when network driver is disabled

In previous releases all these methods were a no-op if the network
driver is disabled. These helper methods are called unconditionally for
all types of network interface, so must be no-ops if missing. Other code
will already generate an error if the network driver is disabled and a
NIC with type=network is used.

Reviewed-by: Laine Stump <laine@laine.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoremote: remove some __sun conditionals
Daniel P. Berrangé [Fri, 23 Mar 2018 10:50:59 +0000 (10:50 +0000)]
remote: remove some __sun conditionals

The libvirtd daemon has some arbitrary logic to drop privileges, but
only on Solaris platforms. This was added during Xen days, when Xen was
the only driver running in libvirtd. There's no expectation or testing
that this works with the new libxl stack, nor whether dropping
privileges breaks any of the secondary drivers. Finally, we'll be
splitting drivers out into their own independant daemons, so this won't
be applicable to libvirtd in future anyway.

The remote driver client meanwhile arbitrarily disables daemon
auto-spawn when connecting as non-root, breaking a key feature of
libvirt unprivileged connections.

Since we've not had any contributions for Solaris since circa 2012
and we don't do any CI testing we should consider this platform
unmaintained and thus reasonable to remove this cruft. If someone steps
forward to maintain Solaris again, this code would need re-evaluating to
come up with something more targetted.

There's various __sun conditionals in the Xen driver code, but those are
not touched. This is all for the legacy Xen driver, which will be
entirely removed at some point in future, so not benefit to hacking out
just the Solaris parts.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agoqemu: Build smartcard command line more wisely
Michal Privoznik [Fri, 23 Mar 2018 13:24:14 +0000 (14:24 +0100)]
qemu: Build smartcard command line more wisely

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

Similarly to b133fac356324c3 we need to look up alias of CCID
controller when constructing smartcard command line instead of
relying on broken assumption it will always be 'ccid0'. After
user aliases it can be anything.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
7 years agoqemu: Fix virQEMUCapsCommands formatting
John Ferlan [Tue, 20 Mar 2018 15:45:15 +0000 (11:45 -0400)]
qemu: Fix virQEMUCapsCommands formatting

Starting with commit id 'fab9d6e1' the formatting of:

{ "command-name", QEMU_CAPS_NAME },

was altered to:

{ "command-name", QEMU_CAPS_NAME},

and then commit id 'e2b05c9a' altered that to:

{ "command-name", QEMU_CAPS_NAME}

So, let's just fix that up to make things consistent with the
rest of the structures.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: domain: Drop declaration of qemuDomainDefValidateDisk
Peter Krempa [Fri, 23 Mar 2018 12:07:37 +0000 (13:07 +0100)]
qemu: domain: Drop declaration of qemuDomainDefValidateDisk

There is no such function in our code. Commit abca72faa49 added it
spuriously.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agotests: qemumonitorjson: Do some useful testing in the 'simple' tests
Peter Krempa [Thu, 22 Mar 2018 18:07:21 +0000 (19:07 +0100)]
tests: qemumonitorjson: Do some useful testing in the 'simple' tests

The 'simple' monitor tests were quite useless, since the code did not
even check whether the correct command was called.

This patch uses the QAPI schema validator to validate that the arguments
are in format according to the schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agotests: qemumonitor: Allow testing schema for fake monitor interactions
Peter Krempa [Thu, 22 Mar 2018 18:05:26 +0000 (19:05 +0100)]
tests: qemumonitor: Allow testing schema for fake monitor interactions

Add infrastructure that will allow testing schema of the commands we
pass to the fake monitor object, so that we can make sure that it
actually does something.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agotests: qemumonitorjson: Fix few arguments of test cases
Peter Krempa [Thu, 22 Mar 2018 17:39:32 +0000 (18:39 +0100)]
tests: qemumonitorjson: Fix few arguments of test cases

Prepare for testing of the schema of used commands by changing few
arguments to values which will not be rejected.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agotests: qemu: Add infrastructure for QAPI schema testing
Peter Krempa [Thu, 22 Mar 2018 16:07:43 +0000 (17:07 +0100)]
tests: qemu: Add infrastructure for QAPI schema testing

Add a function which will allow to test whether a JSON object conforms
to the QAPI schema. This greatly helps when developing formatters for
new JSON objects and will help make sure that the code will not break in
cases which have unit tests but were actually not function-tested
(mostly various disk access protocols).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agotests: Add data file with QEMU QAPI schema
Peter Krempa [Thu, 22 Mar 2018 16:03:07 +0000 (17:03 +0100)]
tests: Add data file with QEMU QAPI schema

Add the QAPI schema (returned by 'query-qmp-schema' command) which will
be used for QAPI schema testing in upcoming patches.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: qapi: Return correct entry in virQEMUQAPISchemaTraverse
Peter Krempa [Wed, 21 Mar 2018 15:51:29 +0000 (16:51 +0100)]
qemu: qapi: Return correct entry in virQEMUQAPISchemaTraverse

virQEMUQAPISchemaTraverse would return previous-to-last queried item on
a query. It would not be a problem if checking if the given path exists
since error reporting works properly but if the caller is interested in
the result, it would be wrong.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoutil: json: Add accessor for looking up JSON value type
Peter Krempa [Tue, 20 Mar 2018 13:07:26 +0000 (14:07 +0100)]
util: json: Add accessor for looking up JSON value type

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: monitor: Move processing of QMP schema to the new file
Peter Krempa [Tue, 20 Mar 2018 08:29:30 +0000 (09:29 +0100)]
qemu: monitor: Move processing of QMP schema to the new file

The JSON array was processed to the hash table used by the query apis in
the monitor code. Move it to a new helper in qemu_qapi.c.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: qapi: Fix naming of moved functions
Peter Krempa [Tue, 20 Mar 2018 07:57:44 +0000 (08:57 +0100)]
qemu: qapi: Fix naming of moved functions

Change the prefix of the functions to 'virQEMUQapi' and rename the two
public APIs so that the verb is put last.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoqemu: caps: Move QAPI schema related code into separate file
Peter Krempa [Tue, 20 Mar 2018 07:44:11 +0000 (08:44 +0100)]
qemu: caps: Move QAPI schema related code into separate file

Extract the code into qemu_qapi.c/h so that we separate it from various
parts of the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agoutil: buffer: Tolerate NULL 'buf' in virBufferStrcat
Peter Krempa [Thu, 22 Mar 2018 12:10:40 +0000 (13:10 +0100)]
util: buffer: Tolerate NULL 'buf' in virBufferStrcat

Most other buffer APIs tolerate the buffer being NULL.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agolxc: report error message raised by the failing function
Prafull [Thu, 22 Mar 2018 14:34:35 +0000 (20:04 +0530)]
lxc: report error message raised by the failing function

The code that calls VIR_WARN after a function fails, doesn't
report the error message raised by the failing function.
Such error messages are now reported in lxc/lxc_driver.c

Signed-off-by: Prafullkumar Tale <talep158@gmail.com>
7 years agodocs: introduce libvirt-dbus binding
Pavel Hrdina [Tue, 4 Jul 2017 14:50:00 +0000 (16:50 +0200)]
docs: introduce libvirt-dbus binding

libvirt-dbus is a new binding that wraps libvirt API into D-Bus calls.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
7 years agodocs: fix a typo in docs.html page
Pavel Hrdina [Fri, 23 Mar 2018 11:52:13 +0000 (12:52 +0100)]
docs: fix a typo in docs.html page

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
7 years agorpc: avoid duplicating config in virtlockd/virtlogd augeas tests
Daniel P. Berrangé [Wed, 21 Mar 2018 16:41:10 +0000 (16:41 +0000)]
rpc: avoid duplicating config in virtlockd/virtlogd augeas tests

Most of the augeas test files use ::CONFIG:: to pull in the master
config file for testing. This ensures that entries added to the config
file are actually tested by augeas.

This identified the missing admin_max_clients example in the virtlogd
config file, which in turn prompted a change in description of the
max_clients parameter, since these daemons don't have separate
readonly & readwrite sockets.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agorpc: remove remains of obsolete log_buffer_size config parameter
Daniel P. Berrangé [Wed, 21 Mar 2018 16:27:42 +0000 (16:27 +0000)]
rpc: remove remains of obsolete log_buffer_size config parameter

The global log buffer feature was deleted in:

  commit c0c8c1d7bb53e0420f8573ea961ef7e19b7fff85
  Author: Daniel P. Berrange <berrange@redhat.com>
  Date:   Mon Mar 3 14:54:33 2014 +0000

    Remove global log buffer feature entirely

    A earlier commit changed the global log buffer so that it only
    records messages that are explicitly requested via the log
    filters setting. This removes the performance burden, and
    improves the signal/noise ratio for messages in the global
    buffer. At the same time though, it is somewhat pointless, since
    all the recorded log messages are already going to be sent to an
    explicit log output like syslog, stderr or the journal. The
    global log buffer is thus just duplicating this data on stderr
    upon crash.

    The log_buffer_size config parameter is left in the augeas
    lens to prevent breakage for users on upgrade. It is however
    completely ignored hereafter.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This was in the 1.2.3 release, and 4 years is sufficient time for a
graceful upgrade path for augeas, so all remaining traces are now
removed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
7 years agovirt-aa-helper: test: check for expected profile content
Christian Ehrhardt [Wed, 21 Mar 2018 11:28:39 +0000 (12:28 +0100)]
virt-aa-helper: test: check for expected profile content

So far the virt-aa-helper tests only checked the return code and thereby
catched aborts like issues failing to parse the XML. But there is one
category of virt-aa-helper issues so far untested - not generating the
expected rule.

This adds a basic grep based checks after each test to match against the
rule that is expected to be added by the test.

Acked-by: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
7 years agotest_driver: Add testDomainDestroyFlags
Katerina Koukiou [Thu, 22 Mar 2018 18:42:27 +0000 (19:42 +0100)]
test_driver: Add testDomainDestroyFlags

Adding this for completeness

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com>
7 years agovirt-aa-helper: generate rules for nvdimm memory
Christian Ehrhardt [Tue, 20 Mar 2018 10:13:54 +0000 (11:13 +0100)]
virt-aa-helper: generate rules for nvdimm memory

nvdimm memory is backed by a path on the host. This currently works only via
hotplug where the AppArmor label is created via the domain label callbacks.

This adds the virt-aa-helper support for nvdimm memory devices to generate
rules for the needed paths from the initial guest definition as well.

Example in domain xml:
  <memory model='nvdimm'>
    <source>
      <path>/tmp/nvdimm-base</path>
    </source>
    <target>
     <size unit='KiB'>524288</size>
     <node>0</node>
    </target>
  </memory>
Works to start now and creates:
  "/tmp/nvdimm-base" rw,

Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1757085
Acked-by: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
7 years agovirt-aa-helper: generate rules for passthrough input devices
Christian Ehrhardt [Tue, 20 Mar 2018 10:11:13 +0000 (11:11 +0100)]
virt-aa-helper: generate rules for passthrough input devices

Input devices can passthrough an event device. This currently works only via
hotplug where the AppArmor label is created via the domain label callbacks.

This adds the virt-aa-helper support for passthrough input devices to generate
rules for the needed paths from the initial guest definition as well.

Example in domain xml:
  <input type='passthrough' bus='virtio'>
          <source evdev='/dev/input/event0' />
  </input>
Works to start now and creates:
  "/dev/input/event0" rw,

Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1757085
Acked-by: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
7 years agosecurity, apparmor: add (Set|Restore)InputLabel
Christian Ehrhardt [Mon, 19 Mar 2018 13:48:39 +0000 (14:48 +0100)]
security, apparmor: add (Set|Restore)InputLabel

d8116b5a "security: Introduce functions for input device hot(un)plug"
implemented the code (Set|Restore)InputLabel for several security modules,
this patch adds an AppArmor implementation for it as well.

That fixes hot-plugging event input devices by generating a rule for the
path that needs to be accessed.

Example hot adding:
  <input type='passthrough' bus='virtio'>
     <source evdev='/dev/input/event0' />
  </input>
Creates now:
  "/dev/input/event0" rwk,

Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1755153
Acked-by: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
7 years agosecurity, apparmor: add (Set|Restore)MemoryLabel
Christian Ehrhardt [Mon, 19 Mar 2018 12:12:14 +0000 (13:12 +0100)]
security, apparmor: add (Set|Restore)MemoryLabel

Recent changes have made implementing this mandatory to hot add any
memory.
Implementing this in apparmor fixes this as well as allows hot-add of nvdimm
tpye memory with an nvdimmPath set generating a AppArmor rule for that
path.

Example hot adding:
  <memory model='nvdimm'>
    <source>
      <path>/tmp/nvdimm-test</path>
    </source>
    <target>
      <size unit='KiB'>524288</size>
      <node>0</node>
    </target>
  </memory>
Creates now:
  "/tmp/nvdimm-test" rwk,

Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1755153
Acked-by: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>