[libvirt] [PATCH] qemu : support persistent add/delete network interface

2011-05-18 Thread KAMEZAWA Hiroyuki
From 226239905ec9b01fd0bd0ce050de97d7f0d9e19c Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Wed, 18 May 2011 15:14:28 +0900 Subject: [PATCH] qemu - support persistent add/delete network interface This patch allows to modify interfaces of domain(qemu).

Re: [libvirt] [PATCHv2 1/6] build: update to latest gnulib

2011-05-18 Thread Matthias Bolte
2011/5/18 Eric Blake ebl...@redhat.com: * .gnulib: Update, for bootstrap and other fixes. * bootstrap: Resynchronize with gnulib. --- v2: not sure I've sent a v1 on list, so this is a new patch * .gnulib 64a5e38...a2b658c (23):   intprops: add doc   verify: add doc to gnulib manual and

Re: [libvirt] [PATCHv2 0/6] flush my patch queue

2011-05-18 Thread Wen Congyang
At 05/18/2011 07:36 AM, Eric Blake Write: I've been building up a grab bag of un-acked patches (a couple have had reviews, but most have met list silence), so I figured a repost would help. Eric Blake (6): build: update to latest gnulib build: require newer gettext virsh: optimize

Re: [libvirt] [PATCH] Fix modifying disk devices in qemu driver

2011-05-18 Thread Markus Groß
v2: - free dev before using it again. When modifying the disk devices of a live domain and the domain configuration, the function qemuDomainAttachDeviceConfig first sets dev-data-disk to NULL. Later qemuDomainAttachDeviceLive accesses dev-data.disk and causes a segfault. ---

[libvirt] [PATCH 3/3] update qemuDomainSetMemoryParameters to use flags

2011-05-18 Thread Hu Tao
--- src/qemu/qemu_driver.c | 106 +++- 1 files changed, 77 insertions(+), 29 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1e133ae..4c62dfe 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4812,20

Re: [libvirt] [PATCH] qemu : support persistent add/delete network interface

2011-05-18 Thread Wen Congyang
At 05/18/2011 02:13 PM, KAMEZAWA Hiroyuki Write: From 226239905ec9b01fd0bd0ce050de97d7f0d9e19c Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Wed, 18 May 2011 15:14:28 +0900 Subject: [PATCH] qemu - support persistent add/delete network interface This

[libvirt] [PATCH 2/3] update qemuDomainGetMemoryParameters to use flags

2011-05-18 Thread Hu Tao
--- src/qemu/qemu_driver.c | 100 --- tools/virsh.c |2 +- 2 files changed, 86 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index fdb3b30..1e133ae 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH 0/3] support for changing memory parameters for inactive domains

2011-05-18 Thread Hu Tao
This series enables user to change memory parameters for inactive domains from virsh command line. Hu Tao (3): Add new flags for setting memory parameters update qemuDomainGetMemoryParameters to use flags update qemuDomainSetMemoryParameters to use flags include/libvirt/libvirt.h.in |

Re: [libvirt] [PATCH] qemu : support persistent add/delete network interface

2011-05-18 Thread KAMEZAWA Hiroyuki
On Wed, 18 May 2011 15:41:31 +0800 Wen Congyang we...@cn.fujitsu.com wrote: At 05/18/2011 02:13 PM, KAMEZAWA Hiroyuki Write: From 226239905ec9b01fd0bd0ce050de97d7f0d9e19c Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Wed, 18 May 2011 15:14:28 +0900

[libvirt] [PATCH 0/3] Add device disk attach/detach support to libxl driver

2011-05-18 Thread Markus Groß
This patch series adds the infrastructure to support attaching and detaching of devices to the libxl driver. Currently only disk devices are supported. The first patch refactors some functions that are needed to create the appropriate datastructures for the libxenlight interface. The second patch

[libvirt] [PATCH 2/3] Fix libxl vm def handling on domU cleanup

2011-05-18 Thread Markus Groß
Otherwise vm-newDef remains in the domain object even when it is destroyed. --- src/libxl/libxl_driver.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 5cc9362..a14ace1 100644 --- a/src/libxl/libxl_driver.c

Re: [libvirt] [PATCH v2] qemu: Add option to enable/disable IOEventFD feature

2011-05-18 Thread Daniel Veillard
On Tue, May 17, 2011 at 03:56:11PM +0100, Daniel P. Berrange wrote: On Tue, May 17, 2011 at 04:49:17PM +0200, Michal Privoznik wrote: This feature allows QEMU to achieve higher throughput, but is available only in recent versions. It is accessible via ioeventfd attribute with accepting

[libvirt] [PATCH 1/3] Refactored libxl datastructure instantiation

2011-05-18 Thread Markus Groß
The new public functions can be used for attaching/detaching devices. --- src/libxl/libxl_conf.c | 304 ++-- src/libxl/libxl_conf.h |8 ++ 2 files changed, 171 insertions(+), 141 deletions(-) diff --git a/src/libxl/libxl_conf.c

Re: [libvirt] [PATCH 1/7] libvirt.h: consolidate typed parameter handling

2011-05-18 Thread Daniel Veillard
On Wed, May 18, 2011 at 07:52:43AM +0200, Matthias Bolte wrote: 2011/5/18 Hu Tao hu...@cn.fujitsu.com: On Tue, May 17, 2011 at 04:42:09PM -0600, Eric Blake wrote: * include/libvirt/libvirt.h.in (virTypedParameterType) (VIR_TYPED_PARAM_FIELD_LENGTH, _virTypedParameter): New enum, macro,

[libvirt] [PATCH 3/3] Add disk attach/detach support to libxl driver

2011-05-18 Thread Markus Groß
Based on the device attach/detach code from the QEMU driver. --- src/libxl/libxl_driver.c | 519 ++ 1 files changed, 519 insertions(+), 0 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index a14ace1..a056be9 100644 ---

Re: [libvirt] [PATCH] Improve invalid argument checks for the public API

2011-05-18 Thread Matthias Bolte
2011/5/18 Daniel Veillard veill...@redhat.com: On Tue, May 17, 2011 at 09:46:34AM -0600, Eric Blake wrote: On 05/17/2011 07:14 AM, Daniel Veillard wrote: On Tue, May 17, 2011 at 02:45:44PM +0200, Matthias Bolte wrote: ---  src/libvirt.c |  100

Re: [libvirt] [PATCH 9/9] add DHCP snooping support to nwfilter

2011-05-18 Thread David Stevens
Daniel Veillard veill...@redhat.com wrote on 05/17/2011 08:47:11 PM: Like Dan I'm worried by removing this functionality. As far as I know most switches learn IP from their clients using ARP snooping, this is I think more resilient and minimize disruption in case of port switching.

Re: [libvirt] [PATCH 9/9] add DHCP snooping support to nwfilter

2011-05-18 Thread Daniel P. Berrange
On Wed, May 18, 2011 at 01:34:33AM -0700, David Stevens wrote: Daniel Veillard veill...@redhat.com wrote on 05/17/2011 08:47:11 PM: Like Dan I'm worried by removing this functionality. As far as I know most switches learn IP from their clients using ARP snooping, this is I think more

Re: [libvirt] [PATCH] Fix modifying disk devices in qemu driver

2011-05-18 Thread Wen Congyang
At 05/18/2011 03:22 PM, Markus Groß Write: v2: - free dev before using it again. When modifying the disk devices of a live domain and the domain configuration, the function qemuDomainAttachDeviceConfig first sets dev-data-disk to NULL. Later qemuDomainAttachDeviceLive accesses

Re: [libvirt] [PATCH] Add support for 'passthru' mode for direct network interfaces

2011-05-18 Thread Daniel Veillard
On Tue, May 17, 2011 at 08:19:17PM -0600, Eric Blake wrote: On 05/17/2011 05:26 AM, D. Herrendoerfer wrote: This patch includes the documentation part. The error returned by libvirt when a using an older kernel is imho sufficient to point to the macvtap setup. Apart from that I doubt

[libvirt] [PATCH] lxc: Seperate domain config loading

2011-05-18 Thread Osier Yang
This patch seperate the domain config loading just as qemu driver does, first loading config of running or trasient domains, then of persistent inactive domains. And only try to reconnect the monitor of running domains, so that it won't always throws errors saying can't connect to domain monitor.

Re: [libvirt] [PATCH 3/3] Add disk attach/detach support to libxl driver

2011-05-18 Thread Markus Groß
Am Mittwoch 18 Mai 2011 10:06:38 schrieb Markus Groß: Based on the device attach/detach code from the QEMU driver. --- src/libxl/libxl_driver.c | 519 ++ 1 files changed, 519 insertions(+), 0 deletions(-) diff --git a/src/libxl/libxl_driver.c

[libvirt] [PATCH v2] qemu : support persistent add/delete network interface

2011-05-18 Thread KAMEZAWA Hiroyuki
v2 here. error path tested. == From 73887fd3a37e3aa38bf4e031df9cf230e2635137 Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Wed, 18 May 2011 15:14:28 +0900 Subject: [PATCH] qemu - support persistent add/delete network interfaces This patch allows to modify

Re: [libvirt] [PATCH] Fix modifying disk devices in qemu driver

2011-05-18 Thread Markus Groß
Am Mittwoch 18 Mai 2011 09:22:43 schrieb Markus Groß: v2: - free dev before using it again. When modifying the disk devices of a live domain and the domain configuration, the function qemuDomainAttachDeviceConfig first sets dev-data-disk to NULL. Later qemuDomainAttachDeviceLive accesses

Re: [libvirt] [PATCH 9/9] add DHCP snooping support to nwfilter

2011-05-18 Thread Daniel Veillard
On Wed, May 18, 2011 at 09:46:21AM +0100, Daniel P. Berrange wrote: On Wed, May 18, 2011 at 01:34:33AM -0700, David Stevens wrote: Daniel Veillard veill...@redhat.com wrote on 05/17/2011 08:47:11 PM: [...] There should be no reason why DHCP wouldn't work on a migrated VM as well

[libvirt] [PATCH] qemu: fix typo in spice migration code

2011-05-18 Thread Michal Privoznik
This typo caused XPath returning improper value and thus not working spice after migration. --- src/qemu/qemu_migration.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index cb408ac..fcf8f9c 100644 ---

[libvirt] [PATCH 0/6] Clarify semantic of virDomain(G|S)et*Parameters functions

2011-05-18 Thread Matthias Bolte
This series was inspired by the discusion about invalid argument checking in the public API and the unclear semantic of this functions. https://www.redhat.com/archives/libvir-list/2011-May/msg01105.html Clarify that the getter functions don't allow to obtain a subset of the parameters. You can

[libvirt] [PATCH 4/6] Clarify that virDomainSet(Memory|Blkio)Parameters can take parameter subsets

2011-05-18 Thread Matthias Bolte
--- src/libvirt.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 2c2866e..3b41f1d 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -2992,11 +2992,11 @@ error: * virDomainSetMemoryParameters: * @domain: pointer to domain

[libvirt] [PATCH 2/6] Clarify the semantic of virDomainGetSchedulerParameters arguments

2011-05-18 Thread Matthias Bolte
params and nparams are essential and cannot be NULL. Check this in libvirt.c and remove redundant checks from the drivers (e.g. xend). Instead of enforcing that nparams must point to exact same value as returned by virDomainGetSchedulerType relax this to a lower bound check. This is what some

[libvirt] [PATCH 1/6] Clarify semantic of nparams argument of virDomainGetSchedulerType

2011-05-18 Thread Matthias Bolte
Some drivers assumed it can be NULL (e.g. qemu and lxc) and check it before assigning to it, other drivers assumed it must be non-NULL (e.g. test and esx) and just assigned to it. Unify this to nparams being optional and document it. --- src/esx/esx_driver.c |4 +++- src/libvirt.c

[libvirt] [PATCH 3/6] Clarify that virDomainSetSchedulerParameters(Flags) can take subset

2011-05-18 Thread Matthias Bolte
Add invalid argument checks for params and nparams to the public API and remove the from the drivers (e.g. xend). Add subset handling to libxl and test drivers. --- src/libvirt.c| 24 ++-- src/libxl/libxl_driver.c |6 -- src/test/test_driver.c | 27

[libvirt] [PATCH 6/6] Improve invalid argument checks for the public API

2011-05-18 Thread Matthias Bolte
--- src/libvirt.c | 82 1 files changed, 76 insertions(+), 6 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index d6e222e..a423e77 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -1390,7 +1390,7 @@ int

[libvirt] [PATCH 5/6] Clarify that virDomainGet(Memory|Blkio)Parameters doesn't support subsets

2011-05-18 Thread Matthias Bolte
Improve invalid argument checks in the size query case. The drivers already relied on this unchecked behavior. Relax the implementation of virDomainGet(Memory|Blkio)MemoryParameters in the drivers and allow to pass more memory than necessary for all parameters. --- src/libvirt.c | 13

Re: [libvirt] [PATCH 2/6] Clarify the semantic of virDomainGetSchedulerParameters arguments

2011-05-18 Thread Daniel Veillard
On Wed, May 18, 2011 at 12:21:09PM +0200, Matthias Bolte wrote: params and nparams are essential and cannot be NULL. Check this in libvirt.c and remove redundant checks from the drivers (e.g. xend). Instead of enforcing that nparams must point to exact same value as returned by

Re: [libvirt] [PATCH 0/6] Clarify semantic of virDomain(G|S)et*Parameters functions

2011-05-18 Thread Daniel Veillard
On Wed, May 18, 2011 at 12:21:07PM +0200, Matthias Bolte wrote: This series was inspired by the discusion about invalid argument checking in the public API and the unclear semantic of this functions. https://www.redhat.com/archives/libvir-list/2011-May/msg01105.html Clarify that the getter

Re: [libvirt] [PATCH 9/9] add DHCP snooping support to nwfilter

2011-05-18 Thread Daniel Veillard
On Wed, May 18, 2011 at 01:34:33AM -0700, David Stevens wrote: Daniel Veillard veill...@redhat.com wrote on 05/17/2011 08:47:11 PM: Like Dan I'm worried by removing this functionality. As far as I know most switches learn IP from their clients using ARP snooping, this is I think more

Re: [libvirt] [PATCH] Add support for 'passthru' mode for direct network interfaces

2011-05-18 Thread D. Herrendoerfer
On May 18, 2011, at 10:53 AM, Daniel Veillard wrote: On Tue, May 17, 2011 at 08:19:17PM -0600, Eric Blake wrote: On 05/17/2011 05:26 AM, D. Herrendoerfer wrote: This patch includes the documentation part. The error returned by libvirt when a using an older kernel is imho sufficient to point

Re: [libvirt] [PATCH] qemu: fix typo in spice migration code

2011-05-18 Thread Daniel P. Berrange
On Wed, May 18, 2011 at 11:59:34AM +0200, Michal Privoznik wrote: This typo caused XPath returning improper value and thus not working spice after migration. --- src/qemu/qemu_migration.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_migration.c

Re: [libvirt] [PATCH] Fix messages using VIR_ERR_XML_ERROR

2011-05-18 Thread Cole Robinson
On 05/13/2011 08:35 AM, Michal Prívozník wrote: On 05/12/2011 11:47 PM, Cole Robinson wrote: This error code has existed since the dawn of time, yet the messages it generates are almost universally busted. Here's a small sampling: src/conf/domain_conf.c:4889 : XML description for missing root

Re: [libvirt] [PATCH] qemu: fix typo in spice migration code

2011-05-18 Thread Michal Prívozník
On 18.05.2011 15:02, Daniel P. Berrange wrote: On Wed, May 18, 2011 at 11:59:34AM +0200, Michal Privoznik wrote: This typo caused XPath returning improper value and thus not working spice after migration. --- src/qemu/qemu_migration.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [libvirt] [PATCH] Fix messages using VIR_ERR_XML_ERROR

2011-05-18 Thread Michal Prívozník
On 18.05.2011 15:41, Cole Robinson wrote: On 05/13/2011 08:35 AM, Michal Prívozník wrote: On 05/12/2011 11:47 PM, Cole Robinson wrote: This error code has existed since the dawn of time, yet the messages it generates are almost universally busted. Here's a small sampling:

[libvirt] Trying to re-compile libvirt package on Ubuntu Lucid

2011-05-18 Thread Lars Nordin
I'm trying to rebuild Ubuntu's libvirt packages to turn on ESX support. I've downloaded the Ubuntu source package for Lucid (updated Lucid package) dget -u http://archive.ubuntu.com/ubuntu/pool/main/libv/libvirt/libvirt_0.7.5-5ubuntu27.11.dsc I try and re-compile dpkg-buildpackage

Re: [libvirt] [PATCH] Fix messages using VIR_ERR_XML_ERROR

2011-05-18 Thread Eric Blake
On 05/12/2011 03:47 PM, Cole Robinson wrote: This error code has existed since the dawn of time, yet the messages it generates are almost universally busted. Here's a small sampling: src/conf/domain_conf.c:4889 : XML description for missing root element is not well formed or invalid

Re: [libvirt] Trying to re-compile libvirt package on Ubuntu Lucid

2011-05-18 Thread Eric Blake
On 05/18/2011 08:01 AM, Lars Nordin wrote: testing with corrupted config: log_level Skipping test (due to Ubuntu buildd FTBFS): running libvirtd with a valid config file (2 seconds) FAIL: daemon-conf If I'm not mistaken, this is due to a testsuite bug and not a problem with libvirt

Re: [libvirt] [PATCH] Add support for 'passthru' mode for direct network interfaces

2011-05-18 Thread Eric Blake
On 05/18/2011 05:32 AM, D. Herrendoerfer wrote: destination device is in codeprivate/code mode./dd + dtcodepassthru/code/dt + ddThis feature allows to attach a virtual function of a SRIOV capable That patch looks fine to me, ACK, The only unresolved uncertainty to me is

Re: [libvirt] [PATCHv2 0/6] flush my patch queue

2011-05-18 Thread Eric Blake
On 05/18/2011 12:36 AM, Wen Congyang wrote: At 05/18/2011 07:36 AM, Eric Blake Write: I've been building up a grab bag of un-acked patches (a couple have had reviews, but most have met list silence), so I figured a repost would help. Eric Blake (6): build: update to latest gnulib

Re: [libvirt] [PATCHv2 1/6] build: update to latest gnulib

2011-05-18 Thread Eric Blake
On 05/18/2011 12:27 AM, Matthias Bolte wrote: 2011/5/18 Eric Blake ebl...@redhat.com: * .gnulib: Update, for bootstrap and other fixes. * bootstrap: Resynchronize with gnulib. --- v2: not sure I've sent a v1 on list, so this is a new patch ACK. Thanks; pushed. -- Eric Blake

Re: [libvirt] [PATCH 1/7] libvirt.h: consolidate typed parameter handling

2011-05-18 Thread Eric Blake
On 05/18/2011 02:11 AM, Daniel Veillard wrote: typedef enum { -VIR_DOMAIN_SCHED_FIELD_INT = 1, /* integer case */ -VIR_DOMAIN_SCHED_FIELD_UINT= 2, /* unsigned integer case */ -VIR_DOMAIN_SCHED_FIELD_LLONG = 3, /* long long case */ -VIR_DOMAIN_SCHED_FIELD_ULLONG =

Re: [libvirt] [PATCH 3/7] sched: introduce virDomainGetSchedulerParametersFlags

2011-05-18 Thread Eric Blake
On 05/17/2011 09:18 PM, Hu Tao wrote: +int +virDomainGetSchedulerParametersFlags(virDomainPtr domain, + virSchedParameterPtr params, int *nparams, + unsigned int flags) +{ +virConnectPtr conn; + +

Re: [libvirt] [PATCH] Fix messages using VIR_ERR_XML_ERROR

2011-05-18 Thread Cole Robinson
On 05/18/2011 10:03 AM, Eric Blake wrote: On 05/12/2011 03:47 PM, Cole Robinson wrote: This error code has existed since the dawn of time, yet the messages it generates are almost universally busted. Here's a small sampling: src/conf/domain_conf.c:4889 : XML description for missing root

Re: [libvirt] [PATCHv2 3/6] virsh: optimize creation of default connection

2011-05-18 Thread Matthias Bolte
2011/5/18 Eric Blake ebl...@redhat.com: Ramon de Carvalho Valle reported a problem with: virsh connect qemu:///system as a non-root user.  The real root problem appears to be a regression in libvirtd being auto-started on the default qemu:///session URI; however, the symptom points to an

[libvirt] [PATCH 2/4] New error code VIR_ERR_XML_CONFIG

2011-05-18 Thread Michal Privoznik
Up to now developers didn't know which error code to use, when invalid attribute/element value was given (e.g. string when expecting integer), something was missing, etc. This patch creates a new error code for cases like that. VIR_ERR_XML_ERROR should really be used when given XML is invalid,

[libvirt] [PATCH 3/4] Improve incorrect root element error messages

2011-05-18 Thread Michal Privoznik
--- src/conf/cpu_conf.c |7 --- src/conf/domain_conf.c| 12 src/conf/interface_conf.c |6 -- src/conf/network_conf.c |6 -- src/conf/node_device_conf.c |6 -- src/conf/secret_conf.c|6 --

[libvirt] [PATCH 1/4] Fix error messages codes when TypeFromString fails

2011-05-18 Thread Michal Privoznik
--- src/conf/cpu_conf.c|4 +- src/conf/domain_conf.c | 100 ++- src/conf/interface_conf.c |2 +- src/conf/network_conf.c|2 +- src/conf/node_device_conf.c|4 +- src/conf/nwfilter_conf.c

[libvirt] [PATCH 4/4] Change XML parsing error codes when details are presented.

2011-05-18 Thread Michal Privoznik
Error messages which contain any additional info should be using VIR_ERR_XML_CONFIG instead of VIR_ERR_XML_ERROR. --- src/conf/cpu_conf.c|2 +- src/conf/domain_conf.c | 42 +++--- src/conf/interface_conf.c | 46

Re: [libvirt] [PATCHv2 4/6] build: make python optional at configure time

2011-05-18 Thread Matthias Bolte
2011/5/18 Eric Blake ebl...@redhat.com: Regression introduced in commit 53cb23f4. * configure.ac: Let --with-python default to check. --- v2: no change from v1 v1: https://www.redhat.com/archives/libvir-list/2011-May/msg00412.html  configure.ac |   29 -  1

Re: [libvirt] [PATCHv2 5/6] build: silence clang false positive

2011-05-18 Thread Matthias Bolte
2011/5/18 Eric Blake ebl...@redhat.com: Clang couldn't quite see that the same condition of (flags VIR_DOMAIN_MEM_CONFIG) is used twice, such that the second block is guaranteed that def was assigned in the first block. * src/libxl/libxl_driver.c (libxlDomainSetMemoryFlags): Add a hint for

Re: [libvirt] [PATCH 2.5/7] maint: prefer newer API names internally

2011-05-18 Thread Daniel P. Berrange
On Wed, May 18, 2011 at 09:51:44AM -0600, Eric Blake wrote: diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 7cd6e13..2174cfd 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -308,6 +308,10 @@ typedef enum { * virTypedParameter:

Re: [libvirt] [PATCH 0/6] Clarify semantic of virDomain(G|S)et*Parameters functions

2011-05-18 Thread Matthias Bolte
2011/5/18 Daniel Veillard veill...@redhat.com: On Wed, May 18, 2011 at 12:21:07PM +0200, Matthias Bolte wrote: This series was inspired by the discusion about invalid argument checking in the public API and the unclear semantic of this functions.

Re: [libvirt] [PATCH 2/6] Clarify the semantic of virDomainGetSchedulerParameters arguments

2011-05-18 Thread Matthias Bolte
2011/5/18 Daniel Veillard veill...@redhat.com: On Wed, May 18, 2011 at 12:21:09PM +0200, Matthias Bolte wrote: params and nparams are essential and cannot be NULL. Check this in libvirt.c and remove redundant checks from the drivers (e.g. xend). Instead of enforcing that nparams must point to

Re: [libvirt] [PATCH] Improve invalid argument checks for the public API

2011-05-18 Thread Matthias Bolte
2011/5/18 Matthias Bolte matthias.bo...@googlemail.com: 2011/5/18 Daniel Veillard veill...@redhat.com: On Tue, May 17, 2011 at 09:46:34AM -0600, Eric Blake wrote: On 05/17/2011 07:14 AM, Daniel Veillard wrote: On Tue, May 17, 2011 at 02:45:44PM +0200, Matthias Bolte wrote: ---  

Re: [libvirt] [PATCH 2.5/7] maint: prefer newer API names internally

2011-05-18 Thread Eric Blake
On 05/18/2011 10:14 AM, Daniel P. Berrange wrote: While the structs are ABI compatible, this still constitutes a change in API. ie apps doing this int np = 5; struct _virMemoryParameter p[np]; Apps shouldn't be doing this (struct _virMemoryParameter is a private name). Furthermore,

Re: [libvirt] [PATCH 3/6] Clarify that virDomainSetSchedulerParameters(Flags) can take subset

2011-05-18 Thread Eric Blake
On 05/18/2011 04:21 AM, Matthias Bolte wrote: Add invalid argument checks for params and nparams to the public API and remove the from the drivers (e.g. xend). Add subset handling to libxl and test drivers. @@ -5092,6 +5092,12 @@ virDomainSetSchedulerParameters(virDomainPtr domain,

Re: [libvirt] [PATCH 2.5/7] maint: prefer newer API names internally

2011-05-18 Thread Daniel P. Berrange
On Wed, May 18, 2011 at 10:32:29AM -0600, Eric Blake wrote: On 05/18/2011 10:14 AM, Daniel P. Berrange wrote: While the structs are ABI compatible, this still constitutes a change in API. ie apps doing this int np = 5; struct _virMemoryParameter p[np]; Apps shouldn't be doing

Re: [libvirt] [Bug 702602] [PATCH] OpenVZ configuration files parsing

2011-05-18 Thread Taisuke Yamada
Hi. As reported by Diego Blanco in - https://bugzilla.redhat.com/show_bug.cgi?id=702602 commit f0443765 which replaced openvz_readline to getline(3) broke OpenVZ driver as it changed semantics of EOF-handling when parsing OpenVZ configuration. There're several other issues reported with

Re: [libvirt] [PATCH 3/6] Clarify that virDomainSetSchedulerParameters(Flags) can take subset

2011-05-18 Thread Matthias Bolte
2011/5/18 Eric Blake ebl...@redhat.com: On 05/18/2011 04:21 AM, Matthias Bolte wrote: Add invalid argument checks for params and nparams to the public API and remove the from the drivers (e.g. xend). Add subset handling to libxl and test drivers. @@ -5092,6 +5092,12 @@

Re: [libvirt] [PATCH 2.5/7] maint: prefer newer API names internally

2011-05-18 Thread Eric Blake
On 05/18/2011 10:55 AM, Daniel P. Berrange wrote: Apps shouldn't be doing this (struct _virMemoryParameter is a private name). Furthermore, we already deleted that private name in patch 1/7; applications using the private name will now be declaring an incomplete type, which explains the

[libvirt] [PATCH] Blank out the 'listenAddr' parameter if empty string

2011-05-18 Thread Daniel P. Berrange
Some bogus apps are generating a VNC/SPICE/RFB listen attribute with no content. This then causes a failure with the graphics migration cookie parsing. Blank out the 'listenAddr' parameter after parsing domain XML if it is the empty string, so the host default takes over *

[libvirt] [PATCH] Fix QEMU migration cookie crash for guests with no graphics

2011-05-18 Thread Daniel P. Berrange
When generating a cookie for a guest with no data, the QEMU_MIGRATION_COOKIE_GRAPHICS flag was set even if no graphics data was added. Avoid setting the flag unless it was needed, also add a safety check for mig-graphics being non-NULL * src/qemu/qemu_migration.c: Avoid cookie crash for guest

[libvirt] [PATCH] Ensure virStrerror always sets an error string

2011-05-18 Thread Daniel P. Berrange
strerror_r() is free to not set any error string, if the passed errno is not valid. It may, however, still return a pointer to the original passed in buffer. This resulting in random garbage from the stack being present as the error string. To reliably detect case where no error string is set,

[libvirt] [PATCH] Don't generate cookies with v2 migration protocol.

2011-05-18 Thread Daniel P. Berrange
The v2 migration protocol had a limit on cookie length that was too small to be useful for QEMU. Avoid generating cookies with v2 protocol, so that old libvirtd can still reliably migrate a guest to new libvirtd uses v2 protocol. * src/qemu/qemu_driver.c: Avoid migration cookies with v2

[libvirt] [PATCH] Ensure p2p and direct migration use the new v3 protocol if available

2011-05-18 Thread Daniel P. Berrange
The internal virDomainMigratePeer2Peer and virDomainMigrateDirect helper methods were not checking whether the target supports the v3 migration protocol. * src/libvirt.c: Use v3 migration protocol for p2p/direct migration if available. --- src/libvirt.c | 60

Re: [libvirt] [PATCH] Blank out the 'listenAddr' parameter if empty string

2011-05-18 Thread Eric Blake
On 05/18/2011 11:08 AM, Daniel P. Berrange wrote: Some bogus apps are generating a VNC/SPICE/RFB listen attribute with no content. This then causes a failure with the graphics migration cookie parsing. Blank out the 'listenAddr' parameter after parsing domain XML if it is the empty string, so

Re: [libvirt] [PATCH] Ensure virStrerror always sets an error string

2011-05-18 Thread Matthias Bolte
2011/5/18 Daniel P. Berrange berra...@redhat.com: strerror_r() is free to not set any error string, if the passed errno is not valid. It may, however, still return a pointer to the original passed in buffer. This resulting in random garbage from the stack being present as the error string.

[libvirt] [PATCH 0/3] Allow extra URI and target VM XML when migrating

2011-05-18 Thread Daniel P. Berrange
This series takes advantage of the fact that we've not yet released the v3 migration protocol, to add support for some extra migration parameters. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 1/3] Extend v3 migration protocol to allow app supplied XML for target

2011-05-18 Thread Daniel P. Berrange
This extends the v3 migration protocol such that the virDomainMigrateBegin3 and virDomainMigratePerform3 methods accept an application supplied XML config for the target VM. If the 'xmlin' parameter is NULL, then Begin3 uses the current guest XML as normal. A driver implementing the Begin3 method

[libvirt] [PATCH 2/3] Add a second URI parameter to virDomainMigratePerform3 method

2011-05-18 Thread Daniel P. Berrange
The virDomainMigratePerform3 currently has a single URI parameter whose meaning varies. It is either - A QEMU migration URI (normal migration) - A libvirtd connection URI (peer2peer migration) Unfortunately when using peer2peer migration, without also using tunnelled migration, it is possible

Re: [libvirt] [PATCH] Ensure virStrerror always sets an error string

2011-05-18 Thread Eric Blake
[adding bug-gnulib] On 05/18/2011 11:07 AM, Daniel P. Berrange wrote: strerror_r() is free to not set any error string, if the passed errno is not valid. It may, however, still return a pointer to the original passed in buffer. This resulting in random garbage from the stack being present as

Re: [libvirt] [PATCH] Ensure p2p and direct migration use the new v3 protocol if available

2011-05-18 Thread Eric Blake
On 05/18/2011 11:08 AM, Daniel P. Berrange wrote: The internal virDomainMigratePeer2Peer and virDomainMigrateDirect helper methods were not checking whether the target supports the v3 migration protocol. * src/libvirt.c: Use v3 migration protocol for p2p/direct migration if available.

Re: [libvirt] [PATCH] Fix QEMU migration cookie crash for guests with no graphics

2011-05-18 Thread Eric Blake
On 05/18/2011 11:08 AM, Daniel P. Berrange wrote: When generating a cookie for a guest with no data, the QEMU_MIGRATION_COOKIE_GRAPHICS flag was set even if no graphics data was added. Avoid setting the flag unless it was needed, also add a safety check for mig-graphics being non-NULL *

Re: [libvirt] inquiry, get native capabilities of the host

2011-05-18 Thread Dong-In David Kang
Hi Jirka, Thank you for the answer. It is a very useful method to checking if the host can support a feature is useful. However, OpenStack uses libvirt in a different way. OpenStack collects the capabilities of a machine when the machine registers itself to the cloud as a compute node.

Re: [libvirt] [PATCH] Don't generate cookies with v2 migration protocol.

2011-05-18 Thread Daniel P. Berrange
On Wed, May 18, 2011 at 11:47:25AM -0600, Eric Blake wrote: On 05/18/2011 11:08 AM, Daniel P. Berrange wrote: The v2 migration protocol had a limit on cookie length that was too small to be useful for QEMU. Avoid generating cookies with v2 protocol, so that old libvirtd can still reliably

Re: [libvirt] [PATCH] Ensure virStrerror always sets an error string

2011-05-18 Thread Daniel P. Berrange
On Wed, May 18, 2011 at 11:27:28AM -0600, Eric Blake wrote: [adding bug-gnulib] On 05/18/2011 11:07 AM, Daniel P. Berrange wrote: strerror_r() is free to not set any error string, if the passed errno is not valid. It may, however, still return a pointer to the original passed in buffer.

[libvirt] API Proposal: Block device streaming (V3)

2011-05-18 Thread Adam Litke
Version 2 of the block device streaming API diverged significantly from the original API provided by Qemu. In an effort to provide an API that is designed to work well for the specific task of streaming data to a local device from its backing store I am proposing this: version 3 of the block

Re: [libvirt] [PATCHv2 3/6] virsh: optimize creation of default connection

2011-05-18 Thread Eric Blake
On 05/18/2011 09:40 AM, Matthias Bolte wrote: 2011/5/18 Eric Blake ebl...@redhat.com: Ramon de Carvalho Valle reported a problem with: virsh connect qemu:///system as a non-root user. The real root problem appears to be a regression in libvirtd being auto-started on the default

Re: [libvirt] [PATCHv2 5/6] build: silence clang false positive

2011-05-18 Thread Eric Blake
On 05/18/2011 09:49 AM, Matthias Bolte wrote: 2011/5/18 Eric Blake ebl...@redhat.com: Clang couldn't quite see that the same condition of (flags VIR_DOMAIN_MEM_CONFIG) is used twice, such that the second block is guaranteed that def was assigned in the first block. *

Re: [libvirt] [PATCHv2 6/6] remote: remove special case for getting version

2011-05-18 Thread Matthias Bolte
2011/5/18 Eric Blake ebl...@redhat.com: The on-the-wire protocol is identical; XDR guarantees that both 'hyper' and 'unsigned hyper' are transmitted as 8 bytes. * src/remote/remote_protocol.x (remote_get_version_ret) (remote_get_lib_version_ret): Match public API. *

[libvirt] Appending REJECT rules.

2011-05-18 Thread Stephen O'Dor
Greetings folks, I've patched the libvirt iptables interface to append it's REJECT rules rather than insert at the head. Idea being that I'm not the only person who usually puts the REJECTs at the end of a chain. In my particular case any custom ACCEPT rules involving the bridge interfaces would

Re: [libvirt] [PATCHv2 6/6] remote: remove special case for getting version

2011-05-18 Thread Eric Blake
On 05/18/2011 01:34 PM, Matthias Bolte wrote: 2011/5/18 Eric Blake ebl...@redhat.com: The on-the-wire protocol is identical; XDR guarantees that both 'hyper' and 'unsigned hyper' are transmitted as 8 bytes. * src/remote/remote_protocol.x (remote_get_version_ret) (remote_get_lib_version_ret):

Re: [libvirt] [PATCH] Blank out the 'listenAddr' parameter if empty string

2011-05-18 Thread Wen Congyang
At 05/19/2011 01:08 AM, Daniel P. Berrange Write: Some bogus apps are generating a VNC/SPICE/RFB listen attribute with no content. This then causes a failure with the graphics migration cookie parsing. Blank out the 'listenAddr' parameter after parsing domain XML if it is the empty string, so

Re: [libvirt] [PATCH] Fix QEMU migration cookie crash for guests with no graphics

2011-05-18 Thread Wen Congyang
At 05/19/2011 01:08 AM, Daniel P. Berrange Write: When generating a cookie for a guest with no data, the QEMU_MIGRATION_COOKIE_GRAPHICS flag was set even if no graphics data was added. Avoid setting the flag unless it was needed, also add a safety check for mig-graphics being non-NULL *

Re: [libvirt] why is network i/o always zero?

2011-05-18 Thread 黄亮
Well, it's a HVM guest. So, should I install the paravirt driver if i need the statistcs? 2011-05-19 黄亮 发件人: Daniel P. Berrange 发送时间: 2011-05-13 17:44:29 收件人: 黄亮 抄送: libvir-list 主题: Re: [libvirt] why is network i/o always zero? On Wed, May 11, 2011 at 09:32:53PM +0800, 黄亮 wrote: