Standard Version of Azure VM extension for SAP solutions
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, please 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 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.
Deploy Azure PowerShell cmdlets
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
Deploy Azure CLI
Follow the steps described in the article Install the Azure CLI
Check frequently for updates to Azure CLI, which usually is updated monthly.
To check the version of Azure CLI that is installed on your computer, run this command:
az --version
Configure the Azure VM extension for SAP solutions with PowerShell
To install the Azure Extension for SAP by using PowerShell:
- Make sure that you have installed the latest version of the Azure PowerShell cmdlet. For more information, see Deploying Azure PowerShell cmdlets
- 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.$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. This can take several minutes.
For more information about Set-AzVMAEMExtension
, 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 additional data disks has been 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 has been deployed or updated.
- The last line of output is informational. It shows your options for testing the VM Extension for SAP configuration.
- To check that all steps of Azure VM Extension for SAP configuration have been executed successfully, and that the Azure Infrastructure provides the necessary data, proceed with the readiness check for the Azure Extension for SAP, as described in Readiness check.
- Wait 15-30 minutes for Azure Diagnostics to collect the relevant data.
Configure the Azure VM extension for SAP solutions with Azure CLI
To install the Azure VM Extension for SAP by using Azure CLI:
Make sure that you have installed the latest version of the Azure CLI. For more information, see Deploy Azure CLI
Sign in with your Azure account:
az login
Install the Azure CLI AEM Extension. Ensure that you use version 0.2.2 or later.
az extension add --name aem
Enable the extension:
az vm aem set -g <resource-group-name> -n <vm name>
Verify that the Azure Extension for SAP is active on the Azure Linux VM. Check whether the file /var/lib/AzureEnhancedMonitor/PerfCounters exists. If it exists, at a command prompt, run this command to display information collected by the Azure Extension for SAP:
cat /var/lib/AzureEnhancedMonitor/PerfCounters
The output looks like this:
... 2;cpu;Current Hw Frequency;;0;2194.659;MHz;60;1444036656;saplnxmon; 2;cpu;Max Hw Frequency;;0;2194.659;MHz;0;1444036656;saplnxmon; ...
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 additional 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 does not 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 have deployed 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, Azure Extension for SAP has been 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.
Run the readiness check on a Windows VM
Sign in to the Azure virtual machine (using an admin account is not necessary).
Open a Command Prompt window.
At the command prompt, change the directory to the installation folder of the Azure Extension for SAP: C:\Packages\Plugins\Microsoft.AzureCAT.AzureEnhancedMonitoring.AzureCATExtensionHandler\<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.exe without any parameters.
Note
Azperflib.exe runs in a loop and updates the collected counters every 60 seconds. To end the loop, close the Command Prompt window.
If the Azure Extension for SAP is not installed, or the AzureEnhancedMonitoring service is not running, the extension has not been configured correctly. For detailed information about how to troubleshoot the extension, see Troubleshooting for Windows or Troubleshooting for Linux.
Note
The Azperflib.exe is a component that can't be used for own purposes. It is a component which delivers Azure infrastructure data related to the VM for the SAP Host Agent exclusively.
Check the output of azperflib.exe
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.exe result values | Azure Extension for SAP health status |
---|---|
API Calls - not available | Counters that are not available might be either not applicable to the virtual machine configuration, or are errors. See Health status. |
Counters total - empty | The following two Azure storage counters can be empty:
|
Health status | Only OK if return status shows OK. |
Diagnostics | Detailed information about health status. |
If the Health status value is not OK, follow the instructions in Health check for the Azure Extension for SAP configuration.
Run the readiness check on a Linux VM
Connect to the Azure Virtual Machine by using SSH.
Check the output of the Azure Extension for SAP.
a. Run
more /var/lib/AzureEnhancedMonitor/PerfCounters
Expected result: Returns list of performance counters. The file should not be empty.
b. Run
cat /var/lib/AzureEnhancedMonitor/PerfCounters | grep Error
Expected result: Returns one line where the error is none, for example, 3;config;Error;;0;0;none;0;1456416792;tst-servercs;
c. Run
more /var/lib/AzureEnhancedMonitor/LatestErrorRecord
Expected result: Returns as empty or does not exist.
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.OSTCExtensions.AzureEnhancedMonitorForLinux-*/'
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:
python /var/lib/waagent/Microsoft.OSTCExtensions.AzureEnhancedMonitorForLinux-2.0.0.2/handler.py daemon
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 for Linux or Troubleshooting for Windows.
Health checks
If some of the infrastructure data is not 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.
Health checks using PowerShell
Make sure that you have installed the latest version of the Azure PowerShell cmdlet, as described in Deploying Azure PowerShell cmdlets.
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 select.
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 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 will be displayed instead of the tests returning "OK". This is normal and intended in case of that disk type. See also Troubleshooting for Linux or Troubleshooting for Windows.
Health checks using Azure CLI
To run the health check for the Azure VM Extension for SAP by using Azure CLI:
Install Azure CLI 2.0. Ensure that you use at least version 2.19.1 or later (use the latest version).
Sign in with your Azure account:
az login
Install the Azure CLI AEM Extension. Ensure that you use version 0.2.2 or later.
az extension add --name aem
Verify the installation of the extension:
az vm aem verify -g <resource-group-name> -n <vm name>
The script tests the configuration of the virtual machine you select.
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 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.
Troubleshooting for Windows
Azure performance counters do not show up at all
The AzureEnhancedMonitoring Windows service collects performance metrics in Azure. If the service has not been installed correctly or if it is not 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 is not installed. Determine whether this is 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 does not exist
Issue
The AzureEnhancedMonitoring Windows service does not exist.
Azperflib.exe output throws an error:
Solution
If the service does not exist, the Azure Extension for SAP has not been 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 are 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 virtual machine.
Troubleshooting for Linux
Azure performance counters do not show up at all
Performance metrics in Azure are collected by a daemon. If the daemon is not running, no performance metrics can be collected.
The installation directory of the Azure Extension for SAP is empty
Issue
The directory \var\lib\waagent\ does not have a subdirectory for the Azure Extension for SAP.
Solution
The extension is not installed. Determine whether this is a proxy issue (as described earlier). You might need to restart the machine and/or rerun the Set-AzVMAEMExtension
configuration script.
The execution of Set-AzVMAEMExtension and Test-AzVMAEMExtension show warning messages stating that Standard Managed Disks are not supported
Issue
When executing Set-AzVMAEMExtension or Test-AzVMAEMExtension messages like these are shown:
WARNING: [WARN] Standard Managed Disks are not supported. Extension will be installed but no disk metrics will be available.
WARNING: [WARN] Standard Managed Disks are not supported. Extension will be installed but no disk metrics will be available.
WARNING: [WARN] Standard Managed Disks are not supported. Extension will be installed but no disk metrics will be available.
Executing azperfli.exe as described earlier you can get a result that is indicating a non-healthy state.
Solution
The messages are caused by the fact that Standard Managed Disks are not delivering the APIs used by the SAP Extension for SAP to check on statistics of the Standard Azure Storage Accounts. This is not a matter of concern. Reason for introducing the collecting data for Standard Disk Storage accounts was throttling of inputs and outputs that occurred frequently. Managed disks will avoid such throttling by limiting the number of disks in a storage account. Therefore, not having that type of that data is not critical.
Some Azure performance counters are missing
Performance metrics in Azure are collected by a daemon, which gets data from several sources. Some configuration data is collected locally, and some performance metrics are read from Azure Diagnostics. Storage counters come from the logs in your storage subscription.
For a complete and up-to-date list of known issues, see SAP Note 1999351, which has additional troubleshooting information for Azure Extension for SAP.
If troubleshooting by using SAP Note 1999351 does not resolve the issue, rerun the Set-AzVMAEMExtension
configuration script 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. You might have to wait for an hour because storage analytics or diagnostics counters might not be created immediately after they are 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 virtual machine.
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 12/16/2015. If you deployed the extension prior to 12/16/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. Note that some counters might need up to 30 minutes for provisioning.
If the errors do not disappear, contact support.
Contact Support
Unexpected error or there is 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 sysprepped OS image (which can include SAP software), it is recommended that this image does not include the Azure extension for SAP. You should install the Azure extension for SAP after the new instance of the generalized OS image has been deployed.
However, if your generalized and sysprepped OS image already contains 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>\RuntimeSettings C:\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 Virtual Machine 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, do not 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 is not supported, and might lead to problems with the Azure extension for SAP.