[libvirt] Small regression with domain refactoring

2008-07-30 Thread Chris Lalancette
Hey, I've run into another regression when using a KVM guest with libvirt tip. If I have a guest with some XML: graphics type='vnc' port='-1' listen='127.0.0.1'/ Then when I virsh define that guest, it ends up looking like: graphics type='vnc' port='-1' autoport='yes'

Re: [libvirt] [PATCH/RFC]: file backed usb massstorage

2008-07-30 Thread Daniel P. Berrange
On Mon, Jul 28, 2008 at 11:02:45AM -0400, Guido G?nther wrote: On Fri, Jul 25, 2008 at 04:17:30PM -0400, Guido Günther wrote: attached is some basic support for host device passthrough. It enables you to passthrough usb devices in qemu/kvm via: On top of the hostdev passthrough (but it's

Re: [libvirt] [PATCH] qemud: move check for polkit before config file check

2008-07-30 Thread Daniel Veillard
On Tue, Jul 29, 2008 at 11:11:16AM +0100, Daniel P. Berrange wrote: On Sat, Jul 26, 2008 at 07:02:59PM -0400, Guido G?nther wrote: Hi, Without this patch and without a /etc/libvirt/libvirt.conf config file the default policy for running the daemon as non root user is still polkit which is

Re: [libvirt] [PATCH] Fix logical storage pool operation on SLES10-SP2

2008-07-30 Thread Daniel Veillard
On Mon, Jul 28, 2008 at 03:35:30PM -0400, David Lively wrote: The attached patch adjusts for a difference in behavior in the LVM utilities 'lvs' and 'vgs'. The SLES10-SP2 versions of these (and presumably others) append a trailing separator. This patch simply adjusts the regexps to allow

Re: [libvirt] [PATCH] virsh edit command

2008-07-30 Thread Daniel P. Berrange
On Wed, Jul 30, 2008 at 04:14:30AM -0400, Daniel Veillard wrote: On Tue, Jul 29, 2008 at 05:55:13PM +0100, Richard W.M. Jones wrote: On Tue, Jul 29, 2008 at 05:50:30PM +0100, John Levon wrote: On Tue, Jul 29, 2008 at 05:46:34PM +0100, Richard W.M. Jones wrote: Do you think a graphical

Re: [libvirt] PATCH: Support container XML enhancements

2008-07-30 Thread Daniel Veillard
On Tue, Jul 29, 2008 at 04:20:14PM +0100, Daniel P. Berrange wrote: This is something I previously submitted as part of one of the LXC patches, but I figure it makes sense on its own, since OpenVZ needs this now too. This adds two new XML elements to the domain XML format: Yep this was

Re: [libvirt] libvirt log

2008-07-30 Thread Daniel P. Berrange
On Tue, Jul 29, 2008 at 07:44:03PM -0400, Steve Oliphant wrote: I have a quick question. I am trying to debug a remote access problem and have set the following parameters: # Override the default config file #LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf # Listen for TCP/IP connections #

Re: [libvirt] Small regression with domain refactoring

2008-07-30 Thread Daniel P. Berrange
On Wed, Jul 30, 2008 at 09:26:53AM +0200, Chris Lalancette wrote: Hey, I've run into another regression when using a KVM guest with libvirt tip. If I have a guest with some XML: graphics type='vnc' port='-1' listen='127.0.0.1'/ Then when I virsh define that guest, it ends up

Re: [libvirt] PATCH: Support container XML enhancements

2008-07-30 Thread Daniel P. Berrange
On Wed, Jul 30, 2008 at 05:04:25AM -0400, Daniel Veillard wrote: On Tue, Jul 29, 2008 at 04:20:14PM +0100, Daniel P. Berrange wrote: This is something I previously submitted as part of one of the LXC patches, but I figure it makes sense on its own, since OpenVZ needs this now too. This

[libvirt] [EMAIL PROTECTED]: [PATCH] autoport overrides actual VNC port number in dump-xml]

2008-07-30 Thread Daniel P. Berrange
Forwarding message that was sent to wrong list... - Forwarded message from Charles Duffy [EMAIL PROTECTED] - To: [EMAIL PROTECTED] From: Charles Duffy [EMAIL PROTECTED] Subject: [PATCH] autoport overrides actual VNC port number in dump-xml Date: Wed, 30 Jul 2008 00:32:57

Re: [libvirt] [PATCH] qemudDomainCreate: also check uuid

2008-07-30 Thread Daniel Veillard
On Wed, Jul 30, 2008 at 12:05:56AM -0500, Charles Duffy wrote: It appears that this patch was applied (in commit 45616162db2d1e807dbe70e60c67cb701cbd06d8) with the virDomainIsActive(vm) checks removed from qemudDomainCreate, such that we fail out with domain [...] is already defined and

Re: [libvirt] [EMAIL PROTECTED]: [PATCH] autoport overrides actual VNC port number in dump-xml]

2008-07-30 Thread Daniel Veillard
On Wed, Jul 30, 2008 at 10:17:59AM +0100, Daniel P. Berrange wrote: Forwarding message that was sent to wrong list... Hum, that sounds right, the logic got twisted, the presence of a defined port should otherride the autoport settings, right ? Daniel case VIR_DOMAIN_GRAPHICS_TYPE_VNC:

Re: [libvirt] [EMAIL PROTECTED]: [PATCH] autoport overrides actual VNC port number in dump-xml]

2008-07-30 Thread Daniel P. Berrange
On Wed, Jul 30, 2008 at 05:33:22AM -0400, Daniel Veillard wrote: On Wed, Jul 30, 2008 at 10:17:59AM +0100, Daniel P. Berrange wrote: Forwarding message that was sent to wrong list... Hum, that sounds right, the logic got twisted, the presence of a defined port should otherride the

Re: [libvirt] [PATCH] virsh edit command

2008-07-30 Thread Daniel Veillard
On Tue, Jul 29, 2008 at 01:27:42PM +0100, Richard W.M. Jones wrote: but with much more sanity checking. The editor is $EDITOR or vi, and it does the right thing if the user doesn't modify the file, or if another user edits the configuration at the same time. [...] +/* Compare original XML

Re: [libvirt] [EMAIL PROTECTED]: [PATCH] autoport overrides actual VNC port number in dump-xml]

2008-07-30 Thread Daniel Veillard
On Wed, Jul 30, 2008 at 10:43:35AM +0100, Daniel P. Berrange wrote: On Wed, Jul 30, 2008 at 05:33:22AM -0400, Daniel Veillard wrote: On Wed, Jul 30, 2008 at 10:17:59AM +0100, Daniel P. Berrange wrote: Forwarding message that was sent to wrong list... Hum, that sounds right, the logic

Re: [libvirt] [PATCH] virsh edit command

2008-07-30 Thread Richard W.M. Jones
On Wed, Jul 30, 2008 at 05:43:44AM -0400, Daniel Veillard wrote: Hum, I would check for basic well-formedness here because it just too easy to break the XML file while editing with a text editor But the subsequent call to virDomainDefineXML should fail if the XML isn't well-formed. Rich. --

[libvirt] [PATCH] virsh edit, virsh net-edit, virsh pool-edit

2008-07-30 Thread Richard W.M. Jones
This implements 'virsh edit', 'virsh net-edit' and 'virsh pool-edit' commands. Previous discussion of this patch was in this thread: https://www.redhat.com/archives/libvir-list/2008-July/thread.html#00434 Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones

Re: [libvirt] [PATCH] virsh edit command

2008-07-30 Thread Daniel Veillard
On Wed, Jul 30, 2008 at 10:56:48AM +0100, Richard W.M. Jones wrote: On Wed, Jul 30, 2008 at 05:43:44AM -0400, Daniel Veillard wrote: Hum, I would check for basic well-formedness here because it just too easy to break the XML file while editing with a text editor But the subsequent call

Re: [libvirt] [PATCH] virsh edit command

2008-07-30 Thread Richard W.M. Jones
On Wed, Jul 30, 2008 at 06:04:23AM -0400, Daniel Veillard wrote: On Wed, Jul 30, 2008 at 10:56:48AM +0100, Richard W.M. Jones wrote: On Wed, Jul 30, 2008 at 05:43:44AM -0400, Daniel Veillard wrote: Hum, I would check for basic well-formedness here because it just too easy to break the

Re: [libvirt] [PATCH] virsh edit command

2008-07-30 Thread Daniel P. Berrange
On Wed, Jul 30, 2008 at 07:54:46AM -0400, Daniel Veillard wrote: On Wed, Jul 30, 2008 at 12:49:20PM +0100, Richard W.M. Jones wrote: On Wed, Jul 30, 2008 at 06:04:23AM -0400, Daniel Veillard wrote: On Wed, Jul 30, 2008 at 10:56:48AM +0100, Richard W.M. Jones wrote: On Wed, Jul 30, 2008

Re: [libvirt] libvirt log

2008-07-30 Thread Steve Oliphant
Daniel: Thanks for the info Sorry for the duplicate message. Steve Date sent: Wed, 30 Jul 2008 10:10:16 +0100 From: Daniel P. Berrange [EMAIL PROTECTED] Subject:Re: [libvirt] libvirt log To: [EMAIL PROTECTED] Copies to:

[libvirt] [PATCH] Detailed XML errors when XML is not well-formed

2008-07-30 Thread Richard W.M. Jones
This patch changes the implementations lots of functions which parse XML documents, so that if the XML document is not well-formed then we get detailed error messages. The general form of the change is: static void catchXMLError (void *ctx, const char *msg ATTRIBUTE_UNUSED, ...) {

Re: [libvirt] [PATCH] Detailed XML errors when XML is not well-formed

2008-07-30 Thread Daniel P. Berrange
On Wed, Jul 30, 2008 at 03:49:17PM +0100, Richard W.M. Jones wrote: This patch changes the implementations lots of functions which parse XML documents, so that if the XML document is not well-formed then we get detailed error messages. The general form of the change is: static void

Re: [libvirt] libvirt log

2008-07-30 Thread Steve Oliphant
Date sent: Wed, 30 Jul 2008 10:10:16 +0100 From: Daniel P. Berrange [EMAIL PROTECTED] Subject:Re: [libvirt] libvirt log To: [EMAIL PROTECTED] Copies to: libvir-list@redhat.com Send reply to: Daniel P. Berrange

[libvirt] PATCH: Validate all test suite XML files against schema

2008-07-30 Thread Daniel P. Berrange
After frequent prompting from John I've implemented a small test case to validate all the domain XML files we have in the test suite against the defined RNG schema. This showed one minor bug in the schema :-) Daniel diff -r c44225477420 docs/libvirt.rng --- a/docs/libvirt.rng Wed Jul 30

Re: [libvirt] [PATCH] Detailed XML errors when XML is not well-formed

2008-07-30 Thread Daniel Veillard
On Wed, Jul 30, 2008 at 03:57:57PM +0100, Daniel P. Berrange wrote: On Wed, Jul 30, 2008 at 03:49:17PM +0100, Richard W.M. Jones wrote: This patch changes the implementations lots of functions which parse XML documents, so that if the XML document is not well-formed then we get detailed

Re: [libvirt] PATCH: Validate all test suite XML files against schema

2008-07-30 Thread Daniel Veillard
On Wed, Jul 30, 2008 at 04:20:17PM +0100, Daniel P. Berrange wrote: After frequent prompting from John I've implemented a small test case to validate all the domain XML files we have in the test suite against the defined RNG schema. This showed one minor bug in the schema :-) Great, +1 !

[libvirt] [PATCH 0/2] Detailed XML errors (with thread-local storage this time)

2008-07-30 Thread Richard W.M. Jones
I've just seen Daniel Veillard's message about the '_private' field. In the meantime here is a solution using thread-local storage implemented on top of pthreads, which may be of interest. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my OCaml

[libvirt] [PATCH 1/2] Thread-local global variables

2008-07-30 Thread Richard W.M. Jones
This patch adds macros for doing thread-local global variables. It is implemented using POSIX threads, and if those aren't available then the variables just turn into real global variables. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts

[libvirt] [PATCH 2/2] Detailed XML errors

2008-07-30 Thread Richard W.M. Jones
This implements the XML errors using thread-local storage to store the connection. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into

[libvirt] [PATCH] Detailed XML errors using the _private field

2008-07-30 Thread Richard W.M. Jones
Here is a patch which uses the _private field to store the virConnectPtr. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen

Re: [libvirt] [PATCH] Detailed XML errors using the _private field

2008-07-30 Thread Daniel P. Berrange
On Wed, Jul 30, 2008 at 05:23:50PM +0100, Richard W.M. Jones wrote: Here is a patch which uses the _private field to store the virConnectPtr. This looks nicer than the pthread approach. I'd still like to see it report the first error, instead of last though. Index: src/domain_conf.c

[libvirt] [PATCH] Detailed XML errors version 4

2008-07-30 Thread Richard W.M. Jones
Updated to report only the first error, as suggested by Dan. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests.

[libvirt] default networking issues

2008-07-30 Thread Bryan Kearney
Need some help about where to look next. I am running a Fedora 9 machine, up to date on the releaed rpms. SELinux is permissive, iptables is stopped. I have followed the instructions for NAT forwarding [1]. When I launch a guest in virt manager it uses the default network, and is assigned an

Re: [libvirt] [PATCH] qemudDomainCreate: also check uuid

2008-07-30 Thread Charles Duffy
Daniel Veillard wrote: Are you disagreeing with the message (which your patch doesn't fix) or with the semantic of the check (and then why allow to create a domain reusing the UUID of another defined but not running domain, I can only see confusion or security problems in doing so) The act

Re: [libvirt] [PATCH] qemudDomainCreate: also check uuid

2008-07-30 Thread Charles Duffy
Blerg; the more complex patch I provided was dangerously wrong. Just applying the one that corrects the message WORKSFORME. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] default networking issues

2008-07-30 Thread Cole Robinson
Bryan Kearney wrote: Need some help about where to look next. I am running a Fedora 9 machine, up to date on the releaed rpms. SELinux is permissive, iptables is stopped. I have followed the instructions for NAT forwarding [1]. When I launch a guest in virt manager it uses the default

Re: [libvirt] default networking issues

2008-07-30 Thread Bryan Kearney
Cole Robinson wrote: Bryan Kearney wrote: Need some help about where to look next. I am running a Fedora 9 machine, up to date on the releaed rpms. SELinux is permissive, iptables is stopped. I have followed the instructions for NAT forwarding [1]. When I launch a guest in virt manager it

[libvirt] [PATCH] storage pool discovery

2008-07-30 Thread David Lively
Hi - The attached patch implements virConnectDiscoverStoragePools mostly as specified by Daniel Berrange in: http://www.redhat.com/archives/libvir-list/2008-February/msg00107.html Daniel wasn't happy with the interface for this function because it wasn't sufficiently general, so it currently