From nobody Sun Feb 8 13:10:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1595510590; cv=none; d=zohomail.com; s=zohoarc; b=S1mcEITmcCrzdf9CuV25BdWpCU7kzfoZHqnLCAODTZfqQOOjIRXGYyMUYjlJvsH2SlwDPW7iezl/WZfdMqZELc0kmieQF64qnK4lH+mjcq6rltla3Tzh1TsbXcynfawYzhTk3CL4KySwNjBqm5d4d9Fsz4UqGEw/W/DKN2tVqKY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595510590; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TJVG6vFqCbKSgkDSuoZFJ4BPr2OAmRpLNeAhi3lGZgo=; b=isu02sWjgN2fVtH1FLBqCs+Fa+Wtnc+1xp8vUCEqBRo8S9sUlHHtdyGmEd2yhGzOZcRlGunv4Eclc7Am63qkN8lAuymSayIwm7mbFY7pmtgIPUdE3vIn95vQioedAeMML0DHWbR1zJf+PBgjSe22Hn0zP2G8R75vRUthMmLhaQ0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1595510590120597.932432315112; Thu, 23 Jul 2020 06:23:10 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-150-ir5uAnqSP_SdwhuX-riYVw-1; Thu, 23 Jul 2020 09:22:39 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ACED9193F562; Thu, 23 Jul 2020 13:22:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B7028BEE8; Thu, 23 Jul 2020 13:22:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 55FAD1805316; Thu, 23 Jul 2020 13:22:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06NDMV1l028707 for ; Thu, 23 Jul 2020 09:22:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 63B6D19930; Thu, 23 Jul 2020 13:22:31 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA2BB2DE9A for ; Thu, 23 Jul 2020 13:22:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595510589; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=TJVG6vFqCbKSgkDSuoZFJ4BPr2OAmRpLNeAhi3lGZgo=; b=Pt/sCg0KLeJkMr6IzWSLSRNxKahxueeeuND8y+LQ8VMfmp4iIBWUlccWMt+E8UKlU26Dt4 kqKtOCk3hw+QoLdlzIuSMSBfboD7f2T2+nJT5Zf3dCqOeYyihwgi8h/VmdiwGffzVRwFSN 3g/ZgSDWi2TsKqJ9vZnq/feuEOzNgU4= X-MC-Unique: ir5uAnqSP_SdwhuX-riYVw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 24/32] docs: formatdomain-devices: Split out Date: Thu, 23 Jul 2020 15:21:29 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa --- docs/formatdomain-devices-memballoon.rst | 69 +++++++++++++++++++++++ docs/formatdomain-devices.rst | 71 +----------------------- docs/meson.build | 1 + 3 files changed, 71 insertions(+), 70 deletions(-) create mode 100644 docs/formatdomain-devices-memballoon.rst diff --git a/docs/formatdomain-devices-memballoon.rst b/docs/formatdomain-d= evices-memballoon.rst new file mode 100644 index 0000000000..39ec180c68 --- /dev/null +++ b/docs/formatdomain-devices-memballoon.rst @@ -0,0 +1,69 @@ +:anchor:`` + +Memory balloon device +~~~~~~~~~~~~~~~~~~~~~ + +A virtual memory balloon device is added to all Xen and KVM/QEMU guests. I= t will +be seen as ``memballoon`` element. It will be automatically added when +appropriate, so there is no need to explicitly add this element in the gue= st XML +unless a specific PCI slot needs to be assigned. :since:`Since 0.8.3, Xen,= QEMU +and KVM only` Additionally, :since:`since 0.8.4` , if the memballoon device +needs to be explicitly disabled, ``model=3D'none'`` may be used. + +Example: automatically added device with KVM + +:: + + ... + + + + ... + +Example: manually added device with static PCI slot 2 requested + +:: + + ... + + +
+ + + + + + +``model`` + The required ``model`` attribute specifies what type of balloon device = is + provided. Valid values are specific to the virtualization platform + + - 'virtio' - default with QEMU/KVM + - 'virtio-transitional' :since:`Since 5.2.0` + - 'virtio-non-transitional' :since:`Since 5.2.0` + - 'xen' - default with Xen + + See `Virtio transitional devices <#elementsVirtioTransitional>`__ for m= ore + details. + +``autodeflate`` + The optional ``autodeflate`` attribute allows to enable/disable (values + "on"/"off", respectively) the ability of the QEMU virtio memory balloon= to + release some memory at the last moment before a guest's process get kil= led by + Out of Memory killer. :since:`Since 1.3.1, QEMU and KVM only` + +``period`` + The optional ``period`` allows the QEMU virtio memory balloon driver to + provide statistics through the ``virsh dommemstat [domain]`` + command. By default, collection is not enabled. In order to enable, use= the + ``virsh dommemstat [domain] --period [number]`` command or + ``virsh edit`` command to add the option to the XML definition. The + ``virsh dommemstat`` will accept the options ``--live``, ``--current``,= or + ``--config``. If an option is not provided, the change for a running do= main + will only be made to the active guest. If the QEMU driver is not at the= right + revision, the attempt to set the period will fail. Large values (e.g. m= any + years) might be ignored. :since:`Since 1.1.1, requires QEMU 1.5` + +``driver`` + For model ``virtio`` memballoon, `Virtio-specific + options <#elementsVirtio>`__ can also be set. ( :since:`Since 3.5.0` ) diff --git a/docs/formatdomain-devices.rst b/docs/formatdomain-devices.rst index 819c05e531..35d1f0681a 100644 --- a/docs/formatdomain-devices.rst +++ b/docs/formatdomain-devices.rst @@ -56,76 +56,7 @@ following characters: ``[a-zA-Z0-9_-]``. :since:`Since 3= .9.0` .. include:: formatdomain-devices-chardev.rst .. include:: formatdomain-devices-sound.rst .. include:: formatdomain-devices-watchdog.rst - -:anchor:`` - -Memory balloon device -~~~~~~~~~~~~~~~~~~~~~ - -A virtual memory balloon device is added to all Xen and KVM/QEMU guests. I= t will -be seen as ``memballoon`` element. It will be automatically added when -appropriate, so there is no need to explicitly add this element in the gue= st XML -unless a specific PCI slot needs to be assigned. :since:`Since 0.8.3, Xen,= QEMU -and KVM only` Additionally, :since:`since 0.8.4` , if the memballoon device -needs to be explicitly disabled, ``model=3D'none'`` may be used. - -Example: automatically added device with KVM - -:: - - ... - - - - ... - -Example: manually added device with static PCI slot 2 requested - -:: - - ... - - -
- - - - - - -``model`` - The required ``model`` attribute specifies what type of balloon device = is - provided. Valid values are specific to the virtualization platform - - - 'virtio' - default with QEMU/KVM - - 'virtio-transitional' :since:`Since 5.2.0` - - 'virtio-non-transitional' :since:`Since 5.2.0` - - 'xen' - default with Xen - - See `Virtio transitional devices <#elementsVirtioTransitional>`__ for m= ore - details. - -``autodeflate`` - The optional ``autodeflate`` attribute allows to enable/disable (values - "on"/"off", respectively) the ability of the QEMU virtio memory balloon= to - release some memory at the last moment before a guest's process get kil= led by - Out of Memory killer. :since:`Since 1.3.1, QEMU and KVM only` - -``period`` - The optional ``period`` allows the QEMU virtio memory balloon driver to - provide statistics through the ``virsh dommemstat [domain]`` - command. By default, collection is not enabled. In order to enable, use= the - ``virsh dommemstat [domain] --period [number]`` command or - ``virsh edit`` command to add the option to the XML definition. The - ``virsh dommemstat`` will accept the options ``--live``, ``--current``,= or - ``--config``. If an option is not provided, the change for a running do= main - will only be made to the active guest. If the QEMU driver is not at the= right - revision, the attempt to set the period will fail. Large values (e.g. m= any - years) might be ignored. :since:`Since 1.1.1, requires QEMU 1.5` - -``driver`` - For model ``virtio`` memballoon, `Virtio-specific - options <#elementsVirtio>`__ can also be set. ( :since:`Since 3.5.0` ) +.. include:: formatdomain-devices-memballoon.rst :anchor:`` diff --git a/docs/meson.build b/docs/meson.build index 21dcd589d7..49f81cd687 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -141,6 +141,7 @@ docs_rst_files =3D [ 'formatdomain-devices-chardev.rst', 'formatdomain-devices-sound.rst', 'formatdomain-devices-watchdog.rst', + 'formatdomain-devices-memballoon.rst', ] }, { 'name': 'hacking' }, --=20 2.26.2