Invalid Template Deployment

%3CLINGO-SUB%20id%3D%22lingo-sub-1415339%22%20slang%3D%22en-US%22%3EInvalid%20Template%20Deployment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415339%22%20slang%3D%22en-US%22%3E%3CDIV%3E%3CSPAN%3E%3CSPAN%3EGreetings.%20%26nbsp%3BI've%20been%20trying%20to%20deploy%20some%20variation%20of%20an%20N-series%20Spot%20VM%20over%20the%20past%20couple%20or%20three%20days.%20%26nbsp%3BHowever%2C%20I%20can%20never%20get%20past%20the%26nbsp%3Bvalidation%20stage.%20%26nbsp%3BI've%20tried%20doing%20so%20using%20a%20VM%20Scale%20Set%20via%20an%20ARM%20template%20as%20well%20as%20just%20a%20single%20VM%20via%20the%20portal.%20%26nbsp%3BAs%20this%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-resource-manager%2Ftemplates%2Ferror-sku-not-available%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Elink%3C%2FA%3E%20suggests%2C%20I've%20tried%20using%20the%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3CEM%3Eaz%20vm%20list-skus%20--location%20eastus2%20--size%20Standard_N%20--output%20%3C%2FEM%3E%3CSPAN%3E%3CEM%3Etable%3C%2FEM%3E%20command%20to%20check%20availability.%20%26nbsp%3BI%20see%20that%20there%20are%20some%20available%3A%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EResourceType%20Locations%20Name%20Zones%20Restrictions%3CBR%20%2F%3E---------------%20-----------%20-----------------%20-------%20--------------%3CBR%20%2F%3EvirtualMachines%20eastus2%20Standard_NV6s_v2%203%20None%3CBR%20%2F%3EvirtualMachines%20eastus2%20Standard_NV12s_v2%203%20None%3CBR%20%2F%3EvirtualMachines%20eastus2%20Standard_NV24s_v2%203%20None%3CBR%20%2F%3E%3CSTRONG%3EvirtualMachines%20eastus2%20Standard_NV12s_v3%203%20None%3C%2FSTRONG%3E%3CBR%20%2F%3EvirtualMachines%20eastus2%20Standard_NV24s_v3%203%20None%3CBR%20%2F%3EvirtualMachines%20eastus2%20Standard_NV48s_v3%203%20None%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EI've%20tried%20different%20combinations%20of%20VM%20sizes%20and%20regions.%20%26nbsp%3BThe%20constants%20that%20I%20can%20see%20are%3A%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CUL%3E%3CLI%3E%3CSPAN%3EI'm%20always%20requesting%20a%20spot%26nbsp%3B%3C%2FSPAN%3EVM%3C%2FLI%3E%3CLI%3EI'm%20always%20using%20the%20same%20subscription%20(Visual%20Studio%20Enterprise)%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CDIV%3E%3CSPAN%3EI%20haven't%20been%20able%20to%20find%20any%20documentation%20that%20shows%20any%20conflicts%20with%20what%20I'm%26nbsp%3Btrying%20to%20do.%20%26nbsp%3B%3C%2FSPAN%3EHowever%2C%20I%20always%20get%20this%20error%3A%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22code%22%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22InvalidTemplateDeployment%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22message%22%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22The%26nbsp%3Btemplate%26nbsp%3Bdeployment%26nbsp%3Bfailed%26nbsp%3Bwith%26nbsp%3Berror%3A%26nbsp%3B'The%26nbsp%3Bresource%26nbsp%3Bwith%26nbsp%3Bid%3A%26nbsp%3B'%2Fsubscriptions%2F%3CSUBSCRIPTIONID%3E%2FresourceGroups%2FFoldingAtHomeRG%2Fproviders%2FMicrosoft.Compute%2FvirtualMachines%2FfoldingAtHomeWorker'%26nbsp%3Bfailed%26nbsp%3Bvalidation%26nbsp%3Bwith%26nbsp%3Bmessage%3A%26nbsp%3B'The%26nbsp%3Brequested%26nbsp%3Bsize%26nbsp%3Bfor%26nbsp%3Bresource%26nbsp%3B'%2Fsubscriptions%2F%3CSUBSCRIPTIONID%3E%2FresourceGroups%2FFoldingAtHomeRG%2Fproviders%2FMicrosoft.Compute%2FvirtualMachines%2FfoldingAtHomeWorker'%26nbsp%3Bis%26nbsp%3Bcurrently%26nbsp%3Bnot%26nbsp%3Bavailable%26nbsp%3Bin%26nbsp%3Blocation%26nbsp%3B'eastus2'%26nbsp%3Bzones%26nbsp%3B'3'%26nbsp%3Bfor%26nbsp%3Bsubscription%26nbsp%3B'%3CSUBSCRIPTIONID%3E'.%26nbsp%3BPlease%26nbsp%3Btry%26nbsp%3Banother%26nbsp%3Bsize%26nbsp%3Bor%26nbsp%3Bdeploy%26nbsp%3Bto%26nbsp%3Ba%26nbsp%3Bdifferent%26nbsp%3Blocation%26nbsp%3Bor%26nbsp%3Bzones.%26nbsp%3BSee%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fazureskunotavailable%26nbsp%3Bfor%26nbsp%3Bdetails%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Faka.ms%2Fazureskunotavailable%26nbsp%3Bfor%26nbsp%3Bdetails%3C%2FA%3E.'.'.%22%3C%2FSUBSCRIPTIONID%3E%3C%2FSUBSCRIPTIONID%3E%3C%2FSUBSCRIPTIONID%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EAnyone%20seen%20this%20before%20or%20have%20any%26nbsp%3Badvice%20to%20offer%3F%20%26nbsp%3BAny%20would%20be%20appreciated.%20%26nbsp%3BThanks.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EBrian%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1415339%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EVirtual%20Machine%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1848916%22%20slang%3D%22en-US%22%3ERe%3A%20Invalid%20Template%20Deployment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1848916%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F589723%22%20target%3D%22_blank%22%3E%40AzureBrian%3C%2FA%3E%2C%20I'm%20dealing%20with%20the%20same%20issue%2C%20as%20I%20was%20trying%20to%20create%20a%20Spot%20VM.%20I%20think%20I%20may%20have%20figured%20it%20out.%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fspot-vms%23channel%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fspot-vms%23channel%3C%2FA%3E%20I%20think%20that%20the%20Visual%20Studio%20Enterprise%20Subscription%20isn't%20supported%20for%20the%20Spot%20VMs%2C%20despite%20being%20given%20the%20quota%20to%20use%20it.%20Is%20probably%20the%20case%2C%20hope%20it%20helps!%20(even%20though%20it's%20been%20a%20little%20while)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1851218%22%20slang%3D%22en-US%22%3ERe%3A%20Invalid%20Template%20Deployment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1851218%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F764848%22%20target%3D%22_blank%22%3E%40samsg%3C%2FA%3E%26nbsp%3BThanks%20for%20the%20info!%20%26nbsp%3BI%20suspect%20you're%20correct%2C%20I%20just%20wish%20there%20was%20a%20good%20error%20message%20that%20said%20that!%20%26nbsp%3BAnyway%2C%20thanks%20again!%3C%2FP%3E%3C%2FLINGO-BODY%3E
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 https://aka.ms/azureskunotavailable for details.'.'."
}
 
Anyone seen this before or have any advice to offer?  Any would be appreciated.  Thanks.
 
Brian
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. https://docs.microsoft.com/en-us/azure/virtual-machines/spot-vms#channel 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!