How Do I Find The IP Address Of My Azure VM?

How Do I Find The IP Address Of My Azure VM?

In this Azure article, we will discuss the steps to find the IP address of your Azure Virtual Machine using Azure Portal and PowerShell.

How Do I Find The IP Address Of My Azure VM?

You can find the IP Address Of your Azure Virtual machine with a few clicks in the Azure Portal. Follow the below steps to find the IP of your Azure VM.

Log in to the Azure Portal (https://portal.azure.com/)

Once you logged in to the Azure Portal, Search for the Virtual Machine.

How Do I Find The IP Address Of My Azure VM?

Once you will click on the search result in Virtual Machines, you can able to see all your virtual machines listed below. Click on the specific virtual machine for which you want to check the IP address.

how to find ip address of azure vm

On the Virtual machine page, you can able to see the Public IP address as highlighted below.

Find ip address of azure vm

You can also click on the Networking option from the left navigation on the Virtual machine page. You can able to see the Public and private IP addresses for the virtual machine as highlighted below

Figure out ip address of azure vm

By default the IP address of the Azure Virtual machine is dynamic, if you want to change the dynamic IP of the VM to a Static IP address, you can click on the IP address as highlighted below.

azure create vm with static private ip

Now on the below window, change the Assignment option from Dynamic to Static and then click on the Save button to save the changes. Now the IP address of your Azure Virtual Machine became Static.

azure vm whitelist ip

So this is How you can find the IP address of your Azure VM and you can also able to change the IP address of your Virtual machine from dynamic to static or static to dynamic.

How Do I Find The IP Address Of My Azure VM using PowerShell?

You can also able to retrieve the IP address of your Azure Virtual Machine using PowerShell. Use the below PowerShell Script to get the IP address for your Azure VM

$vmdetailsreport = @()
$vmList = get-azurermvm
$vmnic = get-azurermnetworkinterface | ?{ $_.VirtualMachine -NE $null}
 
foreach($nic in $vmnic)
{
    $details = "" | Select VmName, ResourceGroupName, HostName, IpAddress
    $myvm = $vmList | ? -Property Id -eq $nic.VirtualMachine.id
    $details.VMName = $myvm.Name
    $details.ResourceGroupName = $myvm.ResourceGroupName
    $details.IpAddress = $nic.IpConfigurations.PrivateIpAddress
    $details.HostName = $myvm.OSProfile.ComputerName
    $vmdetailsreport+=$details
}

You can see the output as below

How Do I Find The IP Address Of My Azure VM PowerShell

This is How you can able to retrieve the IP address of your Azure VM using the above PowerShell Script.

FAQs

Does virtual machine have its own IP address?

The answer is Yes, virtual machines are like physical computers. A virtual machine can have one or more IP addresses. The IP address can be public or private. When we are talking about the IP addresses in the case of Virtual Machines, they are closely associated with the network interfaces. Again, the Network interfaces with the Network adapters.

If you are an administrator, you can configure many virtual network adapters as per your business needs. Once you will create the virtual machine with multiple virtual network adapters, the OS will treat these as network adapters exactly the same as physical adapters and provides them with a network address. You can use IPV4 or IPV6 format. You can able to configure a static address also.

You can communicate with the virtual machine with the help of the IP address that is configured specifically to that Azure virtual machine. Even as an administrator, you can configure the Azure Virtual machine with no IP address but, there is no point in doing that. My intention here is it is possible.

You may also like following the below articles

Final Thoughts

In this Azure article, we discussed the quick steps to get the IP address of your Azure Virtual Machine. THanks for reading this article !!!