我正在尝试在Azure(用于OpenStack实验)中构建一个实现this网络架构的OpenStack云。
我已经使用Azure CLI构建了所有内容并使其正常运行,但在添加第二个NIC时收到以下错误。
error: Deployment provisioning state was not successful
error: Subnet default referenced by resource /subscriptions/<subscriptionid>/resourceGroups/openstack/providers/Microsoft.Network/networkInterfaces/controller-prov-nic/ipConfigurations/ipconfig2 is not in the same Virtual Network as the subnets of other VMs in the availability set.
网络不是我的力量。为什么我不能有两个网络连接到他们自己的VNET?任何人都可以建议如何最好地在上面的OpenStack链接中实现拓扑?
您可以下载整个项目here。该项目连续构建每种资源类型。这样可以更轻松地处理每个模板文件。
注意:
由于
拜伦
答案 0 :(得分:0)
解决了我自己的问题.... 我没有意识到您可以在单个VNET中设置多个子网,然后将每个NIC连接到每个子网。以下是解决问题的JSON:
"resources": [
{
"comments": "VNet definition for OpenStack Network Layout.",
"type": "Microsoft.Network/virtualNetworks",
"name": "[parameters('virtualNetworks_os_vnet_name')]",
"apiVersion": "2016-03-30",
"location": "[parameters('location')]",
"properties": {
"addressSpace": {
"addressPrefixes": [
"10.0.0.0/16",
"203.0.113.0/24"
]
},
"subnets": [
{
"name": "Management-Network",
"properties": {
"addressPrefix": "10.0.0.0/16"
}
},
{
"name": "Provider-Network",
"properties": {
"addressPrefix": "203.0.113.0/24"
}
}
]
},
"resources": [],
"dependsOn": []
}
然后NIC定义变为:
"resources": [
{
"comments": "Controller NIC for Management Network",
"type": "Microsoft.Network/networkInterfaces",
"name": "[parameters('networkInterfaces_controller_mgt_nic_name')]",
"apiVersion": "2016-03-30",
"location": "[parameters('location')]",
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAddress": "10.0.0.11",
"privateIPAllocationMethod": "Static",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_pub_ip_mgt_ctrlr_name'))]"
},
"subnet": {
"id": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_os_vnet_name')), '/subnets/Management-Network')]"
}
}
}
],
"dnsSettings": {
"dnsServers": []
},
"enableIPForwarding": false,
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_management_nsg_name'))]"
}
},
"resources": [],
"dependsOn": []
},
{
"comments": "Controller NIC for Provider Network",
"type": "Microsoft.Network/networkInterfaces",
"name": "[parameters('networkInterfaces_controller_prov_nic_name')]",
"apiVersion": "2016-03-30",
"location": "[parameters('location')]",
"properties": {
"ipConfigurations": [
{
"name": "ipconfig2",
"properties": {
"privateIPAddress": "203.0.113.4",
"privateIPAllocationMethod": "Dynamic",
// "publicIPAddress": {
// "id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_pub_ip_prov_ctrlr_name'))]"
// },
"subnet": {
"id": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_os_vnet_name')), '/subnets/Provider-Network')]"
}
}
}
],
"dnsSettings": {
"dnsServers": []
},
"enableIPForwarding": false,
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_provider_nsg_name'))]"
}
},
"resources": [],
"dependsOn": []
}
]