Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article shows you how to migrate an ExpressRoute virtual network gateway from Standard, HighPerformance, or UltraPerformance SKUs to availability zone-enabled SKUs (ErGw1Az, ErGw2Az, ErGw3Az) using PowerShell. Higher-level SKUs provide more CPUs and network bandwidth, resulting in higher network throughput and more dependable connections to your virtual network.
Prerequisites
Before you begin, make sure you have:
- Reviewed the Gateway migration article for important migration considerations.
- An existing ExpressRoute virtual network gateway using Standard, HighPerformance, or UltraPerformance SKU.
- Azure PowerShell installed. For more information, see Install Azure PowerShell.
Working with Azure PowerShell
The steps and examples in this article use Azure PowerShell Az modules. To install the Az modules locally on your computer, see Install Azure PowerShell. To learn more about the new Az module, see Introducing the new Azure PowerShell Az module. PowerShell cmdlets are updated frequently. If you are not running the latest version, the values specified in the instructions may fail. To find the installed versions of PowerShell on your system, use the Get-Module -ListAvailable Az cmdlet.
Migrate to a new gateway using PowerShell
The migration process uses PowerShell scripts to create a new gateway, transfer the configuration, and remove the old gateway.
Clone the migration scripts
Clone the migration scripts from the Azure samples repository:
git clone https://github.com/Azure-Samples/azure-docs-powershell-samples/Navigate to the ExpressRoute gateway migration directory:
cd azure-docs-powershell-samples/expressroute-gateway/gateway-migration/
Prepare the migration
The PrepareMigration script creates a new ExpressRoute virtual network gateway on the same gateway subnet and connects it to your existing ExpressRoute circuits.
Get the resource ID of your existing gateway:
$resource = Get-AzResource -Name <gateway-name> $resource.IdReplace
<gateway-name>with the name of your virtual network gateway.Run the PrepareMigration.ps1 script:
.\PrepareMigration.ps1When prompted, enter the following information:
- Resource ID of your gateway
- Name suffix for your new resources (this name is appended to the existing name, for example:
existingresourcename_newname) - Availability zone for your new gateway
Run the migration
The migration script transfers the configuration from the old gateway to the new gateway.
Get the resource ID of your new gateway using the name you specified in the prepare step:
$resource = Get-AzResource -Name <new-gateway-name> $resource.IdReplace
<new-gateway-name>with the name of your new virtual network gateway.Run the Migration.ps1 script:
.\Migration.ps1When prompted, enter the following information:
- Resource ID of your original gateway
- Resource ID of your new gateway
Commit the migration
The commit script removes the old gateway and its connections after you verify that the new gateway is working correctly.
Important
Before you run this step, verify that your new virtual network gateway has a working ExpressRoute connection. The migration process can cause a brief interruption of up to 30 seconds.
Run the CommitMigration.ps1 script:
.\CommitMigration.ps1When prompted, enter the resource ID of your original gateway.