Pcornel
Virtualization · Nested Virtualization

Performance Impact

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

Back to the Topic

Answer

Nested virtualization adds overhead because every VM exit in the L2 guest is handled by both hypervisor levels. CPU-heavy work runs reasonably, but I/O and frequent exits are much slower, so keep it for labs and testing.

Remember

  • CPU work OK, I/O and exits slow.
  • Don't benchmark production on nested.
  • Paravirtual drivers help.

First checks

  • time <workload> in L2 vs L1 — compare
  • vmstat 1 — L1 steal
  • perf kvm stat — VM exits (L0)

Verify in this order

L2 operation → L1 exit → L0 handles

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=3811

Confirmation

Confirm action

Continue?