- Managing shared mailboxes in Office 365 with PowerShell - Thu, May 5 2016
- Managing shared mailboxes in Office 365 with the GUI - Wed, May 4 2016
- Installing and configuring the Enhanced Mitigation Experience Toolkit (EMET) - Wed, Mar 16 2016
Whether you need to run a different OS such as Linux, an old version of Windows, or a second (or third) copy of the current Windows OS on your workstation, Hyper-V on the desktop editions of Windows makes doing so very easy. Here’s how to install Hyper-V on your Windows 10 computer.
Prerequisites
Hyper-V on Windows 10 has the following requirements:
- Machine running a 64-bit copy of Windows 10 Pro, Enterprise, or Education (sorry, the Home edition isn’t supported)
- Motherboard BIOS that supports hardware virtualization
- 64-bit processor that supports Second Level Address Translation (SLAT)
- Minimum 4GB RAM (however, you’ll probably want 8GB at a bare minimum; all of my lab systems run with at least 16GB of RAM)
Configure hardware
Depending on the BIOS configuration that ships from your PC manufacturer, hardware virtualization support may come pre-enabled, or you may need to enable it in the BIOS yourself. Some OEMs enable it by default, some don’t. Start the computer, enter the BIOS, and enable the hardware virtualization support. On my personal Lenovo ThinkPad, it was in Security, Virtualization, Intel (R) Virtualization Technology. The process can vary widely between manufacturers and models, so you may need to consult the support site for your OEM to find the exact process.
Enable Intel Virtualization Technology on a Lenovo ThinkPad
Install Hyper-V with the GUI
To install Hyper-V using the GUI, go to the Cortana search box and search for Turn Windows features on or off.
Turn Windows features on or off in the Cortana search box
Open the Turn Windows features on or off area of the Control Panel and scroll down to Hyper-V. Select the top-level Hyper-V check box and ensure that all the sub-features are selected. Click OK and then reboot.
If the Hyper-V Platform and Hyper-V Hypervisor features are grayed out, virtualization support may not be enabled in the BIOS on your computer. Reboot, enable virtualization support, and then try the process again.
Hyper-V Hypervisor not available in Turn Windows features on or off
Install Hyper-V with PowerShell
To install Hyper-V in Windows 10 with PowerShell, run the following command with Admin rights:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Hyper-V will be installed when you reboot.
Enable Hyper-V in Windows 10 with PowerShell
Configure a virtual switch
For virtual machines in Hyper-V to access the network, you’ll need to create a virtual switch. In most cases, you’ll need an external switch that allows the VMs to communicate with the host system, other VMs on the host, other systems on the network, and the Internet (assuming the host system has access to the Internet).
To create a switch using PowerShell, open a PowerShell prompt with Admin rights and run the following command:
New-VMSwitch –Name "Virtual Switch" –NetAdapterName "Ethernet" –AllowManagementOS $true
Create an external switch in Hyper-V using PowerShell
This command creates a new switch named “Virtual Switch” that uses the wired Ethernet adapter and allows the host OS to use the adapter at the same time. (Note: You may need to adjust the NetAdapterName property depending on the name of your local network adapter.)
To create a virtual switch using the GUI, run Hyper-V Manager, click the host system, and go to Virtual Switch Manager. You can access it in the Action pane on the right or by right-clicking the host system’s name and choosing Virtual Switch Manager.
Access the Virtual Switch Manager in Hyper-V Manager
In Virtual Switch Manager, go to New virtual network switch. Ensure External is selected and click Create Virtual Switch. Set the name of your new switch and select the network adapter in the pulldown in the External network section. (Ensure that the Allow management operating system to share this network adapter is selected.) Click OK to create the switch. (Warning: This will temporarily disrupt network connectivity on your computer.)
Create a new External virtual switch in Hyper-V on Windows 10
Other Hyper-V configuration
One other change I typically like to make on my workstation running Hyper-V on Windows 10 is the storage location of the Virtual Hard Disks and Virtual Machines. You can access the Hyper-V settings in Hyper-V Manager by clicking Hyper-V Settings in the Actions pane or right-clicking the Hyper-V computer name and choosing Hyper-V Settings.
On the Hyper-V Settings window, you can update both Virtual Hard Disks and Virtual Machines to a new location of your choosing. My lab systems running Hyper-V always have a dedicated SSD disk for storing my VMs. This allows me to place both the configuration files and the VHDX files on that dedicated disk, for improved performance, instead of in the default locations. It also makes finding the files much easier.
Changing the default storage location for Virtual Hard Disks and Virtual Machines
Configure antivirus
Windows Defender in Windows 10 doesn’t automatically configure Microsoft’s recommended antivirus exclusions after you install Hyper-V. I’ve seen Hyper-V run just fine in Windows 10 without the recommended exclusions, but you’re opening yourself up to potential problems if you don’t configure the antivirus.
Start by going to the Cortana search bar and search for Windows Defender settings. Scroll down to the Exclusions area and click Add an exclusion.
Windows Defender settings in Windows 10
Next, add the following exclusions:
Subscribe to 4sysops newsletter!
- C:\Windows\System32\vmms.exe: Virtual Machine Management Service
- C:\Windows\System32\vmwp.exe: VM Worker Process
- C:\ProgramData\Microsoft\Windows\Hyper-V\: Default location for storing VM configuration files
- C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\: Default location for storing Virtual Hard Disk files
- Custom location for storing VM configuration files
- Custom location for storing Virtual Hard Disk files
- Any other folder containing a VHD, VHDX, AVHD, AVHDX, VHDS, VSV, and ISO files
Windows Defender exclusions in Windows 10
Read the latest IT news and community updates!
Join our IT community and read articles without ads!
Do you want to write for 4sysops? We are looking for new authors.
Only get an error when using powershell,
No Hyper-V in programs and features and file missing from system32.
I’m running windows 10 home x64
Enable-WindowsOptionalFeature : Feature name Microsoft-Hyper-V is unknown.
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
+ FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand
Bullet point 1 under Prerequisites at the beginning of the article: “Machine running a 64-bit copy of Windows 10 Pro, Enterprise, or Education (sorry, the Home edition isn’t supported).” You said, “I’m running windows 10 home x64.” You’re not using a supported version of Windows 10.
No mention about VT-d?
Hi, thanks for this clear article. But before the virtual machine is installed in Hyper-V (up to date W10 pro 64bit) i get the error “the storagelocation of the virtual hard disk does not support the sharing of virtual hard diskdrives. no data can be taken from this location” (my own translation from Dutch ;[ ). Then the procedure is going back to the previous storage VHD location tab. All security autorisations of this map are set dangerously to lowest level (full control) for “everyone”.
What can I do now ?
Hyper-V Hypervisor feature grayed out on my device. how to enable it?