[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v2 1/3] Add support for limiting guest coredump



On Thu, Sep 20, 2012 at 10:58:13AM +0200, Martin Kletzander wrote:
> Sometimes when guest machine crashes, coredump can get huge due to the
> guest memory. This can be limited using madvise(2) system call and is
> being used in QEMU hypervisor. This patch adds an option for configuring
> that in the domain XML and related documentation.
> ---
>  docs/formatdomain.html.in     | 12 +++++++++---
>  docs/schemas/domaincommon.rng |  8 ++++++++
>  src/conf/domain_conf.c        | 25 ++++++++++++++++++++++++-
>  src/conf/domain_conf.h        | 10 ++++++++++
>  src/libvirt_private.syms      |  2 ++
>  5 files changed, 53 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index d021837..210ebe0 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -515,9 +515,15 @@
>          However, the value will be rounded up to the nearest kibibyte
>          by libvirt, and may be further rounded to the granularity
>          supported by the hypervisor.  Some hypervisors also enforce a
> -        minimum, such as
> -        4000KiB. <span class='since'><code>unit</code> since
> -        0.9.11</span></dd>
> +        minimum, such as 4000KiB.
> +
> +        In the case of crash, optional attribute <code>dump-core</code>
> +        can be used to control whether the guest memory should be
> +        included in the generated coredump or not (values "on", "off").
> +
> +        <span class='since'><code>unit</code> since 0.9.11</span>,
> +        <span class='since'><code>dump-core</code> since 0.10.2
> +        (QEMU only)</span></dd>
>        <dt><code>currentMemory</code></dt>
>        <dd>The actual allocation of memory for the guest. This value can
>          be less than the maximum allocation, to allow for ballooning
> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
> index ed25f58..bf6afbb 100644
> --- a/docs/schemas/domaincommon.rng
> +++ b/docs/schemas/domaincommon.rng
> @@ -470,6 +470,14 @@
>      <interleave>
>        <element name="memory">
>          <ref name='scaledInteger'/>
> +        <optional>
> +          <attribute name="dump-core">

As a general rule we have avoided use of '-' in XML element/attribute
names, so this ought to be 'dumpCore' IMHO

> +            <choice>
> +              <value>on</value>
> +              <value>off</value>
> +            </choice>
> +          </attribute>
> +        </optional>
>        </element>
>        <optional>
>          <element name="currentMemory">

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]