When building a virtualization test environment inside a Proxmox VE virtual machine, you may find that the CPU flags include svm, yet starting a nested VM reports that KVM is unavailable. CPU flags are only the first piece of evidence: the physical host’s module parameters, the VM’s CPU configuration, device permissions, and the actual acceleration path must all be correct. This guide builds a verification chain using a Debian 12 test VM, without changing the production network or writing test images to production disks.
Define the three execution layers first
In this guide, L0 is Proxmox VE running on the physical server, L1 is the Debian 12 VM running inside it, and L2 is the test guest launched within Debian. Run each command at the specified layer. The module state in L1 is not evidence of L0’s configuration.
TermAMD’s AMD EPYC 7543P dedicated servers support AMD-V (SVM) and NPT, and Proxmox VE 8/9 is a free operating system option. Hardware support makes a nested environment possible, but it does not replace validation of the guest configuration. This guide verifies only the KVM execution chain; the results are not a performance guarantee for workloads running in the nested guest.
Before starting, save L1’s configuration and back up existing production workloads. Record the kernel versions at both layers. On L0, also record the Proxmox software versions so you can compare them before and after the changes:
uname -r
pveversion -v
Run pveversion only on L0. Use a separate L1 for testing to avoid making temporary troubleshooting changes to a VM that hosts production workloads.
Visible CPU flags, the presence of a KVM device, and an active accelerator are separate findings. Record each one independently: a single CPU screenshot cannot stand in for the complete validation chain.
Check the nested virtualization setting on the physical host
On L0, check the CPU flags and the active parameters of the loaded module:
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -xE 'svm|npt'
cat /sys/module/kvm_amd/parameters/nested
cat /sys/module/kvm_amd/parameters/npt
Both flags should appear. Enabled module parameters are usually reported as Y or 1. If a path does not exist, first check whether the module is loaded and inspect the kernel logs. A failed read does not, by itself, mean the hardware lacks support.
If nested is not enabled, search the existing configuration first to avoid conflicting settings in multiple files:
grep -RnsE '^[[:space:]]*options[[:space:]]+kvm_amd' \
/etc/modprobe.d /usr/lib/modprobe.d
Once you have confirmed there are no conflicts, you can write a persistent setting:
printf '%s\n' 'options kvm_amd nested=1' |
sudo tee /etc/modprobe.d/99-termamd-nested.conf
Writing the file does not change an already loaded module. The setting takes effect only after reloading the module or rebooting. Do not unload KVM modules while VMs are running. First schedule a shutdown of production workloads and confirm that backups are available, then reboot the host and read the active parameters again. If the system configuration affects boot images, update them to match the current Proxmox boot method.
Configure L1’s CPU while the VM is stopped
On L0, identify the test VM and export its configuration first:
read -r -p 'L1 VMID: ' VMID
qm config "$VMID" > "l1-${VMID}-before.conf"
qm status "$VMID"
Confirm that the reported state is stopped before setting the CPU type:
qm set "$VMID" --cpu host
qm config "$VMID" | grep '^cpu:'
The host type exposes the CPU features available from the host to L1. Before making this change, check whether the original CPU line includes additional options. Do not overwrite it blindly and lose existing settings. If you need to roll back, restore the original CPU settings from the exported file.
After the change, start L1 from a stopped state rather than merely rebooting it from inside the guest. The CPU type is part of the virtual hardware definition, so a full stop and start is required to ensure the running instance uses the new configuration. Passing through host CPU features also increases CPU compatibility requirements for migration; it does not mean the VM can migrate to arbitrary hardware.
Verify the device and permissions inside Debian
Run the following commands on L1. Check the flags first, then load the driver:
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -xE 'svm|npt'
sudo modprobe kvm_amd
ls -l /dev/kvm
id
test -r /dev/kvm && test -w /dev/kvm
printf 'kvm_access=%s\n' "$?"
Only a final value of 0 confirms that the current account has both read and write access. Any other value means the access check failed; it does not distinguish a missing device from insufficient permissions.
If the device’s group is kvm, add the regular user account that will actually run QEMU to that group, log in again, and repeat the test. Do not make the device writable by everyone. A successful launch under an administrator account also does not prove that the service account has the required access.
If the driver fails to load, inspect L1’s kernel logs with sudo journalctl -k -b. If L1 lacks svm, return to the CPU configuration on L0 and verify that a full stop and start was performed. Repeatedly installing virtualization tools cannot supply hardware features that have not been exposed to the guest.
Force KVM acceleration and keep the conclusions within scope
Install the test tools on L1 and run the commands under the regular user account whose permissions you just checked:
sudo apt-get update
sudo apt-get install --no-install-recommends qemu-system-x86 seabios
qemu-system-x86_64 \
-accel kvm \
-machine q35 \
-cpu host \
-m 512 \
-smp 1 \
-nodefaults \
-display none \
-monitor stdio \
-S
No disks or network adapters are attached here, and the memory value is simply a resource budget for the test guest. The -S option leaves the guest paused initially. Specifying -accel kvm explicitly prevents a successful launch using software emulation from being mistaken for successful nested virtualization.
At the QEMU monitor, run these commands in order:
info kvm
info status
cont
info status
stop
info registers
quit
Check that info kvm reports KVM as enabled, that the status is running after cont, and that no KVM execution errors appear. The register output captures the test state; the instruction address is not expected to remain fixed. With no boot disk attached, firmware reaching a “no boot device” state is within the expected limits of this test.
Troubleshooting and final records
For permission errors, check the identity of the current process and the device permissions. If hardware acceleration is unavailable, revisit L0’s parameters, L1’s flags, and the kernel logs at both layers. Do not remove -accel kvm just to eliminate an error: doing so changes what you are validating.
Passing this test shows only that nested KVM can create and run a basic guest. It does not prove that an L2 operating system has booted. The next step is to use trusted installation media and a separate test disk to verify the nested operating system’s boot process, storage, networking, and target application. Evaluate performance with real workloads rather than extrapolating from the physical CPU’s thread count.
Archive the L0/L1 versions, CPU configurations before and after the change, module parameters, device permissions, and monitor output. After exiting QEMU, confirm that the test process has ended. Keep the evidence you need and restore any remaining temporary settings according to your records. The result is a traceable, reproducible conclusion about execution, rather than an assumption based solely on hardware flags.
Frequently asked questions
Does an svm flag inside the guest prove nested virtualization works?
No. The physical host must enable nested operation in kvm_amd, the guest process must have access to /dev/kvm, and QEMU must actually start with KVM explicitly required.
Does QEMU reporting KVM enabled validate the nested workload?
No. A firmware smoke test confirms only the basic nested execution path. Nested OS boot, storage, networking, application correctness and workload performance need separate tests.