This step is when LDMS creates the locked copy of the template to use for this deployment. When you have this problem it is normally due to a software package that is part of the template having an issue.
Do you have any software packages in this template?
If you don't then this doco can help find the cause Issue: Provisioning task failing after try 40 of 40