When it comes PXE boot, various issue can occur. I was reported one incident that all the clients fail to PXE boot and that the clients reboot all of a sudden halfway.
The smsts.log has the following information.
01-05-2021 17:06:25.756 TSPxe 1432 (0x598) CLibSMSMessageWinHttpTransport::Send: WinHttpOpenRequest - URL: contoso.com:80 CCM_POST /ccm_system/request
01-05-2021 17:06:25.756 TSPxe 1432 (0x598) Not in SSL.
01-05-2021 17:06:28.013 TSPxe 1432 (0x598) Request was successful.
01-05-2021 17:06:28.560 TSPxe 1432 (0x598) dwBodyLength <= m_nMaxReplySize, HRESULT=80004005 (..\libsmsmessaging.cpp,2404) 01-05-2021 17:06:28.560 TSPxe 1432 (0x598) reply message body length is too long (17733718, 16777216) 01-05-2021 17:06:28.560 TSPxe 1432 (0x598) DoRequest (sReply, true), HRESULT=80004005 (..\libsmsmessaging.cpp,3167) 01-05-2021 17:06:28.560 TSPxe 1432 (0x598) oPolicyAssignments.RequestAssignments(), HRESULT=80004005 (..\tspolicy.cpp,1318) 01-05-2021 17:06:28.560 TSPxe 1432 (0x598) Failed to request policy assignments (Code 0x80004005) 01-05-2021 17:06:28.560 TSPxe 1432 (0x598) m_pPolicyManager->init( sMP, nHttpPort, nHttpsPort, sSiteCode, bUseCRL, L"", sMediaPfx, sMediaGuid, sEnterpriseCert, sServerCerts, sSiteSigningCert, sAuthenticator), HRESULT=80004005 (tsmediawizardcontrol.cpp,1189)
01-05-2021 17:06:28.560 TSPxe 1432 (0x598) Failed to initialize policy from Management Point
01-05-2021 17:06:28.560 TSPxe 1432 (0x598) Exiting TSMediaWizardControl::GetPolicy.
01-05-2021 17:06:28.560 TSPxe 1432 (0x598) GetPolicy(), HRESULT=80004005 (tsmediawizardcontrol.cpp,2547)
01-05-2021 17:06:28.560 TSPxe 1432 (0x598) RunWizardForPXE(), HRESULT=80004005 (tsmediawizardcontrol.cpp,2900)
01-05-2021 17:06:28.560 TSPxe 1432 (0x598) oTSMediaWizardControl.Run(sMediaRoot, true, sTSLaunchMode), HRESULT=80004005 (tsmbootstrap.cpp,1139)
01-05-2021 17:06:28.560 TSPxe 1432 (0x598) Failed to run from PXE in WinPE
01-05-2021 17:06:28.560 TSPxe 1432 (0x598) Execute( eExecutionEnv, sConfigPath, sTSXMLFile, uBootCount, bReloadEnv, &uExitCode ), HRESULT=80004005 (tsmbootstrap.cpp,1291)
01-05-2021 17:06:28.560 TSPxe 1432 (0x598) Exiting with return code 0x80004005
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) Execution complete.
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) hMap != 0, HRESULT=80070002 (..\environmentscope.cpp,493)
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) m_pGlobalScope->open(), HRESULT=80070002 (..\environmentlib.cpp,335)
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) this->open(), HRESULT=80070002 (..\environmentlib.cpp,561)
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) ::RegOpenKeyExW (HKEY_LOCAL_MACHINE, sKey.c_str(), 0, KEY_READ, &hSubKey), HRESULT=80070002 (..\utils.cpp,1107)
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) RegOpenKeyExW is unsuccessful for Software\Microsoft\SMS\Task Sequence
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) GetTsRegValue() is unsuccessful. 0x80070002.
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) End program:
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) Finalizing logging from process 660
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) Finalizing logs to root of first available drive
01-05-2021 17:06:28.575 TSBootShell 724 (0x2d4) LOGGING: Setting log directory to "X:\SMSTSLog".
The problem lies in “reply message body length is too long“. By default, the maximum of policy size allowed for a device is 16M. This is hardcoded and cannot be adjusted. To solve the issue, just manual delete unnecessary deployments to the device or device collection. Suppose you deploy task sequence to All Unknown Computers. In that case, go to its Properties by right click and check if there are too many deployments. If yes, remove some of them that you no longer need.
Here is an explanation from Microsoft Technet –
The limit is on OVERALL policy (not just Task Sequence policy) to the device. As mentioned this is not just Task Sequence policy but all deployments to the device β applications, packages, software updates, etc. Reducing the deployments reduces the policy which fixes the issue. Again this does not just have to be Task Sequence deployments β it can be any deployment. In fact one of the biggest culprits is usually a large amount of software updates deployed to the device. Reduce the amount of updates deployed to the device and it will also fix the problem.
BTW 16MB is actually a HUGE amount of policy. More careful targeting and maintenance again usually resolve this problem.
There are multiple bugs on the issue and work has been done lately to help improve the situation, mainly by being more efficient with policy and getting rid of old policy that is no longer needed (e.g. backward compatibility with ConfigMgr 2007). The first of these efforts are now in ConfigMgr 1902 with additional improvements expected in 1906 (including hopefully fixing the bug that currently limits the policy to 16MB). If this is a serious issue and you have found that all of their deployments are valid and there is no cleanup to do, you may want to consider upgrading to 1902 so that they get some of these improvements.