Skip to content

Commit 5acf8b5

Browse files
authored
Merge pull request #105258 from ju-shim/vmss-mon
VMSS preview article updates
2 parents 89db4b0 + 568a29d commit 5acf8b5

File tree

6 files changed

+190
-64
lines changed

6 files changed

+190
-64
lines changed

articles/virtual-machine-scale-sets/TOC.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@
247247
href: virtual-machine-scale-sets-networking.md
248248
- name: Automatic OS upgrades
249249
href: virtual-machine-scale-sets-automatic-upgrade.md
250-
- name: Instance protection (Preview)
250+
- name: Instance protection
251251
href: virtual-machine-scale-sets-instance-protection.md
252-
- name: Scale-In Policy (Preview)
252+
- name: Scale-In Policy
253253
href: virtual-machine-scale-sets-scale-in-policy.md
254-
- name: Terminate notification on delete (Preview)
254+
- name: Terminate notification on delete
255255
href: virtual-machine-scale-sets-terminate-notification.md
256256
- name: Shared image galleries
257257
items:

articles/virtual-machine-scale-sets/virtual-machine-scale-sets-instance-protection.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
---
22
title: Instance Protection for Azure virtual machine scale set instances
33
description: Learn how to protect Azure virtual machine scale set instances from scale-in and scale-set operations.
4-
author: mayanknayar
4+
author: avirishuv
55
tags: azure-resource-manager
66
ms.service: virtual-machine-scale-sets
77
ms.topic: conceptual
8-
ms.date: 05/22/2019
9-
ms.author: manayar
8+
ms.date: 02/26/2020
9+
ms.author: avverma
1010

1111
---
12-
# Instance Protection for Azure virtual machine scale set instances (Preview)
12+
# Instance Protection for Azure virtual machine scale set instances
13+
1314
Azure virtual machine scale sets enable better elasticity for your workloads through [Autoscale](virtual-machine-scale-sets-autoscale-overview.md), so you can configure when your infrastructure scales-out and when it scales-in. Scale sets also enable you to centrally manage, configure, and update a large number of VMs through different [upgrade policy](virtual-machine-scale-sets-upgrade-scale-set.md#how-to-bring-vms-up-to-date-with-the-latest-scale-set-model) settings. You can configure an update on the scale set model and the new configuration is applied automatically to every scale set instance if you've set the upgrade policy to Automatic or Rolling.
1415

1516
As your application processes traffic, there can be situations where you want specific instances to be treated differently from the rest of the scale set instance. For example, certain instances in the scale set could be performing long-running operations, and you don't want these instances to be scaled-in until the operations complete. You might also have specialized a few instances in the scale set to perform additional or different tasks than the other members of the scale set. You require these 'special' VMs not to be modified with the other instances in the scale set. Instance protection provides the additional controls to enable these and other scenarios for your application.
1617

1718
This article describes how you can apply and use the different instance protection capabilities with scale set instances.
1819

19-
> [!NOTE]
20-
>Instance protection is currently in Public Preview. No opt-in procedure is needed to use the public preview functionality described below. Instance protection preview is only supported with API version 2019-03-01 and on scale sets using managed disks.
21-
2220
## Types of instance protection
2321
Scale sets provide two types of instance protection capabilities:
2422

@@ -40,6 +38,17 @@ Instance protection can be applied to scale set instances after the instances ar
4038

4139
There are multiple ways of applying scale-in protection on your scale set instances as detailed in the examples below.
4240

41+
### Azure portal
42+
43+
You can apply scale-in protection through the Azure portal to an instance in the scale set. You cannot adjust more than one instance at a time. Repeat the steps for each instance you want to protect.
44+
45+
1. Go to an existing virtual machine scale set.
46+
1. Select **Instances** from the menu on the left, under **Settings**.
47+
1. Select the name of the instance you want to protect.
48+
1. Select the **Protection Policy** tab.
49+
1. In the **Protection Policy** blade, select the **Protect from scale-in** option.
50+
1. Select **Save**.
51+
4352
### REST API
4453

4554
The following example applies scale-in protection to an instance in the scale set.
@@ -97,6 +106,17 @@ Protecting an instance from scale set actions also protects the instance from Au
97106

98107
There are multiple ways of applying scale set actions protection on your scale set instances as detailed in the examples below.
99108

109+
### Azure portal
110+
111+
You can apply protection from scale set actions through the Azure portal to an instance in the scale set. You cannot adjust more than one instance at a time. Repeat the steps for each instance you want to protect.
112+
113+
1. Go to an existing virtual machine scale set.
114+
1. Select **Instances** from the menu on the left, under **Settings**.
115+
1. Select the name of the instance you want to protect.
116+
1. Select the **Protection Policy** tab.
117+
1. In the **Protection Policy** blade, select the **Protect from scale set actions** option.
118+
1. Select **Save**.
119+
100120
### REST API
101121

102122
The following example applies protection from scale set actions to an instance in the scale set.

articles/virtual-machine-scale-sets/virtual-machine-scale-sets-scale-in-policy.md

Lines changed: 78 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
---
22
title: Use custom scale-in policies with Azure virtual machine scale sets
33
description: Learn how to use custom scale-in policies with Azure virtual machine scale sets that use autoscale configuration to manage instance count
4-
author: avverma
4+
services: virtual-machine-scale-sets
5+
author: avirishuv
6+
manager: vashan
57
tags: azure-resource-manager
68

79
ms.service: virtual-machine-scale-sets
810
ms.workload: infrastructure-services
911
ms.tgt_pltfrm: vm
1012
ms.topic: conceptual
11-
ms.date: 10/11/2019
13+
ms.date: 02/26/2020
1214
ms.author: avverma
1315

1416
---
1517

16-
# Preview: Use custom scale-in policies with Azure virtual machine scale sets
18+
# Use custom scale-in policies with Azure virtual machine scale sets
1719

18-
A virtual machine scale set deployment can be scaled-out or scaled-in based on an array of metrics, including platform and user-defined custom metrics. While a scale-out creates new Virtual Machines based on the scale set model, a scale-in affects running virtual machines that may have different configurations and/or functions as the scale set workload evolves.
20+
A virtual machine scale set deployment can be scaled-out or scaled-in based on an array of metrics, including platform and user-defined custom metrics. While a scale-out creates new virtual machines based on the scale set model, a scale-in affects running virtual machines that may have different configurations and/or functions as the scale set workload evolves.
1921

20-
The scale-in policy feature provides users a way to configure the order in which virtual machines are scaled-in. The Preview introduces three scale-in configurations:
22+
The scale-in policy feature provides users a way to configure the order in which virtual machines are scaled-in, by way of three scale-in configurations:
2123

2224
1. Default
2325
2. NewestVM
2426
3. OldestVM
2527

26-
***This preview feature is provided without a service level agreement, and it's not recommended for production workloads.***
27-
2828
### Default scale-in policy
2929

3030
By default, virtual machine scale set applies this policy to determine which instance(s) will be scaled in. With the *Default* policy, VMs are selected for scale-in in the following order:
@@ -35,7 +35,7 @@ By default, virtual machine scale set applies this policy to determine which ins
3535

3636
Users do not need to specify a scale-in policy if they just want the default ordering to be followed.
3737

38-
Note that balancing across availability zones or fault domains does not move instances across availability zones or fault domains. The balancing is achieved through deletion of virtual machines from the unbalanced availability zones or fault domains till the distribution of virtual machines becomes balanced.
38+
Note that balancing across availability zones or fault domains does not move instances across availability zones or fault domains. The balancing is achieved through deletion of virtual machines from the unbalanced availability zones or fault domains until the distribution of virtual machines becomes balanced.
3939

4040
### NewestVM scale-in policy
4141

@@ -51,6 +51,17 @@ A scale-in policy is defined in the virtual machine scale set model. As noted in
5151

5252
A scale-in policy can be defined on the virtual machine scale set model in the following ways:
5353

54+
### Azure portal
55+
56+
The following steps define the scale-in policy when creating a new scale set.
57+
58+
1. Go to **Virtual machine scale sets**.
59+
1. Select **+ Add** to create a new scale set.
60+
1. Go to the **Scaling** tab.
61+
1. Locate the **Scale-in policy** section.
62+
1. Select a scale-in policy from the drop-down.
63+
1. When you are done creating the new scale set, select **Review + create** button.
64+
5465
### Using API
5566

5667
Execute a PUT on the virtual machine scale set using API 2019-03-01:
@@ -68,6 +79,33 @@ https://management.azure.com/subscriptions/<sub-id>/resourceGroups/<myRG>/provid
6879
}
6980
}
7081
```
82+
### Azure PowerShell
83+
84+
Create a resource group, then create a new scale set with scale-in policy set as *OldestVM*.
85+
86+
```azurepowershell-interactive
87+
New-AzResourceGroup -ResourceGroupName "myResourceGroup" -Location "<VMSS location>"
88+
New-AzVmss `
89+
-ResourceGroupName "myResourceGroup" `
90+
-Location "<VMSS location>" `
91+
-VMScaleSetName "myScaleSet" `
92+
-ScaleInPolicy “OldestVM”
93+
```
94+
95+
### Azure CLI 2.0
96+
97+
The following example adds a scale-in policy while creating a new scale set. First create a resource group, then create a new scale set with scale-in policy as *OldestVM*.
98+
99+
```azurecli-interactive
100+
az group create --name <myResourceGroup> --location <VMSSLocation>
101+
az vmss create \
102+
--resource-group <myResourceGroup> \
103+
--name <myVMScaleSet> \
104+
--image UbuntuLTS \
105+
--admin-username <azureuser> \
106+
--generate-ssh-keys \
107+
--scale-in-policy OldestVM
108+
```
71109

72110
### Using Template
73111

@@ -91,6 +129,15 @@ The same process applies when using ‘NewestVM’ in the above scale-in policy.
91129

92130
Modifying the scale-in policy follows the same process as applying the scale-in policy. For example, if in the above example, you want to change the policy from ‘OldestVM’ to ‘NewestVM’, you can do so by:
93131

132+
### Azure portal
133+
134+
You can modify the scale-in policy of an existing scale set through the Azure portal.
135+
136+
1. In an existing virtual machine scale set, select **Scaling** from the menu on the left.
137+
1. Select the **Scale-In Policy** tab.
138+
1. Select a scale-in policy from the drop-down.
139+
1. When you are done, select **Save**.
140+
94141
### Using API
95142

96143
Execute a PUT on the virtual machine scale set using API 2019-03-01:
@@ -108,6 +155,27 @@ https://management.azure.com/subscriptions/<sub-id>/resourceGroups/<myRG>/provid
108155
}
109156
}
110157
```
158+
### Azure PowerShell
159+
160+
Update the scale-in policy of an existing scale set:
161+
162+
```azurepowershell-interactive
163+
Update-AzVmss `
164+
-ResourceGroupName "myResourceGroup" `
165+
-VMScaleSetName "myScaleSet" `
166+
-ScaleInPolicy “OldestVM”
167+
```
168+
169+
### Azure CLI 2.0
170+
171+
The following is an example for updating the scale-in policy of an existing scale set:
172+
173+
```azurecli-interactive
174+
az vmss update \
175+
--resource-group <myResourceGroup> \
176+
--name <myVMScaleSet> \
177+
--scale-in-policy OldestVM
178+
```
111179

112180
### Using Template
113181

@@ -167,11 +235,11 @@ For non-zonal virtual machine scale sets, the policy selects the newest VM acros
167235
## Troubleshoot
168236

169237
1. Failure to enable scaleInPolicy
170-
If you get a ‘BadRequest’ error with an error message stating "Could not find member 'scaleInPolicy' on object of type 'properties'”, then check the API version used for virtual machine scale set. API version 2019-03-01 or higher is required for this preview.
238+
If you get a ‘BadRequest’ error with an error message stating "Could not find member 'scaleInPolicy' on object of type 'properties'”, then check the API version used for virtual machine scale set. API version 2019-03-01 or higher is required for this feature.
171239

172240
2. Wrong selection of VMs for scale-in
173241
Refer to the examples above. If your virtual machine scale set is a Zonal deployment, scale-in policy is applied first to the imbalanced Zones and then across the scale set once it is zone balanced. If the order of scale-in is not consistent with the examples above, raise a query with the virtual machine scale set team for troubleshooting.
174242

175243
## Next steps
176244

177-
Learn how to [deploy your application](virtual-machine-scale-sets-deploy-app.md) on virtual machine scale sets.
245+
Learn how to [deploy your application](virtual-machine-scale-sets-deploy-app.md) on virtual machine scale sets.

0 commit comments

Comments
 (0)