Vmware vpshere virtual machine customization failed an error occurred while customizing vm

I. Using terraform we are trying to create a linux VM using centos template in Vmware . The VM is getting successful but getting below error.

Error : virtual machine customization failed an error occurred while customizing vm.

II. In Windows , we are trying to create a VM using a template in vmware but the VM is getting created and deleted automatically .It is failing at customization.

Error : virtual machine customization failed on /

timeout waiting for customization to complete.

Please guide me

Can someone help this?