2017-07-19 71 views
1

將Azure中的服務從經典模型遷移到Azure資源管理器(ARM)時,您可能會在經典模型中保留一些保留的IP地址。保留IP的ARM對應部分是公共IP。創建一個新的公有IP將導致另一個IP地址,並可能會導致將您的IP地址列入白名單的客戶端出現問題。如何將Azure保留IP(經典)遷移到Azure公共IP(ARM)?

儘管最好使用基於FQDN的白名單。但是,有時候這是不可能的,IP白名單是次最佳選擇。如何從保留的IP地址遷移到公共IP地址,而不需要獲取新的IP地址?

回答

1

此主題的實際信用用於此log entry中的Vatsana Kongtakane。我已經調整了這些項目,因爲我認爲大多數人已經擁有一個保留的IP。我把它放在StackOverflow上的原因是爲了防止信息丟失。

第1步 - 登錄和準備ARM環境

第2步 - 登錄到您的經典賬號

# Login to your ASM account 
Add-AzureAccount 

# Get a list of available subscriptions 
Get-AzureSubscription 

# Select your subscription 
Select-AzureSubscription –SubscriptionName <SubscriptionName> 

第3步 - 遷移你的保留IP地址

# Show the list of all reserved IP addresses 
Get-AzureReservedIP 

# De-associate the reserved IP address from your cloud service 
# (only necessary if the IP is still assigned to a service) 
Remove-AzureReservedIPAssociation -ReservedIPName <ReservedIPName> -ServiceName <ServiceName> 

# Check for issues during migration 
Move-AzureReservedIP -ReservedIPName <ReservedIPName> -Validate 

# Prepare the ReservedIP for migration 
Move-AzureReservedIP -ReservedIPName <ReservedIPName> -Prepare 

# Commit to migrating the ReservedIP (take a pretty long time) 
Move-AzureReservedIP -ReservedIPName <ReservedIPName> -Commit 

第4步 - 驗證&清理

在如果您登錄到portal.azure.com這一點上,你應該看到在公共IP地址資源使用正確的IP地址。它正在轉移到一個新的資源組,但您可以將其移動到您喜歡的資源組。