Re: [libvirt] [PATCH 5/4] qemu: properly revert to offline snapshots

2011-08-10 Thread Philipp Hahn
Hello Eric, you're patch looks very similar to mine, which I created myself yesterday, but hadn't had time to actually send after doing the testing. I'll attach it just FYI. On Wednesday 10 August 2011 01:28:42 Eric Blake wrote: qemuDomainSnapshotRevertInactive has the same FIXMEs as

[libvirt] problem with outbound limiting

2011-08-10 Thread Upendra Moturi
Hi I am using 0.9.4 version of libvirt and want to limit bandwidth. I installed libvirt on ubuntu 11.04 using libvirt source. For this i am using the QOS configuration devices interface type='network' source network='default'/ target dev='vnet0'/ *bandwidth inbound

Re: [libvirt] problem with outbound limiting

2011-08-10 Thread Upendra Moturi
small correction it is not mbps ,it is MBps On Wed, Aug 10, 2011 at 12:06 PM, Upendra Moturi upendr...@hexagrid.comwrote: Hi I am using 0.9.4 version of libvirt and want to limit bandwidth. I installed libvirt on ubuntu 11.04 using libvirt source. For this i am using the QOS configuration

Re: [libvirt] [PATCH] qemu: Fix -chardev udp if parameters are omitted

2011-08-10 Thread Daniel Veillard
On Tue, Mar 22, 2011 at 04:08:10PM -0600, Eric Blake wrote: On 03/22/2011 02:36 PM, Cole Robinson wrote: The following XML: serial type='udp' source mode='connect' service=''/ /serial is accepted by domain_conf.c but maps to the qemu command line: -chardev

[libvirt] [PATCH] nwfilter: tolerate disappearing interfaces while instantiating filter

2011-08-10 Thread Stefan Berger
When instantiating a filter, a VM may disappear and remove its tap interfaces. Tolerate this case and don't report an error. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/nwfilter/nwfilter_gentech_driver.c | 14 +++--- 1 file changed, 11 insertions(+), 3

Re: [libvirt] [PATCH 5/4] qemu: properly revert to offline snapshots

2011-08-10 Thread Eric Blake
On 08/10/2011 12:24 AM, Philipp Hahn wrote: Hello Eric, you're patch looks very similar to mine, which I created myself yesterday, but hadn't had time to actually send after doing the testing. I'll attach it just FYI. On Wednesday 10 August 2011 01:28:42 Eric Blake wrote:

[libvirt] managedsave vs. transient domains

2011-08-10 Thread Eric Blake
How in the world is managedsave supposed to work on transient domains? The moment you save a domain, the qemu process is ended; but ending the qemu process means that a transient domain no longer has any state tracked by libvirt. Should libvirt be temporarily defining a domain when creating a

[libvirt] [PATCH] managedsave: prohibit use on transient domains

2011-08-10 Thread Eric Blake
Transient domains reject attempts to set autostart, and using virDomainCreate to restart a domain only works on persistent domains. Therefore, managed save makes no sense on transient domains, and should be rejected up front rather than creating an otherwise unrecoverable managed save file. *

[libvirt] [PATCH] Bugfix: Check stdoutWatch before removing the handler.

2011-08-10 Thread Juerg Haefliger
--- tools/console.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/console.c b/tools/console.c index 11087e5..171ebc9 100644 --- a/tools/console.c +++ b/tools/console.c @@ -95,7 +95,7 @@ virConsoleShutdown(virConsolePtr con) virStreamFree(con-st); if

Re: [libvirt] [PATCH] docs: describe new virtual switch configuration in network XML docs

2011-08-10 Thread Eric Blake
On 08/09/2011 11:45 PM, Laine Stump wrote: This should have been done with the rest of the patch for virtual switch / network device abstraction. And I should have called you on this before the 0.9.4 release - oh well :) + A portgroup provides a method of easily putting guest +

Re: [libvirt] problem with outbound limiting

2011-08-10 Thread Stefan Berger
On 08/10/2011 02:55 AM, Upendra Moturi wrote: Hi, does this patch solve your problem? I am setting the MTU to fixed 2kb. Doing tests with scp seems to indicate that this improved the situation -- at least for me. Stefan Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com ---

Re: [libvirt] [PATCH] Bugfix: Check stdoutWatch before removing the handler.

2011-08-10 Thread Dave Allan
On Wed, Aug 10, 2011 at 05:03:23PM +0200, Juerg Haefliger wrote: --- tools/console.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/console.c b/tools/console.c index 11087e5..171ebc9 100644 --- a/tools/console.c +++ b/tools/console.c @@ -95,7 +95,7 @@

Re: [libvirt] [PATCH] qemu: Fix -chardev udp if parameters are omitted

2011-08-10 Thread Eric Blake
On 08/10/2011 01:15 AM, Daniel Veillard wrote: On Tue, Mar 22, 2011 at 04:08:10PM -0600, Eric Blake wrote: On 03/22/2011 02:36 PM, Cole Robinson wrote: The following XML: serial type='udp' source mode='connect' service=''/ /serial is accepted by domain_conf.c but maps to

Re: [libvirt] [PATCH] nwfilter: tolerate disappearing interfaces while instantiating filter

2011-08-10 Thread Eric Blake
On 08/10/2011 04:34 AM, Stefan Berger wrote: When instantiating a filter, a VM may disappear and remove its tap interfaces. Tolerate this case and don't report an error. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com ACK with one nit: + rc = 0; + goto exit; + } + rc =

Re: [libvirt] problem with outbound limiting

2011-08-10 Thread Eric Blake
On 08/10/2011 09:04 AM, Stefan Berger wrote: On 08/10/2011 02:55 AM, Upendra Moturi wrote: Hi, does this patch solve your problem? I am setting the MTU to fixed 2kb. Doing tests with scp seems to indicate that this improved the situation -- at least for me. Stefan Signed-off-by: Stefan

Re: [libvirt] [PATCH 1/4] qemu: minor formatting cleanup

2011-08-10 Thread Eric Blake
On 08/05/2011 06:00 PM, Eric Blake wrote: I noticed some inconsistent use of 'else'. * src/qemu/qemu_driver.c (qemuCPUCompare) (qemuDomainSnapshotCreateXML, qemuDomainRevertToSnapshot) (qemuDomainSnapshotDiscard): Match coding conventions. --- No functional changes. I've pushed this under

Re: [libvirt] [PATCH] Bugfix: Check stdoutWatch before removing the handler.

2011-08-10 Thread Eric Blake
On 08/10/2011 09:09 AM, Dave Allan wrote: On Wed, Aug 10, 2011 at 05:03:23PM +0200, Juerg Haefliger wrote: --- tools/console.c |2 +- -if (con-stdinWatch != -1) +if (con-stdoutWatch != -1) virEventRemoveHandle(con-stdoutWatch); con-stdinWatch = -1;

[libvirt] [PATCH 0/5] Some rearrangement additions to pid file handling/locking

2011-08-10 Thread Daniel P. Berrange
This series is a collection of changes related to pidfiles. First we define some wrappers around fcntl()'s lock file capability. Then all existing pidfile APIs from src/util/util.h are moved into a new file src/util/virpidfile.h. Next a new API for doing a sanity check on a PID (using

[libvirt] [PATCH 3/5] Introduce functions for checking whether a pidfile is valid

2011-08-10 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com In some cases the caller of virPidFileRead might like extra checks to determine whether the pid just read is really the one they are expecting. This adds virPidFileReadIfValid which will check whether the pid is still alive with kill(0, -1), and (on

[libvirt] [PATCH 2/5] Move pidfile functions into util/virpidfile.{c, h}

2011-08-10 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The functions for manipulating pidfiles are in util/util.{c,h}. We will shortly be adding some further pidfile related functions. To avoid further growing util.c, this moves the pidfile related functions into a dedicated virpidfile.{c,h}. The functions

[libvirt] [PATCH 1/5] Add virFileLock and virFileUnlock APIs

2011-08-10 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add some simple wrappers around the fcntl() discretionary file locking capability. * src/util/util.c, src/util/util.h, src/libvirt_private.syms: Add virFileLock and virFileUnlock APIs --- src/libvirt_private.syms |2 + src/util/virfile.c

[libvirt] [PATCH 4/5] Add some APIs which use locking for crashsafe pidfile handling

2011-08-10 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com In daemons using pidfiles to protect against concurrent execution there is a possibility that a crash may leave a stale pidfile on disk, which then prevents later restart of the daemon. To avoid this problem, introduce a pair of APIs which make use of

Re: [libvirt] [PATCH] docs: describe new virtual switch configuration in network XML docs

2011-08-10 Thread Laine Stump
On 08/10/2011 11:05 AM, Eric Blake wrote: On 08/09/2011 11:45 PM, Laine Stump wrote: This should have been done with the rest of the patch for virtual switch / network device abstraction. And I should have called you on this before the 0.9.4 release - oh well :) A long time ago I used to

Re: [libvirt] problem with outbound limiting

2011-08-10 Thread Stefan Berger
On 08/10/2011 11:20 AM, Eric Blake wrote: On 08/10/2011 09:04 AM, Stefan Berger wrote: On 08/10/2011 02:55 AM, Upendra Moturi wrote: Hi, does this patch solve your problem? I am setting the MTU to fixed 2kb. Doing tests with scp seems to indicate that this improved the situation -- at least

Re: [libvirt] Is there smt missing at Java bindings?

2011-08-10 Thread Bryan Kearney
On 04/13/2011 02:43 AM, kadir yĆ¼ceer wrote: Hello all, I've been posting questions about my issue to the user list but it seems nobody can answer, so I had to try this list, sorry if there is any disturbance. Here is the case: I've been trying to develop a java app that can register callbacks

Re: [libvirt] [PATCH 5/4] qemu: properly revert to offline snapshots

2011-08-10 Thread Philipp Hahn
Hello Eric, thank you for the long description of active Am Mittwoch 10 August 2011 14:18:22 schrieb Eric Blake: Right now, qemu's _only_ use of active (which is set to non-zero by qemuDomainSnapshotSetCurrentActive) is to tell qemuBuildCommandLine to use -loadvm to revert to that point,

Re: [libvirt] [PATCH 0/2] Libvirt-java event handling

2011-08-10 Thread Bryan Kearney
On 07/25/2011 02:25 PM, j...@alien8.de wrote: From: Julian Stecklinajstec...@os.inf.tu-dresden.de I noticed that event handling in the libvirt Java bindings is incomplete. The first patch adds required data types and constants. The second relaxes the visibility of the Domain constructor,

Re: [libvirt] [Qemu-devel] [PATCH v4] XBZRLE delta for live migration of large memory apps

2011-08-10 Thread Anthony Liguori
On 08/10/2011 11:40 AM, Avi Kivity wrote: On 08/10/2011 07:23 PM, Anthony Liguori wrote: Right now we have capabilties in the form of -help output. If -help says -no-xzbrle disable xzbrle support (or -migration-compression xzbrle=off, or something) that's sufficient for management tools.

[libvirt] RFCv2: virDomainSnapshotCreateXML enhancements

2011-08-10 Thread Eric Blake
[BCC'ing those who have responded to earlier RFC's] I've posted previous RFCs for improving snapshot support: ideas on managing a subset of disks: https://www.redhat.com/archives/libvir-list/2011-May/msg00042.html ideas on managing snapshots of storage volumes not tied to a domain

[libvirt] [PATCH 2/2] virsh: fix snapshot-create-as to handle arbitrary names

2011-08-10 Thread Eric Blake
Found this while revising the previous patch to use xpath rather than strstr for undoing the escapse. * tools/virsh.c (cmdSnapshotCreateAs): Escape user input. --- tools/virsh.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index

[libvirt] [PATCHv2 1/2] virsh: add virsh snapshot-current --name

2011-08-10 Thread Eric Blake
Sometimes, full XML is too much; since most snapshot commands operate on a snapshot name, there should be an easy way to get at the current snapshot's name. * tools/virsh.c (cmdSnapshotCurrent): Add an option. * tools/virsh.pod (snapshot-current): Document it. --- v2: use xpath instead of

Re: [libvirt] [PATCH] Implement DNS SRV record into the bridge driver

2011-08-10 Thread Daniel Veillard
On Tue, Aug 09, 2011 at 05:50:55PM +0200, Michal Novotny wrote: Hi, this is the patch to the bridge driver and libvirt XML file to include support for the SRV records in the DNS. The syntax is based on DNSMasq man page and tests for both xml2xml and xml2argv were added as well.

Re: [libvirt] [PATCH] docs: describe new virtual switch configuration in network XML docs

2011-08-10 Thread Daniel Veillard
On Wed, Aug 10, 2011 at 12:20:15PM -0400, Laine Stump wrote: On 08/10/2011 11:05 AM, Eric Blake wrote: On 08/09/2011 11:45 PM, Laine Stump wrote: This should have been done with the rest of the patch for virtual switch / network device abstraction. And I should have called you on this

Re: [libvirt] [PATCH] managedsave: prohibit use on transient domains

2011-08-10 Thread Daniel Veillard
On Wed, Aug 10, 2011 at 08:54:20AM -0600, Eric Blake wrote: Transient domains reject attempts to set autostart, and using virDomainCreate to restart a domain only works on persistent domains. Therefore, managed save makes no sense on transient domains, and should be rejected up front rather

Re: [libvirt] [PATCHv2 1/2] virsh: add virsh snapshot-current --name

2011-08-10 Thread Daniel Veillard
On Wed, Aug 10, 2011 at 05:02:36PM -0600, Eric Blake wrote: Sometimes, full XML is too much; since most snapshot commands operate on a snapshot name, there should be an easy way to get at the current snapshot's name. * tools/virsh.c (cmdSnapshotCurrent): Add an option. * tools/virsh.pod

Re: [libvirt] [PATCH 2/2] virsh: fix snapshot-create-as to handle arbitrary names

2011-08-10 Thread Daniel Veillard
On Wed, Aug 10, 2011 at 05:02:37PM -0600, Eric Blake wrote: Found this while revising the previous patch to use xpath rather than strstr for undoing the escapse. typo, escape * tools/virsh.c (cmdSnapshotCreateAs): Escape user input. --- tools/virsh.c |4 ++-- 1 files changed, 2

Re: [libvirt] [PATCH] Implement DNS SRV record into the bridge driver

2011-08-10 Thread Daniel Veillard
On Thu, Aug 11, 2011 at 10:13:34AM +0800, Daniel Veillard wrote: On Tue, Aug 09, 2011 at 05:50:55PM +0200, Michal Novotny wrote: Hi, this is the patch to the bridge driver and libvirt XML file to include support for the SRV records in the DNS. The syntax is based on DNSMasq man page and

Re: [libvirt] [PATCH] managedsave: prohibit use on transient domains

2011-08-10 Thread Eric Blake
On 08/10/2011 08:19 PM, Daniel Veillard wrote: On Wed, Aug 10, 2011 at 08:54:20AM -0600, Eric Blake wrote: Transient domains reject attempts to set autostart, and using virDomainCreate to restart a domain only works on persistent domains. Therefore, managed save makes no sense on transient

Re: [libvirt] [PATCH] Implement DNS SRV record into the bridge driver

2011-08-10 Thread Laine Stump
On 08/10/2011 10:13 PM, Daniel Veillard wrote: On Tue, Aug 09, 2011 at 05:50:55PM +0200, Michal Novotny wrote: +char *portString = NULL; +char *priorityString = NULL; +char *weightString = NULL; +int port; +int priority; +int weight; +int ret = 0; + +if

Re: [libvirt] [PATCH 2/2] virsh: fix snapshot-create-as to handle arbitrary names

2011-08-10 Thread Eric Blake
On 08/10/2011 08:33 PM, Daniel Veillard wrote: On Wed, Aug 10, 2011 at 05:02:37PM -0600, Eric Blake wrote: Found this while revising the previous patch to use xpath rather than strstr for undoing the escapse. typo, escape I adjusted the message to fix that, then pushed this one first

Re: [libvirt] [PATCHv2 1/2] virsh: add virsh snapshot-current --name

2011-08-10 Thread Eric Blake
On 08/10/2011 08:32 PM, Daniel Veillard wrote: On Wed, Aug 10, 2011 at 05:02:36PM -0600, Eric Blake wrote: Sometimes, full XML is too much; since most snapshot commands operate on a snapshot name, there should be an easy way to get at the current snapshot's name. * tools/virsh.c

[libvirt] [PATCH] virsh: add snapshot-parent

2011-08-10 Thread Eric Blake
Down the road, I want to add virDomainSnapshotGetParent, and use the new API rather than xml scraping; but this virsh command can be implemented even without the new API. * tools/virsh.c (cmdSnapshotParent): New command. * tools/virsh.pod (snapshot-parent): Document it. --- Adding this will make

Re: [libvirt] [PATCH] Implement DNS SRV record into the bridge driver

2011-08-10 Thread Laine Stump
On 08/09/2011 11:50 AM, Michal Novotny wrote: Hi, this is the patch to the bridge driver and libvirt XML file to include support for the SRV records in the DNS. The syntax is based on DNSMasq man page and tests for both xml2xml and xml2argv were added as well. Signed-off-by: Michal

[libvirt] [PATCH] conf: eliminate redundat VIR_ALLOC of first element of hosts.

2011-08-10 Thread Laine Stump
virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def-hosts) if def-nhosts was 0. This is a waste of time, though, since VIR_REALLOC_N is called a few lines further down, prior to any use of def-hosts. --- src/conf/network_conf.c |8 1 files changed, 0 insertions(+), 8 deletions(-)

[libvirt] [PATCH] network: eliminate potential memory leak on parse failure

2011-08-10 Thread Laine Stump
While the first encountered dns host record is being parsed, it's possible for virNetworkDef::hosts to point to memory that has been allocated, but virNetworkDef::nhosts to still be 0. If there is a failure during that time, virNetworkDef::hosts will be leaked. Although this isn't currently the

[libvirt] [PATCH] docs: use IPv6 addresses in range reserved for documentation

2011-08-10 Thread Laine Stump
Pushed under the trivial rule. Someone in an IRC channel or an email pointed out a few days ago that the examples of IPv6 addresses in the libvirt documentation were not in the officially reserved documentation range. This addresses their concern. --- docs/formatnetwork.html.in |8