Azure-部署到Cloud Service时不存在虚拟网络 [英] Azure - Virtual Network does not exist when deploy to Cloud Service

查看:114
本文介绍了Azure-部署到Cloud Service时不存在虚拟网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将Cloud Service(经典)添加到Virtual Network(经典),但是在部署时出现错误(新门户-更新您的部署):

I tried to add Cloud Service (classic) to Virtual Network (classic), but an error appears when I deploy (new portal - Update your deployment):

该域的更新部署操作失败 部署槽"staging"中的"developementtajgowebservicev1" 名称不起作用":虚拟网络devvirtual-Network可以 不存在.'.

The update deployment operation failed for the domain 'developementtajgowebservicev1' in the deployment slot 'staging' with the name 'not working': 'The virtual network devvirtual-Network does not exist.'.

我在Role标签之后将这段代码添加到了配置文件中.

I added this code after Role tag into config file.

<NetworkConfiguration>
    <VirtualNetworkSite name="devvirtual-Network"/>
    <AddressAssignments>
        <InstanceAddress roleName="WorkerRole1">
            <Subnets>
                <Subnet name="Subnet-1"/>
            </Subnets>
        </InstanceAddress>
    </AddressAssignments>
</NetworkConfiguration>

具有此名称的虚拟网络存在于同一预订中.

The virtual network with this name exist in same subscription.

推荐答案

此处有针对此问题的解决方案:

There's a solution for this issue here: https://thelonedba.wordpress.com/2015/07/17/new-azurevm-badrequest-the-virtual-network-foo-does-not-exist/

基本上,问题似乎在于网络的Azure门户名称与您在云服务配置中需要使用的名称不同.

Basically, the problem seems to be that the Azure portal's name for the network isn't the same as the name you need to use in the cloud service configuration.

我能够通过使用Azure CLI工具获得正确的"名称:

I was able to get the "correct" name by using the Azure CLI tools:

azure network export networks.json

然后检查networks.json文件.

And then examining the networks.json file.

就我而言,虚拟网络的正确"名称是组[ResourceGroup] [NetworkName]". (即,该网络被称为资源组"group1"中的"network1",因此正确"的名称是"Group group1 network1")这是针对经典"虚拟网络的-我没有尝试过基于资源管理器的虚拟网络.

In my case, the "correct" name of the Virtual Network was "Group [ResourceGroup] [NetworkName]". (ie, the network is called "network1" which is in the Resource Group "group1", so the "correct" name is "Group group1 network1") This was for a "classic" Virtual Network - I haven't tried with the Resource Manager based Virtual Networks.

这篇关于Azure-部署到Cloud Service时不存在虚拟网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆