0
votes

I have an Azure Cloud Service, and a Azure Virtual Network with Subnet. I can deploy the Cloud Service onto the Virtual Network by setting the appropriate configuration setting in the .cscfg.

What I'm struggling with though is bringing the role onto a specific IP address. My guess is that it's currently using DHCP to get an IP address.

I've tried using the following Powershell:

Get-AzureVM -ServiceName myrole | Set-AzureStaticVNetIP -IPAddress 127.16.0.4 | Update-AzureVM

But the IP address never changes:

<IpAddress>172.16.0.5</IpAddress>

Is there a restriction on doing this on cloud services?

Any help would be really appreciated.

Thanks,

Graeme

1
Have you installed the Azure VM agent onto the virtual machine?Fallso

1 Answers

0
votes

Network configuration schema for Cloud Service is documented here. https://msdn.microsoft.com/library/azure/jj156091.aspx

As you'll see, you have the ability to specify a ReservedIP but not a static private IP.

My understanding is that Set-AzureStaticVNetIP works for Azure IaaS VM, not for Cloud Service VM. Virtual machines whether there are IaaS or Paas provisioned in a VNET are always allocated the first available IP address in the subnet after the first 4 addresses which are reserved from .0 to .3.

So considering your request, I will define subnets that enable to target the right subnet IPs for my role instances, and if I need to precisely know which IP is used by which instance, read it in the "role start" method and use it to configure whatever solution you need for this IP to be be "static". Hope this helps Best regards Stéphane