Configuration Manager – Unknown Host
One of the things I like about System Center Configuration Manager’s OS Deployment is that once a Task Sequence is working as expected, it continues to do so without issue. It might take a little fun out of life to have something work so flawlessly, but it’s worth it in exchange for consistent performance and predictable outcomes.
You can imagine my surprise, then, when I encountered an error in the midst of a task sequence that had previously worked perfectly.
The displayed error message was a typical less-than-informative failure, so I went looking in the SMSTS.log file where I found this error:
unknown host (gethostbyname failed)
Given that the task sequence had been running well up to that point (against the same management point, no less) it seemed a bit odd that Windows PE would suddenly not be able to resolve a host name. Still, I thought I’d test it out and pulled open the command prompt within WinPE (which is very handy for troubleshooting, and is highly recommeded).
To my surprise, nslookup and ping both failed to resolve the hostname of the MP, so I took a closer look. Ipconfig showed the autoconfig IP, and that seemed to be the source of the problem. Once I did a release/renew, name resolution worked as expected. So, that’s all well and good, but why did WinPE lose its IP in the first place?
Internet searches will help you locate all sort of solutions regarding NIC drivers, automatic application of drivers, and even certificates, and they all seem reasonable, except…
There isn’t really an indication that the driver is wrong or not available. Ipconfig shows the NIC, and a manual release/renew immediately solves the problem (even in the midst of the task sequence), so why would the IP just go away?
The answer is pretty simple: DHCP Lease time. WinPE only appears to hold on to an IP for the time of the lease, instead of refreshing and renewing the lease. So, once the lease time expires, the IP simply goes away.
The solution is equally simple: ensure your DHCP lease time is longer than the Task Sequence ever spends in a single iteration of WinPE.