When UEFI network booting on a HyperV Gen 2 VM you might get PXE-E99: Unexpected network error.
This post which might help someone with the same problem, I had this annoying error which was PXE E99 when PXE booting using UEFI network boot on my gen 2 HyperV vm’s. These Gen 2 vm’s were on one of my 6 virtual switches in HyperV which I have created using a simple naming scheme to easily identify the network, eg: #1_CM12, #2_CM12 and so on.
While attempting UEFI network boot I was getting PXE E-99 on my Gen 2 vm’s (the Gen 1 vm’s cannot UEFI boot as they only have a legacy bios). The error translates to “PXE-E99: Unexpected network error.” No matter what I did server side (I tried installing new distribution points on Server 2012 R2, new X64 boot wims, etc, nothing helped,. even DHCP server options) all to no avail.
Network cable unplugged in Windows ?
Finally I got another problem (unrelated or so I thought) where my Gen 2 network adapters failed to get any ip address in Windows, and the cause according to Windows was that the network cable was unplugged, that was odd because they were definetly connected to my #1_CM12 HyperV Private Virtual Switch.
Finally I tried changing the HyperV Switch to the next in line #2_CM12, and the Gen 2 vm’s got connected immediately. The Network cable unplugged message went away and they got an ip from my other switch.
I set them back to #1_CM12 and again, network cable unplugged even though all my Gen 1 vm’s were working fine on the same switch, so in desperation I deleted that switch and recreated it, added my vm’s back to the ‘new’ #1_CM12 and lo and behold the ‘network cable unplugged’ issue was fixed.
Anyhow after fixing that issue I got back to what I was originally testing (UEFI network boot) and I PXE booted my Gen 2 v and voila, the PXE E99 error was gone and all worked fine after that point.
If you are getting strange things happening (network wise) on your Gen 2 vm’s and if nothing you do helps the situation then try what I did, delete the HyperV private virtual switch and recreate it, it worked for me !