How to assign public ip to Virtual machine scale set instance

Deepak sharma 21 Reputation points
2022-07-22T17:10:52.613+00:00

Hi

I created a VSS and under this there are 2 instances.

I want to assign public ip to these instances - https://prnt.sc/qhVd9zChzQiN

I even checked the NIC, but it showing me this - https://prnt.sc/Siv_jMI3siOT

Even I created a public IP, but when i try to associate then it doesn't show the VSS virtual network!!

Can you please guide me how can I assign public IP to VM under VSS?

Thanks

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
404 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jackson Martins 10,556 Reputation points MVP
    2022-07-23T11:40:32.477+00:00

    Hi @Deepak sharma
    If you just want to connect via rdp, you can use inbound nat rules, and define a port for each vm from load balance

    reference: https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-standard-virtual-machine-scale-sets

    223965-image.png

    To create a scale set that assigns a public IP address to each virtual machine with the CLI, add the --public-ip-per-vm parameter to the vmss create command.

    reference: https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-networking#creating-a-scale-set-with-public-ip-per-virtual-machine

    Or you can use public ip prefix to generate ips in a virtual machine scale set

    reference: https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.compute/vmss-with-public-ip-prefix

    Get in touch if you need more help with this issue.

    --please don't forget to "Accept the answer" if the reply is helpful--

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Cristian SPIRIDON 4,476 Reputation points
    2022-07-22T17:53:25.147+00:00

    Hi,

    To have Internet access for VSS you can configure a load balancer:

    https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-standard-virtual-machine-scale-sets

    Hope thus helps!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.