Skip to content

Commit 3fd7515

Browse files
committed
first draft of automatic upgrade article
1 parent 4745eb5 commit 3fd7515

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

articles/azure-arc/servers/manage-automatic-vm-extension-upgrade.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Automatic Extension Upgrade is available for Azure Arc-enabled servers that have
1111

1212
Automatic Extension Upgrade has the following features:
1313

14-
- You can opt out of automatic upgrades at any time.
14+
- You can opt in and out of automatic upgrades at any time.
1515
- Each supported extension is enrolled individually, and you can choose which extensions to upgrade automatically.
1616
- Supported in all public cloud regions.
1717

@@ -95,4 +95,60 @@ A machine managed by Arc-enabled servers can have multiple extensions with autom
9595

9696
If multiple extension upgrades are available for a machine, the upgrades may be batched together, but each extension upgrade is applied individually on a machine. A failure on one extension does not impact the other extension(s) to be upgraded. For example, if two extensions are scheduled for an upgrade, and the first extension upgrade fails, the second extension will still be upgraded.
9797

98+
## Disable Automatic Extension Upgrade
99+
100+
To disable Automatic Extension Upgrade for an extension, you must ensure the property `enableAutomaticUpgrade` is set to `false` and added to every extension definition individually.
101+
102+
### Using the REST API
103+
104+
To disable automatic extension upgrade for an extension (in this example the Dependency Agent extension), use the following:
105+
106+
```
107+
PUT on `/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.HybridCompute/machines/<machineName>/extensions/<extensionName>?api-version=2019-12-01`
108+
```
109+
110+
```json
111+
{    
112+
    "name": "extensionName",
113+
    "type": "Microsoft.Compute/HybridMachines/extensions",
114+
    "location": "<location>",
115+
    "properties": {
116+
     "autoUpgradeMinorVersion": true,
117+
     "enableAutomaticUpgrade":false, 
118+
     "publisher": "Microsoft.Azure.Monitoring.DependencyAgent",
119+
     "type": "DependencyAgentWindows",
120+
     "typeHandlerVersion": "9.5"
121+
     }
122+
}
123+
```
124+
125+
### Using Azure PowerShell
126+
127+
Use the [Set-AzConnectedMachineExtension](/powershell/module/az.connectedmachine/new-azconnectedmachineextension) cmdlet:
128+
129+
```azurepowershell-interactive
130+
Set-AzConnectedMachineExtension -ExtensionName "Microsoft.Azure.Monitoring.DependencyAgent" `
131+
-ResourceGroupName "myResourceGroup" `
132+
-VMName "myVM" `
133+
-Publisher "Microsoft.Azure.Monitoring.DependencyAgent" `
134+
-ExtensionType "DependencyAgentWindows" `
135+
-TypeHandlerVersion 9.5 `
136+
-Location WestUS `
137+
-EnableAutomaticUpgrade $false
138+
```
139+
140+
### Using the Azure CLI
141+
142+
Use the [az connectedmachine extension ](/cli/azure/connectedmachine/extension) cmdlet:
143+
144+
```azurecli-interactive
145+
az connectedmachine extension set \
146+
--resource-group myResourceGroup \
147+
--vm-name myVM \
148+
--name DependencyAgentLinux \
149+
--publisher Microsoft.Azure.Monitoring.DependencyAgent \
150+
--version 9.5 \
151+
--enable-auto-upgrade false
152+
```
153+
98154
## Next steps

0 commit comments

Comments
 (0)