Use this when a guest must see VT-x/AMD-V to run its own hypervisor.
CPU Virtualization Extensions
Nested virtualization needs the CPU virtualization extensions (Intel VT-x with EPT, AMD-V with NPT) exposed to the guest, for example kvm_intel nested=1, Set-VMProcessor -ExposeVirtualizationExtensions or vhv.enable on ESXi.
1. The L1 VM must see CPU virtualization flags.
2. Expose with host CPU model or feature flag.
3. Requires L0 nested support.
4. Changes need power cycle.
5. Verify in L1.
L0 CPU → exposed flags → L1 hypervisor
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
| Check | Command |
|---|---|
| Host CPU supports it | grep -E 'vmx|svm' /proc/cpuinfo; BIOS: VT-x/AMD-V and VT-d enabled |
| Second-level paging | grep -E 'ept|npt' /proc/cpuinfo |
| Exposed to the L1 guest | KVM: nested=1 + host CPU type; Hyper-V: Set-VMProcessor -ExposeVirtualizationExtensions $true; ESXi: "Expose hardware assisted virtualization" |
| Seen inside L1 | lscpu | grep Virtualization or systeminfo (Hyper-V requirements) |
Step 2 Common mistakes Narrow the fault
- Expecting nested VMs to perform like bare metal.
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.
- EPT/NPT needed for decent performance.
- Setting change needs VM power-off.
- Host kernel module option may be required.
grep -o -E 'vmx|svm' /proc/cpuinfo | sort -u— flags in guestGet-VMProcessor <vm>— ExposeVirtualizationExtensionsvirsh dumpxml <vm> | grep -A3 '<cpu'— host-passthrough/feature vmx
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Checking virtualization extensions at each layer:
# L0 host
grep -E -c 'vmx|svm' /proc/cpuinfo; cat /sys/module/kvm_*/parameters/nested
# L1 Linux guest
grep -E -c 'vmx|svm' /proc/cpuinfo; virt-host-validate
# L1 Windows guest
Get-ComputerInfo -Property 'HyperV*'
# L1 ESXi
esxcli hardware cpu global get # HV Support: 3 = enabled and supported
If L1 does not see the flags, the L0 setting is missing or the VM was not power-cycled after changing it.
ReferenceConfiguration & state1 section · depth on demand
Enabling per platform
# KVM host
echo "options kvm_intel nested=1" > /etc/modprobe.d/kvm-nested.conf # or kvm_amd
# Proxmox VM
qm set 101 --cpu host
# Hyper-V (VM must be off)
Set-VMProcessor -VMName lab01 -ExposeVirtualizationExtensions $true
Documented example, not captured output. On ESXi enable "Expose hardware assisted virtualization" in the VM's CPU settings.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Nested Virtualization → CPU Virtualization Extensions. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/docs.html · confidence 94%