|
1 | 1 | ---
|
2 | 2 | title: Automatic OS image upgrades with Azure virtual machine scale sets
|
3 | 3 | description: Learn how to automatically upgrade the OS image on VM instances in a scale set
|
4 |
| -author: shandilvarun |
| 4 | +author: mayanknayar |
5 | 5 | tags: azure-resource-manager
|
6 | 6 | ms.service: virtual-machine-scale-sets
|
7 | 7 | ms.topic: conceptual
|
8 |
| -ms.date: 07/16/2019 |
9 |
| -ms.author: vashan |
| 8 | +ms.date: 03/18/2019 |
| 9 | +ms.author: manayar |
10 | 10 |
|
11 | 11 | ---
|
12 | 12 | # Azure virtual machine scale set automatic OS image upgrades
|
@@ -39,7 +39,7 @@ The upgrade process works as follows:
|
39 | 39 | The scale set OS upgrade orchestrator checks for the overall scale set health before upgrading every batch. While upgrading a batch, there could be other concurrent planned or unplanned maintenance activities that could impact the health of your scale set instances. In such cases if more than 20% of the scale set's instances become unhealthy, then the scale set upgrade stops at the end of current batch.
|
40 | 40 |
|
41 | 41 | ## Supported OS images
|
42 |
| -Only certain OS platform images are currently supported. Custom images aren't currently supported. |
| 42 | +Only certain OS platform images are currently supported. Custom image support is available in preview for custom images deployed through Shared Image Gallery. |
43 | 43 |
|
44 | 44 | The following SKUs are currently supported (and more are added periodically):
|
45 | 45 |
|
@@ -76,6 +76,84 @@ If you are using Service Fabric, ensure the following conditions are met:
|
76 | 76 |
|
77 | 77 | Ensure that durability settings are not mismatched on the Service Fabric cluster and Service Fabric extension, as a mismatch will result in upgrade errors. Durability levels can be modified per the guidelines outlined on [this page](../service-fabric/service-fabric-cluster-capacity.md#changing-durability-levels).
|
78 | 78 |
|
| 79 | + |
| 80 | +## Automatic OS image upgrade for custom images (preview) |
| 81 | + |
| 82 | +> [!IMPORTANT] |
| 83 | +> Automatic OS image upgrade for custom images is currently in Public Preview. An opt-in procedure is needed to use the public preview functionality described below. |
| 84 | +> This preview version is provided without a service level agreement, and is not recommended for production workloads. Certain features might not be supported or might have constrained capabilities. |
| 85 | +> For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). |
| 86 | +
|
| 87 | +Automatic OS image upgrade is available in preview for custom images deployed through [Shared Image Gallery](shared-image-galleries.md). Other custom images are not supported for automatic OS image upgrades. |
| 88 | + |
| 89 | +Enabling the preview functionality requires a one-time opt-in for the feature *AutomaticOSUpgradeWithGalleryImage* per subscription, as detailed below. |
| 90 | + |
| 91 | +### REST API |
| 92 | +The following example describes how to enable the preview for your subscription: |
| 93 | + |
| 94 | +``` |
| 95 | +POST on `/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/Microsoft.Compute/features/AutomaticOSUpgradeWithGalleryImage/register?api-version=2015-12-01` |
| 96 | +``` |
| 97 | + |
| 98 | +Feature registration can take up to 15 minutes. To check the registration status: |
| 99 | + |
| 100 | +``` |
| 101 | +GET on `/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/Microsoft.Compute/features/AutomaticOSUpgradeWithGalleryImage?api-version=2015-12-01` |
| 102 | +``` |
| 103 | + |
| 104 | +Once the feature has been registered for your subscription, complete the opt-in process by propagating the change into the Compute resource provider. |
| 105 | + |
| 106 | +``` |
| 107 | +POST on `/subscriptions/{subscriptionId}/providers/Microsoft.Compute/register?api-version=2019-10-01` |
| 108 | +``` |
| 109 | + |
| 110 | +### Azure PowerShell |
| 111 | +Use the [Register-AzProviderFeature](/powershell/module/az.resources/register-azproviderfeature) cmdlet to enable the preview for your subscription. |
| 112 | + |
| 113 | +```azurepowershell-interactive |
| 114 | +Register-AzProviderFeature -FeatureName AutomaticOSUpgradeWithGalleryImage -ProviderNamespace Microsoft.Compute |
| 115 | +``` |
| 116 | + |
| 117 | +Feature registration can take up to 15 minutes. To check the registration status: |
| 118 | + |
| 119 | +```azurepowershell-interactive |
| 120 | +Get-AzProviderFeature -FeatureName AutomaticOSUpgradeWithGalleryImage -ProviderNamespace Microsoft.Compute |
| 121 | +``` |
| 122 | + |
| 123 | +Once the feature has been registered for your subscription, complete the opt-in process by propagating the change into the Compute resource provider. |
| 124 | + |
| 125 | +```azurepowershell-interactive |
| 126 | +Register-AzResourceProvider -ProviderNamespace Microsoft.Compute |
| 127 | +``` |
| 128 | + |
| 129 | +### Azure CLI 2.0 |
| 130 | +Use [az feature register](/cli/azure/feature#az-feature-register) to enable the preview for your subscription. |
| 131 | + |
| 132 | +```azurecli-interactive |
| 133 | +az feature register --namespace Microsoft.Compute --name AutomaticOSUpgradeWithGalleryImage |
| 134 | +``` |
| 135 | + |
| 136 | +Feature registration can take up to 15 minutes. To check the registration status: |
| 137 | + |
| 138 | +```azurecli-interactive |
| 139 | +az feature show --namespace Microsoft.Compute --name AutomaticOSUpgradeWithGalleryImage |
| 140 | +``` |
| 141 | + |
| 142 | +Once the feature has been registered for your subscription, complete the opt-in process by propagating the change into the Compute resource provider. |
| 143 | + |
| 144 | +```azurecli-interactive |
| 145 | +az provider register --namespace Microsoft.Compute |
| 146 | +``` |
| 147 | + |
| 148 | +### Additional requirements for custom images |
| 149 | +- The opt-in process described above needs to be completed only once per subscription. Post opt-in completion, automatic OS upgrades can be enabled for any scale set created with Shared Image Gallery images in that subscription. |
| 150 | +- The configuration process for automatic OS image upgrade is the same for all scale sets as detailed in the [configuration section](virtual-machine-scale-sets-automatic-upgrade.md#configure-automatic-os-image-upgrade) of this page. |
| 151 | +- Scale sets instances configured for automatic OS image upgrades will be upgraded to the latest version of the Shared Image Gallery image when a new version of the image is published and [replicated](shared-image-galleries.md#replication) to the region of that scale set. If the new image is not replicated to the region where the scale is deployed, the scale set instances will not be upgraded to the latest version. Regional image replication allows you to control the rollout of the new image for your scale sets. |
| 152 | + |
| 153 | +> [!NOTE] |
| 154 | +>It can take up to 2 hours for a scale set to get the first image rollout after the scale set is configured for automatic OS upgrades. This is a one-time delay per scale set. Subsequent image rollouts are applied to the scale set without this delay. |
| 155 | +
|
| 156 | + |
79 | 157 | ## Configure automatic OS image upgrade
|
80 | 158 | To configure automatic OS image upgrade, ensure that the *automaticOSUpgradePolicy.enableAutomaticOSUpgrade* property is set to *true* in the scale set model definition.
|
81 | 159 |
|
|
0 commit comments