Ram*_*ein 6 azure azure-resource-manager
将Azure中的服务从经典模型迁移到Azure资源管理器(ARM)时,经典模型中可能会有一些保留的IP地址。保留IP的ARM副本是公用IP。创建新的公共IP将产生另一个IP地址,并可能导致将您的IP地址列入白名单的客户端出现问题。
尽管最好使用基于FQDN的白名单。但是,有时这是不可能的,IP白名单是次佳的选择。如何在不获取新IP地址的情况下从保留IP地址迁移到公共IP地址?
该日志条目中该主题的实际功劳是Vatsana Kongtakane的。我已经修改了这些项目,因为我认为大多数人已经拥有了保留的IP。我将其放在StackOverflow上的原因是为了防止信息丢失。
步骤1 –登录并准备您的ARM环境
# Login to your ARM account
Add-AzureRmAccount
# Get a list of available subscriptions
Get-AzureRMSubscription
# Select your subscription
Select-AzureRmSubscription -SubscriptionName <SubscriptionName>
# Register migration provider, this can take a couple minuites
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate
# View the current RegistrationState status, do not proceed to step 2 until the status says Registered
Get-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate
Run Code Online (Sandbox Code Playgroud)
第2步–登录您的经典帐户
# Login to your ASM account
Add-AzureAccount
# Get a list of available subscriptions
Get-AzureSubscription
# Select your subscription
Select-AzureSubscription –SubscriptionName <SubscriptionName>
Run Code Online (Sandbox Code Playgroud)
步骤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
Run Code Online (Sandbox Code Playgroud)
步骤4 –验证和清理
此时,如果您登录portal.azure.com,则应该在“公共IP地址”下看到具有正确IP地址的资源。它正在转移到新的资源组,但是您可以将其移动到所需的资源组。
| 归档时间: |
|
| 查看次数: |
2251 次 |
| 最近记录: |