[libvirt] [PATCH 1/2] network: only clear bandwidth if it has been set

2015-02-24 Thread Laine Stump
libvirt was unconditionally calling virNetDevBandwidthClear() for every interface (and network bridge) of a type that supported bandwidth, whether it actually had anything set or not. This doesn't hurt anything (unless ifname == NULL!), but is wasteful. This patch makes sure that all calls to

[libvirt] [PATCH 0/2] check for null ifname when setting/clearing bandwidth

2015-02-24 Thread Laine Stump
When John Ferlan ran the Coverity static checker on my patches to fix the problem with nicindexes, it began complaining about calling the virNetDevBandwidth* functions with a null ifname. Investigation pointed out some real problems with this that are fixed by these two patches (which will be

Re: [libvirt] [PATCH v3 1/9] Implement public API for virDomainGetIOThreadsInfo

2015-02-24 Thread John Ferlan
On 02/24/2015 03:11 PM, Laine Stump wrote: On 02/17/2015 04:03 PM, John Ferlan wrote: Add virDomainGetIOThreadsInfo in order to return a list of virDomainIOThreadsInfoPtr structures which list the IOThread ID, the CPU Affinity map, and associated resources for each IOThread for the domain.

Re: [libvirt] [PATCH v3 1/9] Implement public API for virDomainGetIOThreadsInfo

2015-02-24 Thread Laine Stump
On 02/17/2015 04:03 PM, John Ferlan wrote: Add virDomainGetIOThreadsInfo in order to return a list of virDomainIOThreadsInfoPtr structures which list the IOThread ID, the CPU Affinity map, and associated resources for each IOThread for the domain. For an active domain, the live data will be

[libvirt] [PATCH 2/2] util: check for null ifname inside virNetDevBandwidthSet()

2015-02-24 Thread Laine Stump
Previously this function relied on having ATTRIBUTE_NONNULL(1) in its prototype rather than explicitly checking for a null ifname. Unfortunately, ATTRIBUTE_NONNULL is just a hint to the optimizer and code analyzers like Coverity, it doesn't actually check anything at execution time, so the result

Re: [libvirt] [PATCH] qemu: bulk stats: implement (cpu) tune group.

2015-02-24 Thread Francesco Romani
Hi John, thanks for the review! - Original Message - From: John Ferlan jfer...@redhat.com To: Francesco Romani from...@redhat.com, libvir-list@redhat.com Sent: Monday, February 23, 2015 7:33:47 PM Subject: Re: [libvirt] [PATCH] qemu: bulk stats: implement (cpu) tune group. On

[libvirt] Entering freeze for libvirt-1.2.13

2015-02-24 Thread Daniel Veillard
As suggested yesterday, and hearing no opposition, I have just tagged Redlease Candidate 1 for libvirt-1.2.13 in git and signed tarballs and rpms for it available at the usual place: ftp://libvirt.org/libvirt/ Based on my own but minimal testing this seems to work, but obviously please give

Re: [libvirt] [PATCH 1/3 v3] utilities for supporting midonet virtualports

2015-02-24 Thread Antoni Segura Puimedon
On Tue, Feb 24, 2015 at 3:30 AM, Laine Stump la...@redhat.com wrote: On 02/23/2015 08:48 PM, YAMAMOTO Takashi wrote: On Tue, Feb 24, 2015 at 2:20 AM, YAMAMOTO Takashi yamam...@valinux.co.jp wrote: Adds the port type definitions and methods that will be used to bind interfaces to the

[libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Daniel P. Berrange
The undefine operation should always be allowed to succeed regardless of whether any NVRAM file exists. ie we should not force the application to use the VIR_DOMAIN_UNDEFINE_NVRAM flag. It is valid for the app to decide it wants the NVRAM file left on disk, in the same way that disk images are

Re: [libvirt] [PATCH] network_conf: Forbid commas in DNS TXT

2015-02-24 Thread Martin Kletzander
On Mon, Feb 23, 2015 at 01:40:25PM +0100, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1151942 While the restriction doesn't have origin in any RFC, it matters to us while constructing the dnsmasq config file (or command line previously). For better picture, this is how

Re: [libvirt] [PATCH] util: do not resotre the VF that is in use by another active guest

2015-02-24 Thread John Ferlan
What is described seems reasonable; however, I'm hoping Laine could provide some context here as to whether the change is good since he's the original author of the change (see commit id '7a600cf7'). I've added him to the CC list On 02/12/2015 04:17 AM, Zhang Bo wrote: If we assign a VF,

[libvirt] libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap?

2015-02-24 Thread Anthony PERARD
Hi, A recent OpenStack nova commit make use of virNodeGetCPUMap to get the list of online cpu of a host. But this API is not implemented for the libvirt xen driver. The commit: Add handling for offlined CPUs to the nova libvirt driver.

Re: [libvirt] [PATCH 2/4] virCPUDefFormatBufFull: Use our general error handling pattern

2015-02-24 Thread Martin Kletzander
On Thu, Feb 19, 2015 at 02:13:43PM +0100, Michal Privoznik wrote: Well, so far there are no variables to free, no cleanup work needed on an error, so bare 'return -1;' after each error is just okay. But this will change in a while. Signed-off-by: Michal Privoznik mpriv...@redhat.com ---

Re: [libvirt] [PATCH 3/4] cpu: Format cpu/ properly

2015-02-24 Thread Martin Kletzander
On Thu, Feb 19, 2015 at 02:13:44PM +0100, Michal Privoznik wrote: Well, not that we are not formatting invalid XML, rather than not as beautiful as we can: cpu mode='host-passthrough' /cpu If there are no children, let's use the singleton element. Is there any purpose behind this or is

Re: [libvirt] libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap?

2015-02-24 Thread Daniel P. Berrange
On Tue, Feb 24, 2015 at 12:41:01PM +, Anthony PERARD wrote: Hi, A recent OpenStack nova commit make use of virNodeGetCPUMap to get the list of online cpu of a host. But this API is not implemented for the libvirt xen driver. The commit: Add handling for offlined CPUs to the nova

Re: [libvirt] [PATCH v3 0/9] Introduce display of IOThreads Information

2015-02-24 Thread John Ferlan
On 02/17/2015 04:03 PM, John Ferlan wrote: v2 here: http://www.redhat.com/archives/libvir-list/2015-February/msg00562.html Changes over v2: Patches 1-4 * Add resources and nresources in order to return the resources that are using an IOThread * Fixed memory leak - neglected to free

Re: [libvirt] [PATCH 1/4] util: Introduce virBufferAddBuffer

2015-02-24 Thread Martin Kletzander
On Thu, Feb 19, 2015 at 02:13:42PM +0100, Michal Privoznik wrote: There are some places in our code base which follow the following pattern: char *s = virBufferContentAndReset(buf1); virBufferAdd(buf2, s, -1); I haven't find any, but OK. Also if there are some, why not using the function to

Re: [libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Daniel P. Berrange
On Tue, Feb 24, 2015 at 04:23:41PM +0100, Peter Krempa wrote: In that case we probably should have negated the logic here and delete all the stuff by default and give the user option to leave the data behind. I think that would have been even more unsatisfactory - the semantics of undefine

Re: [libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Peter Krempa
On Tue, Feb 24, 2015 at 15:11:28 +, Daniel Berrange wrote: On Tue, Feb 24, 2015 at 04:07:02PM +0100, Peter Krempa wrote: On Tue, Feb 24, 2015 at 10:12:20 +, Daniel Berrange wrote: The undefine operation should always be allowed to succeed regardless of whether any NVRAM file

Re: [libvirt] [PATCH] qemu: fix memory leak while starting a guest

2015-02-24 Thread Pavel Hrdina
On Tue, Feb 24, 2015 at 03:56:18PM +0100, Peter Krempa wrote: On Tue, Feb 24, 2015 at 15:00:49 +0100, Pavel Hrdina wrote: In commit cc41c648 I've re-factored qemuMonitorFindBalloonObjectPath, but missed that there is a memory leak. The nextpath variable is overridden while looping in for

Re: [libvirt] libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap?

2015-02-24 Thread Anthony PERARD
On Tue, Feb 24, 2015 at 01:22:19PM +, Daniel P. Berrange wrote: On Tue, Feb 24, 2015 at 01:15:57PM +, Anthony PERARD wrote: On Tue, Feb 24, 2015 at 12:46:44PM +, Daniel P. Berrange wrote: On Tue, Feb 24, 2015 at 12:41:01PM +, Anthony PERARD wrote: Hi, A recent

[libvirt] [PATCH v2 1/4] util: Introduce virBufferAddBuffer

2015-02-24 Thread Michal Privoznik
This API joins the following two lines: char *s = virBufferContentAndReset(buf1); virBufferAdd(buf2, s, -1); into one: virBufferAddBuffer(buf2, buf1); With one exception: there's no re-indentation applied to @buf1. The idea is, that in general both can have different indentation (like the test

[libvirt] [PATCH v2] qemu: Allow spaces in disk serial

2015-02-24 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1195660 There's been a bug report appearing on the qemu-devel list, that libvirt is unable to pass spaces in disk serial number [1]. Not only our RNG schema forbids that, the code is not prepared either. However, with a bit of escaping (if needed) we

Re: [libvirt] [PATCH] qemu: fix memory leak while starting a guest

2015-02-24 Thread Peter Krempa
On Tue, Feb 24, 2015 at 15:00:49 +0100, Pavel Hrdina wrote: In commit cc41c648 I've re-factored qemuMonitorFindBalloonObjectPath, but missed that there is a memory leak. The nextpath variable is overridden while looping in for cycle and we have to free it before next overwritten cycle.

Re: [libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Peter Krempa
On Tue, Feb 24, 2015 at 10:12:20 +, Daniel Berrange wrote: The undefine operation should always be allowed to succeed regardless of whether any NVRAM file exists. ie we should not force the application to use the VIR_DOMAIN_UNDEFINE_NVRAM flag. It is valid for the app to decide it wants

Re: [libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Daniel P. Berrange
On Tue, Feb 24, 2015 at 04:07:02PM +0100, Peter Krempa wrote: On Tue, Feb 24, 2015 at 10:12:20 +, Daniel Berrange wrote: The undefine operation should always be allowed to succeed regardless of whether any NVRAM file exists. ie we should not force the application to use the

[libvirt] [PATCH] qemu: forbid large value wraparound in balloon period collection

2015-02-24 Thread Erik Skultety
We do parse and represent period collection as unsigned int in our internal structures, however commit d5c67e7f4523450023b89b69c16472582c85eeaf converts this to int, thus wrapping around inputs greater than INT_MAX which results in an error from QEMU. This patch adds a check into QEMU driver,

Re: [libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Peter Krempa
On Tue, Feb 24, 2015 at 15:31:14 +, Daniel Berrange wrote: On Tue, Feb 24, 2015 at 04:23:41PM +0100, Peter Krempa wrote: In that case we probably should have negated the logic here and delete all the stuff by default and give the user option to leave the data behind. I think that

Re: [libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Peter Krempa
On Tue, Feb 24, 2015 at 15:54:24 +, Daniel Berrange wrote: On Tue, Feb 24, 2015 at 04:41:44PM +0100, Peter Krempa wrote: On Tue, Feb 24, 2015 at 15:31:14 +, Daniel Berrange wrote: On Tue, Feb 24, 2015 at 04:23:41PM +0100, Peter Krempa wrote: The original motivation is apparently

Re: [libvirt] libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap?

2015-02-24 Thread Ian Campbell
On Tue, 2015-02-24 at 12:41 +, Anthony PERARD wrote: Hi, A recent OpenStack nova commit make use of virNodeGetCPUMap to get the list of online cpu of a host. But this API is not implemented for the libvirt xen driver. The commit: Add handling for offlined CPUs to the nova libvirt

Re: [libvirt] [PATCH 04/11] conf: Add device address type for dimm devices

2015-02-24 Thread Peter Krempa
On Tue, Feb 24, 2015 at 14:22:11 +0100, Martin Kletzander wrote: On Fri, Feb 20, 2015 at 07:36:53PM +0100, Martin Kletzander wrote: On Fri, Feb 20, 2015 at 06:25:40PM +0100, Peter Krempa wrote: On Fri, Feb 20, 2015 at 10:19:53 +0100, Martin Kletzander wrote: On Thu, Feb 19, 2015 at 04:38:29PM

Re: [libvirt] [PATCH 04/11] conf: Add device address type for dimm devices

2015-02-24 Thread Daniel P. Berrange
On Tue, Feb 24, 2015 at 02:48:32PM +0100, Peter Krempa wrote: On Tue, Feb 24, 2015 at 14:22:11 +0100, Martin Kletzander wrote: On Fri, Feb 20, 2015 at 07:36:53PM +0100, Martin Kletzander wrote: On Fri, Feb 20, 2015 at 06:25:40PM +0100, Peter Krempa wrote: On Fri, Feb 20, 2015 at 10:19:53

[libvirt] [PATCH] qemu: fix memory leak while starting a guest

2015-02-24 Thread Pavel Hrdina
In commit cc41c648 I've re-factored qemuMonitorFindBalloonObjectPath, but missed that there is a memory leak. The nextpath variable is overridden while looping in for cycle and we have to free it before next cycle. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/qemu/qemu_monitor.c | 1 +

Re: [libvirt] [PATCH 4/4] qemu: Use correct flags for ABI stability check in SaveImageUpdateDef

2015-02-24 Thread Martin Kletzander
On Thu, Feb 19, 2015 at 02:13:45PM +0100, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1183869 Soo. you've successfully started yourself a domain. And since you want s/you/You/ at least ;) to use it on your host exclusively you are confident enough to passthrough the

Re: [libvirt] [PATCH 1/3] utils: Implement virCommandPassFDGetFDIndex

2015-02-24 Thread Martin Kletzander
On Mon, Feb 23, 2015 at 06:50:46AM -0500, Stefan Berger wrote: Implement virCommandPassFDGetFDIndex to determine the index a given file descriptor will have when passed to the child process. When this function is called, a flag is set to prevent the reordering of the file descriptors.

Re: [libvirt] [PATCH 3/3] qemu: Pass file descriptor when using TPM passthrough

2015-02-24 Thread Martin Kletzander
On Mon, Feb 23, 2015 at 06:50:48AM -0500, Stefan Berger wrote: Pass the TPM file descriptor to QEMU via command line. Instead of passing /dev/tpm0 we now pass /dev/fdset/10 and the additional parameters -add-fd set=10,fd=20. This addresses the use case when QEMU is started with non-root

Re: [libvirt] [PATCH 2/7] qemu: lxc: Clarify error message when setting current memory

2015-02-24 Thread Peter Krempa
On Fri, Feb 20, 2015 at 08:16:17 -0500, John Ferlan wrote: On 02/18/2015 09:16 AM, Peter Krempa wrote: Commit 60f7303c151cccdbe214b9f9ac59ecaf95cbf24b introduced the error message but it's unclear whether the persistent config or the live config tripped the message. Later the LXC driver

Re: [libvirt] [PATCH 04/11] conf: Add device address type for dimm devices

2015-02-24 Thread Martin Kletzander
On Fri, Feb 20, 2015 at 07:36:53PM +0100, Martin Kletzander wrote: On Fri, Feb 20, 2015 at 06:25:40PM +0100, Peter Krempa wrote: On Fri, Feb 20, 2015 at 10:19:53 +0100, Martin Kletzander wrote: On Thu, Feb 19, 2015 at 04:38:29PM +0100, Peter Krempa wrote: ACPI Dimm devices are described by

Re: [libvirt] libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap?

2015-02-24 Thread Daniel P. Berrange
On Tue, Feb 24, 2015 at 01:15:57PM +, Anthony PERARD wrote: On Tue, Feb 24, 2015 at 12:46:44PM +, Daniel P. Berrange wrote: On Tue, Feb 24, 2015 at 12:41:01PM +, Anthony PERARD wrote: Hi, A recent OpenStack nova commit make use of virNodeGetCPUMap to get the list of

Re: [libvirt] [PATCH 2/3] qemu: Move TPM command line build code into own function

2015-02-24 Thread Martin Kletzander
On Mon, Feb 23, 2015 at 06:50:47AM -0500, Stefan Berger wrote: Move the TPM command line build code into its own function. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/qemu/qemu_command.c | 37 + 1 file changed, 25 insertions(+), 12

Re: [libvirt] [PATCH 1/3] utils: Implement virCommandPassFDGetFDIndex

2015-02-24 Thread Stefan Berger
On 02/24/2015 08:34 AM, Martin Kletzander wrote: On Mon, Feb 23, 2015 at 06:50:46AM -0500, Stefan Berger wrote: Implement virCommandPassFDGetFDIndex to determine the index a given file descriptor will have when passed to the child process. When this function is called, a flag is set to prevent

[libvirt] [python][RFC] more python bulk stats API

2015-02-24 Thread Francesco Romani
Hi, I was wondering if there is room in libvirt-python for a couple of new APIs which could make life easier for python developers. It is not just a theoretical thing, when developing VDSM, part of oVirt, I found myself repeating these patterns long enough. 1. return dict from getAllDomainStats

Re: [libvirt] libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap?

2015-02-24 Thread Anthony PERARD
On Tue, Feb 24, 2015 at 12:46:44PM +, Daniel P. Berrange wrote: On Tue, Feb 24, 2015 at 12:41:01PM +, Anthony PERARD wrote: Hi, A recent OpenStack nova commit make use of virNodeGetCPUMap to get the list of online cpu of a host. But this API is not implemented for the libvirt

Re: [libvirt] [PATCH 3/3] qemu: Pass file descriptor when using TPM passthrough

2015-02-24 Thread Stefan Berger
On 02/24/2015 09:08 AM, Martin Kletzander wrote: On Mon, Feb 23, 2015 at 06:50:48AM -0500, Stefan Berger wrote: Pass the TPM file descriptor to QEMU via command line. Instead of passing /dev/tpm0 we now pass /dev/fdset/10 and the additional parameters -add-fd set=10,fd=20. This addresses the

Re: [libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Daniel P. Berrange
On Tue, Feb 24, 2015 at 04:41:44PM +0100, Peter Krempa wrote: On Tue, Feb 24, 2015 at 15:31:14 +, Daniel Berrange wrote: On Tue, Feb 24, 2015 at 04:23:41PM +0100, Peter Krempa wrote: The original motivation is apparently that we should not allow anything that would represent state of

[libvirt] [PATCH] maint: update to latest gnulib

2015-02-24 Thread Eric Blake
Needed to silence a valgrind detection of uninitialized memory: https://bugzilla.redhat.com/show_bug.cgi?id=1174147 * .gnulib: Update to latest. * bootstrap: Resync to gnulib. Signed-off-by: Eric Blake ebl...@redhat.com --- I've missed RC1, so I'll wait for a review on this one (are we sure

[libvirt] [PATCH] virsh: tweak domif-getlink link state reporting message

2015-02-24 Thread Erik Skultety
According to docs, we only support 2 link states for an interface up/down, 'up' being the default state if link state is unspecified in domain's XML, so the message when no link state is provided should be changed a little. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1141119 ---

Re: [libvirt] [PATCH 05/11] conf: Add interface to parse and format memory device information

2015-02-24 Thread Martin Kletzander
On Thu, Feb 19, 2015 at 04:38:30PM +0100, Peter Krempa wrote: This patch adds code that parses and formats configuration for memory devices. A simple configuration would be: memory model='acpi-dimm' target size unit='KiB'524287/size node0/node /target /memory A complete configuration

Re: [libvirt] [PATCH] maint: update to latest gnulib

2015-02-24 Thread Eric Blake
On 02/24/2015 09:00 AM, Eric Blake wrote: Needed to silence a valgrind detection of uninitialized memory: https://bugzilla.redhat.com/show_bug.cgi?id=1174147 * .gnulib: Update to latest. * bootstrap: Resync to gnulib. Signed-off-by: Eric Blake ebl...@redhat.com --- I've missed RC1, so

Re: [libvirt] [PATCH 1/4] util: introduce a new helper for get interface IPv6 address

2015-02-24 Thread John Ferlan
On 02/13/2015 02:17 AM, Luyao Huang wrote: Introduce a new function to help to get interface IPv6 address. s/Introduce a new function to help to/Introduce virNetDevGetIPv6Address/ Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virnetdev.c

Re: [libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Kashyap Chamarthy
[/me still reading the complete discussion.] On Tue, Feb 24, 2015 at 04:07:02PM +0100, Peter Krempa wrote: [. . .] We have prior art in denying to undefine a domain that has information stored in libvirt-internal locations such as the managed save image and snapshot metadata. While it

Re: [libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Kashyap Chamarthy
On Tue, Feb 24, 2015 at 10:12:20AM +, Daniel P. Berrange wrote: The undefine operation should always be allowed to succeed regardless of whether any NVRAM file exists. ie we should not force the application to use the VIR_DOMAIN_UNDEFINE_NVRAM flag. It is valid for the app to decide it

Re: [libvirt] [PATCH 2/4] conf: introduce new family attribute in graphics listen for chose IP family

2015-02-24 Thread John Ferlan
On 02/24/2015 01:09 PM, Laine Stump wrote: On 02/24/2015 12:42 PM, John Ferlan wrote: ...snip... I see family as a tristate value. That is not provided is 0 and not printed... Thus, the value turns into tristate where of ipv6='yes|no', where the default is no. There is precedent in

Re: [libvirt] [PATCH 4/4] qemu: fix a error coverd issue in 2 place

2015-02-24 Thread John Ferlan
On 02/13/2015 02:17 AM, Luyao Huang wrote: we already set a more clearly error in networkGetNetworkAddress, so this error will cover our error in networkGetNetworkAddress. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 14 -- 1 file changed, 4

Re: [libvirt] [PATCH] qemu: don't refuse to undefine a guest with NVRAM file

2015-02-24 Thread Cole Robinson
On 02/24/2015 10:23 AM, Peter Krempa wrote: On Tue, Feb 24, 2015 at 15:11:28 +, Daniel Berrange wrote: On Tue, Feb 24, 2015 at 04:07:02PM +0100, Peter Krempa wrote: On Tue, Feb 24, 2015 at 10:12:20 +, Daniel Berrange wrote: The undefine operation should always be allowed to succeed

[libvirt] [PATCHv2 4/7] phyp: Fix error messages mentioning memory

2015-02-24 Thread Peter Krempa
The messages for currentMemory and memory were swapped. --- Notes: Version 2: - new in series src/phyp/phyp_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index c1d6eb2..a1e390d 100644 ---

Re: [libvirt] [PATCH 4/7] conf: Replace access to def-mem.max_balloon with accessor functions

2015-02-24 Thread Peter Krempa
On Fri, Feb 20, 2015 at 10:15:00 -0500, John Ferlan wrote: On 02/18/2015 09:16 AM, Peter Krempa wrote: As there are two possible approaches to define a domain's memory size - one used with legacy, non-NUMA VMs configured in the memory element and per-node based approach on NUMA machines

[libvirt] [PATCHv2 5/7] qemu: command: Add helper to align memory sizes

2015-02-24 Thread Peter Krempa
The memory sizes in qemu are aligned up to 1 MiB boundaries. There are two places where this was done once for the total size and then for individual NUMA cell sizes. Add a function that will align the sizes in one place so that it's clear where the sizes are aligned. --- Notes: Version 2:

[libvirt] [PATCHv2 6/7] conf: numa: Add helper to count total memory size configured in NUMA

2015-02-24 Thread Peter Krempa
The total NUMA memory consists of the sum of individual NUMA node memory amounts. --- Notes: Version 2: - Already ACKed but didn't make sense to push. src/conf/numa_conf.c | 13 + src/conf/numa_conf.h | 2 ++ src/libvirt_private.syms | 1 + 3 files changed, 16

[libvirt] [PATCHv2 7/7] conf: Automatically use NUMA memory size in case NUMA is enabled

2015-02-24 Thread Peter Krempa
Use the NUMA total instead of the configured size both in XML and for uses in the code once NUMA is enabled for a domain. One test case change is necessary as the rounding of the individual cell sizes was not matching the rounding of the total size. --- Notes: Version 2: - Already ACKed

[libvirt] [PATCHv2 0/7] Automaticaly fill memory element for NUMA enabled guests

2015-02-24 Thread Peter Krempa
This series changes the behavior of the memory element in case the guest has NUMA enabled and fills automatically the sum of sizes of numa nodes instead of relying on the user passing correct data. Peter Krempa (7): qemu: Forbid setting maximum memory size with the API with NUMA enabled

[libvirt] [PATCHv2 1/7] qemu: Forbid setting maximum memory size with the API with NUMA enabled

2015-02-24 Thread Peter Krempa
NUMA enabled guest configuration explicitly specifies memory sizes for individual nodes. Allowing the virDomainSetMemoryFlags API (and friends) to change the total doesn't make sense as the individual node configs are not updated in that case. Forbid use of the API in case NUMA is specified. ---

[libvirt] [PATCHv2 2/7] qemu: lxc: Clarify error message when setting current memory

2015-02-24 Thread Peter Krempa
Commit 60f7303c151cccdbe214b9f9ac59ecaf95cbf24b introduced the error message but it's unclear whether the persistent config or the live config tripped the message. Later the LXC driver copied the same code. Separate the message which will also clarify the code. --- Notes: Version 2: -

[libvirt] [PATCHv2 3/7] conf: Replace access to def-mem.max_balloon with accessor functions

2015-02-24 Thread Peter Krempa
As there are two possible approaches to define a domain's memory size - one used with legacy, non-NUMA VMs configured in the memory element and per-node based approach on NUMA machines - the user needs to make sure that both are specified correctly in the NUMA case. To avoid this burden on the

Re: [libvirt] [PATCH 1/4] util: introduce a new helper for get interface IPv6 address

2015-02-24 Thread John Ferlan
On 02/24/2015 11:12 AM, John Ferlan wrote: ...snip... As I'm reading the next patch I'm thinking I forgot something in the previous one... The default has been IPv4 and would seem to be the right thing to return once we find an address; however, if we wanted an IPv6 address and returned an

Re: [libvirt] [PATCH 2/4] conf: introduce new family attribute in graphics listen for chose IP family

2015-02-24 Thread John Ferlan
On 02/13/2015 02:17 AM, Luyao Huang wrote: If a interface or network have both ipv6 and ipv4 address which can be used, we do not know use which be a listen address. So introduce a new attribute to help us chose this. graphics XML will like this after this commit: graphics

Re: [libvirt] [PATCH 3/4] network: rework networkGetNetworkAddress to make it can get IPv6 address

2015-02-24 Thread John Ferlan
On 02/13/2015 02:17 AM, Luyao Huang wrote: Export the required helpers and rework networkGetNetworkAddress to make it can get IPv6 address. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/network_conf.c | 2 +- src/conf/network_conf.h | 1 + src/libvirt_private.syms

Re: [libvirt] [PATCH 2/4] conf: introduce new family attribute in graphics listen for chose IP family

2015-02-24 Thread Laine Stump
On 02/24/2015 01:48 PM, John Ferlan wrote: On 02/24/2015 01:09 PM, Laine Stump wrote: On 02/24/2015 12:42 PM, John Ferlan wrote: ...snip... I see family as a tristate value. That is not provided is 0 and not printed... Thus, the value turns into tristate where of ipv6='yes|no', where the

Re: [libvirt] [PATCH] util: do not resotre the VF that is in use by another active guest

2015-02-24 Thread Laine Stump
On 02/12/2015 04:17 AM, Zhang Bo wrote: If we assign a VF, which has already been used by an active guest, to another guest, and try to start the 2nd guest later on, the 2nd guest would not start, and the VF won't work anymore. Steps to reproduce the problem: 1 Assign a VF to guest A, and

Re: [libvirt] [PATCH] qemu: forbid large value wraparound in balloon period collection

2015-02-24 Thread Martin Kletzander
On Tue, Feb 24, 2015 at 04:28:18PM +0100, Erik Skultety wrote: We do parse and represent period collection as unsigned int in our internal structures, however commit d5c67e7f4523450023b89b69c16472582c85eeaf converts this to int, thus wrapping around inputs greater than INT_MAX which results in

Re: [libvirt] [PATCH 3/3] qemu: Pass file descriptor when using TPM passthrough

2015-02-24 Thread Martin Kletzander
On Tue, Feb 24, 2015 at 09:15:40AM -0500, Stefan Berger wrote: On 02/24/2015 09:08 AM, Martin Kletzander wrote: On Mon, Feb 23, 2015 at 06:50:48AM -0500, Stefan Berger wrote: Pass the TPM file descriptor to QEMU via command line. Instead of passing /dev/tpm0 we now pass /dev/fdset/10 and the

Re: [libvirt] Unattended guest installation fails

2015-02-24 Thread Martin Kletzander
On Fri, Feb 20, 2015 at 12:01:46PM +0530, ChandraShekar Shastri wrote: Hi, I am following the below link to install a Fedora19 guest on Fedora19 Host. http://kashyapc.com/2011/08/18/unattended-guest-install-with-a-local-kickstart/ Version : libvirtd (libvirt) 1.0.5.1, QEMU emulator version

Re: [libvirt] [PATCH] maint: update to latest gnulib

2015-02-24 Thread Martin Kletzander
On Tue, Feb 24, 2015 at 09:04:00AM -0700, Eric Blake wrote: On 02/24/2015 09:00 AM, Eric Blake wrote: Needed to silence a valgrind detection of uninitialized memory: https://bugzilla.redhat.com/show_bug.cgi?id=1174147 * .gnulib: Update to latest. * bootstrap: Resync to gnulib. Signed-off-by:

[libvirt] Reopening file descriptors

2015-02-24 Thread Christopher Pereira
Hi, I'm chasing a bug related with libvirt not being able to resume a VM paused because of an IO Error for images stored on a gluster volume. The bug was reported in oVirt here: https://bugzilla.redhat.com/show_bug.cgi?id=1058300#c39 To reproduce: 1) Run a VM on a gluster volume 2) Stop the

[libvirt] Fwd: Unattended guest installation fails

2015-02-24 Thread ChandraShekar Shastri
Hi, I am following the below link to install a Fedora19 guest on Fedora19 Host. http://kashyapc.com/2011/08/18/unattended-guest-install-with-a-local-kickstart/ Version : libvirtd (libvirt) 1.0.5.1, QEMU emulator version 1.4.2, Copyright (c) 2003-2008 Fabrice Bellard I have the iso which I

[libvirt] Libvirt Forwarding Incoming Connections

2015-02-24 Thread kim
Hi Libvirt Developers The link at http://wiki.libvirt.org/page/Networking under Forwarding Incoming Connections for the advanced version of the script is not working. We experienced problems with the script in that there is no interface specified and although the port forwarding worked,

Re: [libvirt] [PATCH 1/3] utils: Implement virCommandPassFDGetFDIndex

2015-02-24 Thread Martin Kletzander
On Tue, Feb 24, 2015 at 09:24:51AM -0500, Stefan Berger wrote: On 02/24/2015 08:34 AM, Martin Kletzander wrote: On Mon, Feb 23, 2015 at 06:50:46AM -0500, Stefan Berger wrote: Implement virCommandPassFDGetFDIndex to determine the index a given file descriptor will have when passed to the child

Re: [libvirt] [PATCH v2 1/4] util: Introduce virBufferAddBuffer

2015-02-24 Thread Martin Kletzander
On Tue, Feb 24, 2015 at 04:14:37PM +0100, Michal Privoznik wrote: This API joins the following two lines: char *s = virBufferContentAndReset(buf1); virBufferAdd(buf2, s, -1); into one: virBufferAddBuffer(buf2, buf1); With one exception: there's no re-indentation applied to @buf1. The idea

[libvirt] QEMU's File Descriptors

2015-02-24 Thread Christopher Pereira
Dear Martin, Does libvirt currently reopen image files when resuming a VM? There is an issue of an IO Error after restarting a gluster volume and probably doing other maintenance tasks (VM will not resume) which probably invalidates QEMU's File Descriptors. It's an old BZ. Martin Kletzander