Re: [libvirt] [PATCH v3 0/3] add support for changing blkio parameters for inactive domains

2011-06-20 Thread Hu Tao
ping On Tue, Jun 07, 2011 at 02:03:06PM +0800, Hu Tao wrote: This series enables user to change blkio parameters for inactive domains from virsh command line. CHANGES: v2-v3: - based on new macros VIR_DOMAIN_AFFECT_XXX Hu Tao (3): Add new parameters for blkiotune update

Re: [libvirt] [PATCH 3/3] Support automatic creation of leases for disks in sanlock

2011-06-20 Thread Daniel Veillard
On Fri, Jun 17, 2011 at 01:38:21PM +0100, Daniel P. Berrange wrote: The current sanlock plugin requires a central management application to manually add lease elements to each guest, to protect resources that are assigned to it (eg writable disks). This makes the sanlock plugin useless for

Re: [libvirt] [PATCH v3 1/3] Add new parameters for blkiotune

2011-06-20 Thread Daniel Veillard
On Tue, Jun 07, 2011 at 02:03:07PM +0800, Hu Tao wrote: Add --config, --live and --current for command blkiotune --- tools/virsh.c | 26 +++--- tools/virsh.pod |7 +++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c

Re: [libvirt] [PATCH v3 2/3] update qemuDomainGetBlkioParameters to use flags

2011-06-20 Thread Daniel Veillard
On Tue, Jun 07, 2011 at 02:03:08PM +0800, Hu Tao wrote: --- src/qemu/qemu_driver.c | 124 +--- 1 files changed, 86 insertions(+), 38 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2957467..8ebb7d4 100644 ---

Re: [libvirt] [PATCH v3 3/3] Update qemuDomainSetBlkioParameters to use flags

2011-06-20 Thread Daniel Veillard
On Tue, Jun 07, 2011 at 02:03:09PM +0800, Hu Tao wrote: --- src/qemu/qemu_driver.c | 126 ++-- 1 files changed, 90 insertions(+), 36 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8ebb7d4..fb2f63a 100644 ---

Re: [libvirt] [PATCH 2/4] vcpupin: add reset option to virsh vcpupin command

2011-06-20 Thread Daniel Veillard
On Fri, Jun 10, 2011 at 03:39:38PM +0900, Taku Izumi wrote: When resetting vcpupin setting, we have to specify all host physical cpus as a cpulist parameter of virsh vcpupin command. It's a little tedious. This patch changes to allow to receive the special keyword 'r' as a cpulist

Re: [libvirt] [PATCH 1/4] vcpupin: improve vcpupin definition of virsh vcpupin

2011-06-20 Thread Daniel Veillard
On Fri, Jun 10, 2011 at 03:38:55PM +0900, Taku Izumi wrote: When using vcpupin command, we have to speficy comma-separated list as cpulist, but this is tedious in case the number of phsycal cpus is large. This patch improves this by introducing special markup - and ^ which are similar to

Re: [libvirt] [PATCH] build: fix building error when building without libvirtd

2011-06-20 Thread Wen Congyang
At 06/20/2011 12:28 PM, Daniel Veillard Write: On Mon, Jun 20, 2011 at 10:48:07AM +0800, Wen Congyang wrote: When building libvirt without libvirtd, we will receive the following error message: make[3]: Entering directory `/home/wency/rpmbuild/BUILD/libvirt-0.9.2/tools' CC

Re: [libvirt] [PATCH 4/4] vcpupin: add vcpupin resetting feature to qemu driver

2011-06-20 Thread Daniel Veillard
On Fri, Jun 10, 2011 at 03:41:18PM +0900, Taku Izumi wrote: Pinning to all physical cpus means resetting, hence it is preferable to delete vcpupin setting of XML. This patch changes qemu driver to delete vcpupin setting by invoking virDomainVcpupinDel API when pinning the specified

Re: [libvirt] [PATCH v3 1/3] Add new parameters for blkiotune

2011-06-20 Thread Wen Congyang
At 06/20/2011 02:22 PM, Daniel Veillard Write: On Tue, Jun 07, 2011 at 02:03:07PM +0800, Hu Tao wrote: Add --config, --live and --current for command blkiotune --- tools/virsh.c | 26 +++--- tools/virsh.pod |7 +++ 2 files changed, 30 insertions(+), 3

Re: [libvirt] [PATCH 3/4] vcpupin: add virDomainVcpupinDel function

2011-06-20 Thread Daniel Veillard
On Fri, Jun 10, 2011 at 03:40:36PM +0900, Taku Izumi wrote: This patch add the private API (virDomainVcpupinDel). This API can delete the vcpupin setting of a specified virtual cpu. Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com --- src/conf/domain_conf.c | 39

Re: [libvirt] [PATCH 0/5 v3] Add NUMA memory tuning support

2011-06-20 Thread Osier Yang
于 2011年06月20日 13:30, Daniel Veillard 写道: On Fri, Jun 17, 2011 at 06:22:53PM +0800, Osier Yang wrote: Hi, This series incorporated previous feedbacks received on the XML schema, especially on syntax of nodeset. Now using same syntax of cpuset of vcpu. And doing conversion in qemu driver

Re: [libvirt] [PATCH] Support reboots with the QEMU driver

2011-06-20 Thread Wen Congyang
At 06/17/2011 09:26 PM, Daniel P. Berrange Write: On Fri, Jun 17, 2011 at 10:52:03AM +0800, Wen Congyang wrote: At 06/16/2011 01:06 AM, Daniel P. Berrange Write: + + static int qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED, virDomainObjPtr vm)

Re: [libvirt] [PATCH v4 RESEND 0/3] Add filesystem pool formatting

2011-06-20 Thread Osier Yang
% hello, ping 于 2011年06月14日 16:16, Osier Yang 写道: Hi, The following patches add the ability to format filesystem pools when the appropriate flags are passed to pool build. This patch set introduces two new flags: VIR_STORAGE_POOL_BUILD_NO_OVERWRITE causes the build to probe for an existing

[libvirt] [PATCH] Fix preprocessor indentation in nodeinfo.c

2011-06-20 Thread Matthias Bolte
--- I'm pushing this under the build breaker rule. src/nodeinfo.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index c6dbb84..9e0f906 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -685,23 +685,23 @@ int

Re: [libvirt] [PATCH] Move XenAPI driver to correct spec file section

2011-06-20 Thread Matthias Bolte
2011/6/20 Daniel Veillard veill...@redhat.com: On Thu, Jun 16, 2011 at 01:47:23PM +0200, Matthias Bolte wrote: The XenAPI driver works like the ESX and PHyp driver by using its own HTTPS based remote protocol. ---  libvirt.spec.in |    2 +-  1 files changed, 1 insertions(+), 1 deletions(-)

Re: [libvirt] [libvirt-php] - zend_mm_heap corrupted

2011-06-20 Thread Michal Novotny
Hi Henrik, what exactly did you to do to get the error page? I never run into those in any version I'm having in libvirt-php git repository since I always check but it may be Apache PHP version connected and I'm running it as a module. Could you please provide me more information about this or at

Re: [libvirt] [PATCH] Fix preprocessor indentation in nodeinfo.c

2011-06-20 Thread Wen Congyang
At 06/20/2011 04:40 PM, Matthias Bolte Write: --- I'm pushing this under the build breaker rule. src/nodeinfo.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index c6dbb84..9e0f906 100644 --- a/src/nodeinfo.c +++

Re: [libvirt] [PATCH] Fix preprocessor indentation in nodeinfo.c

2011-06-20 Thread Matthias Bolte
2011/6/20 Wen Congyang we...@cn.fujitsu.com: At 06/20/2011 04:40 PM, Matthias Bolte Write: --- I'm pushing this under the build breaker rule.  src/nodeinfo.c |   12 ++--  1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index

Re: [libvirt] [PATCH 1/4] vcpupin: improve vcpupin definition of virsh vcpupin

2011-06-20 Thread Wen Congyang
At 06/20/2011 02:46 PM, Daniel Veillard Write: On Fri, Jun 10, 2011 at 03:38:55PM +0900, Taku Izumi wrote: When using vcpupin command, we have to speficy comma-separated list as cpulist, but this is tedious in case the number of phsycal cpus is large. This patch improves this by

Re: [libvirt] [PATCH 0/4] RFC: vcpupin: some improvements of virsh vcpupin command

2011-06-20 Thread Wen Congyang
At 06/10/2011 02:27 PM, Taku Izumi Write: Hi all, I'll resend this patchset because what sent yesterday was broken. Sorry to be a nuisance. --- This patchset improves virsh vcpupin command like the following: (i) introduce special markup - and ^ which are similar to XML schema

Re: [libvirt] [PATCH] remote: Generate virDomainGetBlockPullInfo

2011-06-20 Thread Matthias Bolte
2011/6/16 Jiri Denemark jdene...@redhat.com: On Thu, Jun 16, 2011 at 11:43:08 +0200, Matthias Bolte wrote: It was already generatable but skipped. ---  daemon/remote.c              |   36  src/remote/remote_driver.c   |   32

Re: [libvirt] [PATCH] remote: Handle functions thar return optional strings

2011-06-20 Thread Matthias Bolte
2011/6/20 Daniel Veillard veill...@redhat.com: On Thu, Jun 16, 2011 at 11:43:53AM +0200, Matthias Bolte wrote: ---  daemon/remote.c              |   64 --  daemon/remote_generator.pl   |   28 ++  src/remote/remote_protocol.x |    2 +-

Re: [libvirt] [PATCH] virsh: Fix compile error due to const mismatch in cmdVcpupin

2011-06-20 Thread Matthias Bolte
2011/6/20 Matthias Bolte matthias.bo...@googlemail.com: Broken by commit c4a8ca71b10eb adding the reset option. Instead of altering a const string move the while loop into an else clause. ---  tools/virsh.c |  110 -  1 files changed,

[libvirt] [PATCH] virsh: Fix compile error due to const mismatch in cmdVcpupin

2011-06-20 Thread Matthias Bolte
Broken by commit c4a8ca71b10eb adding the reset option. Instead of altering a const string move the while loop into an else clause. --- tools/virsh.c | 110 - 1 files changed, 54 insertions(+), 56 deletions(-) diff --git a/tools/virsh.c

Re: [libvirt] Availability of patchchecker

2011-06-20 Thread Daniel P. Berrange
On Sun, Jun 19, 2011 at 05:15:55AM -0400, Itamar Heim wrote: -Original Message- From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] On Behalf Of Daniel Veillard Sent: Thursday, June 09, 2011 16:20 PM To: libvir-list@redhat.com Subject: [libvirt]

[libvirt] [PATCH v2] qemu: domain I/O asynchronous handling

2011-06-20 Thread Michal Privoznik
For virtio disks and interfaces, qemu allows users to enable or disable ioeventfd feature. This means, qemu can execute domain code, while another thread waits for I/O event. Basically, in some cases it is win, in some loss. This feature is available via 'ioeventfd' attribute in disk and interface

Re: [libvirt] [PATCH 1/4] vcpupin: improve vcpupin definition of virsh vcpupin

2011-06-20 Thread Daniel P. Berrange
On Mon, Jun 20, 2011 at 05:18:34PM +0800, Wen Congyang wrote: At 06/20/2011 02:46 PM, Daniel Veillard Write: On Fri, Jun 10, 2011 at 03:38:55PM +0900, Taku Izumi wrote: When using vcpupin command, we have to speficy comma-separated list as cpulist, but this is tedious in case the

[libvirt] nwfilter: limit VM traffic to specific MAC

2011-06-20 Thread Shahar Havivi
Hi, I am trying to add custom filter to block VM traffic to other VMs by limiting the traffic only to the gateways MAC address. The filter XML: filter name='rhev' chain='root' uuidcd4e5890-ccc9-1b0f-303f-e7fe7123646d/uuid filterref filter='allow-dhcp'/ rule action='drop'

Re: [libvirt] nwfilter: limit VM traffic to specific MAC

2011-06-20 Thread Stefan Berger
Shahar Havivi shah...@redhat.com wrote on 06/20/2011 07:39:35 AM: From: Shahar Havivi shah...@redhat.com To: libvirt-l...@redhat.com Cc: Stefan Berger/Watson/IBM@IBMUS Date: 06/20/2011 07:42 AM Subject: nwfilter: limit VM traffic to specific MAC Hi, I am trying to add custom filter to

Re: [libvirt] nwfilter: limit VM traffic to specific MAC

2011-06-20 Thread Shahar Havivi
On 20.06.11 08:02, Stefan Berger wrote: Shahar Havivi shah...@redhat.com wrote on 06/20/2011 07:39:35 AM: From: Shahar Havivi shah...@redhat.com To: libvirt-l...@redhat.com Cc: Stefan Berger/Watson/IBM@IBMUS Date: 06/20/2011 07:42 AM Subject: nwfilter: limit VM traffic to specific MAC

Re: [libvirt] nwfilter: limit VM traffic to specific MAC

2011-06-20 Thread Stefan Berger
Shahar Havivi shah...@redhat.com wrote on 06/20/2011 08:11:43 AM: From: Shahar Havivi shah...@redhat.com To: Stefan Berger/Watson/IBM@IBMUS Cc: libvirt-l...@redhat.com Date: 06/20/2011 08:13 AM Subject: Re: nwfilter: limit VM traffic to specific MAC On 20.06.11 08:02, Stefan Berger wrote:

Re: [libvirt] [Qemu-devel] [PATCH v2] Add support for fd: protocol

2011-06-20 Thread Corey Bryant
On 06/18/2011 04:50 PM, Blue Swirl wrote: On Thu, Jun 16, 2011 at 5:48 PM, Corey Bryantbrynt...@us.ibm.com wrote: On 06/15/2011 03:12 PM, Blue Swirl wrote: On Tue, Jun 14, 2011 at 4:31 PM, Corey Bryantbrynt...@us.ibm.comwrote: sVirt provides SELinux MAC isolation for Qemu guest

Re: [libvirt] [PATCH] daemon: Dynamically create worker threads when some get stuck

2011-06-20 Thread Daniel P. Berrange
On Mon, Jun 20, 2011 at 01:41:41PM +0800, Daniel Veillard wrote: On Fri, Jun 17, 2011 at 01:26:06PM +0100, Daniel P. Berrange wrote: On Fri, Jun 17, 2011 at 12:46:33PM +0200, Jiri Denemark wrote: On Fri, Jun 17, 2011 at 10:55:43 +0100, Daniel P. Berrange wrote: [...] What I do think we

[libvirt] [PATCH] Fix compile warnings in virsh vcpupin

2011-06-20 Thread Daniel P. Berrange
The 'char *cur' variable was being assigned from a 'const char *' string, thus discarding constness. As well as causing a compile warning, it masked a piece of code which attempts to assign to the previously const string. * tools/virsh.c: Fix const-ness of 'cur' variable in vcpupin ---

Re: [libvirt] [PATCH] Fix compile warnings in virsh vcpupin

2011-06-20 Thread Matthias Bolte
2011/6/20 Daniel P. Berrange berra...@redhat.com: The 'char *cur' variable was being assigned from a 'const char *' string, thus discarding constness. As well as causing a compile warning, it masked a piece of code which attempts to assign to the previously const string. * tools/virsh.c:

Re: [libvirt] [Qemu-devel] [PATCH v2] Add support for fd: protocol

2011-06-20 Thread Avi Kivity
On 06/14/2011 04:31 PM, Corey Bryant wrote: - Starting Qemu with a backing file For this we could tell qemu that a file named xyz is available via fd n, via an extension of the getfd command. For example (qemu) getfd path=/images/my-image.img (qemu) getfd path=/images/template.img

[libvirt] [PATCH 1/8] Define a QEMU specific API to attach to a running QEMU process

2011-06-20 Thread Daniel P. Berrange
Introduce a new API in libvirt-qemu.so virDomainPtr virDomainQemuAttach(virConnectPtr domain, unsigned long long pid, unsigned int flags); This allows libvirtd to attach to an existing, externally launched QEMU process. This is

Re: [libvirt] [Qemu-devel] [PATCH v2] Add support for fd: protocol

2011-06-20 Thread Anthony Liguori
On 06/20/2011 08:40 AM, Avi Kivity wrote: On 06/14/2011 04:31 PM, Corey Bryant wrote: - Starting Qemu with a backing file For this we could tell qemu that a file named xyz is available via fd n, via an extension of the getfd command. For example (qemu) getfd path=/images/my-image.img

[libvirt] [PATCH 0/8 v2] Enable libvirt to attach to existing QEMU instances

2011-06-20 Thread Daniel P. Berrange
An update of http://www.redhat.com/archives/libvir-list/2011-May/msg00223.html New in this series: - Split the patch up into more pieces for easier review - Add tainting of the attached process - Correctly handle removal of pidfile for attachde process - Wire up PCI address detection -

[libvirt] [PATCH 2/8] Define remote wire protocol impls for virDomainQemuAttach

2011-06-20 Thread Daniel P. Berrange
* daemon/remote.c: Server side dispatcher * src/remote/remote_driver.c: Client side dispatcher * src/remote/qemu_protocol.x: Wire protocol definition --- daemon/remote.c| 35 +++ src/remote/qemu_protocol.x | 13 -

[libvirt] [PATCH 3/8] Add a new 'virsh qemu-attach' command.

2011-06-20 Thread Daniel P. Berrange
This command allows libvirt to attach to an existing QEMU instance. $ qemu-kvm -cdrom ~/demo.iso \ -monitor unix:/tmp/demo,server,nowait \ -name foo \ -uuid cece4f9f-dff0-575d-0e8e-01fe380f12ea $ QEMUPID=$! $ virsh qemu-attach $QEMUPID --- tools/virsh.c | 47

[libvirt] [PATCH 6/8] Add a method for extracting QEMU argv from /proc

2011-06-20 Thread Daniel P. Berrange
To enable attaching to externally launched QEMU, we need to be able to reverse engineer a guest XML config based on the argv for a PID in /proc * src/qemu/qemu_command.c, src/qemu/qemu_command.h: Add qemuParseCommandLinePid which extracts QEMU config from argv in /proc, given a PID number ---

[libvirt] [PATCH 5/8] Change extract pidfile monitor config from QEMU command line

2011-06-20 Thread Daniel P. Berrange
When converting QEMU argv into a virDomainDefPtr, also extract the pidfile, monitor character device config and the monitor mode. * src/qemu/qemu_command.c, src/qemu/qemu_command.h: Extract pidfile monitor config from QEMU argv * src/qemu/qemu_driver.c, tests/qemuargv2xmltest.c: Add extra

[libvirt] [PATCH 4/8] Keep pidfile path in qemuDomainObjPrivate struct

2011-06-20 Thread Daniel P. Berrange
Avoid re-formatting the pidfile path everytime we need it. Create it once when starting the guest, and preserve it until the guest is shutdown. * src/libvirt_private.syms, src/util/util.c, src/util/util.h: Add virFileReadPidPath * src/qemu/qemu_domain.h: Add pidfile field *

[libvirt] [PATCH]: set and get the MAC of an interface

2011-06-20 Thread Gerhard Stenzel
The following patch renames the function to set the MAC of an interface from ifSetInterfaceMac() to brSetInterfaceMac() and makes it available to other components. It also adds brGetInterfaceMac() to retrieve the MAC. Signed-off-by: Gerhard Stenzel gerhard.sten...@de.ibm.com Index:

[libvirt] [PATCH 7/8] Add monitor API for checking whether KVM is enabled

2011-06-20 Thread Daniel P. Berrange
When attaching to an external QEMU process, it is neccessary to check if the process is using KVM or not. This can be done using a monitor command * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c,

[libvirt] [PATCH 8/8] Implement code to attach to external QEMU instances.

2011-06-20 Thread Daniel P. Berrange
Given a PID, the QEMU driver reads /proc/$PID/cmdline and /proc/$PID/environ to get the configuration. This is fed into the ARGV-XML convertor to build an XML configuration for the process. /proc/$PID/exe is resolved to identify the full command binary path After checking for name/uuid

Re: [libvirt] [PATCH v2]: set and restore MAC address of a NIC when using PASSTHROUGH mode

2011-06-20 Thread Stefan Berger
On 06/16/2011 02:16 PM, Daniel P. Berrange wrote: On Thu, Jun 16, 2011 at 02:23:07PM +0200, Gerhard Stenzel wrote: Index: libvirt/src/util/macvtap.c === --- libvirt.orig/src/util/macvtap.c +++ libvirt/src/util/macvtap.c @@ -87,6

[libvirt] [PATCH] build: require newer netcf when it is available

2011-06-20 Thread Eric Blake
When building for newer Fedora or RHEL, take advantage of the newer netcf packaging to guarantee interface snapshot support. * libvirt.spec.in (BuildRequires): Bump minimum version on platforms that support netcf 0.1.8. --- I don't think we need an explicit 'Requires: netcf-libs = 0.1.8' line

Re: [libvirt] [PATCH 3/3] virsh: enhance snapshot-create-as

2011-06-20 Thread Eric Blake
On 06/16/2011 02:02 AM, Matthias Bolte wrote: 2011/6/16 Eric Blake ebl...@redhat.com: Similar to pool-create-as. * tools/virsh.c (cmdSnapshotCreateAs): Add --print-xml. * tools/virsh.pod: Document it. --- tools/virsh.c |7 +++ tools/virsh.pod |6 -- 2 files changed, 11

Re: [libvirt] [Qemu-devel] [PATCH v2] Add support for fd: protocol

2011-06-20 Thread Avi Kivity
On 06/20/2011 04:50 PM, Anthony Liguori wrote: On 06/20/2011 08:40 AM, Avi Kivity wrote: On 06/14/2011 04:31 PM, Corey Bryant wrote: - Starting Qemu with a backing file For this we could tell qemu that a file named xyz is available via fd n, via an extension of the getfd command. For

[libvirt] [RFC] Introduce virDomainBlockCopy API

2011-06-20 Thread Jiri Denemark
This API starts asynchronous live copy of a block device (specified by target element of the xml argument) into a new source (which must already exist). The process can be controlled in the same way as migration: monitored with virDomainJobInfo() and canceled using virDomainAbortJob(). I don't

[libvirt] virt-dmesg and virt-uname

2011-06-20 Thread Richard W.M. Jones
I just pushed the virt-dmesg package to Fedora Rawhide[1]. http://koji.fedoraproject.org/koji/buildinfo?buildID=248890 This tool uses libvirt to let you list the kernel messages from a Linux KVM guest without needing to log in or run any special agent in the guest. It's useful when a guest

Re: [libvirt] virt-dmesg and virt-uname

2011-06-20 Thread Richard W.M. Jones
[Fixed To address] On Mon, Jun 20, 2011 at 07:59:47PM +0100, Richard W.M. Jones wrote: I just pushed the virt-dmesg package to Fedora Rawhide[1]. http://koji.fedoraproject.org/koji/buildinfo?buildID=248890 This tool uses libvirt to let you list the kernel messages from a Linux KVM guest

Re: [libvirt] [PATCH 01/10] python: libvirt-override: use simpler debug

2011-06-20 Thread Cole Robinson
On 06/16/2011 09:43 AM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:10PM -0400, Cole Robinson wrote: In a couple instances we have to mark a debug variable as ATTRIBUTE_UNUSED to avoid warnings. Signed-off-by: Cole Robinson crobi...@redhat.com --- python/libvirt-override.c | 159

Re: [libvirt] [PATCH 02/10] python: generator: Don't print warning if nothing to warn about

2011-06-20 Thread Cole Robinson
On 06/16/2011 09:44 AM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:11PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/generator.py

Re: [libvirt] [PATCH 03/10] python: Implement bindings for virStreamEventAddCallback

2011-06-20 Thread Cole Robinson
On 06/16/2011 10:33 AM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:12PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |7 +-- python/libvirt-override-virStream.py | 24 ++

Re: [libvirt] [Qemu-devel] [PATCH v2] Add support for fd: protocol

2011-06-20 Thread Anthony Liguori
On 06/20/2011 12:35 PM, Avi Kivity wrote: On 06/20/2011 04:50 PM, Anthony Liguori wrote: On 06/20/2011 08:40 AM, Avi Kivity wrote: On 06/14/2011 04:31 PM, Corey Bryant wrote: - Starting Qemu with a backing file For this we could tell qemu that a file named xyz is available via fd n, via an

Re: [libvirt] [PATCH 09/10] python: events: Fix C-Python handle callback prototype

2011-06-20 Thread Cole Robinson
On 06/19/2011 09:44 PM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:18PM -0400, Cole Robinson wrote: If registering our own event loop implementation written in python, any handles or timeouts callbacks registered by libvirt C code must are wrapped in a python function. There is some

Re: [libvirt] [PATCH 04/10] python: Implement virStreamSend/Recv

2011-06-20 Thread Cole Robinson
On 06/16/2011 10:44 AM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:13PM -0400, Cole Robinson wrote: The return values for the python version are different that the C version of virStreamSend: on success we return a string, an error raises an exception, and if the stream would block

Re: [libvirt] [PATCH 10/10] python: Mark event callback wrappers as private

2011-06-20 Thread Cole Robinson
On 06/19/2011 09:45 PM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:19PM -0400, Cole Robinson wrote: These functions aren't intended to be called directly by users, so mark them as private. Hum, should that be one _ or two __ ? But ACK to cleanup ! Python convention is

[libvirt] [PATCH 1/7] python: Implement virStreamSend/Recv

2011-06-20 Thread Cole Robinson
The return values for the python version are different that the C version of virStreamSend: on success we return a string, an error raises an exception, and if the stream would block we return int(-2). We need to do this since strings aren't passed by reference in python. Signed-off-by: Cole

[libvirt] [PATCH 0/7 v2] python: Implement missing stream/event ops

2011-06-20 Thread Cole Robinson
Currently it isn't possible to implement the equivalent of 'virsh console' with the python bindings. This series implements the missing functionality required to do so. v2: Pushed first 3 patches Actually export virEvent APIs in libvirt.h DV had comments on patch 1 and patch 6 that I

[libvirt] [PATCH 3/7] Promote virEvent*Handle/Timeout to public API

2011-06-20 Thread Cole Robinson
Since we virEventRegisterDefaultImpl is now a public API, callers need a way to invoke the default registered Handle and Timeout functions. We already have general functions for these internally, so promote them to the public API. v2: Actually add APIs to libvirt.h Signed-off-by: Cole

[libvirt] [PATCH 4/7] events: Correct virEventAddTimeout docs

2011-06-20 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- src/util/event.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/event.c b/src/util/event.c index 4108221..bd781ec 100644 --- a/src/util/event.c +++ b/src/util/event.c @@ -87,11 +87,11 @@ int

[libvirt] [PATCH 5/7] python: Add bindings for virEvent*Handle/Timeout

2011-06-20 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py| 11 +-- python/libvirt-override.c | 192 +-- python/libvirt-override.py | 54 3 files changed, 221 insertions(+), 36 deletions(-) diff --git

[libvirt] [PATCH 6/7] python: events: Fix C-Python handle callback prototype

2011-06-20 Thread Cole Robinson
If registering our own event loop implementation written in python, any handles or timeouts callbacks registered by libvirt C code must be wrapped in a python function. There is some argument trickery that makes this all work, by wrapping the user passed opaque value in a tuple, along with the

[libvirt] [PATCH 2/7] python: Implement virStreamSend/RecvAll helpers

2011-06-20 Thread Cole Robinson
Pure python implementation. The handler callbacks have been altered a bit compared to the C API: RecvAll doesn't pass length of the data read since that can be trivially obtained from python string objects, and SendAll requires the handler to return the string data to send rather than store the

[libvirt] [PATCH 7/7] python: Mark event callback wrappers as private

2011-06-20 Thread Cole Robinson
These functions aren't intended to be called directly by users, so mark them as private. While we're at it, remove unneeded exception handling, and break some long lines. Signed-off-by: Cole Robinson crobi...@redhat.com --- python/libvirt-override-virConnect.py | 102

[libvirt] [PATCH] virsh: avoid bogus description

2011-06-20 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=682121 Gettext reserves the empty string for internal use, and it must not be passed through _(). We were violating this for commands that (for whatever reason) used for their description. * tools/virsh.c (vshCmddefHelp): Don't translate empty

Re: [libvirt] [PATCH 3/7] Promote virEvent*Handle/Timeout to public API

2011-06-20 Thread Eric Blake
On 06/20/2011 01:34 PM, Cole Robinson wrote: Since we virEventRegisterDefaultImpl is now a public API, callers need a way to invoke the default registered Handle and Timeout functions. We already have general functions for these internally, so promote them to the public API. v2:

Re: [libvirt] RFC: API additions for enhanced snapshot support

2011-06-20 Thread Motonobu Ichimura
Hi, I'm new to this ML, and very interested in this topic. I'm going to try to implement LVM snapshot feature using this framework. 2011/6/16 Eric Blake ebl...@redhat.com /* Opaque type to manage a snapshot of a single storage volume. */ typedef virStorageVolSnapshotPtr; I'm just

Re: [libvirt] RFC: API additions for enhanced snapshot support

2011-06-20 Thread Eric Blake
On 06/15/2011 11:41 PM, Eric Blake wrote: /* Opaque type to manage a snapshot of a single storage volume. */ typedef virStorageVolSnapshotPtr; /* Create a snapshot of a storage volume. XML is optional, if non-NULL, it would be a new top-level element volsnapshot which is similar to the

Re: [libvirt] RFC: API additions for enhanced snapshot support

2011-06-20 Thread Eric Blake
On 06/20/2011 04:22 PM, Motonobu Ichimura wrote: /* Opaque type to manage a snapshot of a single storage volume. */ typedef virStorageVolSnapshotPtr; I'm just wondering how to detect storage type and to choose assosiate shapshot functionality. Is there any idea about it? I'm not yet

Re: [libvirt] RFC: API additions for enhanced snapshot support

2011-06-20 Thread Eric Blake
On 06/20/2011 04:52 PM, Eric Blake wrote: LVM snapshot may become invalid in the case of running out the volume size, So, adding an API for checking whether snapshot is valid will be needed. I'm not quite sure I follow the scenario you are envisioning here. Would you mind stepping through

Re: [libvirt] RFC: API additions for enhanced snapshot support

2011-06-20 Thread Motonobu Ichimura
Hi, 2011年6月21日7:52 Eric Blake ebl...@redhat.com: For LVM, it may be lvconvert --merge , but requires recent version of lvm and linux kernel, So, there are some failure reason (toolchain doesn't support it or toolchain supports, but failed) I don't know how to handle these case for

Re: [libvirt] [PATCH 09/10] python: events: Fix C-Python handle callback prototype

2011-06-20 Thread Daniel Veillard
On Mon, Jun 20, 2011 at 03:26:18PM -0400, Cole Robinson wrote: On 06/19/2011 09:44 PM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:18PM -0400, Cole Robinson wrote: If registering our own event loop implementation written in python, any handles or timeouts callbacks registered by

Re: [libvirt] [PATCH 04/10] python: Implement virStreamSend/Recv

2011-06-20 Thread Daniel Veillard
On Mon, Jun 20, 2011 at 03:28:07PM -0400, Cole Robinson wrote: On 06/16/2011 10:44 AM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:13PM -0400, Cole Robinson wrote: The return values for the python version are different that the C version of virStreamSend: on success we return a

Re: [libvirt] [PATCH 10/10] python: Mark event callback wrappers as private

2011-06-20 Thread Daniel Veillard
On Mon, Jun 20, 2011 at 03:34:07PM -0400, Cole Robinson wrote: On 06/19/2011 09:45 PM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:19PM -0400, Cole Robinson wrote: These functions aren't intended to be called directly by users, so mark them as private. Hum, should that be

Re: [libvirt] [PATCH] virsh: avoid bogus description

2011-06-20 Thread Wen Congyang
At 06/21/2011 04:40 AM, Eric Blake Write: https://bugzilla.redhat.com/show_bug.cgi?id=682121 Gettext reserves the empty string for internal use, and it must not be passed through _(). We were violating this for commands that (for whatever reason) used for their description. *

Re: [libvirt] [PATCH] virsh: avoid bogus description

2011-06-20 Thread Dave Allan
On Tue, Jun 21, 2011 at 10:22:38AM +0800, Wen Congyang wrote: At 06/21/2011 04:40 AM, Eric Blake Write: https://bugzilla.redhat.com/show_bug.cgi?id=682121 Gettext reserves the empty string for internal use, and it must not be passed through _(). We were violating this for commands

[libvirt] [Question] qemu cpu pinning

2011-06-20 Thread KAMEZAWA Hiroyuki
Hi, When I run a VM(qemu-0.13) on my host with the latest libvirt, I used following settings. == domain type='kvm' id='1' nameRHEL6/name uuidf7ad6bc3-e82a-1254-efb0-9e1a87d83d88/uuid memory2048000/memory currentMemory2048000/currentMemory vcpu cpuset='4-7'2/vcpu == I expected all

[libvirt] [PATCH 3/3] Add Memory Device Information to virSysinfoRead() from dmidecode type 17

2011-06-20 Thread Minoru Usui
Add Memory Device Information to virSysinfoRead() from dmidecode type 17 Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp --- src/util/sysinfo.c | 195 +++- src/util/sysinfo.h | 18 + 2 files changed, 212 insertions(+), 1 deletions(-) diff

[libvirt] [PATCH 0/3] Add Processor/MemoryDevice information to virSysinfoRead() API

2011-06-20 Thread Minoru Usui
Hi, I propose to add hardware Processor/MemoryDevice information to virSysinfoRead() from SMBIOS. I want to get host machine's these infomations through virConnectGetSysinfo(). I think it's useful to managing many host machines, because administrator can centrally manage the host machines which

[libvirt] [PATCH 2/3] Add Processor Information to virSysinfoRead() from dmidecode type 4

2011-06-20 Thread Minoru Usui
Add Processor Information to virSysinfoRead() from dmidecode type 4 Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp --- src/util/sysinfo.c | 207 +++- src/util/sysinfo.h | 19 + 2 files changed, 225 insertions(+), 1 deletions(-) diff

[libvirt] [PATCH 1/3] Cleanup virSysinfoRead()

2011-06-20 Thread Minoru Usui
[Cleanup] Separate BIOSInfo and SystemInfo part from virSysinfoRead() Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp --- src/util/sysinfo.c | 210 1 files changed, 130 insertions(+), 80 deletions(-) diff --git a/src/util/sysinfo.c