Skip to content

Commit 2f452ee

Browse files
committed
add doc for vmss automatic instance repairs
1 parent 689bf21 commit 2f452ee

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

articles/virtual-machine-scale-sets/virtual-machine-scale-sets-automatic-instance-repairs.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ Enabling automatic instance repairs for Azure virtual machine scale sets helps a
2626

2727
Use either the REST API or Azure PowerShell to opt in for the automatic instance repairs preview. These steps will register your subscription for the preview feature. Note this is only a one-time setup required for using this feature. If your subscription is already registered for automatic instance repairs preview, then you do not need to register again.
2828

29-
REST API [Features - Register](/rest/api/resources/features/register)
29+
Using REST API
30+
31+
1. Register for the feature using [Features - Register](/rest/api/resources/features/register)
3032

3133
```
3234
POST on '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/Microsoft.Compute/features/RepairVMScaleSetInstancesPreview/register?api-version=2015-12-01'
@@ -43,7 +45,7 @@ POST on '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/
4345
}
4446
```
4547

46-
Wait for a few minutes for the *State* to change to *Registered*. You can use the following API to confirm this.
48+
2. Wait for a few minutes for the *State* to change to *Registered*. You can use the following API to confirm this.
4749

4850
```
4951
GET on '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/Microsoft.Compute/features/RepairVMScaleSetInstancesPreview?api-version=2015-12-01'
@@ -60,7 +62,15 @@ GET on '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/M
6062
}
6163
```
6264

63-
Azure PowerShell cmdlet [Register-AzureRmResourceProvider](/powershell/module/azurerm.resources/register-azurermresourceprovider) followed by [Register-AzureRmProviderFeature](/powershell/module/azurerm.resources/register-azurermproviderfeature)
65+
3. Once the *State* has changed to *Registered*, then run the following.
66+
67+
```
68+
POST on '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/register?api-version=2015-12-01'
69+
```
70+
71+
Using Azure PowerShell
72+
73+
1. Register for the feature using cmdlet [Register-AzureRmResourceProvider](/powershell/module/azurerm.resources/register-azurermresourceprovider) followed by [Register-AzureRmProviderFeature](/powershell/module/azurerm.resources/register-azurermproviderfeature)
6474

6575
```azurepowershell-interactive
6676
Register-AzureRmResourceProvider `
@@ -71,7 +81,7 @@ Register-AzureRmProviderFeature `
7181
-FeatureName RepairVMScaleSetInstancesPreview
7282
```
7383

74-
Wait for a few minutes for the *RegistrationState* to change to *Registered*. You can use the following cmdlet to confirm this.
84+
2. Wait for a few minutes for the *RegistrationState* to change to *Registered*. You can use the following cmdlet to confirm this.
7585

7686
```azurepowershell-interactive
7787
Get-AzureRmProviderFeature `
@@ -85,6 +95,13 @@ Get-AzureRmProviderFeature `
8595
|---------------------------------------|-------------------------|-------------------------|
8696
| RepairVMScaleSetInstancesPreview | Microsoft.Compute | Registered |
8797

98+
3. Once the *RegistrationState* to change to *Registered*, then run the following cmdlet.
99+
100+
```azurepowershell-interactive
101+
Register-AzureRmResourceProvider `
102+
-ProviderNamespace Microsoft.Compute
103+
```
104+
88105
**Enable application health monitoring for scale set**
89106

90107
The scale set should have application health monitoring for instances enabled. This can be done using either [Application Health extension](./virtual-machine-scale-sets-health-extension.md) or [Load balancer health probes](../load-balancer/load-balancer-custom-probe-overview.md). Only one of these can be enabled at a time. The application health extension or the load balancer probes ping the application endpoint configured on virtual machine instances to determine the application health status. This health status is used by the scale set orchestrator to monitor instance health and perform repairs when required.
@@ -137,7 +154,7 @@ The automatic instance repairs process works as follows:
137154

138155
## Instance protection and automatic repairs
139156

140-
If an instance in a scale set is protected by applying one of the [protection policies](./virtual-machine-scale-sets-instance-protection.md), then automatic repairs are not performed on that instance. This applies to both the protection policies: *Protect from scale-in* and *Protect from scale-set actions*.
157+
If an instance in a scale set is protected by applying the *[Protect from scale-set actions protection policy](./virtual-machine-scale-sets-instance-protection.md#protect-from-scale-set-actions)*, then automatic repairs are not performed on that instance.
141158

142159
## Enabling automatic repairs policy when creating a new scale set
143160

0 commit comments

Comments
 (0)