The resource operation completed with terminal provisioning state ‘Failed’

If you are getting the error “The resource operation completed with terminal provisioning state ‘Failed'” while deploying Virtual Machine using Custom Image then the issue could be with the Windows Image.

I was deploying ARM based Windows Server on Azure using Custom Image and encountered this error because my source Image was not properly sysprep’ed.

I had to recreate the source Image, run Sysprep before deploying them again using ARM.