Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

Nested KVM

Direct answer

Nested KVM is enabled with the kvm_intel or kvm_amd module option nested=1 (check /sys/module/kvm_intel/parameters/nested) and a guest CPU model like host-passthrough, so the guest sees vmx or svm.

When to use this

Use this when enabling nested virtualization on KVM or Proxmox.

First 30 seconds

1. Nested KVM: enable module parameter and use host CPU model.

2. AMD default on.

3. Reload module with VMs stopped.

4. L1 sees vmx/svm.

5. Performance acceptable for labs.

Operational verification

L0 KVM nested=1 → L1 with host CPU → 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 when enabling nested virtualization on KVM or Proxmox.
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
cat /sys/module/kvm_intel/parameters/nested     # Y
egrep -c '(vmx|svm)' /proc/cpuinfo               # in L1, > 0
Step 2 Common mistakes Narrow the fault
  • Forgetting to reload kvm_intel/kvm_amd after enabling nesting (or reboot).
  • L1 CPU model without vmx/svm.
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
  • nested=1 on the kvm_intel/kvm_amd module.
  • Use host-passthrough CPU for the L1 guest.
  • Reload module or reboot after change.
Key checks
  • cat /sys/module/kvm_intel/parameters/nested — Y/1 on L0
  • echo 'options kvm_intel nested=1' > /etc/modprobe.d/kvm.conf — persist
  • qm set <vmid> --cpu host — expose VT to L1 (Proxmox)
ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Nested KVM on a KVM host:

cat /sys/module/kvm_intel/parameters/nested       # Y
echo 'options kvm_intel nested=1' > /etc/modprobe.d/kvm-nested.conf   # kvm_amd for AMD
modprobe -r kvm_intel && modprobe kvm_intel
qm set 150 --cpu host                               # Proxmox L1 VM
# libvirt: <cpu mode='host-passthrough'/>

Nested is enabled by default on recent kernels for both Intel and AMD; L1 VMs with nested guests cannot always be live-migrated.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Enabling nested KVM

cat /sys/module/kvm_intel/parameters/nested      # Y or 1
echo "options kvm_intel nested=1" > /etc/modprobe.d/kvm-nested.conf
modprobe -r kvm_intel && modprobe kvm_intel

Documented example, not captured output (use kvm_amd on AMD). Give the L1 VM CPU type host (Proxmox: qm set <id> --cpu host). Inside L1, ls /dev/kvm should exist.

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

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

Confirm action

Continue?