6

While deploying a new Web Role on Windows Azure i am getting this error: Unable to allocate the required address spaces for the deployment in a new or predefined subnet that is contained within the specified virtual network. I have searched for a solution, but didn't find one. Does any one have an idea?

My cscfg file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="Application.Cloud" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2013-03.2.0">
  <Role name="WebApplication" vmName="vm001">
    <Instances count="1" />
    <ConfigurationSettings>
        ...
    </ConfigurationSettings>
    <Certificates>
      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="..." thumbprintAlgorithm="sha1" />
    </Certificates>
  </Role>
  <Role name="Application.ServiceOpdrachten" vmName="vm002">
    <Instances count="1" />
    <ConfigurationSettings>
      ...
    </ConfigurationSettings>
    <Certificates>
      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint=".." thumbprintAlgorithm="sha1" />
    </Certificates>
  </Role>
  <NetworkConfiguration>
    <VirtualNetworkSite name="VirtualNetwork" />
    <!-- The virtual network name must match the name of the vvirtual network configured in your subscription. -->
    <AddressAssignments>
      <!-- You must map each role in your cloud service to a subnet or a collection of subnets which were defined in your network.-->
      <InstanceAddress roleName="WebApplication">
        <Subnets>
          <Subnet name="Subnet-1" />
        </Subnets>
      </InstanceAddress>
    </AddressAssignments>
  </NetworkConfiguration>
</ServiceConfiguration>

In the same cloudproject i have another instance that deploys fine.

<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="Ecare.Acasa.Cloud" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2013-03.2.0">
  <Role name="WebApplication">
    <Instances count="1" />
    <ConfigurationSettings>
      ...
    </ConfigurationSettings>
    <Certificates>
      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="..." thumbprintAlgorithm="sha1" />
    </Certificates>
  </Role>
  <Role name="Ecare.Acasa.ServiceOpdrachten">
    <Instances count="1" />
    <ConfigurationSettings>
      ...
    </ConfigurationSettings>
    <Certificates>
      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="..." thumbprintAlgorithm="sha1" />
    </Certificates>
  </Role>
  <NetworkConfiguration>
    <VirtualNetworkSite name="Ecare" />
    <!-- The virtual network name must match the name of the vvirtual network configured in your subscription. -->
    <AddressAssignments>
      <!-- You must map each role in your cloud service to a subnet or a collection of subnets which were defined in your network.-->
      <InstanceAddress roleName="WebApplication">
        <Subnets>
          <Subnet name="Subnet-1" />
        </Subnets>
      </InstanceAddress>
    </AddressAssignments>
  </NetworkConfiguration>
</ServiceConfiguration>
Raimond Kuipers
  • 1,146
  • 10
  • 18
  • Just opening a bounty won't help you much. Provide as much information about your deployment as possible. Such as: your .csdef file. Are you using virtual network by mistake or on purpose? do you have any Virtual Machines in the same virtual network? if you use Virtual Network for your Cloud Service deployment, is your cloud service created within the same Affinity Group where the Virtual Network is defined? – astaykov May 24 '13 at 10:59
  • i have edited it. We need the virtual network. – Raimond Kuipers May 24 '13 at 11:42
  • Is the `cloud service` you are trying to deploy in the same `affinity group` as the Virtual Network? does the Virtual Network have enough free IP Addresses when you try to deploy the faulting Cloud Service package? – astaykov May 24 '13 at 19:52
  • yes, it is. One cloud service can be deployed, the other not. – Raimond Kuipers May 25 '13 at 14:46
  • Your samples are providing two totally different Virtual Networks! One is `VirtualNetwork`, other is `ECare`. Is this by mistake of posting, or by general mistake that prevents you from deploying to the required network? – astaykov May 28 '13 at 05:50
  • Both should be VirtualNetwork (i wanted to hide some information) – Raimond Kuipers May 28 '13 at 10:21
  • Is this an older virtual network? I've read that some people experienced this with pre-existing networks after Microsoft officially released the feature. – jerry May 30 '13 at 18:47
  • The virtual network is new. – Raimond Kuipers May 30 '13 at 20:50
  • The solution that seemed to fix it in the cases I found was the same one Vishalgiri suggested anyway. Good luck, hope you can solve your problem. – jerry May 30 '13 at 21:35

2 Answers2

3

We had the same problem around three months ago. Back then may be after some update, the new IP Addresses were not being assigned, or when role or vm were deleted their IP address were not reusable.

We were not able to take help from Microsoft Support, as it was in Preview.

What worked for us was: We deleted the whole virtual network, and created it again.

If it is possible for you, see if it works.

Vishalgiri
  • 484
  • 1
  • 4
  • 15
0

I was facing this issue and found the issue can be fixed. It has been documented here.

java_enthu
  • 2,279
  • 7
  • 44
  • 74