In Hyper-V, there are two different generations of virtual machines: Generation 1 and Generation 2 virtual machines.
Generation 1 is a virtual machine that uses legacy BIOS, and a Generation 2 Hyper-V machine is a UEFI-based machine.
In most cases, I recommend that you create a Generation 2 virtual machine if you don’t have a specific reason not to. One reason could be that you have not yet enabled UEFI in your environment.
This blog post describes how to add a Legacy Adapter to enable PXE boot for devices not yet on UEFI.
Enable legacy boot on a Hyper-V generation 1 machine
How do I verify the Hyper-V virtual machine generation?
If you want to verify if the Hyper-V VM is a Generation 1 or Generation 2 machine, select the machine in Hyper-V Manager and check the Generation version on the first page.
Why doesn’t legacy PXE work on generation 2 virtual machines?
A Hyper-V Generation 2 machine is like a running UEFI workstation.
The UEFI workstation could not communicate with legacy PXE, but only with UEFI boot images.
A machine configured with UEFI will use boot\x64\wdsmgfw.efi on the WDS server when starting the boot. A legacy boot will use boot\x64\wdsnbp.com.
The same issue with UEFI communication also applies to Hyper-V Generation 2 machines. This guide explains how to start PXE over IPv4 on Generation 1 Hyper-V VMs.
If your network is configured to deploy boot images using legacy methods, it requires you to configure the hardware of the virtual machine.
How to configure PXE boot on a Hyper-V Generation 1 virtual machine
Create a virtual switch
First, you need to create a virtual switch. The virtual switch is required for the Virtual Machine to communicate with the network. If you already have created a virtual machine for your network, you can skip this step. Start by right-clicking the Hyper-V host in Hyper-V Manager and selecting Virtual Switch Manager.
Create a new Virtual Switch. Select External. External is similar to “Bridged” if you are using other virtualization platforms.
Give the new Virtual Switch a name. I named mine “Bridged”.
By default, there is only a “Standard Network Adapter” installed on the Virtual Machine, but for PXE functionality it requires you to add a Legacy Network Adapter.
Go to the Legacy Network Adapter that you just added and specify that it should use the Virtual Switch that you just created.
6. Now, we need to make sure that client boots first using the Legacy Network Adapter. Just select the Legacy Network Adapter and move it to the top using the buttons.
Start the Hyper-V virtual machine
Start your Virtual Machine, and now PXE boot should work 🙂
As I mentioned in the introduction, in most cases I recommend creating a Generation 2 virtual machine in Hyper-V, if there are no specific reasons not to do so.
For a thorough explanation about choosing a Generation 1 or Generation 2 VM, refer to Microsoft Docs.
Do you usually create Generation 1 or Generation 2 machines in your Hyper-V environment? Let me know in the comments below 🙂
- Hyper-V issue when starting a virtual machine from downloaded ISO file
- 2 Solutions for solving the issue with Hyper-V virtual machine and Secure Boot on non-supported operating systems
- Don’t forget this step if you want SCCM clients to boot using PXE
- How to create and configure a Hyper-V VM using Powershell
- Hyper-V failure error
- SCCM is looking for policy during PXE