Jump to content
Sign in to follow this  
  • entries
    142
  • comments
    0
  • views
    79544

Set Static Private IP to an Azure VM

proximagr

789 views

First of all, the VM must be within a virtual network to be able to add a static Private IP address

 

There are two ways to set a static private IP. One is using the new Azure Portal "portal.azure.com" and one via PowerShell.

 

Using the new Portal, browse a VM, select settings and then IP addresses. There at the Private IP address you can select "Static" and add the IP address.

 

Using PowerShell, first connect to the Azure (details on this post), and use the following commands:

 

#Test IP availability:
Test-AzureStaticVNetIP -VNetName XXXXXXX -IPAddress

 

#Set the VM that will take the static IP
$static = Get-AzureVM -ServiceName xxxxx -Name xxxxxx

 

#Set the static IP
Set-AzureStaticVNetIP -VM $static -IPAddress xx.xx.xx.xx | Update-AzureVM

 

#Check the static IP
Get-AzureStaticVNetIP -VM $staticVM

 

source: http://www.e-apostolidis.gr/microsoft/set-static-ip-to-azure-vm/



0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...