[libvirt] Add a few more getters/setters to VNC/SPICE configuration

2012-09-12 Thread Christophe Fergeau
Hey, This patch series implements a few more getters/setters for GVirConfigDomainGraphicsVnc and GVirConfigDomainGraphicsSpice. They will be useful in GNOME Boxes as the same is currently achieved through XPath use. Christophe -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [libvirt-glib 1/4] config: Implement gvir_config_domain_graphics_spice_set_listen

2012-09-12 Thread Christophe Fergeau
--- libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c | 10 ++ libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h | 3 +++ libvirt-gconfig/libvirt-gconfig.sym | 2 ++ libvirt-gconfig/tests/test-domain-create.c | 1 + 4 files changed, 16

[libvirt] [libvirt-glib 3/4] config: Add a few GVirConfigDomainGraphicsVnc getters

2012-09-12 Thread Christophe Fergeau
--- .../libvirt-gconfig-domain-graphics-vnc.c | 24 ++ .../libvirt-gconfig-domain-graphics-vnc.h | 3 +++ libvirt-gconfig/libvirt-gconfig.sym| 3 +++ 3 files changed, 30 insertions(+) diff --git

[libvirt] [libvirt-glib] Don't call g_set_error with a NULL format string

2012-09-12 Thread Christophe Fergeau
From: Jovanka Gulicoska jovanka.gulico...@gmail.com The format string passed to g_set_error cannot be NULL or a runtime warning will be printed. --- libvirt-gobject/libvirt-gobject-stream.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 2/2] virtxml: Always initialize 'list'

2012-09-12 Thread Christophe Fergeau
'list' is freed in error cases, and in the 2 functions modified by this commit, we may jump to the error: label before 'list' is initialized when 'db' is NULL. --- examples/virtxml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/virtxml.c b/examples/virtxml.c

[libvirt] [PATCH 1/2] build: allow building with newer glibc-headers and -O0

2012-09-12 Thread Christophe Fergeau
Fix copied from libvirt, commit by Eric Blake. glibc 2.15 (on Fedora 17) coupled with explicit disabling of optimization during development dies a painful death: /usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] Work around

Re: [libvirt] [libvirt-glib][PATCH v3 1/2] gobject: Introduce gvir_connection_get_hypervisor_name

2012-09-12 Thread Christophe Fergeau
On Wed, Sep 12, 2012 at 05:32:00PM +0200, Michal Privoznik wrote: which is basically a wrapper for virConnectGetType(). --- The list is sad as it hasn't delivered previous version. examples/conn-test.c | 12 +++ libvirt-gobject/libvirt-gobject-connection.c |

Re: [libvirt] [libvirt-glib 1/2] Use 1 GB of RAM in Python example (instead of 1 TB)

2012-09-11 Thread Christophe Fergeau
On Tue, Sep 11, 2012 at 10:37:23AM +0300, Timo Juhani Lindfors wrote: Christophe Fergeau cferg...@redhat.com writes: Maybe a comment explicitly saying it's 1GB would be helpful? +domain.set_memory(1024*1024) # 1GB Good question. My first reaction is that if such a simple example needs

Re: [libvirt] [libvirt-glib 1/4] config: Allow NULL node name to gvir_config_object_set_content

2012-09-10 Thread Christophe Fergeau
Hey, I think this patch was missed during the review, I can't push the 3 patches that were ACK'ed without this one. Christophe On Tue, Sep 04, 2012 at 02:44:45PM +0200, Christophe Fergeau wrote: This is useful when you want to set the content of the current node. --- libvirt-gconfig/libvirt

Re: [libvirt] [libvirt-designer][PATCH 3/4] examples: Create an example of usage program

2012-09-10 Thread Christophe Fergeau
Hey, I haven't looked at the patch in depth, just a few comments: On Wed, Sep 05, 2012 at 11:27:46AM +0200, Michal Privoznik wrote: + +/* Standard (non-command) options. The leading + ensures that no + * argument reordering takes place, so that command options are + * not

Re: [libvirt] [libvirt-designer][PATCH 4/4] domain: Introduce interface support

2012-09-10 Thread Christophe Fergeau
Hey, On Fri, Sep 07, 2012 at 03:56:34PM +0200, Martin Kletzander wrote: On 09/05/2012 11:27 AM, Michal Privoznik wrote: + +static const gchar * +gvir_designer_domain_get_preferred_nic_model(GVirDesignerDomain *design, + GError **error) +{ +

Re: [libvirt] [libvirt-designer][PATCH 4/4] domain: Introduce interface support

2012-09-10 Thread Christophe Fergeau
On Mon, Sep 10, 2012 at 11:38:30AM +0200, Martin Kletzander wrote: On 09/10/2012 11:19 AM, Christophe Fergeau wrote: Thanks, but I have to look inside this one, anyway. You confirmed me what I thought this is what the function is doing, but I saw no need for cast in here. Now I see it has

[libvirt] [PATCH] Fix unwanted closing of libvirt client connection

2012-09-10 Thread Christophe Fergeau
e5a1bee07 introduced a regression in Boxes: when Boxes is left idle (it's still doing some libvirt calls in the background), the libvirt connection gets closed after a few minutes. What happens is that this code in virNetClientIOHandleOutput gets triggered: if (!thecall) return -1; /*

Re: [libvirt] [PATCH] Fix unwanted closing of libvirt client connection

2012-09-10 Thread Christophe Fergeau
On Mon, Sep 10, 2012 at 11:36:27AM +0100, Daniel P. Berrange wrote: Considering how the code worked in the past, the comment was actually correct originally. We never invoked virNetClientIOHandleOutput from the event handler callback - we only used the callback for dealing with *incoming* I/O.

Re: [libvirt] [libvirt-glib 1/2] Use 1 GB of RAM in Python example (instead of 1 TB)

2012-09-10 Thread Christophe Fergeau
On Mon, Sep 10, 2012 at 04:12:43PM +0300, Timo Juhani Lindfors wrote: --- examples/config-demo.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/config-demo.py b/examples/config-demo.py index 92e8a89..016f9bb 100644 --- a/examples/config-demo.py +++

Re: [libvirt] [libvirt-glib 2/2] Specify virtualization type in Python example

2012-09-10 Thread Christophe Fergeau
On Mon, Sep 10, 2012 at 04:12:44PM +0300, Timo Juhani Lindfors wrote: Without this creating the domain fails: gi._glib.GError: Failed to create domain: internal error missing domain type attribute --- examples/config-demo.py |1 + 1 file changed, 1 insertion(+) diff --git

Re: [libvirt] [PATCH] events: Fix domain event race on client disconnect

2012-09-07 Thread Christophe Fergeau
On Fri, Sep 07, 2012 at 01:24:35PM +0100, Daniel P. Berrange wrote: A nice long detailed explanation. I agree that this scenario you outline is plausible as an explanation for why Boxes sometimes stops getting events from libvirtd. I've ran more tests in the mean time without this patch

Re: [libvirt] [PATCH] events: Fix domain event race on client disconnect

2012-09-07 Thread Christophe Fergeau
Hey, On Fri, Sep 07, 2012 at 02:55:51PM +0200, Michal Privoznik wrote: On 07.09.2012 14:47, Daniel P. Berrange wrote: On Fri, Sep 07, 2012 at 02:44:03PM +0200, Christophe Fergeau wrote: On Fri, Sep 07, 2012 at 01:24:35PM +0100, Daniel P. Berrange wrote: A nice long detailed explanation. I

[libvirt] [PATCH] events: Fix domain event race on client disconnect

2012-09-06 Thread Christophe Fergeau
GNOME Boxes sometimes stops getting domain events from libvirtd, even after restarting it. Further investigation in libvirtd shows that events are properly queued with virDomainEventStateQueue, but the timer virDomainEventTimer which flushes the events and sends them to the clients never gets

[libvirt] [libvirt-glib 2/4] config: Improve documentation of GVirConfigDomain::set_memory

2012-09-04 Thread Christophe Fergeau
Explicit the fact that it sets the maximum domain memory. --- libvirt-gconfig/libvirt-gconfig-domain.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c index 2ca478f..e6f22bd 100644 ---

[libvirt] [libvirt-glib 1/4] config: Allow NULL node name to gvir_config_object_set_content

2012-09-04 Thread Christophe Fergeau
This is useful when you want to set the content of the current node. --- libvirt-gconfig/libvirt-gconfig-object.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-object.c b/libvirt-gconfig/libvirt-gconfig-object.c index

[libvirt] [libvirt-glib 3/4] config: Handle units in gvir_config_[gs]et_memory

2012-09-04 Thread Christophe Fergeau
gvir_config_[gs]et_memory have an optional 'unit' attribute which indicates the unit used to express the memory size. This commit adds support for parsing this unit, and adjusting the returned value accordingly. --- libvirt-gconfig/libvirt-gconfig-domain.c | 81 ++-- 1

[libvirt] [libvirt-glib 4/4] config: Add gvir_config_domain_[gs]et_current_memory

2012-09-04 Thread Christophe Fergeau
libvirt will insert a currentMemory node when setting the domain maximum memory. If we want to be able to later increase the domain maximum memory, libvirt-gconfig needs to be able to set this currentMemory node as well, otherwise this will cap the available memory in the domain. ---

Re: [libvirt] [PATCH libvirt-glib] Don't hold events lock when dispatching free callbacks

2012-08-27 Thread Christophe Fergeau
On Mon, Aug 20, 2012 at 04:14:52PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The _event_timeout_remove and _event_handle_remove methods were holding onto the global lock when invoking the free callback. This is a violation of the libvirt events API

[libvirt] [libvirt-glib] Fix small typo in error message ('downlaod')

2012-08-09 Thread Christophe Fergeau
--- Pushed under the trivial rule. libvirt-gobject/libvirt-gobject-storage-vol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-gobject/libvirt-gobject-storage-vol.c b/libvirt-gobject/libvirt-gobject-storage-vol.c index 99ccbab..9256445 100644 ---

Re: [libvirt] [glib PATCH V3] Add bindings for virDomainSnapshotCreateXML()

2012-08-03 Thread Christophe Fergeau
Hey, I've worked with Jovanka on this patch, so ACK from me, but I'd appreciate another pair of eyes having a quick look through it just in case. Christophe On Thu, Aug 02, 2012 at 05:58:22PM +0200, Jovanka Gulicoska wrote: --- libvirt-gobject/libvirt-gobject-domain.c | 52

Re: [libvirt] [PATCH libvirt-glib] gobject: add GVir.DomainShutdownFlags binding

2012-08-03 Thread Christophe Fergeau
Hey, On Thu, Jul 19, 2012 at 07:36:50PM +0200, Marc-André Lureau wrote: --- libvirt-gobject/libvirt-gobject-domain.c |2 +- libvirt-gobject/libvirt-gobject-domain.h | 13 + libvirt-gobject/libvirt-gobject.sym |1 + 3 files changed, 15 insertions(+), 1 deletion(-)

Re: [libvirt] [PATCH libvirt-glib] gobject: add GVir.DomainShutdownFlags binding

2012-08-03 Thread Christophe Fergeau
On Fri, Aug 03, 2012 at 12:44:10PM +0200, Marc-André Lureau wrote: The counterpart GVirDomainStartFlags uses _NONE. Is this a flawed in libvirt API? Do we prefer to copy libvirt or do we want consitancy? I prefer constitancy. I don't think this is a flaw, it's just that '0' has a different

Re: [libvirt] [glib PATCH V1] Add bindings for virDomainSnapshotCreateFlags

2012-08-03 Thread Christophe Fergeau
ACK On Fri, Aug 03, 2012 at 01:05:19PM +0200, Jovanka Gulicoska wrote: --- libvirt-gobject/libvirt-gobject-domain.c | 2 +- libvirt-gobject/libvirt-gobject-domain.h | 25 + libvirt-gobject/libvirt-gobject.sym | 1 + 3 files changed, 27 insertions(+), 1

Re: [libvirt] [glib PATCH V5] Add bindings for virDomainRestore*()

2012-08-02 Thread Christophe Fergeau
On Tue, Jul 31, 2012 at 12:41:11PM +0200, Zeeshan Ali (Khattak) wrote: +static void restore_domain_from_file_data_free(RestoreDomainFromFileData *data) +{ +g_free(data-filename); +if (data-custom_conf != NULL) +g_object_unref(data-custom_conf); Actually you can make

Re: [libvirt] [libvirt-glib 1/2] Add async variant of gvir_domain_resume()

2012-08-02 Thread Christophe Fergeau
On Mon, Jul 30, 2012 at 06:30:27PM +0200, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gobject/libvirt-gobject-domain.c | 56 libvirt-gobject/libvirt-gobject-domain.h | 7

Re: [libvirt] [libvirt-glib 2/2] RFC: Make use of GUINT_TO_POINTER/GPOINTER_TO_UINT

2012-08-02 Thread Christophe Fergeau
On Mon, Jul 30, 2012 at 06:30:28PM +0200, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org We create struct and a free function each time we need to pass a simple unsigned integer to an async function. Code can be simplified if we don't do that but rather use

Re: [libvirt] [glib PATCH V4] Add bindings for virDomainRestore*()

2012-07-30 Thread Christophe Fergeau
Hey, This mostly looks good, but I had a few comments nonetheless.. On Sun, Jul 29, 2012 at 06:06:36PM +0200, Jovanka Gulicoska wrote: --- libvirt-gobject/libvirt-gobject-connection.c | 164 ++ libvirt-gobject/libvirt-gobject-connection.h | 20

Re: [libvirt] [libvirt-glib PATCHv2] Fix *_new_from_xml

2012-07-24 Thread Christophe Fergeau
ping? Christophe On Wed, Jul 18, 2012 at 03:39:39PM +0200, Christophe Fergeau wrote: For objects with a subtype 'type' attribute, when the _new_from_xml function was called, the 'type' attribute was forcefully set to the right value rather than checking that the passed-in value matches

Re: [libvirt] [libvirt-glib PATCHv2] Fix *_new_from_xml

2012-07-24 Thread Christophe Fergeau
On Tue, Jul 24, 2012 at 12:55:52PM +0200, Marc-André Lureau wrote: On Tue, Jul 24, 2012 at 12:24 PM, Daniel P. Berrange berra...@redhat.com wrote: Should we instead be using g_return_if_fail() so you get a dianostic, on the basis that this is programmer mistake ? That was my feeling too.

[libvirt] [libvirt-glib PATCHv3] Fix *_new_from_xml

2012-07-24 Thread Christophe Fergeau
For objects with a subtype 'type' attribute, when the _new_from_xml function was called, the 'type' attribute was forcefully set to the right value rather than checking that the passed-in value matches the type of the subclass we are trying to instantiate. This commit changes this, and returns

Re: [libvirt] [PATCH libvirt-glib] gobject: add GVir.DomainShutdownFlags binding

2012-07-20 Thread Christophe Fergeau
On Thu, Jul 19, 2012 at 07:36:50PM +0200, Marc-André Lureau wrote: --- libvirt-gobject/libvirt-gobject-domain.c |2 +- libvirt-gobject/libvirt-gobject-domain.h | 13 + libvirt-gobject/libvirt-gobject.sym |1 + 3 files changed, 15 insertions(+), 1 deletion(-)

Re: [libvirt] [PATCH libvirt-glib] gobject: add GVir.DomainXMLFlags binding

2012-07-19 Thread Christophe Fergeau
On Wed, Jul 18, 2012 at 07:02:43PM +0200, Marc-André Lureau wrote: --- libvirt-gobject/libvirt-gobject-domain.c |2 +- libvirt-gobject/libvirt-gobject-domain.h | 14 ++ libvirt-gobject/libvirt-gobject.sym |5 + 3 files changed, 20 insertions(+), 1 deletion(-)

Re: [libvirt] [libvirt-glib] Fix *_new_from_xml

2012-07-18 Thread Christophe Fergeau
On Wed, Jul 18, 2012 at 03:16:03PM +0200, Christophe Fergeau wrote: For objects with a subtype 'type' attribute, when the _new_from_xml function was called, the 'type' attribute was forcefully set to the right value rather than checking that the passed-in value matches the type of the subclass

[libvirt] [libvirt-glib PATCHv2] Fix *_new_from_xml

2012-07-18 Thread Christophe Fergeau
For objects with a subtype 'type' attribute, when the _new_from_xml function was called, the 'type' attribute was forcefully set to the right value rather than checking that the passed-in value matches the type of the subclass we are trying to instantiate. This commit changes this, and returns

[libvirt] [PATCH] Fix daemon auto-spawning

2012-07-12 Thread Christophe Fergeau
Commit 32a9aac switched libvirt to use the XDG base directories to locate most of its data/config. In particular, the per-user socket for qemu:///session is now stored in the XDG runtime directory. This directory is located by looking at the XDG_RUNTIME_DIR environment variable, with a fallback to

Re: [libvirt] trying to build 0.9.13 on F17: cannot find -lcrypto

2012-07-12 Thread Christophe Fergeau
Hey, On Wed, Jul 11, 2012 at 03:42:20PM +0100, Daniel P. Berrange wrote: On Wed, Jul 11, 2012 at 10:23:21AM -0400, Cole Robinson wrote: I think this comes from rbd support, from configure.ac: LIBRBD_LIBS=-lrbd -lrados -lcrypto from this commit:

Re: [libvirt] [PATCH] Fix daemon auto-spawning

2012-07-12 Thread Christophe Fergeau
On Thu, Jul 12, 2012 at 01:23:15PM +0100, Daniel P. Berrange wrote: --- src/rpc/virnetsocket.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index 0b32ffe..08dfbb0 100644 --- a/src/rpc/virnetsocket.c +++

Re: [libvirt] [PATCH] Fix /domain/features setting in qemuParseCommandLine

2012-07-11 Thread Christophe Fergeau
On Tue, Jul 10, 2012 at 04:04:12PM +0200, Michal Privoznik wrote: Cool, so now we don't overwrite PAE feature set just a few lines above (not visible in this diff though). ACK with this squashed in: I have now pushed this patch with the testcase update. Before pushing I have tested that

Re: [libvirt] Problem setting CPU topology

2012-07-10 Thread Christophe Fergeau
On Sat, Jul 07, 2012 at 07:10:53PM +0300, Zeeshan Ali (Khattak) wrote: Hi, I'm trying to set exact CPU topology to qemu-kvm domains to match host's topology. In my case, host topology is: 1 socket, 2 cores and 2 threads. If I set the XML like this: domain type='kvm' .. vcpu

[libvirt] [PATCH] Fix /domain/features setting in qemuParseCommandLine

2012-07-10 Thread Christophe Fergeau
Commit 5e6ce1 moved down detection of the ACPI feature in qemuParseCommandLine. However, when ACPI is detected, it clears all feature flags in def-features to only set ACPI. This used to be fine because this was the first place were def-features was set, but after the move this is no longer

Re: [libvirt] question about save/restore domain

2012-07-04 Thread Christophe Fergeau
On Tue, Jul 03, 2012 at 11:44:16PM +0300, Zeeshan Ali (Khattak) wrote: On Tue, Jul 3, 2012 at 9:18 PM, Eric Blake ebl...@redhat.com wrote: The plan was to do the latter (online cloning) but since its not already possible and IMO it might be too much work for Jovanka to handle within the GSoC

Re: [libvirt] libvirt can't get capablities

2012-07-02 Thread Christophe Fergeau
Hey, On Mon, Jul 02, 2012 at 05:47:08PM +0800, Li Zhang wrote: 2003-01-02 01:22:00.135+: 12207: error : qemuCapsComputeCmdFlags:1218 : unsupported configuration: this qemu binary requires libvirt to be compiled with yajl Your first problem is here, you need to have yajl-devel installed

Re: [libvirt] libvirt can't get capablities

2012-07-02 Thread Christophe Fergeau
On Mon, Jul 02, 2012 at 05:56:35PM +0800, Osier Yang wrote: I'm wondering if we should force to require yajl-devel if build with with-qemu, as without yajl-devel, it can't do much work with new qemu now. Something like this ? ;) commit 350583c859deaaddc98d7319e1c2ad649e4d3e83 Author: Eric

Re: [libvirt] [libvirt-glib v3 2/2] Add GVirConfigDomainCpu class

2012-06-28 Thread Christophe Fergeau
ACK On Wed, Jun 27, 2012 at 07:35:29PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org API to handle 'domain/cpu' nodes. --- libvirt-gconfig/Makefile.am |2 + libvirt-gconfig/libvirt-gconfig-domain-cpu.c | 138

Re: [libvirt] [libvirt-glib v3 1/2] Make GVirConfigCapabilitiesCpu.get_features virtual

2012-06-28 Thread Christophe Fergeau
ACK On Wed, Jun 27, 2012 at 07:35:28PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org Also provide helper function for subclasses that will have the exact same implementation except that they'll return instances of another type (subclasses of

[libvirt] [PATCH] doc: fix typo in virDomainDestroy API doc

2012-06-27 Thread Christophe Fergeau
--- Pushed under the trivial rule. src/libvirt.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index ef5ac47..db6ba15 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -2127,11 +2127,11 @@ error: * Destroy the domain object. The

Re: [libvirt] [libvirt-glib v2 1/8] Setters/adders for GVirConfigCapabilitiesCpu props

2012-06-26 Thread Christophe Fergeau
On Tue, Jun 26, 2012 at 05:56:13AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org - gvir_config_capabilities_cpu_add_feature - gvir_config_capabilities_cpu_set_topology --- libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c | 32

Re: [libvirt] [libvirt-glib v2 2/8] Add gvir_config_capabilities_cpu_topology_new*

2012-06-26 Thread Christophe Fergeau
ACK On Tue, Jun 26, 2012 at 05:56:14AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org Provide constructor methods for GVirConfigCapabilitiesCpuTopology. --- .../libvirt-gconfig-capabilities-cpu-topology.c| 25

Re: [libvirt] [libvirt-glib v2 3/8] Setters for CapabilitiesCpuTopology props

2012-06-26 Thread Christophe Fergeau
On Tue, Jun 26, 2012 at 05:56:15AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org --- .../libvirt-gconfig-capabilities-cpu-topology.c| 27 .../libvirt-gconfig-capabilities-cpu-topology.h|9 +++

Re: [libvirt] [libvirt-glib v2 4/8] Add gvir_config_capabilities_cpu_feature_set_name()

2012-06-26 Thread Christophe Fergeau
ACK On Tue, Jun 26, 2012 at 05:56:16AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org Setter for CapabilitiesCpuFeature.name. --- libvirt-gconfig/libvirt-gconfig-capabilities-cpu-feature.c | 12

Re: [libvirt] [libvirt-glib v2 5/8] Add GVirConfigDomainCpuFeature class

2012-06-26 Thread Christophe Fergeau
On Tue, Jun 26, 2012 at 05:56:17AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org API to handle 'domain/cpu/feature' nodes. --- libvirt-gconfig/Makefile.am|2 + .../libvirt-gconfig-domain-cpu-feature.c | 100

Re: [libvirt] [libvirt-glib v2 7/8] Add GVirConfigDomainCpu class

2012-06-26 Thread Christophe Fergeau
On Tue, Jun 26, 2012 at 05:56:19AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org API to handle 'domain/cpu' nodes. --- libvirt-gconfig/Makefile.am |2 + libvirt-gconfig/libvirt-gconfig-domain-cpu.c | 179

Re: [libvirt] [libvirt-glib v2 6/8] Make GVirConfigCapabilitiesCpu.get_features virtual

2012-06-26 Thread Christophe Fergeau
ACK On Tue, Jun 26, 2012 at 05:56:18AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c | 30 +--- libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h |4 ++- 2 files changed,

Re: [libvirt] [libvirt-glib v2 8/8] Test cases for new domain CPU APIs

2012-06-26 Thread Christophe Fergeau
ACK Christophe On Tue, Jun 26, 2012 at 05:56:20AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gconfig/tests/test-domain-create.c | 55 1 file changed, 55 insertions(+) diff --git

Re: [libvirt] [libvirt-glib v2 1/8] Setters/adders for GVirConfigCapabilitiesCpu props

2012-06-26 Thread Christophe Fergeau
On Tue, Jun 26, 2012 at 06:05:41PM +0300, Zeeshan Ali (Khattak) wrote: On Tue, Jun 26, 2012 at 12:16 PM, Christophe Fergeau cferg...@redhat.com wrote: On Tue, Jun 26, 2012 at 05:56:13AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org

Re: [libvirt] [PATCH] virsh: Add domdisplay command for VNC and SPICE

2012-06-25 Thread Christophe Fergeau
On Sun, Jun 24, 2012 at 06:54:10PM -0500, Doug Goldstein wrote: On Fri, Jun 22, 2012 at 3:56 AM, Christophe Fergeau cferg...@redhat.com wrote: For SPICE, a URI you can pass to remote-viewer is spice://hostname?port=xxtls-port=yypassword=zzz For simple cases, spice://hostname:port

Re: [libvirt] [libvirt-glib] mainloop integration fixes

2012-06-25 Thread Christophe Fergeau
Ping ? Christophe On Wed, Jun 20, 2012 at 12:29:46PM +0200, Christophe Fergeau wrote: Hey, While testing Boxes, I've noticed that if I started a VM and then let it in the background for a while, it usually crashed after a while. When this happens, the backtrace is: Program received

Re: [libvirt] [libvirt-glib 5/5] mainloop: don't reschedule deleted timeouts/watches

2012-06-25 Thread Christophe Fergeau
On Mon, Jun 25, 2012 at 11:03:16AM +0100, Daniel P. Berrange wrote: On Wed, Jun 20, 2012 at 12:29:51PM +0200, Christophe Fergeau wrote: The deletion of libvirt timeouts/watches is done in 2 steps: - the first step is synchronous and unregisters the timeout/watch from glib mainloop

Re: [libvirt] [libvirt-glib 3/8] Setters for CapabilitiesCpuTopology props

2012-06-25 Thread Christophe Fergeau
Same concerns as with the first patch, GVirConfigCapabilitiesCpuTopology isn't mutable, it may be worth introducing a GVirConfigDomainCpuTopology which would contain these setters (and this would go well with the other GVirConfigDomain classes you introduce in this series). Christophe On Sat,

Re: [libvirt] [libvirt-glib 1/8] Setters/adders for GVirConfigCapabilitiesCpu props

2012-06-25 Thread Christophe Fergeau
On Sat, Jun 23, 2012 at 10:17:57PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org - gvir_config_capabilities_cpu_add_feature - gvir_config_capabilities_cpu_set_topology As I understand it, the capabilities XML is read-only, the only reason for these

Re: [libvirt] [libvirt-glib 6/8] Make GVirConfigCapabilitiesCpu.get_features virtual

2012-06-25 Thread Christophe Fergeau
On Sat, Jun 23, 2012 at 10:18:02PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c | 28 +--- libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h |4 ++- 2 files changed, 22

Re: [libvirt] [libvirt-glib 1/8] Setters/adders for GVirConfigCapabilitiesCpu props

2012-06-25 Thread Christophe Fergeau
On Mon, Jun 25, 2012 at 12:37:48PM +0100, Daniel P. Berrange wrote: On Mon, Jun 25, 2012 at 01:34:41PM +0200, Christophe Fergeau wrote: On Sat, Jun 23, 2012 at 10:17:57PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org

Re: [libvirt] [libvirt-glib 5/5] mainloop: don't reschedule deleted timeouts/watches

2012-06-25 Thread Christophe Fergeau
On Mon, Jun 25, 2012 at 01:04:30PM +0200, Christophe Fergeau wrote: It happens at more or less random times, so I'm not sure if I'll be able to catch a backtrace when the watch is removed. Luckily watches don't get removed very often, so I managed to catch both the remove and the following

Re: [libvirt] [PATCH libvirt-gconfig] Add support for domain filesystems with type=bind|ram

2012-06-25 Thread Christophe Fergeau
On Mon, Jun 25, 2012 at 12:14:59PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This adds support for filesystems with type=bind or type=ram, Both of these are new in libvirt 0.9.13. However, libvirt-glib will still compile and work if it's linking with an

[libvirt] [libvirt-glib 4/5] mainloop: protect 'handles' and 'timeouts' against concurrent accesses

2012-06-20 Thread Christophe Fergeau
Timeout and watch deletion is done from an idle callback. However, we cannot assume that all libvirt event calls (the callbacks passed to virEventRegisterImpl) will be done from the mainloop thread. It's thus possible that a libvirt event call will run a thread while one of the idle deletion

Re: [libvirt] libvirtd stopped launching

2012-06-15 Thread Christophe Fergeau
On Fri, Jun 15, 2012 at 02:06:21AM +0300, Zeeshan Ali (Khattak) wrote: On Wed, Jun 13, 2012 at 5:00 PM, Zeeshan Ali (Khattak) zeesha...@gnome.org wrote: Hi everyone,   After I updated my libvirt repo/install from latest git master yesterday, libvirtd won't just launch for me anymore. The

[libvirt] [libvirt-glib] build: allow building with newer glibc-headers and -O0

2012-06-13 Thread Christophe Fergeau
Commit log and autoconf snippet written by Eric Blake for libvirt. glibc 2.15 (on Fedora 17) coupled with explicit disabling of optimization during development dies a painful death: In file included from /usr/include/limits.h:27:0, from

Re: [libvirt] [PATCH] build: allow building with newer glibc-headers and -O0

2012-06-07 Thread Christophe Fergeau
Hey, On Mon, Jun 04, 2012 at 12:08:20PM -0600, Eric Blake wrote: glibc 2.15 (on Fedora 17) coupled with explicit disabling of optimization during development dies a painful death: In file included from /usr/include/limits.h:27:0, from

Re: [libvirt] [PATCH] build: allow building with newer glibc-headers and -O0

2012-06-07 Thread Christophe Fergeau
On Thu, Jun 07, 2012 at 06:25:40AM -0600, Eric Blake wrote: On 06/07/2012 05:24 AM, Christophe Fergeau wrote: Using a #ifdef would be more correct: Only if you care about -Wundef, which we don't. But I agree that if other projects are copying this trick to work around glibc's braindead

Re: [libvirt] [PATCH] build: allow building with newer glibc-headers and -O0

2012-06-07 Thread Christophe Fergeau
On Thu, Jun 07, 2012 at 07:24:30AM -0600, Eric Blake wrote: If the argument is that we want to make the autoconf snippet easier to copy elsewhere, then I don't mind applying a patch that uses: #if defined __OPTIMIZE__ __OPTIMIZE__ as the gate in the AH_VERBATIM block of code. That would

Re: [libvirt] [PATCH] maint: make it easier to copy FORTIFY_SOURCE snippet

2012-06-07 Thread Christophe Fergeau
of autoconf means that other projects are likely to copy our snippet verbatim. We can be nicer to other projects by making it easier to integrate into projects that use -Wundef. Suggested by Christophe Fergeau. * m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS): Be nice to other

Re: [libvirt] [libvirt-glib] API to get/set domain title

2012-06-04 Thread Christophe Fergeau
On Sat, Jun 02, 2012 at 07:33:08PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gconfig/libvirt-gconfig-domain.c | 33 ++ libvirt-gconfig/libvirt-gconfig-domain.h |2 ++

Re: [libvirt] [PATCH][libvirt-glib] glib-events: Allow zero timeouts for timer

2012-06-01 Thread Christophe Fergeau
On Fri, Jun 01, 2012 at 01:41:54PM +0200, Michal Privoznik wrote: In libvirt, it's perfectly possible and widely used to have disabled timers (timeout=-1) and fire them up 'randomly' with timeout=0. However, with current mapping into glib mainloop it's not possible and causing troubles. ACK

Re: [libvirt] [PATCH][libvirt-glib] Don't misuse GMainLoop for libvirt event loop

2012-05-24 Thread Christophe Fergeau
On Thu, May 24, 2012 at 11:01:19AM +0200, Michal Privoznik wrote: Since we are calling APIs within timers, those might block as any libvirt API may block. This, however, might get so critical, that server will shut us down due to timeout on keepalive. Simply, if an API called within a timer

Re: [libvirt] [libvirt-glib 1/2] Add gvir_config_object_get_attribute_uint64()

2012-05-23 Thread Christophe Fergeau
On Tue, May 22, 2012 at 06:51:45PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org Another internal libvirt-gconfig helper to get unint64 XML attributes. s/unint64/uint64, ACK with this small typo in the log fixed. Christophe ---

Re: [libvirt] [libvirt-glib 2/2] API to deal with topology information of CPU capabilities

2012-05-23 Thread Christophe Fergeau
On Tue, May 22, 2012 at 06:51:46PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gconfig/Makefile.am|2 + .../libvirt-gconfig-capabilities-cpu-topology.c| 83

[libvirt] [libvirt-glib] Check arguments to public libvirt-gobject methods

2012-05-22 Thread Christophe Fergeau
Some public methods in libvirt-gobject don't have g_return_if_fail checks on their arguments. It happens that GNOME Boxes tries to call gvir_connection_find_storage_pool_by_name with a NULL GVirConnection causing a crash https://bugzilla.gnome.org/show_bug.cgi?id=676216 While GNOME Boxes needs to

Re: [libvirt] [PATCH][libvirt-glib] glib-events: Allow zero timeouts for timer

2012-05-22 Thread Christophe Fergeau
On Tue, May 22, 2012 at 05:37:25PM +0200, Michal Privoznik wrote: In libvirt, it's perfectly possible and widely used to have disabled timers (timeout=-1) and fire them up 'randomly' with timeout=0. However, with current mapping into glib mainloop it's not possible and causing troubles. The

Re: [libvirt] Libvirt Support Virtio-serail

2012-05-21 Thread Christophe Fergeau
On Fri, May 18, 2012 at 10:57:34AM +, Pankaj Rawat wrote: Hi, Can Anyone please tell me if there is any option in virt-install by which we can specify this many consoles I mean I don’t want to edit xml file and then define it as it is a post installation process. I want to enable

[libvirt] [libvirt-glib] Debian, symbol versioning ABI breakage

2012-05-21 Thread Christophe Fergeau
Hey, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673430 has recently been brought to my attention. The Debian gnome-boxes package was failing to startup because it had been compiled against an older libvirt-glib version than the one that was installed on the system. So far, we have broken

Re: [libvirt] [libvirt-glib] Add getter for GVirConfigDomainOS.arch

2012-05-21 Thread Christophe Fergeau
On Sat, May 19, 2012 at 05:45:31AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gconfig/libvirt-gconfig-domain-os.c |7 +++ libvirt-gconfig/libvirt-gconfig-domain-os.h |1 + libvirt-gconfig/libvirt-gconfig.sym |1 +

[libvirt] [libvirt-glib] Check arguments to public GVirConfigObject methods

2012-05-21 Thread Christophe Fergeau
GVirConfigObject public methods don't have g_return_if_fail checks on their arguments. It happens that GNOME Boxes tries to call gvir_config_object_to_xml with a NULL GVirConfigObject causing a crash https://bugzilla.gnome.org/show_bug.cgi?id=676308 While GNOME Boxes needs to be fixed not to pass

Re: [libvirt] [libvirt-glib] Add getter for GVirConfigDomain.virt_type

2012-05-16 Thread Christophe Fergeau
On Wed, May 16, 2012 at 04:58:51AM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gconfig/libvirt-gconfig-domain.c | 12 libvirt-gconfig/libvirt-gconfig-domain.h |1 + libvirt-gconfig/libvirt-gconfig.sym |2 ++ 3

Re: [libvirt] [PATCH libvirt 5/8] storage: add preallocation element

2012-05-16 Thread Christophe Fergeau
On Wed, May 16, 2012 at 12:55:12AM +0200, Marc-André Lureau wrote: Allow to specify preallocation mode for QCOW2 images. If not specified or not available, it's ignored. This change only modify the schema, doc, parsing and tests. --- docs/formatstorage.html.in |6 ++

Re: [libvirt] [PATCH libvirt 6/8] storage: learn to create qcow2 with preallocation

2012-05-16 Thread Christophe Fergeau
On Wed, May 16, 2012 at 12:55:13AM +0200, Marc-André Lureau wrote: Use preallocation mode specified in volume XML format when running qemu-img. --- src/storage/storage_backend.c | 70 +++-- 1 file changed, 60 insertions(+), 10 deletions(-) diff

Re: [libvirt] [PATCH libvirt] storage: learn to create qcow2 with preallocation

2012-05-16 Thread Christophe Fergeau
ACK On Wed, May 16, 2012 at 01:21:33PM +0200, Marc-André Lureau wrote: Use preallocation mode specified in volume XML format when running qemu-img. --- src/storage/storage_backend.c | 70 +++-- 1 file changed, 60 insertions(+), 10 deletions(-) diff

[libvirt] [libvirt-glib] Make sure %with_vala is defined for newer RHELs

2012-05-15 Thread Christophe Fergeau
We want to build the vala bindings on recent RHELs. Given than %with_introspection is defined for fedora = 15 and rhel 6 which are exactly the versions for which we want to build the vala bindings, and given that the vala bindings are to be disabled when introspection is disabled, we can set

Re: [libvirt] Libvirt Support Virtio-serail

2012-05-14 Thread Christophe Fergeau
Hi Pankaj, On Mon, May 14, 2012 at 03:52:54AM +, Pankaj Rawat wrote: I wanted to know whether libvirt has any kind of support for virt-io serial or not If yes then how can I use it? I think http://libvirt.org/formatdomain.html#elementCharChannel is what you are looking for, if it's not,

Re: [libvirt] [libvirt-glib 1/2] Add host capabilities API

2012-05-14 Thread Christophe Fergeau
ACK On Fri, May 11, 2012 at 04:18:15PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org Not quite complete but its a good start. --- libvirt-gconfig/Makefile.am|6 + .../libvirt-gconfig-capabilities-cpu-feature.c | 58

Re: [libvirt] [libvirt-glib 2/2] Add guest capabilities API

2012-05-14 Thread Christophe Fergeau
On Fri, May 11, 2012 at 04:18:16PM +0300, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org Not quite complete but its a good start. --- libvirt-gconfig/Makefile.am|8 + .../libvirt-gconfig-capabilities-guest-arch.c | 125

Re: [libvirt] [libvirt-glib 5/5] Add gvir_config_domain_os_get_boot_devices()

2012-05-11 Thread Christophe Fergeau
On Fri, May 11, 2012 at 06:10:24AM +0300, Zeeshan Ali (Khattak) wrote: The annotations says it all. You have to know exactly what it means, and it's written very small in the doc, so no, the annotation doesn't say much if you are not familiar with it, and you have to notice it. IIRC there

Re: [libvirt] [libvirt-glib 5/5] Add gvir_config_domain_os_get_boot_devices()

2012-05-11 Thread Christophe Fergeau
On Fri, May 11, 2012 at 06:10:24AM +0300, Zeeshan Ali (Khattak) wrote: IIRC there was a bug on gtk-doc to generate more helpful output based on these annotations. I don't know if that has been fixed or not but when/if it is I could not find such a bug report by the way. Christophe

Re: [libvirt] [libvirt-glib 5/5] Add gvir_config_domain_os_get_boot_devices()

2012-05-11 Thread Christophe Fergeau
On Fri, May 11, 2012 at 03:08:06PM +0300, Zeeshan Ali (Khattak) wrote: The annotation is not supposed to be directly meant for humans, thats why gtk-doc needs to do a better job. i-e the info is already there, just needs translation. Yep, I don't know if gtk-doc uses the introspection

Re: [libvirt] [libvirt-glib 5/5] Add gvir_config_domain_os_get_boot_devices()

2012-05-11 Thread Christophe Fergeau
On Fri, May 11, 2012 at 01:32:34PM +0100, Daniel P. Berrange wrote: On Fri, May 11, 2012 at 02:27:37PM +0200, Christophe Fergeau wrote: On Fri, May 11, 2012 at 03:08:06PM +0300, Zeeshan Ali (Khattak) wrote: The annotation is not supposed to be directly meant for humans, thats why gtk-doc

<    4   5   6   7   8   9   10   11   12   13   >