You can create a virtual machine with a static public IP address using the Azure portal.
A public IP address enables you to communicate to a virtual machine from the internet. Assign a static public IP address, rather than a dynamic address, to ensure that the address never changes.
Sign in to the Azure portal at https://portal.azure.com.
Enter, or select, the following information, accept the defaults for the remaining settings, and then select OK:
Select a size for the VM and then select Select.
If the public IP address must be a standard SKU, select Standard under SKU. Learn more about Public IP address SKUs. If the virtual machine will be added to the back-end pool of a public Azure Load Balancer, the SKU of the virtual machine's public IP address must match the SKU of the load balancer's public IP address. For details, see Azure Load Balancer.
Accept the remaining default settings and select OK.
You can view the public IP address that is assigned, and that the address is assigned to the myVM virtual machine, as shown in the following picture:
© 2022 Digcode.com