JSON fails creating VM
Closed this issue · 3 comments
Module: Design and implement network security
Lab/Demo: M06
Task: 6
Step: 3
Description of issue
Running JSON ddos.json (if relevant, using Australia East, as VMs not available in most DCs on free account), get the following error:
New-AzResourceGroupDeployment: 11:04:40 AM - The deployment 'ddos' failed with error(s). Showing 1 out of 1 error(s).
Status Message: Cannot parse the request. (Code: InvalidRequestFormat)
- Could not find member 'networkSecurityGroup' on object of type 'VMNetworkProfile'. Path 'Properties.NetworkProfile.networkSecurityGroup', line 1, position 432. (Code:InvalidJson)
CorrelationId: ce0cf25a-5fcc-4ab7-95d7-88d535bd9802
Repro steps:
- Upload provided JSON files to Powershell
- Run New-AzResourceGroupDeployment -ResourceGroupName $RGName -TemplateFile ddos.json -TemplateParameterFile ddos.parameters.json
I am having the same issue, seem the vmSize is no longer available?
That is a different issue, and is related to Azure restricting which datacenters can be used on a free account. I chose other datacenters that did allow the particular sizes on a free account, and altered commands and json to suit. Much of the json just takes the datacenter used by the resource group and doesn't need changing.
To find the datacenters where a given size is available, I used commands similar to:
az vm list-skus --size Standard_D2s_v3 --output table
MOC Labs Review did not experience this issue.