When developing projects locally, sometimes we encounter the need to enable virtualization in a virtual machine environment. Alternatively, if we have set up a PVE (Proxmox Virtual Environment) using a virtual machine, we may need to create virtual instances within PVE (although this may not be meaningful).
In such cases, we need to enable the nested virtualization feature of Hyper-V. This feature cannot be directly enabled in the Hyper-V application and requires setting it in the PowerShell command line.
-
Open the terminal as an administrator.
-
Get the name of the virtual machine:
get-vm
- Enable nested virtualization:
Set-VMProcessor [hostname] -ExposeVirtualizationExtensions $true
- Check the enabled status:
Get-VMProcessor [hostname] | fl
That's it.