Virtual Memory
Cheat sheet · https://pcornel.dk/topic.php?topic=3427
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.
Remember
- Guest sees contiguous RAM; host backs it lazily.
- EPT/NPT makes this efficient.
- Host reclaim affects guest without its knowledge.
First checks
virsh dommemstat <vm>— VM memory stats (balloon, rss)Get-VM <vm> | fl Memory*— Hyper-V memory assigned/demandfree -h— guest view
Verify in this order
guest memory → SLAT → host memory pages
Where it usually breaks
First mismatch in management intent → host/cluster capability → hypervisor runtime/task → virtual resource/device → guest state → workload-visible read-back; preserve identity/native error/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3427