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.
Prerequisites
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
Note
Make sure to uninstall the VM extension before switching between the standard and the new version of the Azure Extension for SAP.
Note
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.
- Make sure to use SAP Host Agent 7.21 PL 47 or higher.
- Make sure the virtual machine on which the extension is enabled has access to management.azure.com.
Follow the steps described in the article Install the Azure PowerShell module
Check frequently for updates to the PowerShell cmdlets, which usually are updated monthly. Follow the steps described in this article. 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 this PowerShell command:
(Get-Module Az.Compute).Version
Configure the Azure VM extension for SAP solutions
The new VM Extension for SAP uses a managed identity that's assigned to the VM to access monitoring and configuration data of the VM. To install the new Azure Extension for SAP by using 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, for example, disks and network interfaces.
Note
The following steps require Owner privileges over the resource group or individual resources (virtual machine, data disks, and network interfaces)
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. It is not supported to install both versions of the VM Extension for SAP on the same virtual machine.
Make sure that you have installed the latest version of the Azure PowerShell cmdlet (at least 4.3.0).
Run the following PowerShell cmdlet. For a list of available environments, run cmdlet
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 parameter -ProxyURI 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> -InstallNewExtension
Restart SAP Host Agent
Log on to the virtual machine on which you enabled the VM Extension for SAP and restart the SAP Host Agent if it was already installed. SAP Host Agent does not use the VM Extension until it's been restarted. 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, that is without using the dedicated PowerShell or Azure CLI commands.
Before deploying the VM Extension for SAP make sure to assign a user or system assigned managed identity to the virtual machine. 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 virtual machine, give the VM read access to either the resource group or the individual resources associated to the virtual machine (VM, Network Interfaces, OS Disks and Data Disks). It is recommended to 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 read access to the required resources. It is 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. Please find a few examples in the next chapters.
The extension currently supports the following configuration keys. In the example below, 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 virtual machine 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.
Run the readiness check on a Windows VM
- Sign in to the Azure virtual machine (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 virtual machine. 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/metrics
contains 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 is not OK, follow the instructions in chapter Health checks.
Run the readiness check on a Linux VM
- Connect to the Azure Virtual Machine by using SSH.
- Check the output of the following command
Expected result: Returns an XML document that contains the monitoring information of the virtual machine, its disks and network interfaces.curl http://127.0.0.1:11812/azure4sap/metrics
If the preceding check was not successful, run these additional checks:
Make sure that the waagent is installed and enabled.
a. Run
sudo ls -al /var/lib/waagent/
Expected result: Lists the content of the waagent directory.
b. Run
ps -ax | grep waagent
Expected result: Displays one entry similar to:
python /usr/sbin/waagent -daemon
Make sure that the Azure Extension for SAP is installed and running.
a. Run
sudo sh -c 'ls -al /var/lib/waagent/Microsoft.AzureCAT.AzureEnhancedMonitoring.MonitorX64Linux-*/'
Expected result: Lists the content of the Azure Extension for SAP directory.
b. Run
ps -ax | grep AzureEnhanced
Expected result: Displays one entry similar to:
/var/lib/waagent/Microsoft.AzureCAT.AzureEnhancedMonitoring.MonitorX64Linux-1.0.0.82/AzureEnhancedMonitoring -monitor
Install SAP Host Agent as described in SAP Note 1031096, and check the output of
saposcol
.a. Run
/usr/sap/hostctrl/exe/saposcol -d
b. Run
dump ccm
c. Check whether the Virtualization_Configuration\Enhanced Monitoring Access metric is true.
If you already have an SAP NetWeaver ABAP application server installed, open transaction ST06 and check whether monitoring is enabled.
If any of these checks fail, and for detailed information about how to redeploy the extension, see Troubleshooting
Health checks
If some of the infrastructure data isn't delivered correctly as indicated by the tests described in Readiness check, run the health checks described in this chapter to check whether the Azure infrastructure and the Azure Extension for SAP are configured correctly.
Make sure that you have installed the latest version of the Azure PowerShell cmdlet (at least 4.3.0).
Run the following PowerShell cmdlet. 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 virtual machine you selected.
Make sure that every health check result is OK. If some checks do not display OK, run the update cmdlet as described in Configure the Azure VM extension for SAP solutions. Repeat the checks described in Readiness check and this chapter. If the checks still indicate a problem with some or all counters, see Troubleshooting.