Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

Virtual Memory

Direct answer

Virtual memory in a VM is guest-physical RAM that the hypervisor backs with host memory using second-level page tables (EPT/NPT). The guest sees contiguous RAM, while the host can share, balloon or swap the backing pages.

When to use this

Use this to understand how guest memory maps to host RAM and why the host can reclaim it.

First 30 seconds

1. Guest physical memory maps to host memory through SLAT.

2. Host RSS can be lower than assigned (not yet touched) or higher (overhead).

3. Ballooning and swapping reduce performance.

4. Size from guest demand.

5. Avoid host swapping.

Operational verification

guest memory → SLAT → host memory pages

Context & applicabilityCommon mistakes · platform/version boundaries
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 to understand how guest memory maps to host RAM and why the host can reclaim it.
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 Common mistakes Narrow the fault
  • Memory overcommit without monitoring ballooning/swapping.
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
  • Guest sees contiguous RAM; host backs it lazily.
  • EPT/NPT makes this efficient.
  • Host reclaim affects guest without its knowledge.
Key checks
  • virsh dommemstat <vm> — VM memory stats (balloon, rss)
  • Get-VM <vm> | fl Memory* — Hyper-V memory assigned/demand
  • free -h — guest view
ReferenceWhy it matters1 section · depth on demand

In depth

Virtual memory in a hypervisor has three address spaces: guest-virtual → guest-physical (guest page tables) → host-physical (hypervisor via EPT/NPT). A TLB miss may need a two-dimensional page walk, which is why large pages (2 MiB/1 GiB) on both guest and host help memory-intensive workloads.

The host can back guest memory lazily (allocate on first touch), share identical pages, balloon or swap — all invisible to the guest until performance suffers.

ReferenceHow it works1 section · depth on demand

How guest memory is mapped

Guest virtual address → (guest page tables) → guest physical address → (EPT on Intel / NPT on AMD) → host physical address.

  • EPT/NPT removes the old shadow-page-table overhead; TLB misses cost more, which large pages (2 MB/1 GB) reduce.
  • The hypervisor can back guest memory lazily, reclaim it (ballooning, swapping) or share identical pages.
  • Guest RAM must fit in host RAM plus overcommit techniques; NUMA placement affects latency on large hosts.
ReferenceImportant terms & boundaries2 sections · depth on demand

Platform, version and operating-envelope scope

Memory reclamation and metric names differ by KVM/Proxmox, Hyper-V and VMware platform/version.

Huge pages

Using 2 MB or 1 GB host pages for guest memory reduces TLB misses and EPT walk cost, helping databases and large VMs.

PlatformSetting
KVM/libvirt<memoryBacking><hugepages/></memoryBacking> with hugepages reserved on the host
Proxmoxhugepages: 1024 or 2 in the VM config
ESXiLarge pages used by default
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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 Hypervisor Architecture → Virtual Memory. Documentation verification only; this is not observed lab or production Evidence.

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

Confirm action

Continue?