Monday, September 29, 2014

Assigning Static IP Addresses to Windows Azure VMs

If you need to configure a Windows Azure virtual network and want to assign Static IP addresses to your Windows Azure Virtual Machines, you can do so directly through PowerShell:

This method basically sets up IP Address binding for the specific VMs in your virtual network similar to how you would set up MAC Address Static IP routing on a router on your own home virtual network.

This avoids the trouble of having to statically set the IP Address in the Network Adapter settings and allows it to be controlled centrally through the Windows Azure Virtual Network.

Therefore, if you need to set up communication between your Windows Azure VMs, this is a handy way to ensure that the Windows Azure VMs that are communicating with each other do not change IP addresses between reboots or other VM operations.  For example, if you are setting up TFS (Team Foundation Server) in the Windows Azure cloud, you may need to rely on your TFS Build machine reliably deploying to the same server on a consistent basis.  If the IP Address of your deploy VM changes, this can break your build and deploy process and therefore ruin your overall CI (Continuous Integration) strategy.  By setting the IP address statically, you can avoid the headaches associated with managing your CI strategy across multiple Windows Azure VMs.

NOTE: However, one thing to note regarding setting static IP Addresses to your Azure VMs, is that if you have already configured Primary and Secondary DNS Servers to your Network Adapter, then these values will be wiped out immediately after assigning a Static IP Address to the Azure VM.  You will have to re-add this information back into the Network Adapter once the Static IP Address has been assigned to the Azure VM.  

No comments:

Post a Comment