Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

Memory Limits

Direct answer

A memory limit caps the physical RAM a VM can use below its configured size; anything above the limit is ballooned or swapped even if the host has free memory. It is a common hidden cause of slow VMs.

When to use this

Use this when a VM swaps or balloons although the host has free memory.

First 30 seconds

1. A memory limit below configured memory forces ballooning/swap.

2. Rarely useful; often a mistake from templates.

3. Check for hidden limits when a VM swaps.

4. Size memory instead.

5. Remove unnecessary limits.

Operational verification

configured memory → limit → reclaim

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Limits set lower than configured memory on templates.
  • Using limits to simulate smaller VMs instead of resizing them.
  • Not checking limits when a VM swaps on an idle host.
Platform / version applicability
virtualization
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformvirtualization
Scope / prerequisiteUse this when a VM swaps or balloons although the host has free memory.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Finding memory limits Verify boundary
Get-VM | Get-VMResourceConfiguration | Where-Object { $_.MemLimitMB -ne -1 } | Select VM,MemLimitMB

In esxtop (m), compare MEMSZ with the limit; ballooning or swapping on a VM while the host has free memory points to a limit.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Remove memory limits unless there is a documented reason.
Key checks
  • virsh setmem / virsh memtune <vm> --hard-limit — libvirt hard limit
  • Set-VMMemory <vm> -MaximumBytes 8GB — Hyper-V dynamic max
  • Get-VMResourceConfiguration (PowerCLI) — vSphere memory limit
ReferenceWhy it matters1 section · depth on demand

Why limits are dangerous

A limit below the configured RAM forces ballooning or swapping even when the host has free memory, and the guest cannot see why. Leftover limits from templates are a classic cause of slow VMs. Check VM resource settings and remove limits unless they are deliberate (for example to model capacity).

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

A memory limit caps how much host memory backs a VM, regardless of its configured size. If the guest uses more than the limit, the hypervisor balloons or swaps the excess — the guest still believes it has its configured RAM, so performance degrades badly.

On VMware, memory limits are rarely appropriate; reduce configured memory instead. Hyper-V's equivalent is the dynamic memory maximum, which the guest sees correctly.

ReferenceConfiguration & state1 section · depth on demand
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docvirtualization current

Authoritative/upstream documentation reviewed for bounded claims in Resource Management → Memory Limits. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://libvirt.org/html/libvirt-libvirt-domain.html · confidence 94%
Confirmation

Confirm action

Continue?