Forum Discussion
How to assign public IP to existing VM
Thanks for your reply but in my scenario I already have azure windows vm with internal ip.
Now I want to assign the public static ip to this vm.
The URL which you are referring is showing how to deploy the vm from scratch with public ip.
Can you pl provide the steps or powershell command to do this.
Thanks
Hi,
See steps below.
1. Go to your VM on portal.
2. Click on the Networking under settings in VM blade.
3. Click on the Network Interface in Networking blade.
4. Click on IP Configuration under settings in Network Interface blade.
5. Click on the IP configuration on the IP configuration blade.
6. Select Enable under Public IP address settings.
7. Create a New IP address and choose static. Save the IP address and then the IP Configuration.
- Suhag DesaiDec 11, 2017Brass Contributor
Excellent,
That works,
by any chance, do you hv this through powershell ? i could create public IP through powershell but could not assign it to interface as we did through GUI ?
- Vineet AroraDec 11, 2017Brass Contributor
Below link has required steps to do this via Power Shell.
- Rusty AbstonMar 16, 2018Copper Contributor
Do you have to do anythign else? I do not see these on my server to associate it to the website in IIS.
- Vineet AroraMar 16, 2018Brass Contributor
Hi,
Have you assigned it to the webserver in the Azure portal using above steps?
If yes, what else you are trying to achieve.
Public IP will not be visible in IIS.
- Mar 17, 2018
IP is NATed. It will be not visible in network configuration. You can read public IP from Identity Metadata Service, if you need to read it from the application perspective: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service
- quangvublogAug 05, 2020Copper Contributor
Thank you so much for useful information Vineet Arora