2017-07-19 49 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地址。它正在转移到一个新的资源组,但您可以将其移动到您喜欢的资源组。

相关问题