Latest posts by Kyle Beckman (see all)
- 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.
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.
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.
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.
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.
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
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.
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.)
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.
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.
Next, add the following exclusions:
- 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