Table of Contents

Here's the information in DokuWiki format for easy copy-pasting:

Enabling Nested Virtualization for Windows VMs in Proxmox

1. Enable Nested Virtualization on Host

Check current nested virtualization status:

For Intel CPUs
 
cat /sys/module/kvm_intel/parameters/nested
 
For AMD CPUs
 
cat /sys/module/kvm_amd/parameters/nested 

Enable nested virtualization persistently:

# For Intel CPUs
echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf
modprobe -r kvm_intel
modprobe kvm_intelFor AMD CPUs
 
echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf modprobe -r kvm_amd modprobe kvm_amd 

Note: Reboot the host or reload kernel modules for changes to take effect.

2. Configure Windows VM

Set CPU type to host:

 qm set <VMID> --cpu host 

For AMD CPUs, add to VM configuration (/etc/pve/qemu-server/<VMID>.conf):

 args: -cpu host,+svm 

3. Verify Nested Virtualization

Inside Windows VM, use these methods to verify:

· Install WSL or Cygwin and run:

 egrep --color -i "svm|vmx" /proc/cpuinfo 

· Use Windows coreinfo utility · Check Windows Features for Hyper-V installation capability

4. Troubleshooting

Blue Screen Errors:

 echo "options kvm ignore_msrs=1" >> /etc/modprobe.d/kvm.conf modprobe -r kvm modprobe kvm 

Hyper-V Enlightenments (if needed): Add to VM configuration:

 args: -cpu host,-hv_ipi,-hv_relaxed,-hv_reset,-hv_runtime,-hv_spinlocks,-hv_stimer,-hv_synic,-hv_time,-hv_vapic,-hv_vpindex 

5. Limitations

· No live migration support for VMs with nested virtualization · Significant performance overhead · Not recommended for production environments · Security considerations for nested VM isolation

6. Proxmox Version Compatibility

· Ensure Proxmox is updated to latest version · Kernel version proxmox-kernel-6.2.16-19 or newer recommended · Check for updates with:

 apt update && apt upgrade 

Note: Replace <VMID> with your actual virtual machine ID in all commands.