Introduction

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.

The generation of the Hyper-V virtual machine matters, because PXE uses different boot files depending on if the machine boots using Legacy BIOS or UEFI.

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.

start pxe over ipv4 hyper-v Configure Virtual Switch

Create a new Virtual Switch. Select External. External is similar to “Bridged” if you are using other virtualization platforms.

start pxe over ipv4 hyper-v - Configure Virtual Switch Step 2

Give the new Virtual Switch a name. I named mine “Bridged”.

start pxe over ipv4 hyper-v - Configure Virtual Switch

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.

start pxe over ipv4 hyper-v - Configure Legacy Adapter Hyper-V

Go to the Legacy Network Adapter that you just added and specify that it should use the Virtual Switch that you just created.

Add Legacy Adapter Step 2

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 pxe over ipv4 hyper-v - Configure BIOS boot priority

Start the Hyper-V virtual machine

Start your Virtual Machine, and now PXE boot should work 🙂

Conclusion

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 🙂

References

Related posts

30 COMMENTS

  1. Thanks Daniel,

    I was unsure where my PXE setup in Hyper-V was failing, so ended up setting up VM in VMWare first. When it worked, i knew the issue was with Hyper-V rather than the PXE config.

    Thanks a lot

  2. Thanks Daniel.

    We don’t use “Enable unknown computer support” in our Config Manager setup, so the PXE boot would not get an IP address.

    Solution:
    Enable a static MAC on the VM and then import that information into Config Manager and add that computer to our “Imaging” device collection. System PXE booted and started imaging the system.

  3. Thanks! This worked so well. I recently migrated to Windows 8.1 and am responsible for creating and maintaining our MDT deployments. PXE in Hyper-V should greatly simplify this task.

    Cheers,
    Chris

  4. Thanks for the tip sheet, I had missed the step of adding the Legacy network adaptor and linking it to the bridged virtual switch, looking good now 🙂

    I’m PXE booting some Linux VM’s that are running on hyper-v, some are running on KVM, and a few bare metal servers

  5. Hi, my hyper-v don’t have “Legacy Network Adapter”, what I need to do? I have “SCSI Controller”, “Network Adapter” and “Fibre chamnel Adapter”…thanks

  6. Hi Daniel,

    Could you be so kind and explain me how can i connect from a physical workstation to a VM running on a standalone Hyper-V Server. Could the problem be that i have no DHCP Server running in my network ?
    One addional question: Is it possible to assign a physical workstation to a VM ?

    Thanks in advance

    Cheers.

  7. Hey there;
    I have a working pxe environment that I’ve used for years to boot a ghost environment. It works great on physical machines but it doesn’t work with my hyper-v vm’s. My test vm gets an IP address ok and downloads the WDSNBP then I get the ‘Press F12 for network service boot’ but then I get ‘Windows Deployment Services: PXE Boot Aborted’. Any thoughts as to what might be going on?

    WD

  8. I’m confused – this seems to indicate you can add a legacy adapter to an existing Gen2 VM in Hyper-V, but unless I’m missing something, that’s not possible. When you go to “add hardware” on a Gen2 VM there is NO option to add a “Legacy Network Adapter.”

    • Hi Dave,

      Thanks for your comment! You are 100% correct in your comment, with your statement that the Legacy Network Adapter is not available for generation 2 VMs. This was a mistake by me, and I have now updated the blog post to reflect this. Thanks again!

  9. Hi There,
    In my case is opposite, it only works with virtual machines Gen1 but never works with Physical machines.
    Press F12 for network service boot but then I get “PXE-53 no boot filename received.”
    Any ideas? Please HELP.
    Many Thanks in advance,

  10. Hi Daniel,
    Thanks for your response so promptly,
    My DHCP & SCCM are not on the same server.
    I do not use any option such as 60,66 or 67.
    Router has already stated forward broadcast to SCCM ip address.
    WDS Service is ticked in DP but I did not configure.
    PXE boot to Hyper-V machines without any problem. it deploys windows 10 successfully every time.
    However, when I tried to PXE boot from any PCs. Error message as I mentioned above.
    PCs I am testing on are varied brand and models: HP Z2, HP Compaq Elite8000, Lenovo T520, T570. All PCs drivers are installed in SCCM and BIOS are up-to-date.
    I also have checked the Boot order in all devices Legacy and UEFI and selected “Both” and they are still not working.
    Please advise.
    Many Thanks

  11. Hi Daniel,
    As advised,
    I checked your link and SMSPXE log file did not show any of error messages like you have.
    However, in SCCM console, my boot image(x64) properties\Data Source\Architecture x86 is selected as default.
    I selected radio button on “architecture x64” and Click apply and set it back to default x86.
    How I could SAVE the settings?
    Here are the details of my SCCM:
    version 1910
    Console version: 5.1910.1067.1600
    Site version: 5.0.8913.1000
    Boot image (x64): version 10.0.18362.1
    Please advise,
    Thanks

LEAVE A REPLY

Please enter your comment!
Please enter your name here