I've deployed Azure VM Scale set and want to attach a separate public IP address to SS VM. How can I perform it?
Asked
Active
Viewed 440 times
1 Answers
2
You can't assign an existing public IP directly to a scale set VM, that's not how scale sets work. VM Scale Sets are designed to create multiple identical copies of a VM, and allow you to scale the number of VM's up or down as required. Given this, assigning an existing IP to a VM doesn't really fit that design. There are however solutions if you need public IP's with you scale set:
- You can assign your existing public IP to an Azure Load Balancer and have that balance traffic across all the VM's in your scale set (regardless of how many there are)
- You can assign a public IP to each VM in the scale set, but you need to have Azure do this for you. You can see how to do this here
All of that said, if you only need a single VM, then you probably want to look at using a VM rather than VMSS.
![](../../users/profiles/48.webp)
Sam Cogan
- 38,158
- 6
- 77
- 113
-
I found that documentation but no detailed guide here. The developer wants to access each of the VM. Agreed with your point. – vish Jan 22 '21 at 09:10
-
If this is purely for developers to access the VM then I would recommend you don't use public IP's at all, as this is a security risk. I would look at setting up Azure Bastion to give you remote access to the vNet, then have the developers access the scale set VM's using their private IP's. Much safer and easier to manage. – Sam Cogan Jan 22 '21 at 09:12