PXE Boot a VM in Hyper-V

By | 2014-02-12

In most technology environments, automation is everything. Part of that automation is the deployment of operating systems to servers and workstations via Windows Deployment Services, with help of PXE boot. Here’s how to PXE boot a guest in Hyper-V.

Problem

You might have tried this before, and discovered that navigating to Properties -> Hardware -> firmware and changing the startup order so that PXE was first.  And it didn’t work, did it?  Why doesn’t it work?!  It’s first in the boot order, right?!

What is PXE?

PXE is short for Preboot eXecution Environment, and is pronounced PXE.  You can think of it as kind of a Windows version of a Linux LiveCD.  We use PXE in the Windows-based enterprise to load a boot image from a network location, from which we can select a pre-configured OS image from a list stored on our WDS server.

This makes things easy for building a uniform, easy to deploy environment, with easily repeatable results every time.

So Why Won’t it Work with my Virtual Machine?

By default, SCVMM (or Hyper-V 3) utilizes a synthetic network adapter as part of the initial VM configuration.  The downer of this is that synthetic card doesn’t start until after the guest OS does, which means it’s not really there before Windows boots up.  Funky, right?

So to get around this, remove the synthetic card, and add a legacy network card to the virtual machine configuration, thus:

  1. Power down the guest
  2. In SCVMM, right-click the guest, and select Properties.
  3. In the Properties window, click Hardware Configuration
  4. Click the network adapter, usually labelled Network Adapter 1, then click Remove at the top of the window.
  5. Now click Add, and select Legacy network adapter from the list.
  6. Click Ok

Power on your guest, and you should see it PXE booting.  Be sure to press F12 to select an image to boot from!

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.