Re: [libvirt] Per user preference file

2010-11-11 Thread Justin Clift
On 11/11/2010, at 4:31 PM, Osier Yang wrote: the tls_client_cert and tls_client_key' are useful it will allow user put the cert and key files where he wants. Yeah, they're just suggestions for things I could think of at the time. :) I've previously found it annoying that virsh doesn't support

Re: [libvirt] auto-generating HACKING?

2010-11-11 Thread Matthias Bolte
2010/11/10 Eric Blake ebl...@redhat.com: Right now, docs/hacking.html.in contains more data than HACKING.  Back in March(! - commit d1c754168) the plan was to add a Makefile rule to autogenerate HACKING via some xml filter; but this still hasn't happened.  Can anyone with a better skill set

[libvirt] dommemstat return nothing

2010-11-11 Thread arnaud.champion
?Hi, I'm currently working on dommemstat C# bindings, and I have a little problem, with virsh under fedora or under linux, dommemstat return nothing. Is it normal ? A suggestion ? Regards, Arnaud Champion-- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] dommemstat return nothing

2010-11-11 Thread Alex Jia
arnaud.champ...@devatom.fr wrote: Hi, I'm currently working on dommemstat C# bindings, and I have a little problem, with virsh under fedora or under linux, dommemstat return nothing. Is it normal ? A suggestion ? Regards, Arnaud Champion

Re: [libvirt] Per user preference file

2010-11-11 Thread Daniel P. Berrange
On Thu, Nov 11, 2010 at 11:14:09AM +1100, Justin Clift wrote: Hi all, Had a thought the other night, about a possible approach to having a per user libvirt preferences file. How about, in the user's home directory, we have a single text file, say .libvirt-prefs, structured something

Re: [libvirt] dommemstat return nothing

2010-11-11 Thread Daniel P. Berrange
On Thu, Nov 11, 2010 at 10:37:08AM +0100, arnaud.champ...@devatom.fr wrote: ?Hi, I'm currently working on dommemstat C# bindings, and I have a little problem, with virsh under fedora or under linux, dommemstat return nothing. Is it normal ? A suggestion ? Yes, this functionality had to

[libvirt] Different approach to locking

2010-11-11 Thread Richard W.M. Jones
I get the feeling that the locking manager is meant to be a libvirt-internal API. I'll throw out this idea instead: How about making the concept of reserving a VM into a public libvirt API? /* Reserve 'dom'. * * flags: * VIR_DOMAIN_RESERVE_READONLY: reserve for read-only access

Re: [libvirt] Per user preference file

2010-11-11 Thread Richard W.M. Jones
I would agree with Dan that either this is libvirt-only, or it's a general virt-tools preferences file. However for virt-tools, good luck on getting everyone's agreement on how it should work (it's a serious technical as well as social challenge). Rich. -- Richard Jones, Virtualization Group,

Re: [libvirt] dommemstat return nothing

2010-11-11 Thread arnaud.champion
?Okay, thanks for the info. Regards, Arnaud -- From: Daniel P. Berrange berra...@redhat.com Sent: Thursday, November 11, 2010 11:40 AM To: arnaud.champ...@devatom.fr Cc: libvir-list@redhat.com Subject: Re: [libvirt] dommemstat return nothing On

Re: [libvirt] Per user preference file

2010-11-11 Thread Justin Clift
On 11/11/2010, at 9:33 PM, Daniel P. Berrange wrote: snip [virt-viewer] more_overrides=/value/foo This isn't really something virt-viewer wants to use either. As a graphical desktop application, any preferences will belong in GConf / GSettings, as does virt-manager. So I'd really just

Re: [libvirt] Per user preference file

2010-11-11 Thread Daniel P. Berrange
On Thu, Nov 11, 2010 at 10:33:57AM +, Daniel P. Berrange wrote: On Thu, Nov 11, 2010 at 11:14:09AM +1100, Justin Clift wrote: Hi all, Had a thought the other night, about a possible approach to having a per user libvirt preferences file. How about, in the user's home directory,

Re: [libvirt] Per user preference file

2010-11-11 Thread Justin Clift
On 11/11/2010, at 10:21 PM, Daniel P. Berrange wrote: snip So we really come down to a config file with the URI and a logfile. Is this any better than just setting LIBVIRT_DEFUALT_URI and LIBVIRT_LOG_OUTPUTS in $HOME/.bashrc, which *will* actually impact any application using libvirt.so

Re: [libvirt] Different approach to locking

2010-11-11 Thread Daniel P. Berrange
On Thu, Nov 11, 2010 at 10:49:27AM +, Richard W.M. Jones wrote: I get the feeling that the locking manager is meant to be a libvirt-internal API. I'll throw out this idea instead: How about making the concept of reserving a VM into a public libvirt API? /* Reserve 'dom'. * *

Re: [libvirt] Per user preference file

2010-11-11 Thread Richard W.M. Jones
On Thu, Nov 11, 2010 at 10:21:32PM +1100, Justin Clift wrote: On 11/11/2010, at 9:33 PM, Daniel P. Berrange wrote: snip [virt-viewer] more_overrides=/value/foo This isn't really something virt-viewer wants to use either. As a graphical desktop application, any preferences will belong

Re: [libvirt] Different approach to locking

2010-11-11 Thread Daniel P. Berrange
On Thu, Nov 11, 2010 at 11:35:55AM +, Daniel P. Berrange wrote: If you wanted to avoid directly using the libvirt lock manager plugins, and use a public libvirt API, then the other option is for libguestfs to create a custom XML with all the requested disks, and boot a transient libvirt

Re: [libvirt] [PATCH v2] macvtap: convert nl msg construction to use libnl

2010-11-11 Thread Stefan Berger
Any comments on this one? Stefan On 11/04/2010 06:57 AM, Stefan Berger wrote: V2: - forgot to convert two more function that were hidden in #defines - small nits In a first step I am converting the netlink message construction in macvtap code to use libnl. It's pretty much a 1:1

Re: [libvirt] [PATCH] RFC: Remove all object hashtable caches from virConnectPtr

2010-11-11 Thread Daniel P. Berrange
On Fri, Oct 29, 2010 at 12:52:18PM +0100, Daniel P. Berrange wrote: The virConnectPtr struct will cache instances of all other objects. APIs like virDomainLookupByUUID will return a cached object, so if you do virDomainLookupByUUID twice in a row, you'll get the same exact virDomainPtr

Re: [libvirt] [PATCH] RFC: Remove all object hashtable caches from virConnectPtr

2010-11-11 Thread Dave Allan
On Thu, Nov 11, 2010 at 04:20:43PM +, Daniel P. Berrange wrote: On Fri, Oct 29, 2010 at 12:52:18PM +0100, Daniel P. Berrange wrote: The virConnectPtr struct will cache instances of all other objects. APIs like virDomainLookupByUUID will return a cached object, so if you do

Re: [libvirt] [PATCH] RFC: Remove all object hashtable caches from virConnectPtr

2010-11-11 Thread Daniel P. Berrange
On Thu, Nov 11, 2010 at 11:44:42AM -0500, Dave Allan wrote: On Thu, Nov 11, 2010 at 04:20:43PM +, Daniel P. Berrange wrote: On Fri, Oct 29, 2010 at 12:52:18PM +0100, Daniel P. Berrange wrote: The virConnectPtr struct will cache instances of all other objects. APIs like

[libvirt] [PATCH] remote_driver.c: fix non-literal format strings w/o args

2010-11-11 Thread Laine Stump
Pushed another of these under the trivial rule (with correct email address this time!). I guess I run into these so often because I build with --disable-nls and most other people don't... --- src/remote/remote_driver.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH] ignore SELinuxSetFilecon error in SELinuxSetSecurityFileLabel if on nfs

2010-11-11 Thread Laine Stump
On 11/10/2010 03:35 PM, Eric Blake wrote: On 11/10/2010 12:52 PM, Laine Stump wrote: If virDomainAttachDevice() was called with an image that was located on a root-squashed NFS server, and in a directory that was unreadable by root on the machine running libvirtd, the attach would fail due to

Re: [libvirt] [PATCH] remote_driver.c: fix non-literal format strings w/o args

2010-11-11 Thread Daniel P. Berrange
On Thu, Nov 11, 2010 at 12:17:33PM -0500, Laine Stump wrote: Pushed another of these under the trivial rule (with correct email address this time!). I guess I run into these so often because I build with --disable-nls and most other people don't... We're constantly hitting this problem. We

[libvirt] [PATCH] rpm: Fix summary wording

2010-11-11 Thread Cole Robinson
--- libvirt.spec.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index f77626e..9a64fda 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -186,7 +186,7 @@ %endif -Summary: Library providing a simple API virtualization

Re: [libvirt] [PATCH v2] macvtap: convert nl msg construction to use libnl

2010-11-11 Thread Laine Stump
git am says the patch is corrupted. Possibly because the Content-Type includes 'Format=flowed'? On 11/11/2010 08:51 AM, Stefan Berger wrote: Any comments on this one? Stefan On 11/04/2010 06:57 AM, Stefan Berger wrote: V2: - forgot to convert two more function that were hidden in

Re: [libvirt] [PATCH] rpm: Fix summary wording

2010-11-11 Thread Eric Blake
On 11/11/2010 10:27 AM, Cole Robinson wrote: --- libvirt.spec.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index f77626e..9a64fda 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -186,7 +186,7 @@ %endif

Re: [libvirt] [PATCH] RFC: Remove all object hashtable caches from virConnectPtr

2010-11-11 Thread Dave Allan
On Thu, Nov 11, 2010 at 04:55:03PM +, Daniel P. Berrange wrote: On Thu, Nov 11, 2010 at 11:44:42AM -0500, Dave Allan wrote: On Thu, Nov 11, 2010 at 04:20:43PM +, Daniel P. Berrange wrote: On Fri, Oct 29, 2010 at 12:52:18PM +0100, Daniel P. Berrange wrote: The virConnectPtr struct

Re: [libvirt] [PATCH] remote_driver.c: fix non-literal format strings w/o args

2010-11-11 Thread Eric Blake
On 11/11/2010 10:27 AM, Daniel P. Berrange wrote: On Thu, Nov 11, 2010 at 12:17:33PM -0500, Laine Stump wrote: Pushed another of these under the trivial rule (with correct email address this time!). I guess I run into these so often because I build with --disable-nls and most other people

[libvirt] [PATCH v2] [RESEND] macvtap: convert nl msg construction to use libnl

2010-11-11 Thread Stefan Berger
Resending this mail using 'Evolution'. V2: - forgot to convert two more functions that were hidden in #defines - small nits In a first step I am converting the netlink message construction in macvtap code to use libnl. It's pretty much a 1:1 conversion except that now the message needs to

Re: [libvirt] [PATCH] esx: Support SMBIOS host mode

2010-11-11 Thread Matthias Bolte
2010/11/11 Eric Blake ebl...@redhat.com: On 11/10/2010 03:50 PM, Matthias Bolte wrote: ---  src/esx/esx_vmx.c                    |   27 ++-  tests/vmx2xmldata/vmx2xml-smbios.vmx |    3 +++  tests/vmx2xmldata/vmx2xml-smbios.xml |   16  

[libvirt] [PATCH] qemu: Add qemu-system-s390x to the emulators list

2010-11-11 Thread Matthias Bolte
--- src/qemu/qemu_conf.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 9974cf4..92797f1 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -478,6 +478,7 @@ static const struct qemu_arch_info const

Re: [libvirt] [PATCH] qemu: Add qemu-system-s390x to the emulators list

2010-11-11 Thread Eric Blake
On 11/11/2010 11:55 AM, Matthias Bolte wrote: --- src/qemu/qemu_conf.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 9974cf4..92797f1 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -478,6 +478,7

Re: [libvirt] First Virsh command Reference Pages online

2010-11-11 Thread Justin Clift
Hi Daniel, The Virtual Networking commands are now all in the new Virsh Command Reference, DocBook version. http://justinclift.fedorapeople.org/virshcmdref/chap-Virsh_Command_Reference-Command_Listing.html We can output to multiple formats (html, single-page-html, pdf, epub, txt), so it's

[libvirt] [PATCH] virt-aa-helper should require uuid in XML

2010-11-11 Thread Jamie Strandboge
When uuid is not in the XML, a virUUIDGenerate() ends up being called which is unnecessary and can lead to crashes if /dev/urandom isn't available because virRandomInitialize() is not called within virt-aa-helper. This patch adds verify_xpath_context() and updates caps_mockup() to use it. This is

[libvirt] [PATCH 0/3] Add proper validation of IP/MAC addresses to network.rng

2010-11-11 Thread Laine Stump
I needed to add more elements to network.rng, and modify the possible values for some existing elements, but noticed that there was currently no validation of IP addresses or MAC addresses. As a first stpe in my modifications, I'm bringing network.rng's validation/format more in line with what's

[libvirt] [PATCH 2/3] re-indent network.rng following structural change

2010-11-11 Thread Laine Stump
This commit is whitespace changes only, do avoid obscuring actual code changes. --- docs/schemas/network.rng | 206 +++--- 1 files changed, 103 insertions(+), 103 deletions(-) diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng index

[libvirt] [PATCH 3/3] Do a better job of validating IP and MAC addresses in network.rng

2010-11-11 Thread Laine Stump
IP addresses and MAC addresses had been defined in the RNG simply as text/ meaning that, according to the RNG, any string could go in there. Of course the C parsing code does a much better job of validating, but we may as well have this describing the contents accurately (even though it's

[libvirt] [PATCH 1/3] Put network.rng contents inside grammer for uniformity with other RNGs

2010-11-11 Thread Laine Stump
All the other RNG files in libvirt are enclosed within grammer. This commit makes the syntactical changes necessary to make network.rng fit that pattern. (This is the first step in adding some data type definitions to network.rng for more exact validation of IP and MAC addresses). Formatting

Re: [libvirt] [PATCH 3/3] Do a better job of validating IP and MAC addresses in network.rng

2010-11-11 Thread Stefan Berger
On 11/11/2010 03:41 PM, Laine Stump wrote: IP addresses and MAC addresses had been defined in the RNG simply as text/ meaning that, according to the RNG, any string could go in there. Of course the C parsing code does a much better job of validating, but we may as well have this describing the

Re: [libvirt] [PATCH 2/3] re-indent network.rng following structural change

2010-11-11 Thread Stefan Berger
On 11/11/2010 03:41 PM, Laine Stump wrote: This commit is whitespace changes only, do avoid obscuring actual code changes. I trust you on this. ACK. --- docs/schemas/network.rng | 206 +++--- 1 files changed, 103 insertions(+), 103 deletions(-)

Re: [libvirt] [PATCH 1/3] Put network.rng contents inside grammer for uniformity with other RNGs

2010-11-11 Thread Stefan Berger
On 11/11/2010 03:41 PM, Laine Stump wrote: All the other RNG files in libvirt are enclosed withingrammer. This commit makes the syntactical changes necessary to make network.rng fit that pattern. (This is the first step in adding some data type definitions to network.rng for more exact

Re: [libvirt] [PATCH 3/3] Do a better job of validating IP and MAC addresses in network.rng

2010-11-11 Thread Eric Blake
On 11/11/2010 01:41 PM, Laine Stump wrote: + !-- An ipv4 dotted quad address -- + define name='ipv4-addr' +data type='string' + param name=pattern(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))\.){3}((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))/param This allows 01.1.1.1

Re: [libvirt] [PATCH] Generate HACKING from docs/hacking.html.in

2010-11-11 Thread Eric Blake
On 11/11/2010 01:39 PM, Matthias Bolte wrote: Tweak pre tags in docs/hacking.html.in to achieve proper indentation of their plaintext representation. Also use more b/i/code tags in docs/hacking.html.in. --- HACKING | 602 +- A

Re: [libvirt] [PATCH 1/3] Put network.rng contents inside grammer for uniformity with other RNGs

2010-11-11 Thread Dave Allan
On Thu, Nov 11, 2010 at 03:41:27PM -0500, Laine Stump wrote: All the other RNG files in libvirt are enclosed within grammer. This commit makes the syntactical changes necessary to make network.rng fit that pattern. (This is the first step in adding some data type definitions to network.rng for

Re: [libvirt] [PATCH 3/3] Do a better job of validating IP and MAC addresses in network.rng

2010-11-11 Thread Laine Stump
On 11/11/2010 04:05 PM, Eric Blake wrote: On 11/11/2010 01:41 PM, Laine Stump wrote: +!-- An ipv4 dotted quad address -- +define name='ipv4-addr' +data type='string' +param

Re: [libvirt] [PATCH 3/3] Do a better job of validating IP and MAC addresses in network.rng

2010-11-11 Thread Eric Blake
On 11/11/2010 02:57 PM, Laine Stump wrote: name=pattern(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))\.){3}((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))/param This allows 01.1.1.1 (leading zero looks unusual in an IPv4 address). I would have done something like: How about if I

Re: [libvirt] [PATCH] virt-aa-helper should require uuid in XML

2010-11-11 Thread Eric Blake
On 11/11/2010 12:33 PM, Jamie Strandboge wrote: When uuid is not in the XML, a virUUIDGenerate() ends up being called which is unnecessary and can lead to crashes if /dev/urandom isn't available because virRandomInitialize() is not called within virt-aa-helper. This patch adds

Re: [libvirt] Is there an API for clone?

2010-11-11 Thread 黄亮
Hi Alex Thank you for your reply. I just wanna make sure I'm not misunderstanding, virStorageVolGetXMLDesc virStorageVolCreateXMLFrom together can do the clone process, am I right? Regards 2010-11-12 Lancer 发件人: Alex Jia 发送时间: 2010-11-10 13:28:21 收件人: 黄亮 抄送: libvir-list 主题: Re:

Re: [libvirt] Is there an API for clone?

2010-11-11 Thread 黄亮
Hi, Daniel So, do you mean if I wanna accomplish the task of clone, I should use a batch of APIs ? Regards 2010-11-12 Lancer 发件人: Daniel P. Berrange 发送时间: 2010-11-10 18:42:35 收件人: 黄亮 抄送: libvir-list 主题: Re: [libvirt] Is there an API for clone? On Wed, Nov 10, 2010 at

Re: [libvirt] Is there an API for clone?

2010-11-11 Thread 黄亮
Hi Richard, Thank you for your information, I'll look into it. Regards 2010-11-12 Lancer 发件人: Richard W.M. Jones 发送时间: 2010-11-11 06:21:04 收件人: Daniel P. Berrange 抄送: 黄亮; libvir-list 主题: Re: [libvirt] Is there an API for clone? On Wed, Nov 10, 2010 at 10:42:27AM +, Daniel P.

Re: [libvirt] Is there an API for clone?

2010-11-11 Thread ajia
On 11/12/2010 02:07 AM, 黄亮 wrote: Hi Alex Thank you for your reply. I just wanna make sure I'm not misunderstanding, virStorageVolGetXMLDesc virStorageVolCreateXMLFrom together can do the clone process, am I right? In fact, libvirt will call a group of APIs to complete vol-clone operation,

Re: [libvirt] First Virsh command Reference Pages online

2010-11-11 Thread Osier Yang
On 11/12/2010 03:27 AM, Justin Clift wrote: Hi Daniel, The Virtual Networking commands are now all in the new Virsh Command Reference, DocBook version. http://justinclift.fedorapeople.org/virshcmdref/chap-Virsh_Command_Reference-Command_Listing.html looks pretty good, though missed