Hi,
So to create a Public IP and link to the VM you need to follow these steps:
Try these steps --you can create a new public IP address and associate it to an existing virtual machine by following these steps:
In the Azure Management Portal, navigate to the "Virtual Machines" section.
Select the virtual machine that you want to associate the new public IP address with.
In the virtual machine's dashboard, click on the "ENDPOINTS" tab.
Click on the "Add" button to create a new endpoint.
In the "Add Endpoint" dialog box, select "Public" as the endpoint type.
Select the protocol (TCP or UDP) and enter the public and private port numbers.
Select "Create a new IP address" and provide a name and IP address or select an existing IP address if it is available.
Click the "Add" button to create the new endpoint.
Once you've created the new endpoint, the new public IP address will be associated with the virtual machine, and traffic sent to the public IP address will be directed to the virtual machine. Also need to make sure to configure the Network security group rules to allow the traffic to the virtual machine on the specific port and protocol that you want to use.
Hope this helps. JS
== Please Accept the answer if the information helped you. This will help us and others in the community as well.