|
| 1 | +--- |
| 2 | +title: Upgrade from Basic Public to Standard Public - Azure Load Balancer |
| 3 | +description: This article shows you how to upgrade Azure Public Load Balancer from Basic SKU to Standard SKU |
| 4 | +services: load-balancer |
| 5 | +author: irenehua |
| 6 | +ms.service: load-balancer |
| 7 | +ms.topic: article |
| 8 | +ms.date: 01/23/2020 |
| 9 | +ms.author: irenehua |
| 10 | +--- |
| 11 | + |
| 12 | +# Upgrade Azure Public Load Balancer from Basic SKU to Standard SKU |
| 13 | +[Azure Standard Load Balancer](load-balancer-overview.md) offers a rich set of functionality and high availability through zone redundancy. To learn more about Load Balancer SKU, see [comparison table](https://docs.microsoft.com/azure/load-balancer/concepts-limitations#skus). |
| 14 | + |
| 15 | +There are two stages in a upgrade: |
| 16 | + |
| 17 | +1. Migrate the configuration |
| 18 | +2. Add VMs to backend pools of Standard Load Balancer |
| 19 | + |
| 20 | +This article covers configuration migration. Adding VMs to backend pools may vary depending on your specific environment. However, some high-level, general recommendations [are provided](#add-vms-to-backend-pools-of-standard-load-balancer). |
| 21 | + |
| 22 | +## Upgrade overview |
| 23 | + |
| 24 | +An Azure PowerShell script is available that does the following: |
| 25 | + |
| 26 | +* Creates a Standard Public SKU Load Balancer in the resource group and location the you specify. |
| 27 | +* Seamlessly copies the configurations of the Basic SKU Public Load Balancer to the newly create Standard Public Load Balancer. |
| 28 | + |
| 29 | +### Caveats\Limitations |
| 30 | + |
| 31 | +* Script only supports Public Load Balancer upgrade. For Internal Basic Load Balancer upgrade, create a Standard Internal Load Balancer if outbound connectivity is not desired, and create a Standard Internal Load Balancer and Standard Public Load Balancer if outbound connectivity is required. |
| 32 | +* The Standard Load Balancer has a new public address. It’s impossible to move the IP addresses associated with existing Basic Load Balancer seamlessly to Standard Load Balancer since they have different SKUs. |
| 33 | +* If the Standard load balancer is created in a different region, you won’t be able to associate the VMs existing in the old region to the newly created Standard Load Balancer. To work around this limitation, make sure to create a new VM in the new region. |
| 34 | +* If your Load Balancer does not have any frontend IP configuration or backend pool, you are likely to hit an error running the script. Please make sure they are not empty. |
| 35 | + |
| 36 | +## Download the script |
| 37 | + |
| 38 | +Download the migration script from the [PowerShell Gallery](https://www.powershellgallery.com/packages/AzurePublicLBUpgrade/1.0). |
| 39 | +## Use the script |
| 40 | + |
| 41 | +There are two options for you depending on your local PowerShell environment setup and preferences: |
| 42 | + |
| 43 | +* If you don’t have the Azure Az modules installed, or don’t mind uninstalling the Azure Az modules, the best option is to use the `Install-Script` option to run the script. |
| 44 | +* If you need to keep the Azure Az modules, your best bet is to download the script and run it directly. |
| 45 | + |
| 46 | +To determine if you have the Azure Az modules installed, run `Get-InstalledModule -Name az`. If you don't see any installed Az modules, then you can use the `Install-Script` method. |
| 47 | + |
| 48 | +### Install using the Install-Script method |
| 49 | + |
| 50 | +To use this option, you must not have the Azure Az modules installed on your computer. If they're installed, the following command displays an error. You can either uninstall the Azure Az modules, or use the other option to download the script manually and run it. |
| 51 | + |
| 52 | +Run the script with the following command: |
| 53 | + |
| 54 | +`Install-Script -Name AzurePublicLBUpgrade` |
| 55 | + |
| 56 | +This command also installs the required Az modules. |
| 57 | + |
| 58 | +### Install using the script directly |
| 59 | + |
| 60 | +If you do have some Azure Az modules installed and can't uninstall them (or don't want to uninstall them), you can manually download the script using the **Manual Download** tab in the script download link. The script is downloaded as a raw nupkg file. To install the script from this nupkg file, see [Manual Package Download](/powershell/scripting/gallery/how-to/working-with-packages/manual-download). |
| 61 | + |
| 62 | +To run the script: |
| 63 | + |
| 64 | +1. Use `Connect-AzAccount` to connect to Azure. |
| 65 | + |
| 66 | +1. Use `Import-Module Az` to import the Az modules. |
| 67 | + |
| 68 | +1. Run `Get-Help AzureLBUpgrade.ps1` to examine the required parameters: |
| 69 | + |
| 70 | + ``` |
| 71 | + AzurePublicLBUpgrade.ps1 |
| 72 | + -oldRgName <name of the Resource Group where Basic Load Balancer exists> |
| 73 | + -oldLBName <name of existing Basic Load Balancer> |
| 74 | + -newrgName <Name of the Resource Group where the new Standard Load Balancer will be created> |
| 75 | + -newlocation <Name of the location where the new Standard Load Balancer will be created> |
| 76 | + -newLBName <Name of the Standard Load Balancer to be created> |
| 77 | + ``` |
| 78 | + Parameters for the script: |
| 79 | + * **oldRgName: [String]: Required** – This is the resource group for your existing Basic Load Balancer you want to upgrade. To find this string value, navigate to Azure Portal, select your Basic Load Balancer source, and click the **Overview** for the load balancer. The Resource Group is located on that page. |
| 80 | + * **oldLBName: [String]: Required** – This is the name of your existing Basic Balancer you want to upgrade. |
| 81 | + * **newrgName: [String]: Required** – This is the resource group in which the Standard Load Balancer will be created. It can be a new resource group or an existing one. If you pick an existing resource group, note that the name of the Load Balancer has to be unique within the resource group. |
| 82 | + * **newlocation: [String]: Required** – This is the location in which the Standard Load Balancer will be created. It is recommended to inherit the same location of the chosen Basic Load Balancer to the Standard Load Balancer for better association with other existing resources. |
| 83 | + * **newLBName: [String]: Required** – This is the name for the Standard Load Balancer to be created. |
| 84 | +1. Run the script using the appropriate parameters. It may take five to seven minutes to finish. |
| 85 | + |
| 86 | + **Example** |
| 87 | + |
| 88 | + ```azurepowershell |
| 89 | + ./AzurePublicLBUpgrade.ps1 -oldRgName "test_publicUpgrade_rg" -oldLBName "LBForPublic" -newrgName "test_userInput3_rg" -newlocation "centralus" -newLbName "LBForUpgrade" |
| 90 | + ``` |
| 91 | + |
| 92 | +### Add VMs to backend pools of Standard Load Balancer |
| 93 | + |
| 94 | +First, double check that the script successfully created a new Standard Public Load Balancer with the exact configuration migrated over from your Basic Public Load Balancer. You can verify this from the Azure portal. |
| 95 | + |
| 96 | +Be sure to send a small amount of traffic through the Standard Load Balancer as a manual test. |
| 97 | + |
| 98 | +Here are a few scenarios of how you add VMs to backend pools of the newly created Standard Public Load Balancer may be configured, and our recommendations for each one: |
| 99 | + |
| 100 | +* **Moving existing VMs from backend pools of old Basic Public Load Balancer to backend pools of newly created Standard Public Load Balancer**. |
| 101 | + 1. To do the tasks in this quickstart, sign in to the [Azure portal](https://portal.azure.com). |
| 102 | + |
| 103 | + 1. Select **All resources** on the left menu, and then select the **newly created Standard Load Balancer** from the resource list. |
| 104 | + |
| 105 | + 1. Under **Settings**, select **Backend pools**. |
| 106 | + |
| 107 | + 1. Select the backend pool which matches the backend pool of the Basic Load Balancer, select the following value: |
| 108 | + - **Virtual Machine**: Drop down and select the VMs from the matching backend pool of the Basic Load Balancer. |
| 109 | + 1. Select **Save**. |
| 110 | + >[!NOTE] |
| 111 | + >For VMs which have Public IPs, you will need to create Standard IP addresses first where same IP address is not guaranteed. Disassociate VMs from Basic IPs and associate them with the newly created Standard IP addresses. Then, you will be able to follow instructions to add VMs into backend pool of Standard Load Balancer. |
| 112 | +
|
| 113 | +* **Creating new VMs to add to the backend pools of the newly created Standard Public Load Balancer**. |
| 114 | + * More instructions on how to create VM and associate it with Standard Load Balancer can be found [here](https://docs.microsoft.com/azure/load-balancer/quickstart-load-balancer-standard-public-portal#create-virtual-machines). |
| 115 | + |
| 116 | +## Common questions |
| 117 | + |
| 118 | +### Are there any limitations with the Azure PowerShell script to migrate the configuration from v1 to v2? |
| 119 | + |
| 120 | +Yes. See [Caveats/Limitations](#caveatslimitations). |
| 121 | + |
| 122 | +### Does the Azure PowerShell script also switch over the traffic from my Basic Load Balancer to the newly created Standard Load Balancer? |
| 123 | + |
| 124 | +No. The Azure PowerShell script only migrates the configuration. Actual traffic migration is your responsibility and in your control. |
| 125 | + |
| 126 | +### I ran into some issues with using this script. How can I get help? |
| 127 | + |
| 128 | +You can send an email to [email protected], open a support case with Azure Support, or do both. |
| 129 | + |
| 130 | +## Next steps |
| 131 | + |
| 132 | +[Learn about Standard Load Balancer](load-balancer-overview.md) |
0 commit comments