Node names for block objects in qemu need to be unique for an instance
of the qemu process. Add a counter to generate objects sequentially and
store it in the status XML so that we can restore it.
The helpers added allow to create new node names and reset the counter
after the VM process
Use the index stored in virStorageSource struct rather than
recalculating it. Currently we'd report proper numbers but that will
change with blockdev.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git
The 'device' field reported by 'query-block' is empty when -blockdev is
used. Add an argument which will allow matching disk by using the qdev
id so we can use this code with -blockdev.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_monitor.c | 8
QEMU supports 'block_resize' since 0.14 so we don't need to do explicit
checking. Additionally the caller did not use the different value at
all.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c
Add code paths which call into the new functions to gather the data on a
per-node-name basis and tweak the aliases used for extracting the data.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 54 +++---
1 file changed, 38 insertions(+), 16
Add handling of the 'id' field in the event which corresponds to the
QDEV id of the device.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 3 ++-
src/qemu/qemu_monitor.h | 2 ++
src/qemu/qemu_monitor_json.c | 11 ---
src/qemu/qemu_process.c | 3 ++-
4 files
Hi,
This series was run against 'syntax-check' test by patchew.org, which failed,
please find the details below:
Type: series
Message-id:
c690de2ccd5777f163f030bcaf13ec4e69881933.1533051128.git.crobi...@redhat.com
Subject: [libvirt] [PATCH] spec: Use %make_install
=== TEST SCRIPT BEGIN ===
on vir*ObjListExport call stack
Anya Harter (3):
conf: rename structs used by Export function
conf: rename Export Callback functions
conf: rename Match functions
src/conf/virinterfaceobj.c | 16 +---
src/conf/virnetworkobj.c| 24 ---
name match functions to be the vir prefix and interface name followed by
ObjMatch
ex. for virNetworkObjListExport, the match function is named
virNetworkObjMatch
Signed-off-by: Anya Harter
---
src/conf/virnetworkobj.c| 8
src/conf/virnodedeviceobj.c | 6 +++---
name functions to be the name of the export function followed by Callback
ex. for virInterfaceObjListExport, the callback function is named
virInterfaceObjListExportCallback
Signed-off-by: Anya Harter
---
src/conf/virinterfaceobj.c | 8
src/conf/virnetworkobj.c | 8
name structs to be the name of the Export function followed by Data
also tweak definitions to follow standard struct definition pattern
ex. for virInterfaceObjListExport, the struct is defined as follows:
typedef struct _virInterfaceObjListExportData
virInterfaceObjListExportData;
In this version everything except blockjobs should work properly.
Similarly to the previous posting, the block job support is not part of
this posting yet so blockjobs will not work.
Changes to v1:
- Added support for floppies via -device so they work with blockdev
- fixed return value from the
If a user configures the backing chain in the XML we should not ignore
it. We already do parse it but don't format it out. As a
safety-precaution don't attempt to format detected chain into the
inactive XML.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 8
When we stop using -drive qemu stops reporting it in some of the monitor
commands. To allow referring the disk frontends and the corresponding
block backends we need to know these names. Unfortunately different
buses require different names.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_alias.c
The proper way to do this would be to use the 'throttle' driver but
unfortunately it can't change the 'throttle_group' so we can't provide
feature parity. This hack uses the block_set_io_throttle command to do
so until we can properly replace it.
Signed-off-by: Peter Krempa
---
Allow storing of private data in the status XML for disks.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 60 ++
src/conf/domain_conf.h | 7 ++
2 files changed, 67 insertions(+)
diff --git a/src/conf/domain_conf.c
Allow referring to individual node name to rezise.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_monitor.c | 12 ++--
src/qemu/qemu_monitor.h | 3 ++-
src/qemu/qemu_monitor_json.c | 4 +++-
src/qemu/qemu_monitor_json.h | 3 ++-
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 479bf3adfe..e8e8bdbb14 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20194,20
Allow reuse of qemuDomainGetStatsOneBlock to work with nodenames by
removing the code that looks up the stats data to the caller.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git
The copy on read functionality is done using a separate layer in the
backing chain. Add function to generate properties for it.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_block.c | 22 ++
src/qemu/qemu_block.h | 2 ++
2 files changed, 24 insertions(+)
diff --git
With blockdev we can use the full range of commands to manipulate the
tray and the medium separately. Implement monitor code for this.
Schema testing done in the qemumonitorjsontest allows us to verify that
we generate the commands correctly.
Signed-off-by: Peter Krempa
---
Use the nodename to resize the device rather than the drive alias.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index fb09278112..f745a0392a 100644
The capability currently is not enabled so that we can add individual
bits first.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 1 +
src/qemu/qemu_capabilities.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
Similarly to backing store indexes which will become stable eventually
we need also to be able to format and store in the status XML for later
use the index for the top level of the backing chain.
Add XML formatter, parser, schema and docs.
Signed-off-by: Peter Krempa
---
Format the backing chain onto the commandline using the 'json' syntax
with -blockdev.
The command line formatter needs only minor tweaks to add the new
entries but we now need to initialize the strucutres that are used for
every layer of the backing chain.
Signed-off-by: Peter Krempa
---
It should be impossible to lack an alias in the domain definition. Other
disk types don't generate it so remove it here as well.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_hotplug.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
We'll specify them ourselves so it's pointless to attempt to redetect
them.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_process.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index d9acb4bd68..ff4d992ff1 100644
---
Prepare the full backing chain by instantiating authentication and TLS
transport secrets and other necessary objects so that we can add the
full backing chain explicitly to qemu. This also includes allocation of
nodenames for the individual backing chain members.
Signed-off-by: Peter Krempa
---
For use with -blockdev we need to be able to retrieve the stats by
'qdev' for the frontend device stats since 'device' will be empty. Note
that for non-blockdev case qdev and 'device' with 'drive-' skipped would
be the same.
Additionally so that we can report the highest written offset we need to
The copy-on-read feature is expressed by adding a new node layer in
qemu when using -blockdev. Since we will keep these per-disk (as opposed
to per storage source) we need to store the appropriate node names in
the disk definition.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c
Add a helper which will use a collection of other helpers to determine
whether a disk requires throttling to be enabled.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 10 ++
src/qemu/qemu_command.h | 3 +++
2 files changed, 13 insertions(+)
diff --git
We need to load the backing chain from the XML when using -blockdev.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_process.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 38e88404aa..d9acb4bd68 100644
---
Pass in the node name as the backend alias when -blockdev is used. As
copy-on-read is expressed by a separate -blockdev backing chain member
we need to decide which node name to use here.
For empty cdroms when using -blockdev there is no backend at all so NULL
is returned.
Signed-off-by: Peter
With -blockdev the drive alias can't be used any more so we need to
switch to the QOM name.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 30 --
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
When using -blockdev you need to use the qdev path to refer to the disk
fronends. Add means for storing the path and getting it after restart.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c| 27 +++
src/qemu/qemu_domain.h|
Disk image size data are not contained in the reply of query-blockstats
but need to be gathered from query-block. For use with -blockdev we
really need to call 'query-named-block-nodes' and process it to retrieve
the correct data.
This patch introduces qemuMonitorBlockStatsUpdateCapacityBlockdev
The string is not modified so it does not make sense to have a copy.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5dee701dc4..f36d4dc37f 100644
---
Use the 'qdev' instead of the disk alias to lookup the stats and
transfer the capacity from the appropriate node name so that the
function works with -blockdev.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 48 +---
1 file changed, 37
Split out the code which converts the stats gathered in
qemuDomainGetStatsBlock into typed parameters so that it will look
less ugly when extending it.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 73 +-
1 file changed, 49
'query-blockstats' did not report the 'qdev' field prior to fixing it so
that it works with our setup. Use that as a witness to enable -blockdev
Note that the blockjobs were NOT adapted yet so any blockjob will desync
the state of qemu. This patch needs to wait until blockjobs are fixed.
---
In cases when -blockdev is used we need to use 'query-named-block-nodes'
instead of 'query-block'. This means that we can extract the
write-threshold variable right away.
To keep compatibility with old VMs modify the code which was extracting
the value previously so that it updates the stats
Data relevant for the storage of a backing chain member will need to be
reported separately when switching to blockdev. Prepare a function that
extracts the appropriate data.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 28 +++-
1 file changed, 27
Use the new APIs which allow to manipulate the tray and media separately
and also allow using a nodename to refer to a media to implement media
changing.
With the new approach we don't have to call eject twice as the media is
removed by calling qemuMonitorBlockdevMediumRemove.
Signed-off-by:
While we report the read and written byte stats for every single layer
of the backing chain, qemu in fact reports them only for the frontend.
Split out the relevant stats into a separate function so that we can
later fix this bug and stop reporting it for backing chain entries where
they don't
To allow referring to the drives via the QOM id we need to setup the
floppy drives with a proper ID. This means that -device should be used
for them.
There are the following quirks:
- FDC needs to be instantiated prior to any floppy device
- floppy drive specified via -device does not support
When reporting stats for the backing chain some of them make sense only
for the topmost entry as they are actually tied to the frontend device.
We unfortunately can't change that fact, but we can stop reporting all
zero stats for the backing chain members where they don't make any
sense.
Use the 'node-name' provided in the event if 'device' is empty to look
up the disk.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 3 ++-
src/qemu/qemu_monitor.h | 2 ++
src/qemu/qemu_monitor_json.c | 5 -
src/qemu/qemu_process.c | 12 +++-
4 files
Allow looking up also via QOM id and rename the function accordingly.
Also add documentation of the specifics.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_process.c | 42 +++---
src/qemu/qemu_process.h | 5 +++--
3 files
Initialize data for the whole backing chain when plugging in or removing
disks when a machine supports -blockdev.
Similarly to startup we need to prepare the structures for the whole
backing chain and take care of the copy-on-read feature.
Signed-off-by: Peter Krempa
---
Split out the header so that the loop can be refactored later.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 38 --
1 file changed, 28 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index
Switch to using the QOM/qdev handles in all calls to
qemuMonitorGetBlockInfo when using -blockdev. The callers also need to
make sure to use the correct handle afterwards to extract the data.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 9 -
src/qemu/qemu_process.c | 7
With -blockdev qemu will not report any useful "device" for the data
returned by 'query-block'. We need to start using the 'qdev' field to do
so in cases when "device" is empty or it does not match the entry name.
This patch adds data for the 'qdev' field into the returned data
structure.
Rather than totalling every entry from 'query-block' for stats provided
by qemuDomainBlocksStatsGather total only stats for known disks. This
will allow to return data for nodenames and qdevs in the same hash so
that we can use them with -blockdev.
Signed-off-by: Peter Krempa
---
On 08/09/2018 01:44 AM, Cole Robinson wrote:
> Signed-off-by: Cole Robinson
> ---
> libvirt.spec.in | 19 ++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
ACK
Michal
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On Mon, Aug 13, 2018 at 01:58:56PM +0100, Daniel P. Berrangé wrote:
On Mon, Aug 13, 2018 at 02:54:00PM +0200, Ján Tomko wrote:
On Mon, Aug 13, 2018 at 01:55:10PM +0200, Ján Tomko wrote:
> For QEMU, we need a JSON parser that is able to handle its non-compliant
> JSON usage:
>
On Mon, Aug 13, 2018 at 04:13:31PM +0200, Michal Privoznik wrote:
> If a domain has hugepages configured and we're currently building
> memory-backend-file for a nvdimm device that domain has we will
> put hugepages path onto the command line. It should have been
> nvdimm path configured in the
On 08/13/2018 06:55 AM, Ján Tomko wrote:
For QEMU, we need a JSON parser that is able to handle its non-compliant
JSON usage:
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
QEMU is not non-compliant in its use of JSON. Rather,
https://tools.ietf.org/html/rfc7159 states that "This
On 08/11/2018 04:39 PM, Marcos Paulo de Souza wrote:
> When building libvirt with libcurl debug enabled (with
> ESX_VI__CURL__ENABLE_DEBUG_OUTPUT set), the message bellow pops up:
>
> make[3]: Entering directory '/mnt/data/gitroot/libvirt/src'
> CC esx/libvirt_driver_esx_la-esx_vi.lo
>
On 08/12/2018 01:05 PM, Marcos Paulo de Souza wrote:
> Commit 6c0d0210cbcd5d647f0d882c07f077d444bc707d changed the behavior of
> virStr*cpy* functions, so now the nodeGetInfo call fails. Version 4.1.0
> (default for Fedora 28) works:
>
> Model: Intel Core i7-4500U CPU @ 1.80G
>
> Current master
On 08/13/2018 02:25 PM, John Ferlan wrote:
> Commit id d45bee449 updated the pool-define-as qualifier descriptions
> to add some new fields, but neglected to modify the command item list
> in order to add those fields as well.
>
> Signed-off-by: John Ferlan
> ---
>
> Discovered by QE while
If a domain has hugepages configured and we're currently building
memory-backend-file for a nvdimm device that domain has we will
put hugepages path onto the command line. It should have been
nvdimm path configured in the XML.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_command.c
Broken by commit <901d2b9c87>.
Signed-off-by: Pavel Hrdina
---
Pushed under build-breaker rule.
src/util/vircgroup.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 0ed83932ac..df38bb77e0 100644
--- a/src/util/vircgroup.c
Several cases were found needing /tmp, for example ceph will try to list /tmp
and the samba feature of qemu will place things in /tmp/qemu-smb.*.
This is sort of safe because:
- While /tmp could contain anything it is not recommended to put critical
data there anyway
- We restrict general
Hi,
this is a summary of things I had to touch recently when working on 4.6.
The first two patches are re-submissions and modifications of last
year which were never totally challenged, but also not pushed yet (I had
no permissions yet back then).
The first was lost in a discussion about
If a guest runs unconfined , but libvirtd is
confined then the peer for signal can only be detected as
'unconfined'. That triggers issues like:
apparmor="DENIED" operation="signal"
profile="/usr/sbin/libvirtd" pid=22395 comm="libvirtd"
requested_mask="send" denied_mask="send" signal=term
Libvirt now tries to preserve all mounts under /dev in qemu namespaces.
The old rules only listed a set of known paths but those are no more enough.
I found some due to containers like /dev/.lxc/* and such but also /dev/console
and /dev/net/tun.
Libvirt is correct to do so, but we can no more
virt-manager's UI connection will need socket access for openGraphicsFD
to work - otherwise users will face a failed connection error when
opening the UI view.
Depending on the exact versions of libvirt and qemu involved this needs
either a rule from qemu to libvirt or vice versa.
Signed-off-by:
On Mon, 13 Aug 2018 at 18:10, Erik Skultety wrote:
>
> On Thu, Aug 09, 2018 at 09:42:12AM +0530, Sukrit Bhatnagar wrote:
> > By making use of GNU C's cleanup attribute handled by the
> > VIR_AUTOPTR macro for declaring aggregate pointer variables,
> > majority of the calls to *Free functions can
On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote:
> virt-manager's UI connection will need socket access for
> openGraphicsFD
> to work - otherwise users will face a failed connection error when
> opening the UI view.
>
> Depending on the exact versions of libvirt and qemu involved
On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote:
> If a guest runs unconfined , but libvirtd is
> confined then the peer for signal can only be detected as
> 'unconfined'. That triggers issues like:
>apparmor="DENIED" operation="signal"
>profile="/usr/sbin/libvirtd" pid=22395
On Mon, Aug 13, 2018 at 7:11 PM Jamie Strandboge
wrote:
> On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote:
> > Libvirt now tries to preserve all mounts under /dev in qemu
> > namespaces.
> > The old rules only listed a set of known paths but those are no more
> > enough.
> >
> > I
101 - 171 of 171 matches
Mail list logo