Skip to content

Commit 95611c9

Browse files
GabstaMSFTprzlplx
andauthored
AB#7288: Adding doc for removing extension on netapp cvo images (#9599)
* Adding doc for removing extension on netapp cvo images * Fixed some issues as per Acrolinx * Added prerequisite section and made some formatting changes based on feedback * Fixed build errors in commit 7276c27 * Fixed Acrolinx score * Revise document on removing extensions from NetApp CVO images * Clarify prerequisites for removing VM extensions Edit review per CI 7288 * Update removing-extensions-netapp-cvo.md * Fix link for removing NetApp CVO Image extensions * Updating prerequisite to be more clear. * Update image references in removing-extensions-netapp-cvo.md * Update removing-extensions-netapp-cvo.md * Fix link for removing NetApp CVO Image extensions * Fix link for removing NetApp CVO extensions * Removing incorrectly formatted image * Adding correctly formatted image name --------- Co-authored-by: Jerry Sitser <[email protected]>
1 parent fc451b9 commit 95611c9

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
lines changed
288 KB
Loading
45.6 KB
Loading
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: Removing Extensions NetApp CVO Image
3+
description: This article guides you through removing extensions from Azure VMs created from NetApp CVO images.
4+
services: virtual-machines
5+
ms.collection: linux
6+
ms.service: azure-virtual-machines
7+
author: GabstaMSFT
8+
ms.topic: troubleshooting
9+
ms.tgt_pltfrm: vm-linux
10+
ms.custom: linux-related-content
11+
ms.workload: infrastructure
12+
ms.date: 08/25/2025
13+
ms.author: Gabsta
14+
---
15+
16+
# Removing extensions from VMs created from NetApp CVO images
17+
**Applies to:** :heavy_check_mark: NetApp CVO Linux VMs
18+
19+
This article discusses how to remove extensions that are installed on Microsoft Azure virtual machines (VMs) that are created from NetApp Cloud Volumes ONTAP (CVO) images. This article also discusses how to prevent extensions from being installed.
20+
21+
## Prerequisites
22+
- The NetApp CVO resource group has a "delete" lock feature that might prevent the script from uninstalling VM extensions. You might have to remove the lock and restore it after you run the scripts in the "Resolution" section. The lock properties are as follows:
23+
24+
- Name: (matches the CVO resource group name)
25+
- Type: **Delete**
26+
- Scope: **CVO resource group**
27+
28+
:::image type="content" source="media/netapp-cvo-issue/netapp-cloud-volumes-ontap-lock.png" alt-text="The NetApp Cloud Volumes ONTAP Locks screen might list a delete lock that must be removed before you run a script to uninstall extensions.png.":::
29+
30+
- Download and install the latest version of the Windows Installer (MSI) agent from the [GitHub page for Azure Windows VM Agent releases](https://github.com/Azure/WindowsVMAgent/releases). You must have administrator rights to complete the installation.
31+
32+
## Symptoms
33+
You receive the following error message:
34+
35+
_Cloud Volumes ONTAP is not compatible with Azure VM extensions. VM extensions are currently installed on your Azure VM. Contact Microsoft Azure support to remove those extensions._
36+
37+
:::image type="content" source="media/netapp-cvo-issue/cloud-volumes-ontap-error.png" alt-text="You receive an error message that states that Cloud Volumes ONTAP isn't compatible with Azure VM Extensions.":::
38+
39+
## Cause
40+
Cloud Volumes ONTAP doesn't support Azure VM extensions because extensions affect BlueXP management operations. Although CVO VM appears as Linux (ONTAP version) in the Azure portal, it's actually a highly customized derivative of the FreeBSD operating system that ONTAP uses.
41+
42+
> [!NOTE]
43+
> Starting in BlueXP 3.9.54, NetApp enforces this pre-existing limitation as a notification in BlueXP.
44+
45+
## Resolution
46+
To resolve this issue, run the following script on every VM:
47+
48+
```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
59+
```
60+
61+
> [!NOTE]
62+
> 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.
63+
64+
## More information
65+
66+
To prevent extensions from installing in VMs without a guest agent or extensions, disable extensions. You can disable extensions either through a policy definition or by setting `AllowExtensionOperations` to `false`.
67+
68+
### Option 1: Set a policy definition
69+
70+
```json
71+
{
72+
"if": {
73+
"allOf": [
74+
{
75+
"field": "type",
76+
"equals": "Microsoft.Compute/virtualMachines/extensions"
77+
}
78+
]
79+
},
80+
"then": {
81+
"effect": "deny"
82+
}
83+
}
84+
```
85+
86+
### Option 2: Set AllowExtensionOperations to false
87+
88+
```powershell
89+
$vm = Get-AzVM -Name <VMName> -ResourceGroupName <ResourceGroupName>
90+
$vm.OSProfile.AllowExtensionOperations = $false
91+
$vm | Update-AzVM
92+
```
93+
94+
## References
95+
96+
[Installing Azure VM management extensions into Cloud Volume ONTAP](https://kb.netapp.com/Cloud/Cloud_Volumes_ONTAP/Can_Azure_VM_Management_Extensions_be_installed_into_Cloud_Volume_ONTAP)
97+
98+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]
99+
100+
[!INCLUDE [third-party-disclaimer](../../../includes/third-party-disclaimer.md)]
101+
102+
[!INCLUDE [Third-party disclaimer](../../../includes/third-party-contact-disclaimer.md)]

support/azure/virtual-machines/linux/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@
403403
href: linux-agent-cannot-process-extensions.md
404404
- name: Supported operating systems
405405
href: ../windows/extension-supported-os.md?context=/troubleshoot/azure/virtual-machines/linux/context/context
406+
- name: Removing Extensions NetApp CVO Image
407+
href: ../linux/removing-extensions-netapp-cvo.md
406408
- name: Cloud-init
407409
items:
408410
- name: Azure cloud-init support for Linux VMs

0 commit comments

Comments
 (0)