Please check ClientIDManagerStartup.log under c:\windows\ccm\logs. I've seen such case which are caused by machine certificate missing when registering the client to the server, the error is recorded in ClientIDManagerStartup.log.
For your information, for VDI template machine, before deploying
you have to delete SMSCFG.INI file under C:\WINDOWS\
you need to delete Machine Cert store SMS