Pcornel
Virtualization · Memory Virtualization

Ballooning

Cheat sheet · https://pcornel.dk/topic.php?topic=3492

Back to the Topic

Answer

Ballooning lets the hypervisor reclaim memory through a driver inside the guest (vmmemctl, virtio-balloon, Hyper-V Dynamic Memory) that inflates and hands unused guest pages back to the host under memory pressure.

Remember

  • Balloon in a VM = host pressure.
  • Balloon driver needs guest tools.
  • Limits can force ballooning on idle hosts.

First checks

  • virsh dommemstat <vm> — actual vs available
  • esxtop (MCTLSZ) — balloon size
  • lsmod | grep balloon — guest driver

Commands

virsh dommemstat <vm>

Verify in this order

host pressure → balloon → guest frees memory

Where it usually breaks

First mismatch in host capability/IOMMU/NUMA → hypervisor allocation/mapping → virtual hardware model → guest driver/enumeration → workload use; 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=3492

Confirmation

Confirm action

Continue?