How to force Microsoft Azure Cloud Service public IP to change...
Posted on 2014-07-29
I'm exploring the abilities of Microsoft Azure for hosting a web scraper. To work-around site blocking, I'd like to be able to force the public IP address of the Azure Cloud Service to change on command. Ideally, a script would be used to force the IP change on a regular schedule.
Azure's documentation indicates that the Cloud Service Public IP address will be re-provisioned if all of the VMs using the service are shut down. However, when shutting down and restarting my one VM using PowerShell, I'm getting mixed results--sometimes the Cloud Service IP changes, sometimes it doesn't. One test took 15+ minutes after the VM shutdown/restart for the IP change to register, while other identical tests showed the change within a minute, or no change at all.
Not certain if there is a time factor involved--maybe X number of seconds/minutes are needed after the VM shutdown, before the VM is restarted (along with the Cloud Service by default) for the Azure backend to register the changes?
Any insights or knowledge regarding this would be greatly appreciated.