Skip to content

Commit 5265a02

Browse files
committed
add doc for vmss automatic instance repairs
1 parent df7f8b0 commit 5265a02

File tree

1 file changed

+44
-6
lines changed

1 file changed

+44
-6
lines changed

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

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,69 @@ Enabling automatic instance repairs for Azure virtual machine scale sets helps a
2222
2323
## Requirements for using automatic instance repairs
2424

25-
**Opt-in to the preview for automatic instance repairs**
25+
**Opt-in for the automatic instance repairs preview**
2626

27-
Use either of the following ways to opt-in to the preview for automatic instance repairs. These steps will prepare your subscription for enabling the preview feature.
27+
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 set up 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

2929
REST API [Features - Register](/rest/api/resources/features/register)
3030

3131
```
3232
POST on '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/Microsoft.Compute/features/RepairVMScaleSetInstancesPreview/register?api-version=2015-12-01'
3333
```
3434

35-
Azure PowerShell cmdlet [Register-AzureRmProviderFeature](/powershell/module/azurerm.resources/register-azurermproviderfeature)
35+
```json
36+
{
37+
"properties": {
38+
"state": "Registering"
39+
},
40+
"id": "/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/Microsoft.Compute/features/RepairVMScaleSetInstancesPreview",
41+
"type": "Microsoft.Features/providers/features",
42+
"name": "Microsoft.Compute/RepairVMScaleSetInstancesPreview"
43+
}
44+
```
45+
46+
Wait for a few minutes for the *State* to change to *Registered*. You can use the following API to confirm this.
47+
48+
```
49+
GET on '/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/Microsoft.Compute/features/RepairVMScaleSetInstancesPreview?api-version=2015-12-01'
50+
```
51+
52+
```json
53+
{
54+
"properties": {
55+
"state": "Registered"
56+
},
57+
"id": "/subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/Microsoft.Compute/features/RepairVMScaleSetInstancesPreview",
58+
"type": "Microsoft.Features/providers/features",
59+
"name": "Microsoft.Compute/RepairVMScaleSetInstancesPreview"
60+
}
61+
```
62+
63+
Azure PowerShell cmdlet [Register-AzureRmResourceProvider](/powershell/module/azurerm.resources/register-azurermresourceprovider) followed by [Register-AzureRmProviderFeature](/powershell/module/azurerm.resources/register-azurermproviderfeature)
3664

3765
```azurepowershell-interactive
66+
Register-AzureRmResourceProvider `
67+
-ProviderNamespace Microsoft.Compute
68+
3869
Register-AzureRmProviderFeature `
3970
-ProviderNamespace Microsoft.Compute `
4071
-FeatureName RepairVMScaleSetInstancesPreview
4172
```
4273

43-
Wait for a few minutes to ensure that the *RegistrationState* changes to *Registered* and then run the following cmdlet.
74+
Wait for a few minutes for the *RegistrationState* to change to *Registered*. You can use the following cmdlet to confirm this.
4475

4576
```azurepowershell-interactive
46-
Register-AzureRmResourceProvider `
47-
-ProviderNamespace Microsoft.Compute
77+
Get-AzureRmProviderFeature `
78+
-ProviderNamespace Microsoft.Compute `
79+
-FeatureName RepairVMScaleSetInstancesPreview
4880
```
4981

82+
The response should be as follows.
83+
84+
| FeatureName  | ProviderName | RegistrationState |
85+
|---------------------------------------|-------------------------|-------------------------|
86+
| RepairVMScaleSetInstancesPreview | Microsoft.Compute | Registered |
87+
5088
**Enable application health monitoring for scale set**
5189

5290
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.

0 commit comments

Comments
 (0)