If you’re running a Windows 10/11 virtual machine (VM) in Proxmox and install Docker Desktop, you might encounter an issue where the VM fails to start and gets stuck on the “startup recovery” screen. This can be caused by nested virtualization not being (fully) enabled in your Proxmox environment.
Solution: Enable Nested Virtualization in Proxmox
To resolve this issue, follow these steps to ensure nested hardware-assisted virtualization is enabled:
1. Check if Nested Virtualization is Enabled
You can check whether nested virtualization is enabled by running the following command on your Proxmox host:
For Intel CPUs:
cat /sys/module/kvm_intel/parameters/nested
For AMD CPUs:
cat /sys/module/kvm_amd/parameters/nested
If the output is N
, it means nested virtualization is not enabled. If output is Y, skip to step 3.
2. Enable Nested Virtualization
For Intel CPUs, run:
echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf
For AMD CPUs, run:
echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf
Then, reload the kernel module:
modprobe -r kvm_intel # For Intel modprobe kvm_intel # For Intel
For AMD:
modprobe -r kvm_amd # For AMD modprobe kvm_amd # For AMD
Check again to confirm:
cat /sys/module/kvm_intel/parameters/nested # For Intel cat /sys/module/kvm_amd/parameters/nested # For AMD
The output should now be Y
.
3. Manually Edit the VM Configuration File (If Necessary)
If enabling nested virtualization does not resolve the issue, manually edit the Proxmox VM configuration file.
- Open a terminal on the Proxmox host.
- Edit the VM configuration file:
cd /etc/pve/qemu-server/
nano [vm-id].conf
- Add the following line to the configuration file (or append if “args” already exists):
args: -cpu Cooperlake,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,+vmx
- Save the file and reboot the VM.
Step 3 above worked for me with Proxmox VE 8.1.4.