
Explanation:
Set-VMProcessor VM1 -ExposeVirtualizationExtensions $true
In a Windows Server Hyper-V environme nt, running Hyper-V inside a virtual machine (i.e., installing the Hyper-V role in a guest) requires nested virtualization . The Administering Windows Server Hybrid Core Infrastructure materials explain that before you can add the Hyper-V role in the guest OS, the virtualization extensions of the physical CPU must be exposed to the VM: "To enable a virtual machine to act as a Hyper- V host, configure the VM to expose hardware virtualization extensions to the guest. This is done with the VM processor settings and is a prerequisite to installing the Hyper-V role inside the VM." The guide further clarifies: "Use the PowerShell cmdlet Set-VMProcessor with the -ExposeVirtualizationExtensions parameter to allow the guest to see VT-x/AMD-V so that the Hyper-V role can be installed and started successfully." Other host settings such as Enhanced Session Mode, firmware options, or host resource protection are unrelated to enabling nested virtualization. After exposing the extensions, you can start VM1 and install the H yper-V role (e.g., Install-WindowsFeature Hyper-V -IncludeManagementTools -Restart ). Therefore, the first command you must run on the parent host (Server1) to permit installing Hyper-V within VM1 is:
Set-VMProcessor VM1 -ExposeVirtualizationExtensions $tru e .