代码改变世界

Azure Reserved IP

2015-11-08 03:18  zhangpengc  阅读(313)  评论(0编辑  收藏  举报

Azure PowerShell

> Add-AzureAccount
> Select-AzureSubscription "SubscriptionName"
> New-AzureReservedIP -ReservedIPName "projectname-development-ip" -Label "projectname-development-ip-label" -Location "West Europe"
> Get-AzureReservedIP

Add the below NetworkConfiguration section into ServiceConfiguration.Development.cscfg

<NetworkConfiguration>    
    <AddressAssignments>      
        <ReservedIPs>        
            <ReservedIP name="projectname-development-ip" />      
        </ReservedIPs>    
    </AddressAssignments>  
</NetworkConfiguration>

 

Azure VM: Adding a Reserved IP address to an existing VM

At Build 2015 they announced this is now possible and VERY easy. Simply open Azure powershell and run this:

New-AzureReservedIP -ReservedIPName "ipname" -Location "West US" -ServiceName "somevm"

If you run this it will reserve an IP named "ipname" and associate it with the already deployed instance "somevm.cloudapp.net"