-1
我創建了虛擬網絡,並且想要將新虛擬機部署到此虛擬網絡。網絡創建虛擬機並將虛擬機關聯到現有的虛擬網絡
我嘗試使用這個命令來創建VM:
az vm create --resource-group myGroup --name VMTestNet1 --location eastus --image eastus1Image --vnet-name eastusVNet1 --admin-username azureuser --size Standard_F4S --public-ip-address ""
我得到這個異常:
Deployment failed. {
"error": {
"code": "InUseSubnetCannotBeDeleted",
"message": "Subnet GatewaySubnet is in use by /subscriptions/subscriptionId/resourceGroups/Automationsystem/providers/Microsoft.Network/virtualNetworkGateways/eastusGW/ipConfigurations/vnetGatewayConfig0 and cannot be deleted.",
"details": []
}
}
我如何部署我的虛擬機到現有的虛擬網絡?