Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
There are two versions of the VM extension. This article covers the new version of the Azure VM extension for SAP. For guidance on how to install the standard version, see Standard Version of Azure VM extension for SAP solutions.
Prerequisites
Make sure to uninstall the standard VM extension before switching to the new version of the Azure Extension for SAP.
Make sure to use SAP Host Agent 7.21 PL 47 or later.
Make sure the virtual machine (VM) on which the extension is enabled has access to management.azure.com.
The Azure PowerShell module or Azure CLI must be installed. See the following instructions:
Follow the steps described in Install the Azure PowerShell module.
Check frequently for updates to the Azure PowerShell cmdlets. Unless stated otherwise in SAP Note 1928533 or SAP Note 2015553, we recommend that you work with the latest version of Azure PowerShell cmdlets.
To check the version of the Azure PowerShell cmdlets that are installed on your computer, run the following command:
(Get-Module Az.Compute).Version
Note
General support statement:
Support for the Azure Extension for SAP is provided through SAP support channels. If you need assistance with the Azure VM extension for SAP solutions, open a support case with SAP Support.
Configure the Azure VM extension for SAP solutions
The new VM Extension for SAP uses a managed identity assigned to the VM to access monitoring and configuration data of the VM. To install the new Azure Extension for SAP using Azure PowerShell, you first have to assign such an identity to the VM and grant that identity access to all resources that are in use by that VM.
Note
The following steps require Owner privileges over the resource group or individual resources (VM, data disks, network interfaces, etc.).
Make sure to use SAP Host Agent 7.21 PL 47 or higher.
Make sure to uninstall the standard version of the VM Extension for SAP. Installing both versions of the VM Extension for SAP on the same VM isn't supported.
Make sure that the latest version of the Azure PowerShell cmdlet (at least 4.3.0) is installed.
For a list of available environments, run
Get-AzEnvironment. If you want to use global Azure, your environment is AzureCloud. For Microsoft Azure operated by 21Vianet, select AzureChinaCloud.The VM Extension for SAP supports configuring a proxy that the extension should use to connect to external resources, for example the Azure Resource Manager API. Use the -ProxyURI parameter to set the proxy.
$env = Get-AzEnvironment -Name <name of the environment> Connect-AzAccount -Environment $env Set-AzContext -SubscriptionName <subscription name> Set-AzVMAEMExtension -ResourceGroupName <resource group name> -VMName <virtual machine name> -InstallNewExtensionRestart SAP Host Agent.
Sign in to the VM on which you enabled the VM Extension for SAP and restart the SAP Host Agent if it was already installed. The SAP Host Agent doesn't use the VM Extension until you restart it. It currently can't detect that an extension was installed after it was started.
Manually configure the Azure VM extension for SAP solutions
If you want to use Azure Resource Manager, Terraform, or other tools to deploy the VM Extension for SAP, you can also deploy the VM Extension for SAP manually.
Before you deploy the VM Extension for SAP, make sure to assign a user or system assigned managed identity to the VM. For more information, read the following guides:
- Configure managed identities for Azure resources on a VM using the Azure portal
- Configure managed identities for Azure resources on an Azure VM using Azure CLI
- Configure managed identities for Azure resources on an Azure VM using PowerShell
- Configure managed identities for Azure resources on an Azure VM using templates
- Terraform VM Identity
After assigning an identity to the VM, give the VM read access to either the resource group or the individual resources associated to the VM (network interfaces, OS disks, and data disks). We recommend you use the built-in Reader role to grant the access to these resources. You can also grant this access by adding the VM identity to a Microsoft Entra group that already has the read permissions to the required resources. It's then no longer needed to have Owner privileges when deploying the VM Extension for SAP if you use a user assigned identity that already has the required permissions.
There are different ways how to deploy the VM Extension for SAP manually. The extension currently supports the following configuration keys. In the following example, the msi_res_id is shown.
- msi_res_id: ID of the user assigned identity the extension should use to get the required information about the VM and its resources
- proxy: URL of the proxy the extension should use to connect to the internet, for example to retrieve information about the VM and its resources.
The following code contains four examples. It shows how to deploy the extension on Windows and Linux, using a system or user assigned identity. Make sure to replace the name of the resource group, the location, and VM name in the example.
# Windows VM - user assigned identity
Set-AzVMExtension -Publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" -ExtensionType "MonitorX64Windows" -ResourceGroupName "<rg name>" -VMName "<vm name>" `
-Name "MonitorX64Windows" -TypeHandlerVersion "1.0" -Location "<location>" -SettingString '{"cfg":[{"key":"msi_res_id","value":"<user assigned resource id>"}]}'
# Windows VM - system assigned identity
Set-AzVMExtension -Publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" -ExtensionType "MonitorX64Windows" -ResourceGroupName "<rg name>" -VMName "<vm name>" `
-Name "MonitorX64Windows" -TypeHandlerVersion "1.0" -Location "<location>" -SettingString '{"cfg":[]}'
# Linux VM - user assigned identity
Set-AzVMExtension -Publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" -ExtensionType "MonitorX64Linux" -ResourceGroupName "<rg name>" -VMName "<vm name>" `
-Name "MonitorX64Linux" -TypeHandlerVersion "1.0" -Location "<location>" -SettingString '{"cfg":[{"key":"msi_res_id","value":"<user assigned resource id>"}]}'
# Linux VM - system assigned identity
Set-AzVMExtension -Publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" -ExtensionType "MonitorX64Linux" -ResourceGroupName "<rg name>" -VMName "<vm name>" `
-Name "MonitorX64Linux" -TypeHandlerVersion "1.0" -Location "<location>" -SettingString '{"cfg":[]}'
Versions of the VM Extension for SAP
If you want to disable automatic updates for the VM extension or want to deploy a specific version of the extension, you can retrieve the available versions with Azure CLI or Azure PowerShell.
# Windows
Get-AzVMExtensionImage -Location westeurope -PublisherName Microsoft.AzureCAT.AzureEnhancedMonitoring -Type MonitorX64Windows
# Linux
Get-AzVMExtensionImage -Location westeurope -PublisherName Microsoft.AzureCAT.AzureEnhancedMonitoring -Type MonitorX64Linux
Readiness check
This check makes sure that all performance metrics that appear inside your SAP application are provided by the underlying Azure Extension for SAP.
- Sign in to the Azure VM (using an admin account isn't necessary).
- Open a web browser and navigate to
http://127.0.0.1:11812/azure4sap/metrics. - The browser should display or download an XML file that contains the monitoring data of your VM. If that isn't the case, make sure that the Azure Extension for SAP is installed.
- Check the content of the XML file. The XML file that you can access at
http://127.0.0.1:11812/azure4sap/metricscontains all populated Azure performance counters for SAP. It also contains a summary and health indicator of the status of Azure Extension for SAP. - Check the value of the Provider Health Description element. If the value isn't OK, follow the Health checks instructions.
Health checks
If some of the infrastructure data isn't delivered correctly, as indicated by the tests described in [Readiness check][vm-extension-for-sap-new.md#readiness-check], run the health checks described in this article. These checks verify whether the Azure infrastructure and the Azure Extension for SAP are configured correctly.
Make sure that the latest version of the Azure PowerShell module (at least 4.3.0) is installed.
For a list of available environments, run the cmdlet
Get-AzEnvironment. To use global Azure, select the AzureCloud environment. For Microsoft Azure operated by 21Vianet, select AzureChinaCloud.$env = Get-AzEnvironment -Name <name of the environment> Connect-AzAccount -Environment $env Set-AzContext -SubscriptionName <subscription name> Test-AzVMAEMExtension -ResourceGroupName <resource group name> -VMName <virtual machine name>The script tests the configuration of the VM you selected.
Make sure that every health check result is OK. If some checks don't display OK, run the update cmdlet as described in Configure the Azure VM extension for SAP solutions. Repeat the checks described in [Readiness check][vm-extension-for-sap-new.md#readiness-check] and this section. If the checks still indicate a problem with some or all counters, see Troubleshooting.