Reputation: 41
I am testing azure right now and have some problems.
I am using new Azure portal (Resource manager). How do I add a static IP to my network and forward ports to different VM's? Then how do I add a static IP on my "Network Interface"?
I can't assign this interface to VM, because it says that only dynamic IP can be assigned, and static IP can only be assigned to load balancer. I have created load balancer, added static public IP, but then I try to add a Virtual machine and it asks me to define availability set. But I do not have availability set. So I have created Availability set, but now I cannot add virtual machine to availability set, because PowerShell cmdlet is only for classic VM's, and there is no cmdlet for resource manager VM.
So I have only two questions: How can I add static Public IP in my Azure RM network (so that ip address newer changes) and forward ports to Azure RM VM's in my private network? Because there will be exchange server, web server and I need to forward basic ports to them.
If answer to previous question is "Load balancer", so how I can move Azure RM VM's to Availability Set? Do I have to recreate a Virtual Machine? That if there is important data?
Upvotes: 3
Views: 2956
Reputation: 1344
I have been investigating some aspects of this as I move from Classic VMs (ASM) to ARM.
The documentation isn't clear or very complete, and this being Azure will probably be different in a months time. But, today....
A static public IP can only be assigned to a load balancer, not an individual VM. Search for "Reserved IP Address" in the following article where it states "Static Public IPs can only be assigned to a Load balancer right now.": https://azure.microsoft.com/en-gb/documentation/articles/virtual-machines-azurerm-versus-azuresm/ (EDIT: Noticed that in portal.azure.com there is a switch on each public IP resource to change it from dynamic to static - though I haven't tested this).
Port forward definitely requires a load balancer. See the comments at the bottom of this article where I asked this exact question and Microsoft replied confirming this: https://azure.microsoft.com/en-gb/documentation/articles/load-balancer-arm-powershell/
Basic VMs cannot use a load balancer today: https://azure.microsoft.com/en-gb/pricing/details/load-balancer/
I also read somewhere (can't find the link now) that under a load balancer, there are some restrictions about which machines can be grouped together (based around sizing). From memory I think A0 to A4 could be grouped for example, then say A5 to A8 could be, but say A0 and A7 couldn't be.
The following page states "Currently with Resource Manager, you can only add a virtual machine to an availability set during its creation.": https://azure.microsoft.com/en-gb/documentation/articles/virtual-machines-ps-create-preconfigure-windows-resource-manager-vms/ If you need an Availability Set, then you may need to delete and recreate the VM. You should be able to delete the VM but keep the VHDs, then recreate the VM with the existing VHDs so not lose data.
As well as the links above, I have also found the following helpful: http://blogs.msdn.com/b/cloud_solution_architect/archive/2015/05/05/creating-azure-vms-with-arm-powershell-cmdlets.aspx http://blogs.technet.com/b/parallel_universe_-_ms_tech_blog/archive/2015/11/04/deploy-a-vm-with-azure-powershell-preview-1-0-cmdlets.aspx
Hope that helps.
Chris
Upvotes: 2