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 Azure virtual machine (VM) extension. This article covers the Standard version of the Azure VM extension for SAP. For guidance on how to install the new version, see New Version of Azure VM extension for SAP solutions.
Prerequisites
Make sure to uninstall the VM extension before switching between the standard and the new version of the Azure extension for SAP.
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
Make sure that you installed the latest version of the Azure PowerShell cmdlet. For more information, see Deploying Azure PowerShell cmdlets
Run the following cmdlet. 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.$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>
After you enter your account data, the script deploys the required extensions and enables the required features. The script can take several minutes. For more information, see Set-AzVMAEMExtension.

The Set-AzVMAEMExtension configuration does all the steps to configure host data collection for SAP.
The script output includes the following information:
- Confirmation that data collection for the OS disk and all other data disks are configured.
- The next two messages confirm the configuration of Storage Metrics for a specific storage account.
- One line of output gives the status of the actual update of the VM extension for SAP configuration.
- Another line of output confirms that the configuration is deployed or updated.
- The last line of output is informational. It shows your options for testing the VM extension for SAP configuration.
- Verify that the Azure VM extension for SAP configuration is complete and the Azure infrastructure is delivering the required data by running the Readiness check.
- Wait 15-30 minutes for Azure Diagnostics to collect the relevant data.
Update the configuration of Azure extension for SAP
Update the configuration of Azure extension for SAP in any of the following scenarios:
- The joint Microsoft/SAP team extends the capabilities of the VM extension and requests more or fewer counters.
- Microsoft introduces a new version of the underlying Azure infrastructure that delivers the data, and the Azure extension for SAP needs to be adapted to those changes.
- You mount extra data disks to your Azure VM or you remove a data disk. In this scenario, update the collection of storage-related data. Changing your configuration by adding or deleting endpoints or by assigning IP addresses to a VM doesn't affect the extension configuration.
- You change the size of your Azure VM, for example, from size A5 to any other VM size.
- You add new network interfaces to your Azure VM.
To update settings, update configuration of Azure extension for SAP by following the steps in Configure the Azure VM extension for SAP solutions with Azure CLI or Configure the Azure VM extension for SAP solutions with PowerShell.
Checks and troubleshooting
After you deploy your Azure VM and set up the relevant Azure extension for SAP, check whether all the components of the extension are working as expected.
Run the readiness check for the Azure extension for SAP as described in Readiness check. If all readiness check results are positive and all relevant performance counters appear OK, the Azure extension for SAP is set up successfully. You can proceed with the installation of SAP Host Agent as described in the SAP Notes in SAP resources. If the readiness check indicates that counters are missing, run the health check for the Azure extension for SAP, as described in Health check for the Azure extension for SAP configuration. For more troubleshooting options, see Troubleshooting for Windows or Troubleshooting for Linux.
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 Command Prompt window.
At the command prompt, change the directory to the installation folder of the Azure extension for SAP:
cd "C:\Packages\Plugins\Microsoft.AzureCAT.AzureEnhancedMonitoring.MonitorX64Windows\<version>\drop"The
<version>in the path to the extension might vary. If you see folders for multiple versions of the extension in the installation folder, check the configuration of the AzureEnhancedMonitoring Windows service, and then switch to the folder indicated as Path to executable.
At the command prompt, run
azperflib.exewithout any parameters.Note
Azperflib.exeruns in a loop and updates the collected counters every 60 seconds. To end the loop, close the command prompt window. Azperflib.exe is a component that can't be used for own purposes. It's a component that delivers Azure infrastructure data related to the VM for the SAP Host Agent exclusively.
If the Azure extension for SAP isn't installed, or the AzureEnhancedMonitoring service isn't running, the extension wasn't configured correctly. For detailed information about how to troubleshoot the extension, see Troubleshooting for Windows or Troubleshooting for Linux.
Check the output of azperflib.exe
The azperflib.exe output shows all populated Azure performance counters for SAP. At the bottom of the list of collected counters, a summary and health indicator show the status of Azure extension for SAP.

Check the result returned for the Counters total output, which is reported as empty, and for Health status, shown in the preceding figure.
Interpret the resulting values as follows:
| Azperflib result values | Azure extension for SAP health status |
|---|---|
| API Calls - not available | Counters that aren't available might be either not applicable to the VM configuration, or are errors. See Health status. |
| Counters total - empty | The following two Azure storage counters can be empty:
All other counters must have values. |
| Health status | Only OK if return status shows OK. |
| Diagnostics | Detailed information about health status. |
If the Health status value isn't OK, follow the instructions in Health check for the Azure extension for SAP configuration.
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 article. Check whether the Azure infrastructure and the Azure extension for SAP are configured correctly.
Make sure that you installed the latest version of the Azure PowerShell cmdlet, as described in Deploying Azure PowerShell cmdlets.
Run the following 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 VM you select.

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 with Azure CLI or Configure the Azure VM extension for SAP solutions with PowerShell.
Wait 15 minutes, and repeat the checks described in Readiness check and this chapter. If the checks still indicate a problem with some or all counters, see Troubleshooting for Linux or Troubleshooting for Windows.
Note
You can experience some warnings in cases where you use Managed Standard Azure Disks. Warnings are displayed instead of the tests returning OK. Warnings are normal and intended for that disk type. See also Troubleshooting for Linux or Troubleshooting for Windows.
Troubleshooting
Azure performance counters don't show up at all
The AzureEnhancedMonitoring Windows service collects performance metrics in Azure. If the service wasn't installed correctly or if it isn't running in your VM, no performance metrics can be collected.
The installation directory of the Azure extension for SAP is empty
Issue:
The installation directory C:\Packages\Plugins\Microsoft.AzureCAT. AzureEnhancedMonitoring.AzureCATExtensionHandler\<version>\drop is empty.
Solution:
The extension isn't installed. Determine whether it's a proxy issue (as described earlier). You might need to restart the machine or rerun the Set-AzVMAEMExtension configuration script.
Service for Azure extension for SAP doesn't exist
Issue:
The AzureEnhancedMonitoring Windows service doesn't exist.
Azperflib.exe output throws an error:

Solution:
If the service doesn't exist, the Azure extension for SAP wasn't installed correctly. Redeploy the extension as described in Configure the Azure VM extension for SAP solutions with Azure CLI or Configure the Azure VM extension for SAP solutions with PowerShell.
After you deployed the extension, check again whether the Azure performance counters are provided in the Azure VM.
Service for Azure extension for SAP exists but fails to start
Issue:
The AzureEnhancedMonitoring Windows service exists and is enabled, but fails to start. For more information, check the Application event log.
Solution:
The configuration is incorrect. Restart the Azure extension for SAP in the VM, as described in Configure the Azure extension for SAP.
Some Azure performance counters are missing
The AzureEnhancedMonitoring Windows service collects performance metrics in Azure. The service gets data from several sources. Some configuration data is collected locally, and some performance metrics are read from Azure Diagnostics. Storage counters are used from your logging on the storage subscription level.
If troubleshooting by using SAP Note 1999351 doesn't resolve the issue, rerun the Set-AzVMAEMExtension configuration script. You might have to wait an hour because storage analytics or diagnostics counters might not be created immediately after they're enabled. If the problem persists, open an SAP customer support message on the component BC-OP-NT-AZR for Windows or BC-OP-LNX-AZR for a Linux VM.
Azure extension error codes
| Error ID | Error description | Solution |
|---|---|---|
| cfg/018 | App configuration is missing. | run setup script |
| cfg/019 | No deployment ID in app config. | contact support |
| cfg/020 | No RoleInstanceId in app config. | contact support |
| cfg/022 | No RoleInstanceId in app config. | contact support |
| cfg/031 | Cannot read Azure configuration. | contact support |
| cfg/021 | App configuration file is missing. | run setup script |
| cfg/015 | No VM size in app config. | run setup script |
| cfg/016 | GlobalMemoryStatusEx counter failed. | contact support |
| cfg/023 | MaxHwFrequency counter failed. | contact support |
| cfg/024 | NIC counters failed. | contact support |
| cfg/025 | Disk mapping counter failed. | contact support |
| cfg/026 | Processor name counter failed. | contact support |
| cfg/027 | Disk mapping counter failed. | contact support |
| cfg/038 | The metric 'Disk type' is missing in the extension configuration file config.xml. 'Disk type' along with some other counters was introduced in v2.2.0.68 on December 12, 2015. If you deployed the extension before December 12, 2015, it uses the old configuration file. The Azure extension framework automatically upgrades the extension to a newer version, but the config.xml remains unchanged. To update the configuration, download and execute the latest PowerShell setup script. |
run setup script |
| cfg/039 | No disk caching. | run setup script |
| cfg/036 | No disk SLA throughput. | run setup script |
| cfg/037 | No disk SLA IOPS. | run setup script |
| cfg/028 | Disk mapping counter failed. | contact support |
| cfg/029 | Last hardware change counter failed. | contact support |
| cfg/030 | NIC counters failed | contact support |
| cfg/017 | Due to sysprep of the VM your Windows SID has changed. | redeploy after sysprep |
| str/007 | Access to the storage analytics failed. As population of storage analytics data on a newly created VM may need up to half an hour, the error might disappear after some time. If the error still appears, re-run the setup script. |
run setup script |
| str/010 | No Storage Analytics counters. | run setup script |
| str/009 | Storage Analytics failed. | run setup script |
| wad/004 | Bad WAD configuration. | run setup script |
| wad/002 | Unexpected WAD format. | contact support |
| wad/001 | No WAD counters found. | run setup script |
| wad/040 | Stale WAD counters found. | contact support |
| wad/003 | Cannot read WAD table. There is no connection to WAD table. There can be several causes of this: 1) outdated configuration 2) no network connection to Azure 3) issues with WAD setup |
run setup script fix internet connection contact support |
| prf/011 | Perfmon NIC metrics failed. | contact support |
| prf/012 | Perfmon disk metrics failed. | contact support |
| prf/013 | Some perfmon metrics failed. | contact support |
| prf/014 | Perfmon failed to create a counter. | contact support |
| cfg/035 | No metric providers configured. | contact support |
| str/006 | Bad Storage Analytics config. | run setup script |
| str/032 | Storage Analytics metrics failed. | run setup script |
| cfg/033 | One of the metric providers failed. | run setup script |
| str/034 | Provider thread failed. | contact support |
Detailed guidelines on solutions provided
Run the setup script
Follow the steps in chapter Configure the Azure extension for SAP in this guide to install the extension again. Some counters might need up to 30 minutes for provisioning.
If the errors don't disappear, contact support.
Contact Support
Unexpected error or there's no known solution. Collect the AzureEnhancedMonitoring_service.log file located in the folder C:\Packages\Plugins\Microsoft.AzureCAT.AzureEnhancedMonitoring.AzureCATExtensionHandler\<version>\drop (Windows) or /var/log/azure/Microsoft.OSTCExtensions.AzureEnhancedMonitorForLinux (Linux) and contact SAP support for further assistance.
Redeploy after sysprep
If you plan to build a generalized sysprep OS image (which can include SAP software), we recommend that this image doesn't include the Azure extension for SAP. You should install the Azure extension for SAP after the new instance of the generalized OS image is deployed.
However, if your generalized and did a sysprep OS image already containing the Azure extension for SAP, you can apply the following workaround to reconfigure the extension on the newly deployed VM instance. On the newly deployed VM instance, delete the content of the following folders:
C:\Packages\Plugins\Microsoft.AzureCAT.AzureEnhancedMonitoring.AzureCATExtensionHandler\<version>\RuntimeSettingsC:\Packages\Plugins\Microsoft.AzureCAT.AzureEnhancedMonitoring.AzureCATExtensionHandler\<version>\StatusFollow the steps in chapter Configure the Azure extension for SAP in this guide to install the extension again.
Fix internet connection
The Microsoft Azure VM running the Azure extension for SAP requires access to the Internet. If this Azure VM is part of an Azure Virtual Network or of an on-premises domain, make sure that the relevant proxy settings are set. These settings must also be valid for the LocalSystem account to access the Internet. Follow chapter Configure the proxy in this guide.
In addition, if you need to set a static IP address for your Azure VM, don't set it manually inside the Azure VM, but set it using Azure PowerShell, Azure CLI Azure portal. The static IP is propagated via the Azure DHCP service.
Manually setting a static IP address inside the Azure VM isn't supported, and might lead to problems with the Azure extension for SAP.