Re: [libvirt] [PATCH] dont't crash in virsh dominfo domain

2010-03-19 Thread Balbir Singh
On Thu, Mar 18, 2010 at 7:18 PM, Daniel Veillard veill...@redhat.com wrote: On Wed, Mar 17, 2010 at 09:11:07PM +0100, Guido Günther wrote: Hi, virsh dominfo domain crashes with: #0  strlen () at ../sysdeps/i386/i486/strlen.S:69 #1  0x080891c9 in qemudNodeGetSecurityModel (conn=0x8133940,

Re: [libvirt] [PATCH v2 1/5] Public virDomainMigrateSetMaxDowntime API

2010-03-19 Thread Daniel Veillard
On Thu, Mar 18, 2010 at 08:12:44PM +0100, Jiri Denemark wrote: --- include/libvirt/libvirt.h.in |4 +++ src/libvirt.c| 49 ++ src/libvirt_public.syms |5 3 files changed, 58 insertions(+), 0 deletions(-) diff

Re: [libvirt] [PATCH v2 2/5] Wire protocol and dispatcher for virDomainMigrateSetMaxDowntime

2010-03-19 Thread Daniel Veillard
On Thu, Mar 18, 2010 at 08:12:45PM +0100, Jiri Denemark wrote: [...] diff --git a/src/remote/remote_protocol.h b/src/remote/remote_protocol.h index f76e6e5..34d49fa 100644 --- a/src/remote/remote_protocol.h +++ b/src/remote/remote_protocol.h @@ -4,51 +4,51 @@ */ #ifndef _RP_H_RPCGEN

Re: [libvirt] [PATCH v2 3/5] Implement virDomainMigrateSetMaxDowntime in remote driver

2010-03-19 Thread Daniel Veillard
On Thu, Mar 18, 2010 at 08:12:46PM +0100, Jiri Denemark wrote: --- src/remote/remote_driver.c | 32 +++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 2fb81a1..58f5a9d 100644 ---

[libvirt] virStoragePoolDefParseString() fails with the following pool xml

2010-03-19 Thread Sharadha Prabhakar (3P)
Hi, I have the following Pool XML pool type='netfs' nameNFS ISO library/name uuid6142b786-378d-9def-bc96-2d0dc0466c13/uuid capacity838729728/capacity allocation838729728/allocation available148315040/available source host name='telos'/ dir path='/images/autoinstall'/

Re: [libvirt] [PATCH v2 1/5] Public virDomainMigrateSetMaxDowntime API

2010-03-19 Thread Daniel P. Berrange
On Fri, Mar 19, 2010 at 11:33:38AM +0100, Daniel Veillard wrote: On Thu, Mar 18, 2010 at 08:12:44PM +0100, Jiri Denemark wrote: --- include/libvirt/libvirt.h.in |4 +++ src/libvirt.c| 49 ++ src/libvirt_public.syms |

Re: [libvirt] [PATCH v2 4/5] Implement virDomainMigrateSetMaxDowntime in qemu driver

2010-03-19 Thread Daniel Veillard
On Thu, Mar 18, 2010 at 08:12:47PM +0100, Jiri Denemark wrote: --- src/qemu/qemu_driver.c | 70 +- src/qemu/qemu_monitor.c | 15 + src/qemu/qemu_monitor.h |3 ++ src/qemu/qemu_monitor_json.c | 29 +

Re: [libvirt] virStoragePoolDefParseString() fails with the following pool xml

2010-03-19 Thread Daniel P. Berrange
On Fri, Mar 19, 2010 at 10:37:15AM +, Sharadha Prabhakar (3P) wrote: Hi, I have the following Pool XML pool type='netfs' nameNFS ISO library/name uuid6142b786-378d-9def-bc96-2d0dc0466c13/uuid capacity838729728/capacity allocation838729728/allocation

Re: [libvirt] [PATCH v2 5/5] Add migrate-setmaxdowntime command to virsh

2010-03-19 Thread Daniel Veillard
On Thu, Mar 18, 2010 at 08:12:48PM +0100, Jiri Denemark wrote: --- tools/virsh.c | 66 +++ tools/virsh.pod |6 + 2 files changed, 72 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index

Re: [libvirt] [PATCH v2 2/5] Wire protocol and dispatcher for virDomainMigrateSetMaxDowntime

2010-03-19 Thread Jiri Denemark
diff --git a/src/remote/remote_protocol.h b/src/remote/remote_protocol.h index f76e6e5..34d49fa 100644 --- a/src/remote/remote_protocol.h +++ b/src/remote/remote_protocol.h @@ -4,51 +4,51 @@ */ #ifndef _RP_H_RPCGEN -# define _RP_H_RPCGEN +#define _RP_H_RPCGEN -#

Re: [libvirt] [PATCH v2 4/5] Implement virDomainMigrateSetMaxDowntime in qemu driver

2010-03-19 Thread Daniel Veillard
On Thu, Mar 18, 2010 at 08:12:47PM +0100, Jiri Denemark wrote: --- src/qemu/qemu_driver.c | 70 +- src/qemu/qemu_monitor.c | 15 + src/qemu/qemu_monitor.h |3 ++ src/qemu/qemu_monitor_json.c | 29 +

Re: [libvirt] virStoragePoolDefParseString() fails with the following pool xml

2010-03-19 Thread Sharadha Prabhakar (3P)
-Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: 19 March 2010 10:57 To: Sharadha Prabhakar (3P) Cc: libvir-list@redhat.com Subject: Re: [libvirt] virStoragePoolDefParseString() fails with the following pool xml On Fri, Mar 19, 2010 at 10:37:15AM +,

Re: [libvirt] virStoragePoolDefParseString() fails with the following pool xml

2010-03-19 Thread Daniel P. Berrange
On Fri, Mar 19, 2010 at 11:09:52AM +, Sharadha Prabhakar (3P) wrote: -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: 19 March 2010 10:57 To: Sharadha Prabhakar (3P) Cc: libvir-list@redhat.com Subject: Re: [libvirt]

Re: [libvirt] [PATCH v2 4/5] Implement virDomainMigrateSetMaxDowntime in qemu driver

2010-03-19 Thread Jiri Denemark
typedef struct _qemuDomainObjPrivate qemuDomainObjPrivate; @@ -107,6 +112,7 @@ struct _qemuDomainObjPrivate { virCond jobCond; /* Use in conjunction with main virDomainObjPtr lock */ enum qemuDomainJob jobActive; /* Currently running job */ unsigned int jobSignals;

Re: [libvirt] virStoragePoolDefParseString() fails with the following pool xml

2010-03-19 Thread Daniel P. Berrange
On Fri, Mar 19, 2010 at 10:37:15AM +, Sharadha Prabhakar (3P) wrote: Hi, I have the following Pool XML pool type='netfs' nameNFS ISO library/name uuid6142b786-378d-9def-bc96-2d0dc0466c13/uuid capacity838729728/capacity allocation838729728/allocation

Re: [libvirt] [PATCH] Keep track of guest paused state after disk IO errors

2010-03-19 Thread Daniel Veillard
On Tue, Mar 16, 2010 at 05:24:38PM +, Daniel P. Berrange wrote: With the QMP mode monitor, it is possible to get a notification when the guest is paused indirectly (eg as result of a disk IO error). This patch enables such reporting and when receiving an error updates libvirt's view of the

Re: [libvirt] [PATCH v2 4/5] Implement virDomainMigrateSetMaxDowntime in qemu driver

2010-03-19 Thread Jiri Denemark
+int qemuMonitorJSONSetMigrationDowntime(qemuMonitorPtr mon, +unsigned long long downtime) +{ +int ret; +char *downtimestr; +virJSONValuePtr cmd; +virJSONValuePtr reply = NULL; +if (virAsprintf(downtimestr, %llun,

Re: [libvirt] [PATCH v2 1/5] Public virDomainMigrateSetMaxDowntime API

2010-03-19 Thread Jiri Denemark
+/** + * virDomainMigrateSetMaxDowntime: + * @domain: a domain object + * @downtime: maximum tolerable downtime for live migration, in nanoseconds + * @flags: fine-tuning flags, currently unused, use 0 We discussed that previously, obviously the nanosecond accuracy is

Re: [libvirt] [PATCH v2 1/5] Public virDomainMigrateSetMaxDowntime API

2010-03-19 Thread Daniel P. Berrange
On Fri, Mar 19, 2010 at 12:42:02PM +0100, Jiri Denemark wrote: +/** + * virDomainMigrateSetMaxDowntime: + * @domain: a domain object + * @downtime: maximum tolerable downtime for live migration, in nanoseconds + * @flags: fine-tuning flags, currently unused, use 0

Re: [libvirt] [PATCH v2 5/5] Add migrate-setmaxdowntime command to virsh

2010-03-19 Thread Jiri Denemark
+static const vshCmdOptDef opts_migrate_setmaxdowntime[] = { +{domain, VSH_OT_DATA, VSH_OFLAG_REQ, N_(domain name, id or uuid)}, +{downtime, VSH_OT_DATA, VSH_OFLAG_REQ, N_(maximum tolerable downtime (in nanoseconds) for migration)}, +{NULL, 0, 0, NULL} +}; Maybe for

Re: [libvirt] virStoragePoolDefParseString() fails with the following pool xml

2010-03-19 Thread Sharadha Prabhakar (3P)
I just added target path to pool XML. It doesn't resolve the issue. virStoragePoolDefParseString() returns NULL. -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: 19 March 2010 11:16 To: Sharadha Prabhakar (3P) Cc: libvir-list@redhat.com Subject: Re:

Re: [libvirt] [PATCH v2 5/5] Add migrate-setmaxdowntime command to virsh

2010-03-19 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 12:45:28PM +0100, Jiri Denemark wrote: +static const vshCmdOptDef opts_migrate_setmaxdowntime[] = { +{domain, VSH_OT_DATA, VSH_OFLAG_REQ, N_(domain name, id or uuid)}, +{downtime, VSH_OT_DATA, VSH_OFLAG_REQ, N_(maximum tolerable downtime (in

Re: [libvirt] Using callback under Windows compiling of libvirtlibrary

2010-03-19 Thread Dev.Atom
I have implemented the virEventRegisterImpl as in domain-event.c, I have the unmarshalled msg and another info : libvir: QEMU error : remoteDomainProcessEvent: unmarshalling msg libvir: Remote error : unknown program (received 54657374, expected 20008086) Any clue ? Best regards, Arnaud

[libvirt] [PATCH 00/13] Add support for all QEMU event notifications

2010-03-19 Thread Daniel P. Berrange
This series adds support for (nearly) all QEMU event notifications that are currently supported by the new JSON mode monitor. - Guest reboot - RTC adjustment - Watchdog firing - Block IO errors - Graphics client connect/disconnect It required two new public APIs, and a bunch of extra

[libvirt] [PATCH 02/13] Make internal domain events struct definitions private

2010-03-19 Thread Daniel P. Berrange
The virtual box driver was directly accesing the domain events structs instead of using the APIs provided. To prevent this kind of abuse, make the struct definitions private, forcing use of the internal APIs. This requires adding one extra internal API. * src/conf/domain_event.h,

[libvirt] [PATCH 01/13] Introduce a new public API for domain events

2010-03-19 Thread Daniel P. Berrange
The current API for domain events has a number of problems - Only allows for domain lifecycle change events - Does not allow the same callback to be registered multiple times - Does not allow filtering of events to a specific domain This introduces a new more general purpose domain events API

[libvirt] [PATCH 05/13] Support new event register/deregister APis in all drivers except remote

2010-03-19 Thread Daniel P. Berrange
The libvirtd daemon impl will need to switch over to using the new event APIs. To make this simpler, ensure all drivers currently providing events support both the new APIs and old APIs. * src/lxc/lxc_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/vbox/vbox_tmpl.c,

[libvirt] [PATCH 04/13] Add new internal domain events APIs for handling other event types

2010-03-19 Thread Daniel P. Berrange
The current internal domain events API tracks callbacks based on the function pointer, and only supports lifecycle events. This adds new internal APIs for registering callbacks for other event types. These new APIs are postfixed with the word 'ID' to indicate that they operated based on event ID,

[libvirt] [PATCH 09/13] Add support for an explicit guest reboot event

2010-03-19 Thread Daniel P. Berrange
The reboot event is not a normal lifecycle event, since the virtual machine on the host does not change state. Rather the guest OS is resetting the virtual CPUs. ie, the QEMU process does not restart. Thus, this does not belong in the current lifecycle events callback. This introduces a new event

[libvirt] [PATCH 03/13] Refactor domain events to handle multiple event types

2010-03-19 Thread Daniel P. Berrange
The internal domain events APIs are designed to handle the lifecycle events. This needs to be refactored to allow arbitrary new event types to be handled. * The signature of virDomainEventDispatchFunc changes to use virConnectDomainEventGenericCallback instead of the lifecycle event

[libvirt] [PATCH 12/13] Add support for an explicit IO error event

2010-03-19 Thread Daniel P. Berrange
This introduces a new event type VIR_DOMAIN_EVENT_ID_IO_ERROR This event includes the action that is about to be taken as a result of the watchdog triggering typedef enum { VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0, VIR_DOMAIN_EVENT_IO_ERROR_PAUSE, VIR_DOMAIN_EVENT_IO_ERROR_REPORT,

[libvirt] [PATCH 06/13] Remote driver daemon impl of new event API

2010-03-19 Thread Daniel P. Berrange
This wires up the remote driver to handle the new events APIs. The public API allows an application to request a callback filters events to a specific domain object, and register multiple callbacks for the same event type. On the wire there are two strategies for this - Register multiple

[libvirt] [PATCH 07/13] Convert domain events example to new API

2010-03-19 Thread Daniel P. Berrange
Convert the domain events example program to use the new events APIs for one of its callback registrations to demo the new API and interoperability with the old API. * examples/domain-events/events-c/event-test.c: Convert to new events API --- examples/domain-events/events-c/event-test.c |

[libvirt] [PATCH 13/13] Add domain events for graphics network clients

2010-03-19 Thread Daniel P. Berrange
This introduces a new event type VIR_DOMAIN_EVENT_ID_GRAPHICS The same event can be emitted in 3 scenarioes typedef enum { VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0, VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE, VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT, } virDomainEventGraphicsPhase;

[libvirt] [PATCH 08/13] Rename domain lifecycle event message

2010-03-19 Thread Daniel P. Berrange
To avoid confusion, rename the current REMOTE_PROC_DOMAIN_EVENT message to REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE. This does not cause ABI problems, since the names are only relevant at the source code level. On the wire they encoding is a plain integer whose value does not change *

[libvirt] [PATCH 10/13] Add support for an explicit RTC change event

2010-03-19 Thread Daniel P. Berrange
This introduces a new event type VIR_DOMAIN_EVENT_ID_RTC_CHANGE This event includes the new UTC offset measured in seconds. Thus there is a new callback definition for this event type typedef void (*virConnectDomainEventRTCChangeCallback)(virConnectPtr conn,

[libvirt] [PATCH 11/13] Add support for an explicit watchdog event

2010-03-19 Thread Daniel P. Berrange
This introduces a new event type VIR_DOMAIN_EVENT_ID_WATCHDOG This event includes the action that is about to be taken as a result of the watchdog triggering typedef enum { VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0, VIR_DOMAIN_EVENT_WATCHDOG_PAUSE, VIR_DOMAIN_EVENT_WATCHDOG_RESET,

Re: [libvirt] [PATCH v2 0/5] Introduce virDomainMigrateSetMaxDowntime API

2010-03-19 Thread Jiri Denemark
This API call sets maximum tolerable time for which the domain is allowed to be paused at the end of live migration. It's supposed to be called while the domain is being live-migrated as a reaction to migration progress. Changes in version 3: - use milliseconds instead of nanoseconds both

[libvirt] [PATCH] virDomainDiskDefAssignAddress: return int, not void

2010-03-19 Thread Jim Meyering
Per discussion a week or so ago, here's a fix for virDomainDiskDefAssignAddress. However, this change is incomplete, because making that function reject erroneous input has exposed problems elsewhere. For starters, this change causes three previously passing tests to fail: TEST: virshtest

Re: [libvirt] [PATCHv2] Support vhost-net mode at qemu startup for virtio network devices.

2010-03-19 Thread Daniel Veillard
On Thu, Mar 18, 2010 at 04:19:10PM -0400, Laine Stump wrote: Attempt to turn on vhost-net mode for devices of type NETWORK, BRIDGE, and DIRECT (macvtap). * src/qemu/qemu_conf.h: add vhostfd to qemuBuildHostNetStr prototype add qemudOpenVhostNet prototype

Re: [libvirt] [PATCH v2 2/5] Wire protocol and dispatcher for virDomainMigrateSetMaxDowntime

2010-03-19 Thread Eric Blake
On 03/19/2010 04:37 AM, Daniel Veillard wrote: -# define REMOTE_STRING_MAX 65536 +#include internal.h +#include arpa/inet.h +#define REMOTE_MESSAGE_MAX 262144 +#define REMOTE_MESSAGE_HEADER_MAX 24 +#define REMOTE_MESSAGE_PAYLOAD_MAX 262120 +#define REMOTE_STRING_MAX 65536 painful

Re: [libvirt] [PATCH v2 0/5] Introduce virDomainMigrateSetMaxDowntime API

2010-03-19 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 04:51:11PM +0100, Jiri Denemark wrote: This API call sets maximum tolerable time for which the domain is allowed to be paused at the end of live migration. It's supposed to be called while the domain is being live-migrated as a reaction to migration progress.

Re: [libvirt] [PATCH] virDomainDiskDefAssignAddress: return int, not void

2010-03-19 Thread Daniel P. Berrange
On Fri, Mar 19, 2010 at 05:00:21PM +0100, Jim Meyering wrote: Per discussion a week or so ago, here's a fix for virDomainDiskDefAssignAddress. However, this change is incomplete, because making that function reject erroneous input has exposed problems elsewhere. For starters, this change

Re: [libvirt] [PATCH 01/13] Introduce a new public API for domain events

2010-03-19 Thread Eric Blake
On 03/19/2010 09:38 AM, Daniel P. Berrange wrote: Since different event types can received different data in the callback, the API is defined with a generic callback. Specific events will each have a custom signature for their callback. Thus when registering an event it is neccessary to cast

Re: [libvirt] [PATCH 01/13] Introduce a new public API for domain events

2010-03-19 Thread Daniel P. Berrange
On Fri, Mar 19, 2010 at 11:06:40AM -0600, Eric Blake wrote: On 03/19/2010 09:38 AM, Daniel P. Berrange wrote: Since different event types can received different data in the callback, the API is defined with a generic callback. Specific events will each have a custom signature for their

[libvirt] libvirt 0.7.7 and kvm 72

2010-03-19 Thread Guido Günther
Hi, kvm 72 uses info migration instead of info migrate: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574272 It's not only that, the output format of these commands differs too so that virsh save breaks. Stefan suggested the attached improved error message. Cheers, -- Guido From

Re: [libvirt] libvirt 0.7.7 and kvm 72

2010-03-19 Thread Guido Günther
On Fri, Mar 19, 2010 at 06:19:02PM +0100, Guido Günther wrote: Hi, kvm 72 uses info migration instead of info migrate: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574272 It's not only that, the output format of these commands differs too so that virsh save breaks. Stefan suggested

Re: [libvirt] [PATCH] virDomainDiskDefAssignAddress: return int, not void

2010-03-19 Thread Jim Meyering
Daniel P. Berrange wrote: On Fri, Mar 19, 2010 at 05:00:21PM +0100, Jim Meyering wrote: Per discussion a week or so ago, here's a fix for virDomainDiskDefAssignAddress. However, this change is incomplete, because making that function reject erroneous input has exposed problems elsewhere. For

Re: [libvirt] [PATCH 0/9] Rebased volume wiping API patches

2010-03-19 Thread Dave Allan
On 03/17/2010 06:33 AM, Daniel P. Berrange wrote: On Mon, Mar 15, 2010 at 10:13:22PM -0400, David Allan wrote: Nobody ack'd (because of general lack of time, I hope) what I think is the final version of the volume wiping API patches, so here is the set again, rebased to the current head. I

[libvirt] Bug 526913 - libvirt does not lock disk files

2010-03-19 Thread Ric Foster
https://bugzilla.redhat.com/show_bug.cgi?id=526913 Will this bug get fixed? I had hoped the using CLVM would keep the guest disk image from getting corrupted if a running guest was inadvertently started on another cluster node. -- libvir-list mailing list libvir-list@redhat.com