Invalid Template Deployment

Occasional Contributor
Greetings.  I've been trying to deploy some variation of an N-series Spot VM over the past couple or three days.  However, I can never get past the validation stage.  I've tried doing so using a VM Scale Set via an ARM template as well as just a single VM via the portal.  As this link suggests, I've tried using the az vm list-skus --location eastus2 --size Standard_N --output table command to check availability.  I see that there are some available:
ResourceType Locations Name Zones Restrictions
--------------- ----------- ----------------- ------- --------------
virtualMachines eastus2 Standard_NV6s_v2 3 None
virtualMachines eastus2 Standard_NV12s_v2 3 None
virtualMachines eastus2 Standard_NV24s_v2 3 None
virtualMachines eastus2 Standard_NV12s_v3 3 None
virtualMachines eastus2 Standard_NV24s_v3 3 None
virtualMachines eastus2 Standard_NV48s_v3 3 None
I've tried different combinations of VM sizes and regions.  The constants that I can see are:
  • I'm always requesting a spot VM
  • I'm always using the same subscription (Visual Studio Enterprise) 
I haven't been able to find any documentation that shows any conflicts with what I'm trying to do.  However, I always get this error:
  "code": "InvalidTemplateDeployment",
  "message": "The template deployment failed with error: 'The resource with id: '/subscriptions/<subscriptionid>/resourceGroups/FoldingAtHomeRG/providers/Microsoft.Compute/virtualMachines/foldingAtHomeWorker' failed validation with message: 'The requested size for resource '/subscriptions/<subscriptionid>/resourceGroups/FoldingAtHomeRG/providers/Microsoft.Compute/virtualMachines/foldingAtHomeWorker' is currently not available in location 'eastus2' zones '3' for subscription '<subscriptionid>'. Please try another size or deploy to a different location or zones. See for details.'.'."
Anyone seen this before or have any advice to offer?  Any would be appreciated.  Thanks.
2 Replies

Hey @AzureBrian, I'm dealing with the same issue, as I was trying to create a Spot VM. I think I may have figured it out. I think that the Visual Studio Enterprise Subscription isn't supported for the Spot VMs, despite being given the quota to use it. Is probably the case, hope it helps! (even though it's been a little while)

@samsg Thanks for the info!  I suspect you're correct, I just wish there was a good error message that said that!  Anyway, thanks again!