Use this when sizing a VM's RAM or diagnosing a guest that pages or runs out of memory.
Guest Memory
Guest memory is the RAM configured for a VM and seen by its OS. Size it to the workload's working set; too little causes guest swapping, while too much wastes host memory and slows boot and migration.
1. Guest memory is what the OS sees.
2. Guest cache looks "used" — check available.
3. Guest swapping = undersized or ballooned.
4. Compare with host view.
5. Size from available, not used.
guest allocation → guest usage → host backing
Context & applicabilityCommon mistakes · platform/version boundaries
- Sizing from "used" in Task Manager, which includes cache.
- Dynamic Memory minimum set too low, starving the guest at boot.
- Ignoring application settings (SQL Server max server memory, JVM heap) that must fit the VM size.
Operational reference
Fast context before you go deeper.
Get-Counter '\Memory\Available MBytes','\Memory\Pages/sec'Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
free -m ; vmstat 1 # Linux guest
Get-Counter '\Memory\Available MBytes','\Memory\Pages/sec' # Windows guest
Low available memory with rising paging inside the guest means the guest needs more RAM; high available memory over weeks means it can be reduced.
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.
- Size to working set plus headroom.
- Too much RAM slows boot and migration.
- Guest paging ≠ host swapping.
free -m— guest viewcat /proc/meminfo— guest detailGet-Counter '\Memory\Available MBytes'— Windows guest
ReferenceWhy it matters1 section · depth on demand
Sizing guest memory
- Measure the working set inside the guest over a normal busy period.
- Add headroom (about 20 %) and avoid large over-allocation, which wastes host RAM and lengthens migrations.
- Install guest tools/drivers so ballooning and memory reporting work.
Guest paging (free -m, Task Manager) means too little RAM; host ballooning or swapping means the host is overcommitted.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Guest memory is what the guest OS manages: kernel, applications, and page/file cache. The guest normally uses free RAM as cache, so guest-reported "used" is high on healthy systems.
Inside the guest look at:
free -h # available, not free
vmstat 5 # si/so = swap in/out
sar -B # major page faults
Get-Counter '\Memory\Pages/sec','\Memory\Available MBytes'
Sustained swap activity or major faults mean the VM itself needs more memory, regardless of host status.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Memory Virtualization → Guest Memory. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/docs.html · confidence 94%