From: Friedrich Weber <f.weber@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH docs 1/2] pci passthrough: mention incompatibility with ballooning
Date: Mon, 13 Nov 2023 18:09:15 +0100 [thread overview]
Message-ID: <20231113170916.184994-2-f.weber@proxmox.com> (raw)
In-Reply-To: <20231113170916.184994-1-f.weber@proxmox.com>
When using PCI(e) passthrough, setting a minimum amount of memory does
not have any effect, which may be surprising to users [0]. Add a note
to the PCI(e) passthrough section, and reference it in the ballooning
section.
[0] https://forum.proxmox.com/threads/134202/
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
---
qm-pci-passthrough.adoc | 10 ++++++++++
qm.adoc | 5 +++++
2 files changed, 15 insertions(+)
diff --git a/qm-pci-passthrough.adoc b/qm-pci-passthrough.adoc
index 1f68721..406156d 100644
--- a/qm-pci-passthrough.adoc
+++ b/qm-pci-passthrough.adoc
@@ -20,6 +20,16 @@ PCI speeds. Passing through devices as PCIe just sets a flag for the guest to
tell it that the device is a PCIe device instead of a "really fast legacy PCI
device". Some guest applications benefit from this.
+xref:qm_ballooning[Automatic memory allocation (ballooning)] is not possible
+when using PCI(e) passthrough. As the PCI device may use DMA (Direct Memory
+Access), QEMU needs to map the complete guest memory on VM startup. Hence, the
+QEMU process will use at least the (maximum) configured amount of VM memory and
+setting a minimum amount does not have any effect. When using PCI(e)
+passthrough, it is recommended to set memory and minimum memory to the same
+amount and keep the balloning device enabled. However, keep in mind that the
+memory consumption reported in the GUI for the VM may be much lower than the
+memory consumption of the QEMU process.
+
General Requirements
~~~~~~~~~~~~~~~~~~~~
diff --git a/qm.adoc b/qm.adoc
index b7938d7..cbc5e0d 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -623,6 +623,7 @@ it (like for debugging purposes), simply uncheck *Ballooning Device* or set
in the configuration.
+[[qm_ballooning]]
.Automatic Memory Allocation
// see autoballoon() in pvestatd.pm
@@ -659,6 +660,10 @@ systems.
When allocating RAM to your VMs, a good rule of thumb is always to leave 1GB
of RAM available to the host.
+When using PCI(e) passthrough, setting a minimum amount of memory does not have
+any effect, see the section on xref:qm_pci_passthrough[PCI(e) passthrough] for
+more details.
+
[[qm_network_device]]
Network Device
--
2.39.2
next prev parent reply other threads:[~2023-11-13 17:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 17:09 [pve-devel] [PATCH docs/qemu-server 0/2] Ballooning/PCI passthrough incompatibility: add warning and docs Friedrich Weber
2023-11-13 17:09 ` Friedrich Weber [this message]
2023-11-14 8:30 ` [pve-devel] [PATCH docs 1/2] pci passthrough: mention incompatibility with ballooning Fiona Ebner
2023-11-14 10:20 ` Friedrich Weber
2023-11-17 12:37 ` Friedrich Weber
2023-11-13 17:09 ` [pve-devel] [PATCH qemu-server 2/2] vm start: warn if using ballooning and PCI(e) passthrough Friedrich Weber
2023-11-14 9:13 ` Fiona Ebner
2023-11-14 10:20 ` Friedrich Weber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231113170916.184994-2-f.weber@proxmox.com \
--to=f.weber@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox