Re: [libvirt] [PATCH] qemuDriver: check for migrate command

2008-07-24 Thread Daniel Veillard
On Wed, Jul 23, 2008 at 03:20:31PM -0400, Guido Günther wrote: > Hi, > qemu doesn't know about "migrate" used to save a qemu/kvm domain. > Current CVS fails silently - this patch checks if the command if > available. I would have expected the previous qemudMonitorCommand() to fail instead. Patch

Re: [libvirt] [PATCH] qemudDomainCreate check if domain is already active

2008-07-24 Thread Daniel Veillard
On Thu, Jul 24, 2008 at 12:49:13AM -0400, Guido Günther wrote: > Hi, > currently virsh create foo.xml overwrites running domains. In case of > qemu this leaves detached qemu processes around and the domain creation > fails later on being unable to start other domains afterwards - not > nice. > Atta

Re: [libvirt] xml format for openvz driver

2008-07-24 Thread Evgeniy Sokolov
I just want to summarize XML for OpenVZ will looks like 209 8dea22b31d52d8f32516782e98ab8fa0 //for bridge

Re: [libvirt] Couple qemu driver bugs after xml refactoring

2008-07-24 Thread Daniel P. Berrange
On Tue, Jul 22, 2008 at 05:23:00PM +0100, Daniel P. Berrange wrote: > On Tue, Jul 22, 2008 at 04:53:19PM +0100, Daniel P. Berrange wrote: > > On Tue, Jul 22, 2008 at 11:42:03AM -0400, Cole Robinson wrote: > > > Hi all, > > > > > > I've hit a couple bugs in the qemu driver with the recent > > > dom

Re: [libvirt] Double free in test driver error handling (0.4.4)

2008-07-24 Thread Daniel P. Berrange
On Mon, Jul 21, 2008 at 07:03:29PM +0200, T?th Istv?n wrote: > While debugging the libvirt-java error handling problem, Ive found that > if I call the test driver with a bad uri, the application instantly > bombs with a > double free error. Try out this patch: diff -r 59140de4e7a9 src/test.c --

Re: [libvirt] [PATCH] qemudDomainCreate check if domain is already active

2008-07-24 Thread Daniel P. Berrange
On Thu, Jul 24, 2008 at 12:49:13AM -0400, Guido G?nther wrote: > Hi, > currently virsh create foo.xml overwrites running domains. In case of > qemu this leaves detached qemu processes around and the domain creation > fails later on being unable to start other domains afterwards - not > nice. > Atta

[libvirt] Virt-Manager, libvirt & TLS

2008-07-24 Thread Geoff Wiener
Hi! This is my first post to either of these list, I have been lurking, (sorry to cross post but I don't know if this is a virt-manager or libvirt question). So first off thank you to everyone for all your efforts. I think libvirt and virt-manager are excellent! I've built a pair of server

[libvirt] PATCH Remove unused openvz code

2008-07-24 Thread Daniel P. Berrange
The openvz driver currrently generates a compile warning due to this unused function. If no one objects I'll shortly remove it. I intend to turn on openvz and LXC driver compilation for the nightly builds to get more testing coverage Daniel diff -r 59140de4e7a9 src/openvz_driver.c --- a/src/ope

Re: [libvirt] xml format for openvz driver

2008-07-24 Thread Daniel P. Berrange
On Thu, Jul 24, 2008 at 11:48:16AM +0400, Evgeniy Sokolov wrote: > I just want to summarize > XML for OpenVZ will looks like > > > 209 > 8dea22b31d52d8f32516782e98ab8fa0 > > > THis will also get an element:

Re: [libvirt] Couple qemu driver bugs after xml refactoring

2008-07-24 Thread Daniel P. Berrange
On Tue, Jul 22, 2008 at 04:53:19PM +0100, Daniel P. Berrange wrote: > On Tue, Jul 22, 2008 at 11:42:03AM -0400, Cole Robinson wrote: > > Hi all, > > > > I've hit a couple bugs in the qemu driver with the recent > > domain xml refactoring. I've debugged them but in both > > cases I'm not sure what

Re: [libvirt] [PATCH] qemuDriver: check for migrate command

2008-07-24 Thread Richard W.M. Jones
On Wed, Jul 23, 2008 at 03:20:31PM -0400, Guido Günther wrote: > Hi, > qemu doesn't know about "migrate" used to save a qemu/kvm domain. > Current CVS fails silently - this patch checks if the command if > available. There's a patch floating around for KVM migration (see previous postings on the l

[libvirt] Re: [et-mgmt-tools] Virt-Manager, libvirt & TLS

2008-07-24 Thread Daniel P. Berrange
On Thu, Jul 24, 2008 at 11:13:28AM +0100, Geoff Wiener wrote: > Hi! > > > > This is my first post to either of these list, I have been lurking, > (sorry to cross post but I don't know if this is a virt-manager or > libvirt question). So first off thank you to everyone for all your > efforts.

Re: [libvirt] PATCH: 8/14: Remove dead Xen code

2008-07-24 Thread Daniel Veillard
On Tue, Jul 08, 2008 at 05:37:37PM +0100, Daniel P. Berrange wrote: > This patch is a cleanup to prepare the way for the next set of > Xen related patches. It basically removes a bunch of no-op or > unused code. okay, +1, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization

Re: [libvirt] PATCH: 9/14: Convert XenD XML generator to generic API

2008-07-24 Thread Daniel Veillard
On Tue, Jul 08, 2008 at 05:38:41PM +0100, Daniel P. Berrange wrote: > This replaces the code which converts from the SEXPR into XML > with code which converts from the SEXPR to virDomainDefPtr > object. We then simply call virDomainDefFormat() to generate > the XML. The generated XML is thus guaren

Re: [libvirt] PATCH: 9/14: Convert XenD XML generator to generic API

2008-07-24 Thread Daniel P. Berrange
On Thu, Jul 24, 2008 at 08:24:32AM -0400, Daniel Veillard wrote: > On Tue, Jul 08, 2008 at 05:38:41PM +0100, Daniel P. Berrange wrote: > > -const char *boot = sexpr_node(node, "domain/image/hvm/boot"); > > -if ((boot != NULL) && (boot[0] != 0)) { > > -while

Re: [libvirt] PATCH: 9/14: Convert XenD XML generator to generic API

2008-07-24 Thread Daniel Veillard
On Thu, Jul 24, 2008 at 02:24:43PM +0100, Daniel P. Berrange wrote: > On Thu, Jul 24, 2008 at 08:24:32AM -0400, Daniel Veillard wrote: > You are correct that we are removing

Re: [libvirt] PATCH: 10/14: Convert XenD XML parser to generic API

2008-07-24 Thread Daniel Veillard
On Tue, Jul 08, 2008 at 05:39:27PM +0100, Daniel P. Berrange wrote: > This replaces the code which converts from the XML into SEXPR > with code which converts from the virDomainDefPtr object to a > SEXPR. We then simply use virDomainDefParseString() to generate > the initial virDomainDefPtr. This m

Re: [libvirt] PATCH: 11/14: Change XM driver in-memory objects

2008-07-24 Thread Daniel Veillard
On Tue, Jul 08, 2008 at 05:40:17PM +0100, Daniel P. Berrange wrote: > This is a refactoring of the XM driver. Previously we would store > the virConfPtr objects as our master 'in memory' representation > of inactive domains. This switch it over to using virDomainDefPtr > objects instead. The code f

Re: [libvirt] [PATCH] qemudDomainCreate check if domain is already active

2008-07-24 Thread Guido Günther
On Thu, Jul 24, 2008 at 10:01:32AM +0100, Daniel P. Berrange wrote: > > diff --git a/src/qemu_driver.c b/src/qemu_driver.c > > index b84bdf4..0ad72ae 100644 > > --- a/src/qemu_driver.c > > +++ b/src/qemu_driver.c > > @@ -1978,6 +1978,15 @@ static virDomainPtr qemudDomainCreate(virConnectPtr > > co

Re: [libvirt] [PATCH] qemudDomainCreate check if domain is already active

2008-07-24 Thread Daniel P. Berrange
On Thu, Jul 24, 2008 at 10:41:31AM -0400, Guido G?nther wrote: > On Thu, Jul 24, 2008 at 10:01:32AM +0100, Daniel P. Berrange wrote: > > > diff --git a/src/qemu_driver.c b/src/qemu_driver.c > > > index b84bdf4..0ad72ae 100644 > > > --- a/src/qemu_driver.c > > > +++ b/src/qemu_driver.c > > > @@ -197

Re: [libvirt] PATCH: 10/14: Convert XenD XML parser to generic API

2008-07-24 Thread Daniel P. Berrange
On Thu, Jul 24, 2008 at 09:32:41AM -0400, Daniel Veillard wrote: > On Tue, Jul 08, 2008 at 05:39:27PM +0100, Daniel P. Berrange wrote: > > > static virCapsPtr > > -xenHypervisorBuildCapabilities(virConnectPtr conn, > > - const char *hostmachine, > > +xenHypervisorBui

Re: [libvirt] PATCH: 12/14: Convert XM driver XML formatter to generic API

2008-07-24 Thread Daniel Veillard
On Tue, Jul 08, 2008 at 05:41:01PM +0100, Daniel P. Berrange wrote: > This replaces the code which converts from virConfPtr objects > into XML, with code which converts from virConfPtr objects > straight into virDomainDefPtr objects. A few more XML changes > are needed in the test suite to take acc

Re: [libvirt] PATCH: 13/14: Convert XM driver XML parser to generic API

2008-07-24 Thread Daniel Veillard
On Tue, Jul 08, 2008 at 05:41:46PM +0100, Daniel P. Berrange wrote: > > This completes the Xen driver work, replacing the code which > converts from XML into virConfPtr objects, with code which > converts from virDomainDefPtr into virConfPtr objects. The > XML parsing is now fully handled by the g

Re: [libvirt] PATCH: 14/14: Report XML errors against virConnectPtr

2008-07-24 Thread Daniel Veillard
On Tue, Jul 08, 2008 at 05:42:36PM +0100, Daniel P. Berrange wrote: > The generic XML parsing routines can generate various > errors. We were not passing a virConnectPtr object into > any of them, so the errors were not propagated back to > the calling app correctly. This fixes that problem Exce

Re: [libvirt] PATCH: 11/14: Change XM driver in-memory objects

2008-07-24 Thread Daniel P. Berrange
On Thu, Jul 24, 2008 at 10:44:18AM -0400, Daniel Veillard wrote: > On Tue, Jul 08, 2008 at 05:40:17PM +0100, Daniel P. Berrange wrote: > > This is a refactoring of the XM driver. Previously we would store > > the virConfPtr objects as our master 'in memory' representation > > of inactive domains. T

[libvirt] [PATCH] fix Relax-NG pattern matching

2008-07-24 Thread John Levon
Don't use unescaped meta-characters. Signed-off-by: John Levon <[EMAIL PROTECTED]> Index: docs/libvirt.rng === RCS file: /data/cvs/libvirt/docs/libvirt.rng,v retrieving revision 1.9 diff -u -r1.9 libvirt.rng --- docs/libvirt.rng

Re: [libvirt] PATCH: 12/14: Convert XM driver XML formatter to generic API

2008-07-24 Thread Daniel P. Berrange
On Thu, Jul 24, 2008 at 11:53:48AM -0400, Daniel Veillard wrote: > On Tue, Jul 08, 2008 at 05:41:01PM +0100, Daniel P. Berrange wrote: > > This replaces the code which converts from virConfPtr objects > > into XML, with code which converts from virConfPtr objects > > straight into virDomainDefPtr o

Re: [libvirt] PATCH: 3/14: Generic domain XML parser/formatter

2008-07-24 Thread Daniel P. Berrange
On Fri, Jul 18, 2008 at 06:29:15PM +0200, Jim Meyering wrote: > > Looks like this can be replaced with virDomainChrTypeFromString. > > > +if (STREQ(type, "null")) > > +def->type = VIR_DOMAIN_CHR_TYPE_NULL; > > +else if (STREQ(type, "vc")) > > +def->type = VI

[libvirt] Re: kexec/kdump of a kvm guest?

2008-07-24 Thread Mike Snitzer
On Thu, Jul 24, 2008 at 9:15 AM, Vivek Goyal <[EMAIL PROTECTED]> wrote: > On Thu, Jul 24, 2008 at 07:49:59AM -0400, Mike Snitzer wrote: >> On Thu, Jul 24, 2008 at 4:39 AM, Alexander Graf <[EMAIL PROTECTED]> wrote: >> > As you're stating that the host kernel breaks with kvm modules loaded, >> > ma

RE: [libvirt] Re: [et-mgmt-tools] Virt-Manager, libvirt & TLS

2008-07-24 Thread Geoff Wiener
Hi Daniel; Thanks for the quick response and for your help, this is working now. If you are interested in the gory details they are detailed below, at least I'll document them here for the sake of others on the list. See "Gory Details - start" While I have your attention I have another ques

[libvirt] [PATCH] qemudDomainCreate: also check uuid

2008-07-24 Thread Guido Günther
On Thu, Jul 24, 2008 at 04:12:05PM +0100, Daniel P. Berrange wrote: > On Thu, Jul 24, 2008 at 10:41:31AM -0400, Guido G?nther wrote: > > On Thu, Jul 24, 2008 at 10:01:32AM +0100, Daniel P. Berrange wrote: [..snip..] > > > You need to check for UUID clash too. > > Indeed. But before fixing this I w

[libvirt] [PATCH] qemudOpenMonitor: fix open(2) error check

2008-07-24 Thread Guido Günther
Hi, open returns -1 on failure. Pointed out by Guido Trotter on: http://bugs.debian.org/492250 Patch against current CVS attached. -- Guido --- src/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 8015b63..2539

[libvirt] Re: kexec/kdump of a kvm guest?

2008-07-24 Thread Anthony Liguori
Mike Snitzer wrote: On Thu, Jul 24, 2008 at 9:15 AM, Vivek Goyal <[EMAIL PROTECTED]> wrote: On Thu, Jul 24, 2008 at 07:49:59AM -0400, Mike Snitzer wrote: On Thu, Jul 24, 2008 at 4:39 AM, Alexander Graf <[EMAIL PROTECTED]> wrote: I can do further research but welcome others' insi

[libvirt] [PATCH]: libvirt.h: very xen centric

2008-07-24 Thread Guido Günther
Hi, while reading through that I noticed libvirt.h is quiet xen centric. Purely cosmetic patch attached, -- Guido --- include/libvirt/libvirt.h | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/libvirt/libvirt.h b/include/libvirt/libvirt.h index 8980bc2..9c

[libvirt] [PATCH]: qemu_driver: convert uuid to string in error messages

2008-07-24 Thread Guido Günther
Hi, qemu_driver misses some conversions to a char* before printing the uuid. Possible fix attached. Cheers, -- Guido --- src/qemu_driver.c | 25 - 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 2539d78..2983b9c

Re: [libvirt] PATCH: 10/14: Convert XenD XML parser to generic API

2008-07-24 Thread Daniel Veillard
On Thu, Jul 24, 2008 at 04:49:50PM +0100, Daniel P. Berrange wrote: > On Thu, Jul 24, 2008 at 09:32:41AM -0400, Daniel Veillard wrote: > > On Tue, Jul 08, 2008 at 05:39:27PM +0100, Daniel P. Berrange wrote: > > > > > static virCapsPtr > > > -xenHypervisorBuildCapabilities(virConnectPtr conn, > >

Re: [libvirt] PATCH: 11/14: Change XM driver in-memory objects

2008-07-24 Thread Daniel Veillard
On Thu, Jul 24, 2008 at 05:10:55PM +0100, Daniel P. Berrange wrote: > On Thu, Jul 24, 2008 at 10:44:18AM -0400, Daniel Veillard wrote: > > On Tue, Jul 08, 2008 at 05:40:17PM +0100, Daniel P. Berrange wrote: > > > This is a refactoring of the XM driver. Previously we would store > > > the virConfPtr

Re: [libvirt] PATCH: 12/14: Convert XM driver XML formatter to generic API

2008-07-24 Thread Daniel Veillard
On Thu, Jul 24, 2008 at 06:03:24PM +0100, Daniel P. Berrange wrote: > On Thu, Jul 24, 2008 at 11:53:48AM -0400, Daniel Veillard wrote: > > On Tue, Jul 08, 2008 at 05:41:01PM +0100, Daniel P. Berrange wrote: > > > This replaces the code which converts from virConfPtr objects > > > into XML, with cod

[libvirt] Re: kexec/kdump of a kvm guest?

2008-07-24 Thread Vivek Goyal
On Thu, Jul 24, 2008 at 03:03:33PM -0400, Mike Snitzer wrote: > On Thu, Jul 24, 2008 at 9:15 AM, Vivek Goyal <[EMAIL PROTECTED]> wrote: > > On Thu, Jul 24, 2008 at 07:49:59AM -0400, Mike Snitzer wrote: > >> On Thu, Jul 24, 2008 at 4:39 AM, Alexander Graf <[EMAIL PROTECTED]> wrote: > > >> > As you'

Re: [libvirt] [PATCH] fix Relax-NG pattern matching

2008-07-24 Thread Daniel Veillard
On Thu, Jul 24, 2008 at 05:40:33PM +0100, John Levon wrote: > > Don't use unescaped meta-characters. > > Signed-off-by: John Levon <[EMAIL PROTECTED]> Hum, right :-) Applied and commited, thanks ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard