Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

Nested Hypervisor

Direct answer

A nested hypervisor is a hypervisor running inside a VM (L1) that starts its own VMs (L2). It needs exposed virtualization extensions and is mainly used for labs, CI and training rather than production workloads.

When to use this

Use this to understand L0/L1/L2 layers when running a hypervisor in a VM.

First 30 seconds

1. A nested hypervisor is a hypervisor running in a VM.

2. Needs VT exposed and enough memory.

3. L2 networking requires MAC spoofing or promiscuous on L0.

4. Not supported for production by most vendors.

5. Keep labs isolated.

Operational verification

L0 → L1 nested hypervisor → L2

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 L0/L1/L2 layers when running a hypervisor in a VM.
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.

2 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 Checks Verify boundary
  • L0 exposes virtualization extensions to L1.
  • L1 sees vmx/svm (egrep -c '(vmx|svm)' /proc/cpuinfo).
  • Networking for L2: MAC spoofing/promiscuous or MAC learning enabled.
Step 2 Common mistakes Narrow the fault
  • Forgetting MAC learning/promiscuous mode for L2 networking.
  • Too little memory for L1, which must host its own VMs.
  • Expecting vendor support for production nested setups.
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
  • Every VM exit in the nested guest is handled by two hypervisors.
  • Vendor support for nested setups is limited.
  • It is meant for labs, CI and training.
Key checks
  • systemd-detect-virt — in L1: running as VM
  • lsmod | grep kvm — L1 hypervisor loaded
  • virsh list — L2 VMs
ReferenceWhy it matters1 section · depth on demand

Use cases

  • Hypervisor labs and training.
  • Testing upgrades.
  • CI for infrastructure code.
  • WSL2/VBS inside Windows VMs.
ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Requirements for a nested hypervisor VM:

RequirementWhy
Expose VT-x/AMD-V (host CPU or vmx/svm flag)L1 needs virtualization extensions
Static memory, no ballooningL1 manages its own memory for L2
MAC spoofing / promiscuous or MAC learningL2 VMs have their own MACs
Enough vCPUs and RAML2 VMs live inside L1's allocation
UEFI where the nested hypervisor requires itESXi 8, Hyper-V Gen 2

Check inside L1: grep -c vmx /proc/cpuinfo (Linux) or systeminfo → "Virtualization Enabled in Firmware: Yes" (Windows).

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 Nested Virtualization → Nested Hypervisor. Documentation verification only; this is not observed lab or production Evidence.

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

Confirm action

Continue?