Windows 10 Pro, Enterprise, and Education editions contain a free virtualization software named Hyper-V. The underlying code works nearly the same as what’s provided in Windows Server. In this article, I will discuss how to enable Hyper-V on Windows 10, how to create your first virtual machine, and briefly talk about nested virtualization.
You can enable Hyper-V on Windows 10 by using PowerShell or the Windows GUI. PowerShell is probably the easiest way to do it, and here’s two proceed:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All
Keep reading for more detailed instructions on how to enable Hyper-V using either PowerShell or the Windows GUI.
Hyper-V is Microsoft’s free virtualization software in all editions and versions of Windows Server and Windows 10/11 Pro, Enterprise, and Education SKUs. Whether you’re an IT professional, a software developer, or a technology enthusiast, I imagine you would prefer to run multiple, independent operating systems on one computer instead of having to purchase a computer for each one. That can get expensive!
Virtual machines running in Hyper-V run on what’s called virtual hardware. Hard disks, switches, and DVD Drives are virtualized and presented to your guest OS. The guest VM doesn’t necessarily know it’s running as a virtual machine.
There are a few technical and specific requirements and prerequisites before enabling the Hyper-V feature in Windows 10. First, your host computer must meet these requirements:
There are additional requirements later on if you wish to run a virtual machine inside of a virtual machine – don’t worry, I’ll talk about nested virtualization soon enough.
Hyper-V requires Windows 10 (or 11) Enterprise, Pro, or Education editions, and it’s not available on Windows 10 Home. However, you can upgrade from Windows 10 Home to Windows 10 Pro on your PC by going into Settings > Update and Security > Activation.
Interestingly the steps required to enable the feature in Windows are relatively easy. I say interesting because being able to run another operating system ‘inside’ your current operating system is a very cool technology. And, thanks to the rather powerful and efficient tech behind Powershell, you’ll be up and running and creating virtual machines (VMs) in no time.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Piece of cake! We are (sort of) all set to start creating VMs. Well, I discovered an ‘issue’ here. More on that very soon.
Let me show you how to perform the same steps using the legacy Control Panel GUI.
When I hover over the Hyper-V Platform item, I see: “Hyper-V cannot be installed: The processor does not have the required virtualization capabilities.”
So, how about some background? Sure. I am utilizing my Hyper-V lab on my main desktop computer running Windows 11. I am using one of my Windows 10 VMs to demonstrate the topic. I am already one layer down in the virtual world if you will (think Inception).
However, what I am asking Windows to do is called nested virtualization. I will go over this in more detail below, but basically, I need to add a second layer. Run Hyper-V as a feature inside another Hyper-V VM. I know, I had to watch Inception 5 times to wrap my head around it!
Anyway, if you aren’t already running Windows 10 in a VM (as I am), Hyper-V won’t be greyed out in the list of optional Windows Features. You’ll be able to select it, click OK, then you’ll be prompted to reboot your Windows 10 PC.
So, we have Hyper-V enabled and ready to go. Let’s go through the basics of creating a new Windows VM. In the Hyper-V Manager, we’ll first create a new Virtual Switch so we can pass the network/Internet connection on our host machine down to our new VM.
Let’s name it ‘Internet Switch.’ Then, the defaults should be good – we are using the External network and the Microsoft Hyper-V Network Adapter to pass thru whatever connection the VM host has down to the new VM. This will allow DHCP servers to give the new machine an IP Address.
There you have it!
I will go through a few more common config changes I make when setting up a new VM and explain them to you.
Well, those are the salient points and should definitely get you headed in the right direction.
I’ve already briefly described the concept of nested virtualization. For the scope of this article, let me ask you to get more detail by checking out our previous post on how to enable nested virtualization on Windows 10 Hyper-V.
However, I want to address a few ‘issues’ I mentioned earlier in this article. The main issue is the fact that I can’t really use the Hyper-V software until I resolve the nested virtualization requirements. Personally, I find it odd that Windows allows you to run the PowerShell command to enable the Hyper-V platform without the required prerequisites!
Being able to turn on the Hyper-V feature in a VM requires a special PowerShell command to be run from your initial host computer. Before you proceed, make sure the VM you wish to modify is powered off. I will fire up a PowerShell console as Administrator and run a few commands.
First, I will run the Get-VM command:
Yep, I do have a lovely assortment of machines, don’t I? The one I am working with is called ‘Windows 10 22H2 – MSA – ISO‘. So, I will run this command to enable the special CPU features for that specific VM.
Set-VMProcessor -VMName "Windows 10 22H2 - MSA - ISO" - ExposeVirtualizationExtensions $true
Simply power up your VM and now you’ll be able to enable Hyper-V in it. You can refer to the steps above using PowerShell or the GUI.
Hyper-V is a free, easy-to-use virtualization solution built right into Windows. I have been using it ever since it became a part of Windows, back in the Windows 8 days!
I strongly encourage you, as IT Pros, to use it for your day-to-day testing needs. There is no need to buy another desktop or laptop just to see if an older version of Adobe Acrobat will work on Windows 11. Just fire up a new Windows 11 VM and give it a go!
Please leave any comments or questions below. I would love to assist you if you run into any configuration issues. Thanks for reading!