4
votes

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

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.'.

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.

4

4 Answers

8
votes

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/

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.

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

azure network export networks.json

And then examining the networks.json file.

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.

2
votes

You should double check the virtual network name. Do not use the name you just created, just use "Virtual network site name (for .cscfg file) " column in virtual network details in Azure portal.

0
votes

When you are deploying in the new portal, you are deploying to resource manager. You have to recreate the vnets in resource manager or migrate them to resource manager.

Mor info on classic vs resource manager: resource-manager-deployment-model

0
votes

At this point of time Cloud services cannot connect to a Virtual network (Resource manager type), you can only connect them to a Virtual network (classic). I hope they add the support for Resource manager type Virtual networks in a near future.