@@ -43,21 +43,40 @@ Cloud Volumes ONTAP doesn't support Azure VM extensions because extensions affec
4343> Starting in BlueXP 3.9.54, NetApp enforces this pre-existing limitation as a notification in BlueXP.
4444
4545## Resolution
46- To resolve this issue, run the following script against any affected NetApp CVO VMs in PowerShell:
46+ To resolve this issue, run the following script against any affected NetApp CVO VMs:
47+
48+ ### [ PowerShell] ( #tab/powershell )
4749
4850``` powershell
49- $subscriptionId = (Get-AzContext).Subscription.Id
50- $resourceGroup = "RGname"
51- $vmName = "VMName"
52- $apiVersion = "2025-04-01"
53- $uri = "https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.Compute/virtualMachines/${vmName}?api-version=${apiVersion}"
54- $response = Invoke-AzRestMethod -Method GET -Uri $uri
55- $vmModel = $response.Content | ConvertFrom-Json
56- $vmModel.resources = @()
57- $body = $vmModel | ConvertTo-Json -Depth 10 -Compress
58- Invoke-AzRestMethod -Method PUT -Uri $uri -Payload $body
51+ $subscriptionId = (Get-AzContext).Subscription.Id
52+ $resourceGroup = "RGname"
53+ $vmName = "VMName"
54+ $apiVersion = "2025-04-01"
55+ $uri = "https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.Compute/virtualMachines/${vmName}?api-version=${apiVersion}"
56+
57+ $response = Invoke-AzRestMethod -Method GET -Uri $uri
58+ $vmModel = $response.Content | ConvertFrom-Json
59+ $vmModel.resources = @()
60+ $body = $vmModel | ConvertTo-Json -Depth 10 -Compress
61+ Invoke-AzRestMethod -Method PUT -Uri $uri -Payload $body
5962```
6063
64+ ### [ CLI] ( #tab/cli )
65+
66+ ``` cmd
67+ subscriptionId=$(az account show --query id -o tsv)
68+ resourceGroup="RGName"
69+ vmName="VMName"
70+ apiVersion="2025-04-01"
71+ uri="https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.Compute/virtualMachines/${vmName}?api-version=${apiVersion}"
72+
73+ response=$(az rest --method get --uri "$uri")
74+ vmModel=$(echo "$response" | jq '.resources = []')
75+ az rest --method put --uri "$uri" --body "$vmModel"
76+ ```
77+
78+ ---
79+
6180> [ !NOTE]
6281> This operation might take 20-30 minutes to finish if the guest agent doesn't exist. This condition occurs because Azure CRP polls for the agent status first. The script removes all extensions from a VM model.
6382
0 commit comments