Pcornel
Virtualization

Nested Virtualization

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

Back to the Topic

Answer

Nested virtualization runs a hypervisor inside a VM, exposing VT-x/AMD-V to the guest so it can start its own VMs. It is used for labs, CI and training, at the cost of extra overhead and limited vendor support.

Remember

  • Nested is for labs, not production performance.
  • Guest must see vmx/svm or the inner hypervisor refuses to start.
  • Nested VM networking needs MAC spoofing or promiscuous mode.

First checks

  • cat /sys/module/kvm_intel/parameters/nested — nested enabled
  • Get-VMProcessor <vm> | fl ExposeVirtualizationExtensions — Hyper-V
  • grep -cE 'vmx|svm' /proc/cpuinfo — inside L1

Verify in this order

L0 host → L1 hypervisor VM → L2 VMs

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

Confirmation

Confirm action

Continue?