【发布时间】:2016-02-28 08:07:40
【问题描述】:
我正在使用 Azure 资源管理器门户。我已经使用 json 模板创建了 vm。但是vm的本地ip地址的顺序发生了变化。 `我的要求是 10.0.0.4,10.0.0.5,10.0.0.6。 但输出是 10.0.0.5, 10.0.0.6,10.0.0.4
我尝试使用 json 设置私有 IP 地址
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "static",
"PrivateIpAddress": [concat("10.0.0."), copyindex())],
"copy": {
"name": "ipaddress",
"count": "["[variables('numberOfInstances')]"]"
},
"subnet": {
"id": "[variables('subnetRef')]"
},
"loadBalancerBackendAddressPools": [
{
"id": "[concat(variables('lbID'), '/backendAddressPools/BackendPool1')]"
}
],
"loadBalancerInboundNatRules": [
{
"id": "[concat(variables('lbID'),'/inboundNatRules/RDP-VM', copyindex())]"
}
]
}
}
]
}
},
但它会引发 json 解析异常。有人知道如何在 json 模板中设置私有 IP 地址吗?
【问题讨论】: