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.
Refer to my article on Deploying Custom Image using ARM.
There could be other reasons for this error but it will be worth checking the source Image if your scenario matches.