Run Hype-V on Windows 11 and Install Windows OS via PXE Boot

In this article, we shall discuss the steps on how to run Hype-V on Windows 11 and Install Windows OS via PXE Boot. The Preboot Execution Environment (PXE) allows seamless access to the Windows Preinstallation Environment (WinPE) over the network. This enables efficient deployment and troubleshooting without requiring local installation media. Please see AADSTS50020: User from Identity Provider does not exist in Tenant, and Delete Azure Tenant: Remove Custom Domain from Entra ID.
PXE is an industry standard created by Intel that provides pre-boot services within the devices firmware. It enables devices to download network boot programs to client computers.
Note: Remember to create your vSwitch before hand. You can also create this even after you have created your VM. But you will have to modify the VM to assign the switch via the VM settings.
Please see How to create Microsoft 365 Account, how to Block IP Addresses Using Group Policy (GPO) in Active Directory, and How to Create a User and Custom Domain in Entra ID.
MAC address Range for VMs
This section defines how to decide on a custom MAC address when you do not want to use the default (dynamic Mac Address) for Hyper-V VMs. This is also applicable to VMware. To learn more on how to set up MAC address pools in the VMM fabric
| MAC pool name | Environment | Default range |
|---|---|---|
| Default MAC address pool | Hyper-V | 00:1D:D8:B7:1C:00 – 00:1D:D8:F4:1F:FF |
| Default VMware MAC address pool | ESX/ESXi | 00:50:56:00:00:00 – 00:50:56:3F:FF:FF |
Since I am working on Hyper-V. I will manually create and assign a MAC address to my VM(s). This will be from the range of information provided in the table above.
For HyperV and VMware. The last 6 characters of the UUID of a virtual machine are indeed used to form the last three octets (24 bits) of the MAC address.
VMware generates MAC addresses using the 00:50:56 OUI range, which IEEE assigns to VMware. Similarly, Hyper-V uses a static range of MAC addresses assigned by Microsoft starting from 00:1D:D8 range as its organizationally unique identifier. The rest of the MAC address (last three octets) is generated pseudo-randomly or programmatically to ensure uniqueness within the virtual network.
Please see and How to Create a Windows Server VM on HyperV, and how to run Windows 11 on HyperV. Also,see how to migrate WDS and MDT to a new Windows Server
Why Is having a Duplicate MAC Addresses on VMs a Problem?
Having the same MAC address on multiple virtual machines (VMs) in your environment can be problematic- This is because, it violates the principle of uniqueness that MAC addresses are designed to uphold. This can lead to several issues in your network as discussed below;
Network Communication Conflicts: Switches use MAC addresses to forward traffic. If two VMs share the same MAC address. The network switch cannot correctly maintain their MAC address tables, causing network traffic to be misrouted or broadcasted unnecessarily.
Duplicate MAC addresses can cause ARP table issues. This can lead to devices sending packets to the wrong destination. This is because, the Address Resolution Protocol (ARP) maps IP addresses to MAC addresses.
Security Risks: A malicious actor could exploit duplicate MAC addresses to intercept traffic, impersonate other devices on the network, and potentially violate compliance regulations that mandate unique device identifiers.
Connectivity Problems: Switches and routers may drop network packets or cause devices to lose connectivity entirely as they struggle to identify the correct machine when VMs have identical MAC addresses.
The list of issues is endless, so either let your VM host dynamically manage the VM’s MAC address. Because, VMware and Hyper-V automatically generate unique MAC addresses for VMs within a specific range. Or assign it correctly yourself ( ensure that each VM is assigned a unique address within the allowed range).
Note: Maintain a registry of manually assigned MAC addresses to prevent duplicate Mac Addresses.
Please see How to Fix “This PC Can’t Run Windows 11” on Hyper, and how to Fix Boot Failed UEFI SCSI Device on HyperV. Here is how to Prevent OS Reinstallation: Change from legacy BIOS to UEFI.
Enable Hyper-V on Windows 11
Press Win + R, type optional features, and hit Enter. Alternatively, search for Control Panel, click on Programs and then “on Turn Windows Features on or off”.

Please select, Check Hyper-V and expand Hyper-V and ensure Hyper-V Management Tools and Hyper-V Platform are selected as shown below. Note: You can also do this via PowerShell with the command below.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

Please see No valid offer received: WDS PXE-E16 error when booting clients,and how to Enable HyperV on Windows: How to install Windows 11 on HyperV. Here is how to Configure Windows Sandbox.
As you can see, changes are being applied.

When prompted, please restart your PC to apply the needed changes.

Please see Restrict IP Address Range on Windows PC, and how to Fix for a boot image was not found for HyperV Virtual Machine.
Create Virtual Machine
Next, proceed to create a new VM. To do this, launch the Hyper-V Manager. In Hyper-V Manager, on the right-hand panel, click New > Virtual Machine.

You can skip the before you begin page or click on “Do not show this page again”.

Enter a descriptive name for the virtual machine and click on Next

How to set up a VM via PXE boot on a Generation 1 VM, Generation 2 VM: Set up a HyperV VM through PXE boot, and Why does the legacy PXE not does work on Generation 2 VM.
Configure VM Generation
Please specify VM generation. Please take a look at the link above to learn about the differences between the two options. Generation 2 is recommended for newer operating systems (UEFI-based) that support secure boot and faster boot options.

Set the amount of RAM you want to allocate to the virtual machine

Here are some related articles: Fix PXE Boot Stuck or No Boot Image was found for HyperV VM, and how to fix “Stuck at Start PXE over IPv4: PXE-E18, Server response timeout“.
Configure Networking
We have discussed extensively in our archive, please search through our blog post on how to create vSwitches via PowerShell and via the Hyper-V Manager.
Please select the vSwitch you have created or click on Next as shown below. Mind you, you will come back and modify your VM if you desire internet access.

Choose to Create a virtual hard disk and specify the size. I am Okay with the default size as shown below.

I will select install Operating System later as I will be using PXE Boot.

Review the VM summary and click on Finish.

Here is a guide How to deploy images to computers using PXE Boot, and how to Fix No bootable media found system halted: Unable to PXE boot.
PXE Boot to Install OS
Start the VM in order to install the OS via PXEboot. Here is an extensive article on this topic: ADK|WinPE|MDT: Deploy Windows with WDS.

Please see How to delete Virtual Switches from Hyper-V, and Install HyperV and Configure vSwitch on Windows Server with PowerShell
Get-VMNetworkAdapter command on PowerShell
By using the following command from the Hyper-V host (locally or remotely) you can view the MAC address of the VM you specify.
Get-VMNetworkAdapter -VMName <vmname>

In addition, to view the MAC addresses of all VMs of a Hyper-V host, you can use the following command.
Get-VM | Get-VMNetworkAdapter | ft VMName, MacAddress

I hope you found this article very useful on how to run Hype-V on Windows 11 and Install Windows OS via PXE Boot. Please feel free to leave a comment below.