[libvirt] Using Restore in another host.

2011-04-03 Thread Marcela Castro León
Hello: I need to know if I can use the restore operation (virsh o the equivalent in libvirt) to recover a previous state of a guest, but recovered previously in another host. I did a test, but I got an error: The exactly sequence using virsh I testes is: On [HOST SOURCE]: Using virsh 1) save

[libvirt] [PATCH 17/20] storage: Remove PATH_MAX sized stack allocation from iSCSI backend

2011-04-03 Thread Matthias Bolte
--- src/storage/storage_backend_iscsi.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 6eff5f5..2e2e99e 100644 --- a/src/storage/storage_backend_iscsi.c +++

[libvirt] [PATCH 09/20] Use virFileAbsPath instead of manually creating the absolute path

2011-04-03 Thread Matthias Bolte
Removes multiple 4kb stack allocations. --- src/libvirt.c | 113 + 1 files changed, 42 insertions(+), 71 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 8be18d4..25f8d41 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@

[libvirt] [PATCH 08/20] xenxs: Remove PATH_MAX sized stack alocation in XM script parsing

2011-04-03 Thread Matthias Bolte
--- src/xenxs/xen_xm.c | 14 ++ 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/xenxs/xen_xm.c b/src/xenxs/xen_xm.c index 0acd120..22ad788 100644 --- a/src/xenxs/xen_xm.c +++ b/src/xenxs/xen_xm.c @@ -211,6 +211,7 @@ xenParseXM(virConfPtr conf, int

[libvirt] [PATCH 19/20] xend: Remove 4kb stack allocation

2011-04-03 Thread Matthias Bolte
--- src/xen/xend_internal.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 8859373..8b07a8a 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -279,11 +279,17 @@ istartswith(const char

[libvirt] [PATCH 13/20] openvz: Remove several larger stack allocations

2011-04-03 Thread Matthias Bolte
Replace openvz_readline with getline in several places to get rid of stack allocated buffers to hold lines. openvzReadConfigParam allocates memory for return values instead of expecting a preexisting buffer. --- src/openvz/openvz_conf.c | 141 +++-

[libvirt] [PATCH 06/20] qemu: Use heap allocated memory to read the monitor greeting

2011-04-03 Thread Matthias Bolte
Removing a 4kb stack allocation. Reduce stack buffer for virStrerror to the common 1kb instead of 4kb. --- src/qemu/qemu_process.c | 16 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 90fcea0..fc9fdae

[libvirt] [PATCH 11/20] phyp: Remove the last instance of stack allocating a 4kb volume key

2011-04-03 Thread Matthias Bolte
--- src/phyp/phyp_driver.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index fe2e99d..76207c2 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -2362,13 +2362,22 @@

[libvirt] [PATCH 16/20] xen: Remove PATH_MAX sized stack allocation from block stats code

2011-04-03 Thread Matthias Bolte
--- src/xen/block_stats.c | 52 +--- 1 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/xen/block_stats.c b/src/xen/block_stats.c index e7c80c9..6b4171d 100644 --- a/src/xen/block_stats.c +++ b/src/xen/block_stats.c @@ -113,34

[libvirt] [PATCH 18/20] uml: Remove PATH_MAX sized stack allocation from /proc parsing code

2011-04-03 Thread Matthias Bolte
--- src/uml/uml_driver.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index e2bd5f2..33849a0 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -1036,21 +1036,25 @@ static char

[libvirt] [PATCH 10/20] virsh: Remove two 4kb stack allocations

2011-04-03 Thread Matthias Bolte
--- tools/virsh.c | 23 +-- 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 19e3449..99da054 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2052,7 +2052,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)

[libvirt] [PATCH 15/20] qemu: Remove PATH_MAX sized stack allocation used in commandline building

2011-04-03 Thread Matthias Bolte
--- src/qemu/qemu_command.c | 43 ++- 1 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3138943..326a6b3 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3318,7

[libvirt] [PATCH 20/20] Use virBufferPtr for sexpr2string instead of manual buffer handling

2011-04-03 Thread Matthias Bolte
Removes 4kb stack allocation in the XenD subdriver. --- src/util/sexpr.c| 142 +++ src/util/sexpr.h|3 +- src/xen/xend_internal.c | 17 +- 3 files changed, 86 insertions(+), 76 deletions(-) diff --git a/src/util/sexpr.c

[libvirt] [PATCH 12/20] daemon: Remove 4kb stack allocation of security label

2011-04-03 Thread Matthias Bolte
--- daemon/remote.c | 20 ++-- 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 1700c2d..dd85ef1 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1607,7 +1607,7 @@ remoteDispatchDomainGetSecurityLabel(struct

[libvirt] [PATCH 03/20] ebtables: Remove PATH_MAX sized stack allocation

2011-04-03 Thread Matthias Bolte
--- src/util/ebtables.c | 44 +--- 1 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/util/ebtables.c b/src/util/ebtables.c index e3b8da4..27dce5d 100644 --- a/src/util/ebtables.c +++ b/src/util/ebtables.c @@ -266,29 +266,43 @@

[libvirt] [PATCH 07/20] sasl: Remove stack allocated 8kb temporary buffers

2011-04-03 Thread Matthias Bolte
Move the buffers to the heap allocated client/private data structs. --- daemon/libvirtd.c | 10 ++ daemon/libvirtd.h |1 + src/remote/remote_driver.c |8 +--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/daemon/libvirtd.c

[libvirt] [PATCH 05/20] phyp: Remove 16kb stack allocation

2011-04-03 Thread Matthias Bolte
Allocate on the heap instead. --- src/phyp/phyp_driver.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 51f9ff6..fe2e99d 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -115,12 +115,18

[libvirt] [PATCH 02/20] pci: Remove PATH_MAX sized stack allocations

2011-04-03 Thread Matthias Bolte
Use virAsprintf instead of snprintf. --- src/util/pci.c | 172 +--- 1 files changed, 127 insertions(+), 45 deletions(-) diff --git a/src/util/pci.c b/src/util/pci.c index 8d2dbb0..6ed96f4 100644 --- a/src/util/pci.c +++ b/src/util/pci.c @@

[libvirt] [PATCH 01/20] Remove PATH_MAX sized stack allocations related to virFileBuildPath

2011-04-03 Thread Matthias Bolte
Make virFileBuildPath operate on the heap instead of the stack. It allocates a buffer instead of expecting a preexisting buffer. --- src/conf/nwfilter_conf.c | 21 +++-- src/conf/storage_conf.c | 44 +++- src/util/util.c | 29

[libvirt] [PATCH 04/20] virt-aa-helper: Remove PATH_MAX sized stack allocations

2011-04-03 Thread Matthias Bolte
--- src/security/virt-aa-helper.c | 46 + 1 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 77df514..bb716e6 100644 --- a/src/security/virt-aa-helper.c +++

[libvirt] [PATCH 14/20] Remove PATH_MAX sized stack allocation from virFileOpenTtyAt

2011-04-03 Thread Matthias Bolte
--- src/util/util.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index 31feecc..c0391ad 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -1901,14 +1901,13 @@ int virFileOpenTtyAt(const char *ptmx, } if

[libvirt] [PATCH 00/20] Remove large stack allocations

2011-04-03 Thread Matthias Bolte
This is meant for post-0.9.0. The series removes many large stack allocations from the code base and makes it compile with -Wframe-larger-than=2500. This was inspired by Dan's patch for using gnulib's manywarnings warnings modules [1]. Where he mentioned that currently -Wframe-larger-than=20480

Re: [libvirt] [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change

2011-04-03 Thread Stefan Hajnoczi
On Tue, Mar 29, 2011 at 8:04 PM, Stefan Hajnoczi stefa...@linux.vnet.ibm.com wrote: Piggy-back on the guest CD-ROM polling to poll on the host.  Open and close the host CD-ROM file descriptor to ensure we read the new size and not a stale size. Two things are going on here: 1. If

[libvirt] [PATCH] vmx: Use case-insensitive compare functions for all content

2011-04-03 Thread Matthias Bolte
--- src/vmx/vmx.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 9f4d5fb..9a482ef 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -730,7 +730,7 @@ virVMXGetConfigLong(virConfPtr conf, const char *name, long long *number,

[libvirt] [PATCH] vmx: Support persistent CPU shares

2011-04-03 Thread Matthias Bolte
--- src/vmx/vmx.c| 43 ++ tests/vmx2xmldata/vmx2xml-case-insensitive-1.vmx |2 +- tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml |3 ++ tests/vmx2xmldata/vmx2xml-case-insensitive-2.xml |3 ++

Re: [libvirt] [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change

2011-04-03 Thread Blue Swirl
On Sun, Apr 3, 2011 at 2:57 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Tue, Mar 29, 2011 at 8:04 PM, Stefan Hajnoczi stefa...@linux.vnet.ibm.com wrote: Piggy-back on the guest CD-ROM polling to poll on the host.  Open and close the host CD-ROM file descriptor to ensure we read the new

Re: [libvirt] [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change

2011-04-03 Thread Stefan Hajnoczi
On Sun, Apr 3, 2011 at 2:12 PM, Blue Swirl blauwir...@gmail.com wrote: On Sun, Apr 3, 2011 at 2:57 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Tue, Mar 29, 2011 at 8:04 PM, Stefan Hajnoczi stefa...@linux.vnet.ibm.com wrote: Piggy-back on the guest CD-ROM polling to poll on the host.  Open

Re: [libvirt] [BUG] qemu quited unexpectedly will cause libvirtd crashed

2011-04-03 Thread Wen Congyang
At 04/01/2011 02:54 AM, Eric Blake Write: On 03/31/2011 12:42 AM, Wen Congyang wrote: So I try to use gdb and add sleep() to trigger this bug. I have posted two patches to fix 2 bugs. But there is still another bug, and I have no good way to fix it. Steps to reproduce this bug: 1. use

Re: [libvirt] [PATCH 1/6] virNodeGetCpuTime: Expose new API

2011-04-03 Thread Minoru Usui
Hi, Eric On Fri, 01 Apr 2011 10:19:20 -0600 Eric Blake ebl...@redhat.com wrote: On 03/31/2011 07:55 PM, Minoru Usui wrote: virNodeGetCpuTime: Expose new API include/libvirt/libvirt.h.in | 26 ++ src/libvirt_public.syms |1 + 2 files changed, 27

Re: [libvirt] [PATCH] vmx: Support persistent CPU shares

2011-04-03 Thread Daniel Veillard
On Sun, Apr 03, 2011 at 02:43:55PM +0200, Matthias Bolte wrote: --- src/vmx/vmx.c| 43 ++ tests/vmx2xmldata/vmx2xml-case-insensitive-1.vmx |2 +- tests/vmx2xmldata/vmx2xml-case-insensitive-1.xml |3 ++

Re: [libvirt] [RFC PATCH] build: detect doc build errors

2011-04-03 Thread Daniel Veillard
On Fri, Apr 01, 2011 at 04:06:50PM -0600, Eric Blake wrote: I'm still stumped by xsltproc complaining about nbsp; not being a valid XML entity, hence the (hackish) exemption in docs/Makefile.am that adds --html for a couple of .html.in files. But for the remaining files, this does make input