Tuesday, September 22, 2015

How to get WDS PXE boot on Windows Server 2012 R2 to work on VMWare ESXi 6

After struggling with getting Windows Deployment Services to work on VMWare ESXi 6, I thought I should share a simple tip.

A virtual client doing PXE boot on ESXi 6 (or 5.5) on a standard default installed WDS on Windows Server 2012 R2 does not work out of the box. You have to do some small magic in order for this to work.

Here is what happens with VM that tries to network boot from a WDS server using the standard boot.vim that is included in the Windows 2012 R2 ISO/DVD:
Error while obtaining an IP address from the DHCP server

As you see, the VM does not get an IP from the DHCP server, although it clearly used to have an IP otherwise you couldn't get so far. So the VM does a network boot (PXE with F12), and then it fails.
When you are doing this on a VM running on ESXi 6 (or 5.5) and you are using the VMXNET3 nic on the VM, this is failing. The reason is that the driver for VMXNET3 is not included. If you setup your VM with E1000 or E1000E nic, this is not a problem as the driver for those nic's are included in the default boot.vim boot image.

So how to add the driver?
This is very simple, but takes some steps to perform.
1. First you need to find a VM with VMWare Tools installed. In my case, the WDS server is a Windows 2012 R2 server running as a VM.
2. Second, you need to add the VMXNET3 driver to a package group, which you already should have created. I just copied all the drivers from C:\Windows\System32\DriverStore from my WDS server for a start. And that is fine, but VMXNET3 is not included there. So right click your Drivers folder in the console and choose "Add Driver Package...":


3. Just browse to your C:\Program Files\Common Files\VMWare\drivers\vmxnet3 and choose the vmxnet3ndis6.inf file and click Next 2 times:

4. In the end, choose to add it to your driver group of choice. 


5. Then you need to add the driver for VMXNET3 to the boot image. Go into the WDS console, find your boot image and right-click, click "Add drivers packages to image...":

6. Click Next.
7. On this step, click the "Search for package" button:

8. Somewhere in the bottom you should find vmxnet3ndis6[x64]. Just unselect all the others and choose only the vmxnet3ndist6 driver package. It's a bad idea to add unnecessary drivers to the boot image, adding all drivers from this screen will cause the PXE boot process to go into a BSOD.

9. Click Next 2 times and you are done!

Now you can PXE boot your VM without problems getting DHCP.