How to Create a VM Without a Public IP?

September 5, 2025 2 answers
Asked by CuriousNinja42
Hey everyone! I have a couple of questions about setting up VMs in Azure. First off, is there a way to create a VM without it automatically getting a public IP? I had a test VM that ended up with a public IP, and I'm not sure how to avoid that. My second question is about creating a new VM in a different resource group under the same subscription. I noticed that it didn't assign IPs from the virtual network address space. Am I missing something? Thanks for your help!

Answers

CloudExplorer88
Yes, it's definitely possible to set up a VM without a public IP. You can manage access through other resources in your VNet instead, like using a load balancer or a bastion host for connectivity. Regarding the IP assignment issue, just check if the virtual network and network interface card are properly configured. It should grab an IP from the VNet if everything is in order.
Reply to this answer
TechGuruRandom
Absolutely, you can create a VM without a public IP! When setting up the VM, just make sure to uncheck the option for creating a public IP. Alternatively, you can detach the public IP from the network interface after creating the VM. As for your second question, creating a VM in a different resource group shouldn't affect IP assignment. It should still pull from the available IPs of your virtual network, given that itโ€™s connected properly to that network.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions