Re: [libvirt] [RFC PATCH 2/2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Martin Kletzander
On Tue, May 23, 2017 at 09:32:03AM +0100, Daniel P. Berrange wrote: On Mon, May 22, 2017 at 06:00:13PM +0200, Peter Krempa wrote: Hint that the users should limit the number of VMs queried in the bulk stats API. --- src/libvirt-domain.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

Re: [libvirt] [RFC PATCH 2/2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Daniel P. Berrange
On Tue, May 23, 2017 at 10:51:47AM +0200, Martin Kletzander wrote: > On Tue, May 23, 2017 at 09:32:03AM +0100, Daniel P. Berrange wrote: > > On Mon, May 22, 2017 at 06:00:13PM +0200, Peter Krempa wrote: > > > Hint that the users should limit the number of VMs queried in the bulk > > > stats API. >

Re: [libvirt] libvirt-question

2017-05-23 Thread Erik Skultety
On Tue, May 23, 2017 at 10:29:14AM +0800, zhun...@gmail.com wrote: > Hello,does libvirt provides API to get qemu process ID by vm ID or name??or > is there any methods to do this?? > thanks!! No, libvirt doesn't provide such API. Depends on what you really want to do. Libvirt uses domain objects

Re: [libvirt] [PATCH V2] libxl: add default controllers for USB devices

2017-05-23 Thread Cedric Bosdonnat
On Fri, 2017-05-05 at 15:48 -0600, Jim Fehlig wrote: > Attempting to start a domain with USB hostdevs but no USB controllers > fails with the rather cryptic error > > libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an > error message from QMP server: Bus 'xenusb-0.0' not found >

Re: [libvirt] libvirt-question

2017-05-23 Thread Martin Kletzander
On Tue, May 23, 2017 at 10:29:14AM +0800, zhun...@gmail.com wrote: Hello,does libvirt provides API to get qemu process ID by vm ID or name??or is there any methods to do this?? thanks!! No. It was discussed multiple times here. I added explanation [1] to our FAQ. [1]

Re: [libvirt] libvirt-question

2017-05-23 Thread Erik Skultety
On Tue, May 23, 2017 at 10:29:14AM +0800, zhun...@gmail.com wrote: > Hello,does libvirt provides API to get qemu process ID by vm ID or name??or > is there any methods to do this?? > thanks!! Oh, and I also forgot to mention that these kinds of questions are better suited for libvirt-users

[libvirt] [PATCH v3 1/3] conf : Add loadparm boot option for a boot device

2017-05-23 Thread Farhan Ali
Update the per device boot schema to add an optional loadparm parameter. Extend the virDomainDeviceInfo to support loadparm option. Modify the appropriate functions to parse loadparm from boot device xml. Signed-off-by: Farhan Ali Reviewed-by: Bjoern Walk

[libvirt] [PATCH v3 3/3] tests : Testcases for loadparm

2017-05-23 Thread Farhan Ali
Add testcases for loadparm Signed-off-by: Farhan Ali Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk Reviewed-by: Marc Hartmayer ---

[libvirt] [PATCH v3 2/3] qemu : Add loadparm to qemu command line string

2017-05-23 Thread Farhan Ali
Introduce a new QEMU capability for loadparm and if the capability is supported by QEMU then append the loadparm value to "-machine" string of qemu command line. Signed-off-by: Farhan Ali Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski

[libvirt] [PATCH v3 0/3] Loadparm support

2017-05-23 Thread Farhan Ali
This patch series introduces the support for new s390x 'loadparm' feature. The 'loadparm' can be used to select the boot entry to boot from, for a boot device. Here is a link to the QEMU patches: https://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg00192.html ChangeLog - v2 -> v3:

Re: [libvirt] [libvirt-python][PATCH 1/4] Implement virStreamSendHole/virStreamRecvHole

2017-05-23 Thread Martin Kletzander
On Tue, May 23, 2017 at 12:52:34PM +0200, Martin Kletzander wrote: On Mon, May 22, 2017 at 12:57:12PM +0200, Michal Privoznik wrote: The return value for virStreamRecvHole is slightly different to its C counterpart. In python, either it returns the hole size or None if C API fails.

[libvirt] [libvirt-python][PATCH v2 2/4] virStream: Introduce virStreamRecvFlags

2017-05-23 Thread Michal Privoznik
Yet again, we need a custom wrapper over virStreamRecvFlags because our generator is not capable of generating it. Signed-off-by: Michal Privoznik --- generator.py | 1 + libvirt-override-virStream.py | 18 ++ libvirt-override.c

[libvirt] [libvirt-python][PATCH v2 4/4] examples: Introduce sparsestream.py

2017-05-23 Thread Michal Privoznik
Sparse streams are not that straight forward to use for the very first time. Especially the sparseRecvAll() and sparseSendAll() methods which expects callbacks. What we can do to make it easier for developers is to have an example where they can take an inspiration from. Signed-off-by: Michal

[libvirt] [libvirt-python][PATCH v2 1/4] Implement virStreamSendHole/virStreamRecvHole

2017-05-23 Thread Michal Privoznik
The return value for virStreamRecvHole is slightly different to its C counterpart. In python, either it returns the hole size or None if C API fails. Signed-off-by: Michal Privoznik --- generator.py | 2 ++ libvirt-override-virStream.py | 21

Re: [libvirt] [PATCH] qemu: process: Clear priv->namespaces on VM shutdown

2017-05-23 Thread Peter Krempa
On Mon, May 22, 2017 at 15:04:58 +0200, Martin Kletzander wrote: > On Mon, May 22, 2017 at 01:40:01PM +0200, Peter Krempa wrote: > > Otherwise the private data entry would be kept across instances of the > > same VM even if it's not configured to do so. > > > > Resolves:

[libvirt] [libvirt-python][PATCH v2 3/4] virStream: Introduce virStreamSparse{Recv, Send}All

2017-05-23 Thread Michal Privoznik
Yet again, our parser is not capable of generating proper wrapper. To be fair, this one wold be really tough anyway. Signed-off-by: Michal Privoznik --- generator.py | 2 + libvirt-override-virStream.py | 107 ++

[libvirt] [libvirt-python][PATCH v2 0/4] Implement sparse streams

2017-05-23 Thread Michal Privoznik
diff to v1: - Martin's review worked in. Patches 1-3 were ACKed already. Well, conditionally. Patch 4/4 wasn't. I'm sending them again to make sure I've worked in the review as expected. Michal Privoznik (4): Implement virStreamSendHole/virStreamRecvHole virStream: Introduce

Re: [libvirt] [libvirt-python][PATCH 1/4] Implement virStreamSendHole/virStreamRecvHole

2017-05-23 Thread Martin Kletzander
On Mon, May 22, 2017 at 12:57:12PM +0200, Michal Privoznik wrote: The return value for virStreamRecvHole is slightly different to its C counterpart. In python, either it returns the hole size or None if C API fails. Signed-off-by: Michal Privoznik --- generator.py

Re: [libvirt] [libvirt-python][PATCH 3/4] virStream: Introduce virStreamSparse{Recv, Send}All

2017-05-23 Thread Martin Kletzander
On Mon, May 22, 2017 at 12:57:14PM +0200, Michal Privoznik wrote: Yet again, our parser is not capable of generating proper wrapper. To be fair, this one wold be really tough anyway. Signed-off-by: Michal Privoznik --- generator.py | 2 +

Re: [libvirt] [PATCH 1/2] conf: don't iterate over backcompat console in virDomainChrDefForeach

2017-05-23 Thread Martin Kletzander
On Mon, May 15, 2017 at 04:28:34PM +0200, Pavel Hrdina wrote: If the first console is just a copy of the first serial device we don't need to iterate over the same device twice in order to perform actions like security labeling, cgroup configuring, etc. Currently only security SELinux manager

[libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Peter Krempa
Hint that the users should limit the number of VMs queried in the bulk stats API. --- v2: - added a suggestion of the number of queried VMs (valid after bump to 32M message) src/libvirt-domain.c | 8 1 file changed, 8 insertions(+) diff --git a/src/libvirt-domain.c

Re: [libvirt] [libvirt-python][PATCH 2/4] virStream: Introduce virStreamRecvFlags

2017-05-23 Thread Martin Kletzander
On Mon, May 22, 2017 at 12:57:13PM +0200, Michal Privoznik wrote: Yet again, we need a custom wrapper over virStreamRecvFlags because our generator is not capable of generating it. Signed-off-by: Michal Privoznik --- generator.py | 1 +

Re: [libvirt] [PATCH 2/2] qemu: don't relabel chardev source file if virtlogd is used

2017-05-23 Thread Martin Kletzander
On Mon, May 15, 2017 at 04:28:35PM +0200, Pavel Hrdina wrote: If libvirt uses virtlogd instead of passing the file path directly to QEMU we shouldn't relabel the chardev source file, otherwise virtlogd will get a permission denied while reloading. Resolves:

Re: [libvirt] [libvirt-python][PATCH 4/4] examples: Introduce sparsestream.py

2017-05-23 Thread Martin Kletzander
On Mon, May 22, 2017 at 12:57:15PM +0200, Michal Privoznik wrote: Sparse streams are not that straight forward to use for the very first time. Especially the sparseRecvAll() and sparseSendAll() methods which expects callbacks. What we can do to make it easier for developers is to have an example

Re: [libvirt] [libvirt-python][PATCH 0/4] Implement sparse streams

2017-05-23 Thread Martin Kletzander
On Mon, May 22, 2017 at 03:33:21PM +0200, Michal Privoznik wrote: On 05/22/2017 12:57 PM, Michal Privoznik wrote: *** BLURB HERE *** Michal Privoznik (4): Implement virStreamSendHole/virStreamRecvHole virStream: Introduce virStreamRecvFlags virStream: Introduce

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Michal Privoznik
On 05/23/2017 05:19 PM, Martin Kletzander wrote: > On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: >> On 05/23/2017 04:35 PM, Martin Kletzander wrote: >>> On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: Hint that the users should limit the number of VMs queried

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Martin Kletzander
On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: Hint that the users should limit the number of VMs queried in the bulk stats API. --- v2: - added a suggestion of the number of queried VMs (valid after bump to 32M message) src/libvirt-domain.c | 8 1 file changed, 8

[libvirt] not able install libvirt

2017-05-23 Thread Eric Blake
[moderator note: re-posting to list with screenshot deleted, in order to meet list policy size constraints] hello, i am am trying to install libvmi tool on my xen hypervisor but some where is asking to install libvirt packages. i am following your code and your instruction but its showing some

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Michal Privoznik
On 05/23/2017 04:35 PM, Martin Kletzander wrote: > On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: >> Hint that the users should limit the number of VMs queried in the bulk >> stats API. >> --- >> v2: >> - added a suggestion of the number of queried VMs (valid after bump to >> 32M

Re: [libvirt] [PATCH 2/2] qemu: don't relabel chardev source file if virtlogd is used

2017-05-23 Thread Pavel Hrdina
On Tue, May 23, 2017 at 04:25:01PM +0200, Martin Kletzander wrote: > On Mon, May 15, 2017 at 04:28:35PM +0200, Pavel Hrdina wrote: > >If libvirt uses virtlogd instead of passing the file path directly > >to QEMU we shouldn't relabel the chardev source file, otherwise > >virtlogd will get a

Re: [libvirt] [libvirt-perl][PATCH 5/7] Introduce Stream::sparse_send_all()

2017-05-23 Thread Daniel P. Berrange
On Tue, May 23, 2017 at 05:05:39PM +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > Changes| 1 + > Virt.xs| 124 > + > lib/Sys/Virt/Stream.pm | 19 >

[libvirt] [libvirt-perl][PATCH 5/7] Introduce Stream::sparse_send_all()

2017-05-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- Changes| 1 + Virt.xs| 124 + lib/Sys/Virt/Stream.pm | 19 t/030-api-coverage.t | 2 + 4 files changed, 146 insertions(+) diff --git a/Changes

[libvirt] [libvirt-perl][PATCH 2/7] Introduce flags to Stream::recv()

2017-05-23 Thread Michal Privoznik
At the same time register RECV_STOP_AT_HOLE constant. Signed-off-by: Michal Privoznik --- Changes| 2 ++ Virt.xs| 13 ++--- lib/Sys/Virt/Stream.pm | 20 3 files changed, 28 insertions(+), 7 deletions(-) diff

[libvirt] [libvirt-perl][PATCH 3/7] Introduce Stream::recvHole() and Stream::sendHole()

2017-05-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- Changes| 1 + Virt.xs| 28 lib/Sys/Virt/Stream.pm | 17 + 3 files changed, 46 insertions(+) diff --git a/Changes b/Changes index b4a493c..c92c271 100644 ---

[libvirt] [libvirt-perl][PATCH 6/7] Register VOL_DOWNLOAD_SPARSE_STREAM & VOL_UPLOAD_SPARSE_STREAM constants

2017-05-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- Changes| 2 ++ Virt.xs| 4 lib/Sys/Virt/StorageVol.pm | 30 ++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index

[libvirt] [libvirt-perl][PATCH 7/7] examples: Introduce vol-sparse.pl

2017-05-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- Changes| 1 + examples/vol-sparse.pl | 142 + 2 files changed, 143 insertions(+) create mode 100755 examples/vol-sparse.pl diff --git a/Changes b/Changes index

[libvirt] [libvirt-perl][PATCH 0/7] Implement sparse streams

2017-05-23 Thread Michal Privoznik
*** BLURB HERE *** Michal Privoznik (7): Fix send_all() callback helper Introduce flags to Stream::recv() Introduce Stream::recvHole() and Stream::sendHole() Introduce Stream::sparse_recv_all() Introduce Stream::sparse_send_all() Register VOL_DOWNLOAD_SPARSE_STREAM &

[libvirt] [libvirt-perl][PATCH 1/7] Fix send_all() callback helper

2017-05-23 Thread Michal Privoznik
Sys::Virt::virStream->send_all() uses virStreamSendAll() under the hood. This function takes one callback to fill the send buffer with stream data. We have a C glue callback that eventually calls the perl one. However, there's a problem with the glue callback mangling the data as it mistakenly

Re: [libvirt] [libvirt-perl][PATCH 3/7] Introduce Stream::recvHole() and Stream::sendHole()

2017-05-23 Thread Daniel P. Berrange
On Tue, May 23, 2017 at 05:05:37PM +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > Changes| 1 + > Virt.xs| 28 > lib/Sys/Virt/Stream.pm | 17 + > 3 files changed, 46

Re: [libvirt] [libvirt-perl][PATCH 0/7] Implement sparse streams

2017-05-23 Thread Daniel P. Berrange
On Tue, May 23, 2017 at 05:05:34PM +0200, Michal Privoznik wrote: > *** BLURB HERE *** > > Michal Privoznik (7): > Fix send_all() callback helper > Introduce flags to Stream::recv() > Introduce Stream::recvHole() and Stream::sendHole() > Introduce Stream::sparse_recv_all() > Introduce

[libvirt] [PATCH 03/10] apparmor, virt-aa-helper: Allow aarch64 UEFI.

2017-05-23 Thread Stefan Bader
From: William Grant Allow access to aarch64 UEFI images. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader Acked-by: Guido Günther --- examples/apparmor/libvirt-qemu | 2 ++

[libvirt] [PATCH 04/10] apparmor, libvirt-qemu: Add ppc64el related changes

2017-05-23 Thread Stefan Bader
From: Serge Hallyn Updates profile to allow running on ppc64el. Bug-Ubuntu: https://bugs.launchpad.net/bugs/1374554 Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader ---

[libvirt] [PATCH 06/10] apparmor, libvirtd: Allow libxl-save-helper to run on Debian/Ubuntu

2017-05-23 Thread Stefan Bader
On Debian/Ubuntu the libxl-save-helper (used when saving/restoring a domain through libxl) is located under /usr/lib/xen-/bin. Bug-Ubuntu: https://bugs.launchpad.net/bugs/1334195 Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader

[libvirt] [PATCH 07/10] apparmor, libvirt-qemu: Allow access to ceph config

2017-05-23 Thread Stefan Bader
From: Serge Hallyn Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader --- examples/apparmor/libvirt-qemu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/apparmor/libvirt-qemu

[libvirt] [PATCH 10/10] apparmor, libvirt-qemu: Allow access to certificates used by libvirt-vnc

2017-05-23 Thread Stefan Bader
From: Serge Hallyn When setting up VncTLS according to the official Libvirt documentation, only one certificate for libvirt/libvirt-vnc is used. The document indicates to use the following directories : /etc/pki/CA /etc/pki/libvirt /etc/pki/libvirt/private in order

[libvirt] [PATCH 09/10] apparmor, libvirt-qemu: Allow read access to overcommit_memory

2017-05-23 Thread Stefan Bader
From: Jamie Strandboge Allow qemu to read @{PROC}/sys/vm/overcommit_memory. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader --- examples/apparmor/libvirt-qemu | 1 + 1 file changed, 1 insertion(+)

[libvirt] [PATCH 05/10] apparmor: Allow pygrub to run on Debian/Ubuntu

2017-05-23 Thread Stefan Bader
In Debian/Ubuntu the pygrub command is located under /usr/lib/xen-/bin/pygrub. Bug-Ubuntu: https://bugs.launchpad.net/bugs/1326003 Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader ---

[libvirt] [PATCH 08/10] apparmor, libvirt-qemu: Allow macvtap access

2017-05-23 Thread Stefan Bader
From: Guilhem Lettron Add rule to allow access to /dev/tap* used by macvtap. Bug-Ubuntu: https://bugs.launchpad.net/bugs/921870 Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader ---

Re: [libvirt] [PATCH 2/2] qemu: don't relabel chardev source file if virtlogd is used

2017-05-23 Thread Daniel P. Berrange
On Tue, May 23, 2017 at 05:53:46PM +0200, Pavel Hrdina wrote: > On Tue, May 23, 2017 at 04:24:13PM +0100, Daniel P. Berrange wrote: > > On Tue, May 23, 2017 at 04:25:01PM +0200, Martin Kletzander wrote: > > > On Mon, May 15, 2017 at 04:28:35PM +0200, Pavel Hrdina wrote: > > > > If libvirt uses

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Martin Kletzander
On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: On 05/23/2017 04:35 PM, Martin Kletzander wrote: On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: Hint that the users should limit the number of VMs queried in the bulk stats API. --- v2: - added a suggestion of the

Re: [libvirt] [PATCH 2/2] qemu: don't relabel chardev source file if virtlogd is used

2017-05-23 Thread Daniel P. Berrange
On Tue, May 23, 2017 at 04:25:01PM +0200, Martin Kletzander wrote: > On Mon, May 15, 2017 at 04:28:35PM +0200, Pavel Hrdina wrote: > > If libvirt uses virtlogd instead of passing the file path directly > > to QEMU we shouldn't relabel the chardev source file, otherwise > > virtlogd will get a

Re: [libvirt] [PATCH 2/2] qemu: don't relabel chardev source file if virtlogd is used

2017-05-23 Thread Martin Kletzander
On Tue, May 23, 2017 at 05:13:17PM +0200, Erik Skultety wrote: > while (cur != NULL) { > @@ -10628,6 +10630,8 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDefPtr def, > case VIR_DOMAIN_CHR_TYPE_UNIX: > if (!append && def->type ==

[libvirt] [libvirt-perl][PATCH 4/7] Introduce Stream::sparse_recv_all()

2017-05-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- Changes| 1 + Virt.xs| 70 ++ lib/Sys/Virt/Stream.pm | 14 ++ t/030-api-coverage.t | 1 + 4 files changed, 86 insertions(+) diff --git a/Changes

Re: [libvirt] [libvirt-python][PATCH v2 3/4] virStream: Introduce virStreamSparse{Recv, Send}All

2017-05-23 Thread Martin Kletzander
On Tue, May 23, 2017 at 04:26:10PM +0200, Michal Privoznik wrote: Yet again, our parser is not capable of generating proper wrapper. To be fair, this one wold be really tough anyway. Signed-off-by: Michal Privoznik --- generator.py | 2 +

Re: [libvirt] [PATCH 2/2] qemu: don't relabel chardev source file if virtlogd is used

2017-05-23 Thread Erik Skultety
> > while (cur != NULL) { > > @@ -10628,6 +10630,8 @@ > > virDomainChrSourceDefParseXML(virDomainChrSourceDefPtr def, > > case VIR_DOMAIN_CHR_TYPE_UNIX: > > if (!append && def->type == VIR_DOMAIN_CHR_TYPE_FILE) > > append =

Re: [libvirt] [PATCH 2/2] qemu: don't relabel chardev source file if virtlogd is used

2017-05-23 Thread Pavel Hrdina
On Tue, May 23, 2017 at 04:24:13PM +0100, Daniel P. Berrange wrote: > On Tue, May 23, 2017 at 04:25:01PM +0200, Martin Kletzander wrote: > > On Mon, May 15, 2017 at 04:28:35PM +0200, Pavel Hrdina wrote: > > > If libvirt uses virtlogd instead of passing the file path directly > > > to QEMU we

[libvirt] Various apparmor related changes (part 2)

2017-05-23 Thread Stefan Bader
> Over the years there have been a bunch of changes to the > apparmor profiles and/or virt-aa-helper which have been > carried in Debian/Ubuntu but never made it upstream. > > In an attempt to clean this up and generally improve the > apparmor based environments, we (Christian and I) went > over

[libvirt] [PATCH 01/10] virt-aa-helper, apparmor: allow /usr/share/OVMF/ too

2017-05-23 Thread Stefan Bader
From: Simon McVittie The split firmware and variables files introduced by https://bugs.debian.org/764918 are in a different directory for some reason. Let the virtual machine read both. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan

[libvirt] [PATCH 02/10] virt-aa-helper: Generalize test for firmware paths

2017-05-23 Thread Stefan Bader
From: Christian Ehrhardt This replaces individual tests for firmware locations by a generic function which will simplify having additional locations in the future. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Peter Krempa
On Tue, May 23, 2017 at 17:19:53 +0200, Martin Kletzander wrote: > On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: > > On 05/23/2017 04:35 PM, Martin Kletzander wrote: > > > On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: [...] > > > > + * Note that this API is

Re: [libvirt] [PATCH] qemu: Properly check return value of VIR_STRDUP in qemuDomainGetBlockIoTune

2017-05-23 Thread Jiri Denemark
On Tue, May 23, 2017 at 17:40:13 +0200, Peter Krempa wrote: > Setting the 'group_name' for a disk would falsely trigger a error path s/a error/an error/ > as in commit 4b57f76502 we did not properly check the return value of > VIR_STRDUP. > --- > I must have forgotten to commit this change, as

Re: [libvirt] [PATCH V2] libxl: add default controllers for USB devices

2017-05-23 Thread Jim Fehlig
On 05/23/2017 01:11 AM, Cedric Bosdonnat wrote: On Fri, 2017-05-05 at 15:48 -0600, Jim Fehlig wrote: Attempting to start a domain with USB hostdevs but no USB controllers fails with the rather cryptic error libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an error message from

Re: [libvirt] [PATCH] usb: keep leading zeros of vendor/product id in USB device

2017-05-23 Thread Chen Hanxiao
At 2017-05-19 15:17:32, "Chen Hanxiao" wrote: >From: Chen Hanxiao > >Some vendor id or product id may have leading zeros. >We should show them. > >Signed-off-by: Chen Hanxiao ping Regards, - Chen -- libvir-list mailing

[libvirt] [PATCH 1/2] util: rename qemuGetProcessInfo to virProcessGetStat

2017-05-23 Thread Wang King
qemuGetProcessInfo is more likely a process utility function, just rename it to virProcessGetStat and move it to virprocess.c source file. --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 83 ++-- src/util/virprocess.c| 62

[libvirt] [PATCH 2/2] util: rename qemuGetSchedInfo to virProcessGetSchedInfo

2017-05-23 Thread Wang King
qemuGetSchedInfo is more likely a process utility function, just rename it to virProcessGetSchedInfo and move it to virprocess.c source file. --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 78 +--- src/util/virprocess.c| 75

Re: [libvirt] [RFC PATCH 2/2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Martin Kletzander
On Tue, May 23, 2017 at 10:04:44AM +0100, Daniel P. Berrange wrote: On Tue, May 23, 2017 at 10:51:47AM +0200, Martin Kletzander wrote: On Tue, May 23, 2017 at 09:32:03AM +0100, Daniel P. Berrange wrote: > On Mon, May 22, 2017 at 06:00:13PM +0200, Peter Krempa wrote: > > Hint that the users

Re: [libvirt] [RFC PATCH 2/2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Peter Krempa
On Tue, May 23, 2017 at 10:04:44 +0100, Daniel Berrange wrote: > On Tue, May 23, 2017 at 10:51:47AM +0200, Martin Kletzander wrote: > > On Tue, May 23, 2017 at 09:32:03AM +0100, Daniel P. Berrange wrote: > > > On Mon, May 22, 2017 at 06:00:13PM +0200, Peter Krempa wrote: > > > > Hint that the

Re: [libvirt] [RFC PATCH 1/2] rpc: Bump maximum message size to 32M

2017-05-23 Thread Martin Kletzander
On Mon, May 22, 2017 at 06:00:12PM +0200, Peter Krempa wrote: While most of the APIs are okay with 16M messages, the bulk stats API can run into the limit in big configurations. Before we devise a new plan for this, bump this limit slightly to accomodate some more configs. ---

Re: [libvirt] [PATCH 05/13] nodedev: Use common naming for virnodedeviceobj

2017-05-23 Thread Bjoern Walk
John Ferlan [2017-05-19, 09:08AM -0400]: A virNodeDeviceObjPtr is an @obj A virNodeDeviceObjListPtr is an @devs More intuitive for the virNodeDeviceObjListPtr would be @objs, but I guess the naming scheme is already well defined here. signature.asc Description: PGP

Re: [libvirt] [RFC PATCH 2/2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Daniel P. Berrange
On Mon, May 22, 2017 at 06:00:13PM +0200, Peter Krempa wrote: > Hint that the users should limit the number of VMs queried in the bulk > stats API. > --- > src/libvirt-domain.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c > index

Re: [libvirt] libvirt-question

2017-05-23 Thread zhun...@gmail.com
thanks a lot! zhun...@gmail.com From: Erik Skultety Date: 2017-05-23 15:09 To: zhun...@gmail.com CC: libvir-list Subject: Re: [libvirt] libvirt-question On Tue, May 23, 2017 at 10:29:14AM +0800, zhun...@gmail.com wrote: > Hello,does libvirt provides API to get qemu process ID by vm ID or

Re: [libvirt] [PATCH 04/13] nodedev: Move node_device_linux_sysfs from node_driver to conf

2017-05-23 Thread Bjoern Walk
John Ferlan [2017-05-19, 09:08AM -0400]: Move the whole file from src/node_device into src/conf and rename the API's to have the "virNodeDevice" prefix. Signed-off-by: John Ferlan --- src/Makefile.am| 8

Re: [libvirt] [RFC PATCH 2/2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Peter Krempa
On Tue, May 23, 2017 at 10:12:06 +0200, Martin Kletzander wrote: > On Mon, May 22, 2017 at 06:00:13PM +0200, Peter Krempa wrote: > > Hint that the users should limit the number of VMs queried in the bulk > > stats API. > > --- > > src/libvirt-domain.c | 7 +++ > > 1 file changed, 7

Re: [libvirt] [RFC PATCH 2/2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Martin Kletzander
On Mon, May 22, 2017 at 06:00:13PM +0200, Peter Krempa wrote: Hint that the users should limit the number of VMs queried in the bulk stats API. --- src/libvirt-domain.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index

Re: [libvirt] [PATCH 00/13] Make the virNodeDeviceObjPtr private

2017-05-23 Thread Bjoern Walk
John Ferlan [2017-05-19, 09:08AM -0400]: All part of the effort I have to have a common object model. This series is node device test, driver, and virnodedevobj related. There's also a couple of bug fixes at the beginning of the series from things I have found during this

Re: [libvirt] [RFC PATCH 2/2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Daniel P. Berrange
On Tue, May 23, 2017 at 10:12:06AM +0200, Martin Kletzander wrote: > On Mon, May 22, 2017 at 06:00:13PM +0200, Peter Krempa wrote: > > Hint that the users should limit the number of VMs queried in the bulk > > stats API. > > --- > > src/libvirt-domain.c | 7 +++ > > 1 file changed, 7