Skip to content

How to enable Hyper-V in Hyper-V Virtual Machine

Enable Hyper-v in Guest OS

Hyper-V is Microsoft’s native virtualization platform built into Windows, allowing users to create and manage virtual machines (VMs) directly from their desktop or server environment. Available in Windows 10 and Windows 11 Pro, Enterprise, and Windows Server editions, Hyper-V provides a robust and scalable solution for running multiple operating systems simultaneously without the need for third-party virtualization software. Each VM operates in isolation, using its own virtualized hardware, including CPU, memory, and storage, while sharing the underlying physical resources of the host machine.

Hyper-V is highly versatile, supporting various guest operating systems, including Windows, Linux, and FreeBSD. This is of course perfect for developers, IT professionals, or enterprises looking to test software, run legacy systems, or deploy production environments. Its integration with Windows enables seamless management via Hyper-V Manager or PowerShell, offering efficient resource control and advanced features like live migration, snapshots, and dynamic memory allocation.

In cases where we want to use a nested Virtual Machine like open Windows SandBox from Hyper-V Virtual Machine, we need to enable Hyper-V inside the Hyper-V VM. Nested Virtual Machine itself is a capability of running a virtual machine (VM) within another VM, enabling a virtualized environment to host its own hypervisor and additional VMs. This creates a multilayered virtualization structure, where each level of virtualization can function independently, allowing users to test complex scenarios, such as hypervisor development, cloud infrastructure testing, or intricate networking setups.

To enable Hyper-V in Hyper-V Virtual Machine is quite easy, you can do it by opening Powershell with administrator privileges in your Windows 10 or Windows 11 then type the following command.

Enabling Hyper-V in a Hyper-V VM

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

Disabling Hyper-V in a Hyper-V VM

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $false

Replace the command <VMName> with the name of the Virtual Machine in your Hyper-V.

Example:

Enable Hyper-V in Guest OS

That’s a guide on how you can enable Hyper-V features in guest operating systems that use Hyper-V VMs. You can read a more complete guide on other settings that you may need as you try to build a nested Virtual Machine on the Microsoft site which you can read here.

You might like other interesting articles

Leave a Reply

Your email address will not be published. Required fields are marked *