Azure Virtual Machines deployment for SAP NetWeaver

Note

Azure has two different deployment models you can use to create and work with resources: Azure Resource Manager and classic. This article covers the use of the Resource Manager deployment model. We recommend the Resource Manager deployment model for new deployments instead of the classic deployment model.

Azure Virtual Machines is the solution for organizations that need compute and storage resources, in minimal time, and without lengthy procurement cycles. You can use Azure Virtual Machines to deploy classical applications, like SAP NetWeaver-based applications, in Azure. Extend an application's reliability and availability without additional on-premises resources. Azure Virtual Machines supports cross-premises connectivity, so you can integrate Azure Virtual Machines into your organization's on-premises domains, private clouds, and SAP system landscape.

In this article, we cover the steps to deploy SAP applications on virtual machines (VMs) in Azure, including alternate deployment options and troubleshooting. This article builds on the information in Azure Virtual Machines planning and implementation for SAP NetWeaver. It also complements SAP installation documentation and SAP Notes, which are the primary resources for installing and deploying SAP software.

Prerequisites

Note

This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM compatibility, see Introducing the new Azure PowerShell Az module. For Az module installation instructions, see Install Azure PowerShell.

Setting up an Azure virtual machine for SAP software deployment involves multiple steps and resources. Before you start, make sure that you meet the prerequisites for installing SAP software on virtual machines in Azure.

Local computer

To manage Windows or Linux VMs, you can use a PowerShell script and the Azure portal. For both tools, you need a local computer running Windows 7 or a later version of Windows. If you want to manage only Linux VMs and you want to use a Linux computer for this task, you can use Azure CLI.

Internet connection

To download and run the tools and scripts that are required for SAP software deployment, you must be connected to the Internet. The Azure VM that is running the Azure Enhanced Monitoring Extension for SAP also needs access to the Internet. If the Azure VM is part of an Azure virtual network or on-premises domain, make sure that the relevant proxy settings are set, as described in Configure the proxy.

Microsoft Azure subscription

You need an active Azure account.

Topology and networking

You need to define the topology and architecture of the SAP deployment in Azure:

  • Azure storage accounts to be used
  • Virtual network where you want to deploy the SAP system
  • Resource group to which you want to deploy the SAP system
  • Azure region where you want to deploy the SAP system
  • SAP configuration (two-tier or three-tier)
  • VM sizes and the number of additional data disks to be mounted to the VMs
  • SAP Correction and Transport System (CTS) configuration

Create and configure Azure storage accounts (if required) or Azure virtual networks before you begin the SAP software deployment process. For information about how to create and configure these resources, see Azure Virtual Machines planning and implementation for SAP NetWeaver.

SAP sizing

Know the following information, for SAP sizing:

  • Projected SAP workload, for example, by using the SAP Quick Sizer tool, and the SAP Application Performance Standard (SAPS) number
  • Required CPU resource and memory consumption of the SAP system
  • Required input/output (I/O) operations per second
  • Required network bandwidth of eventual communication between VMs in Azure
  • Required network bandwidth between on-premises assets and the Azure-deployed SAP system

Resource groups

In Azure Resource Manager, you can use resource groups to manage all the application resources in your Azure subscription. For more information, see Azure Resource Manager overview.

Resources

SAP resources

When you are setting up your SAP software deployment, you need the following SAP resources:

  • SAP Note 1928533, which has:

    • List of Azure VM sizes that are supported for the deployment of SAP software
    • Important capacity information for Azure VM sizes
    • Supported SAP software, and operating system (OS) and database combinations
    • Required SAP kernel version for Windows and Linux on Microsoft Azure
  • SAP Note 2015553 lists prerequisites for SAP-supported SAP software deployments in Azure.

  • SAP Note 2178632 has detailed information about all monitoring metrics reported for SAP in Azure.

  • SAP Note 1409604 has the required SAP Host Agent version for Windows in Azure.

  • SAP Note 2191498 has the required SAP Host Agent version for Linux in Azure.

  • SAP Note 2243692 has information about SAP licensing on Linux in Azure.

  • SAP Note 1984787 has general information about SUSE Linux Enterprise Server 12.

  • SAP Note 2002167 has general information about Red Hat Enterprise Linux 7.x.

  • SAP Note 2069760 has general information about Oracle Linux 7.x.

  • SAP Note 1999351 has additional troubleshooting information for the Azure Enhanced Monitoring Extension for SAP.

  • SAP Note 1597355 has general information about swap-space for Linux.

  • SAP on Azure SCN page has news and a collection of useful resources.

  • SAP Community WIKI has all required SAP Notes for Linux.

  • SAP-specific PowerShell cmdlets that are part of Azure PowerShell.

  • SAP-specific Azure CLI commands that are part of Azure CLI.

Windows resources

These Microsoft articles cover SAP deployments in Azure:

Deployment scenarios for SAP software on Azure VMs

You have multiple options for deploying VMs and associated disks in Azure. It's important to understand the differences between deployment options, because you might take different steps to prepare your VMs for deployment based on the deployment type you choose.

Scenario 1: Deploying a VM from the Azure Marketplace for SAP

You can use an image provided by Microsoft or by a third party in the Azure Marketplace to deploy your VM. The Marketplace offers some standard OS images of Windows Server and different Linux distributions. You also can deploy an image that includes database management system (DBMS) SKUs, for example, Microsoft SQL Server. For more information about using images with DBMS SKUs, see Azure Virtual Machines DBMS deployment for SAP NetWeaver.

The following flowchart shows the SAP-specific sequence of steps for deploying a VM from the Azure Marketplace:

Flowchart of VM deployment for SAP systems by using a VM image from the Azure Marketplace

Create a virtual machine by using the Azure portal

The easiest way to create a new virtual machine with an image from the Azure Marketplace is by using the Azure portal.

  1. Go to https://portal.azure.com/#create/hub. Or, in the Azure portal menu, select + New.
  2. Select Compute, and then select the type of operating system you want to deploy. For example, Windows Server 2012 R2, SUSE Linux Enterprise Server 12 (SLES 12), Red Hat Enterprise Linux 7.2 (RHEL 7.2), or Oracle Linux 7.2. The default list view does not show all supported operating systems. Select see all for a full list. For more information about supported operating systems for SAP software deployment, see SAP Note 1928533.
  3. On the next page, review terms and conditions.
  4. In the Select a deployment model box, select Resource Manager.
  5. Select Create.

The wizard guides you through setting the required parameters to create the virtual machine, in addition to all required resources, like network interfaces and storage accounts. Some of these parameters are:

  1. Basics:

    • Name: The name of the resource (the virtual machine name).
    • VM disk type: Select the disk type of the OS disk. If you want to use Premium Storage for your data disks, we recommend using Premium Storage for the OS disk as well.
    • Username and password or SSH public key: Enter the username and password of the user that is created during the provisioning. For a Linux virtual machine, you can enter the public Secure Shell (SSH) key that you use to sign in to the machine.
    • Subscription: Select the subscription that you want to use to provision the new virtual machine.
    • Resource group: The name of the resource group for the VM. You can enter either the name of a new resource group or the name of a resource group that already exists.
    • Location: Where to deploy the new virtual machine. If you want to connect the virtual machine to your on-premises network, make sure you select the location of the virtual network that connects Azure to your on-premises network. For more information, see Microsoft Azure networking in Azure Virtual Machines planning and implementation for SAP NetWeaver.
  2. Size:

    For a list of supported VM types, see SAP Note 1928533. Be sure you select the correct VM type if you want to use Azure Premium Storage. Not all VM types support Premium Storage. For more information, see Storage: Microsoft Azure Storage and data disks and Azure Premium Storage in Azure Virtual Machines planning and implementation for SAP NetWeaver.

  3. Settings:

    • Storage
      • Disk Type: Select the disk type of the OS disk. If you want to use Premium Storage for your data disks, we recommend using Premium Storage for the OS disk as well.
      • Use managed disks: If you want to use Managed Disks, select Yes. For more information about Managed Disks, see chapter Managed Disks in the planning guide.
      • Storage account: Select an existing storage account or create a new one. Not all storage types work for running SAP applications. For more information about storage types, see Storage structure of a VM for RDBMS Deployments.
    • Network
      • Virtual network and Subnet: To integrate the virtual machine with your intranet, select the virtual network that is connected to your on-premises network.
      • Public IP address: Select the public IP address that you want to use, or enter parameters to create a new public IP address. You can use a public IP address to access your virtual machine over the Internet. Make sure that you also create a network security group to help secure access to your virtual machine.
      • Network security group: For more information, see Control network traffic flow with network security groups.
    • Extensions: You can install virtual machine extensions by adding them to the deployment. You do not need to add extensions in this step. The extensions required for SAP support are installed later. See chapter Configure the Azure Enhanced Monitoring Extension for SAP in this guide.
    • High Availability: Select an availability set, or enter the parameters to create a new availability set. For more information, see Azure availability sets.
    • Monitoring
      • Boot diagnostics: You can select Disable for boot diagnostics.
      • Guest OS diagnostics: You can select Disable for monitoring diagnostics.
  4. Summary:

    Review your selections, and then select OK.

Your virtual machine is deployed in the resource group you selected.

Create a virtual machine by using a template

You can create a virtual machine by using one of the SAP templates published in the azure-quickstart-templates GitHub repository. You also can manually create a virtual machine by using the Azure portal, PowerShell, or Azure CLI.

In the Azure portal, enter the following parameters for the template:

  1. Basics:

    • Subscription: The subscription to use to deploy the template.
    • Resource group: The resource group to use to deploy the template. You can create a new resource group, or you can select an existing resource group in the subscription.
    • Location: Where to deploy the template. If you selected an existing resource group, the location of that resource group is used.
  2. Settings:

    • SAP System ID: The SAP System ID (SID).

    • OS type: The operating system you want to deploy, for example, Windows Server 2012 R2, SUSE Linux Enterprise Server 12 (SLES 12), Red Hat Enterprise Linux 7.2 (RHEL 7.2), or Oracle Linux 7.2.

      The list view does not show all supported operating systems. For more information about supported operating systems for SAP software deployment, see SAP Note 1928533.

    • SAP system size: The size of the SAP system.

      The number of SAPS the new system provides. If you are not sure how many SAPS the system requires, ask your SAP Technology Partner or System Integrator.

    • System availability (three-tier template only): The system availability.

      Select HA for a configuration that is suitable for a high-availability installation. Two database servers and two servers for ABAP SAP Central Services (ASCS) are created.

    • Storage type (two-tier template only): The type of storage to use.

      For larger systems, we highly recommend using Azure Premium Storage. For more information about storage types, see these resources:

    • Admin username and Admin password: A username and password. A new user is created, for signing in to the virtual machine.

    • New or existing subnet: Determines whether a new virtual network and subnet are created or an existing subnet is used. If you already have a virtual network that is connected to your on-premises network, select Existing.

    • Subnet ID: If you want to deploy the VM into an existing VNet where you have a subnet defined the VM should be assigned to, name the ID of that specific subnet. The ID usually looks like this: /subscriptions/<subscription id>/resourceGroups/<resource group name>/providers/Microsoft.Network/virtualNetworks/<virtual network name>/subnets/<subnet name>

  3. Terms and conditions:
    Review and accept the legal terms.

  4. Select Purchase.

The Azure VM Agent is deployed by default when you use an image from the Azure Marketplace.

Configure proxy settings

Depending on how your on-premises network is configured, you might need to set up the proxy on your VM. If your VM is connected to your on-premises network via VPN or ExpressRoute, the VM might not be able to access the Internet, and won't be able to download the required extensions or collect monitoring data. For more information, see Configure the proxy.

Join a domain (Windows only)

If your Azure deployment is connected to an on-premises Active Directory or DNS instance via an Azure site-to-site VPN connection or ExpressRoute (this is called cross-premises in Azure Virtual Machines planning and implementation for SAP NetWeaver), it is expected that the VM is joining an on-premises domain. For more information about considerations for this task, see Join a VM to an on-premises domain (Windows only).

Configure monitoring

To be sure SAP supports your environment, set up the Azure Monitoring Extension for SAP as described in Configure the Azure Enhanced Monitoring Extension for SAP. Check the prerequisites for SAP monitoring, and required minimum versions of SAP Kernel and SAP Host Agent, in the resources listed in SAP resources.

Monitoring check

Check whether monitoring is working, as described in Checks and troubleshooting for setting up end-to-end monitoring.

Post-deployment steps

After you create the VM and the VM is deployed, you need to install the required software components in the VM. Because of the deployment/software installation sequence in this type of VM deployment, the software to be installed must already be available, either in Azure, on another VM, or as a disk that can be attached. Or, consider using a cross-premises scenario, in which connectivity to the on-premises assets (installation shares) is given.

After you deploy your VM in Azure, follow the same guidelines and tools to install the SAP software on your VM as you would in an on-premises environment. To install SAP software on an Azure VM, both SAP and Microsoft recommend that you upload and store the SAP installation media on Azure VHDs or Managed Disks, or that you create an Azure VM that works as a file server that has all the required SAP installation media.

Scenario 2: Deploying a VM with a custom image for SAP

Because different versions of an operating system or DBMS have different patch requirements, the images you find in the Azure Marketplace might not meet your needs. You might instead want to create a VM by using your own OS/DBMS VM image, which you can deploy again later. You use different steps to create a private image for Linux than to create one for Windows.


Windows Windows

To prepare a Windows image that you can use to deploy multiple virtual machines, the Windows settings (like Windows SID and hostname) must be abstracted or generalized on the on-premises VM. You can use sysprep to do this.

Linux Linux

To prepare a Linux image that you can use to deploy multiple virtual machines, some Linux settings must be abstracted or generalized on the on-premises VM. You can use waagent -deprovision to do this. For more information, see Capture a Linux virtual machine running on Azure and the Azure Linux agent user guide.


You can prepare and create a custom image, and then use it to create multiple new VMs. This is described in Azure Virtual Machines planning and implementation for SAP NetWeaver. Set up your database content either by using SAP Software Provisioning Manager to install a new SAP system (restores a database backup from a disk that's attached to the virtual machine) or by directly restoring a database backup from Azure storage, if your DBMS supports it. For more information, see Azure Virtual Machines DBMS deployment for SAP NetWeaver. If you have already installed an SAP system on your on-premises VM (especially for two-tier systems), you can adapt the SAP system settings after the deployment of the Azure VM by using the System Rename procedure supported by SAP Software Provisioning Manager (SAP Note 1619720). Otherwise, you can install the SAP software after you deploy the Azure VM.

The following flowchart shows the SAP-specific sequence of steps for deploying a VM from a custom image:

Flowchart of VM deployment for SAP systems by using a VM image in private Marketplace

Create a virtual machine by using the Azure portal

The easiest way to create a new virtual machine from a Managed Disk image is by using the Azure portal. For more information on how to create a Manage Disk Image, read Capture a managed image of a generalized VM in Azure

  1. Go to https://ms.portal.azure.com/#blade/HubsExtension/Resources/resourceType/Microsoft.Compute%2Fimages. Or, in the Azure portal menu, select Images.
  2. Select the Managed Disk image you want to deploy and click on Create VM

The wizard guides you through setting the required parameters to create the virtual machine, in addition to all required resources, like network interfaces and storage accounts. Some of these parameters are:

  1. Basics:

    • Name: The name of the resource (the virtual machine name).
    • VM disk type: Select the disk type of the OS disk. If you want to use Premium Storage for your data disks, we recommend using Premium Storage for the OS disk as well.
    • Username and password or SSH public key: Enter the username and password of the user that is created during the provisioning. For a Linux virtual machine, you can enter the public Secure Shell (SSH) key that you use to sign in to the machine.
    • Subscription: Select the subscription that you want to use to provision the new virtual machine.
    • Resource group: The name of the resource group for the VM. You can enter either the name of a new resource group or the name of a resource group that already exists.
    • Location: Where to deploy the new virtual machine. If you want to connect the virtual machine to your on-premises network, make sure you select the location of the virtual network that connects Azure to your on-premises network. For more information, see Microsoft Azure networking in Azure Virtual Machines planning and implementation for SAP NetWeaver.
  2. Size:

    For a list of supported VM types, see SAP Note 1928533. Be sure you select the correct VM type if you want to use Azure Premium Storage. Not all VM types support Premium Storage. For more information, see Storage: Microsoft Azure Storage and data disks and Azure Premium Storage in Azure Virtual Machines planning and implementation for SAP NetWeaver.

  3. Settings:

    • Storage
      • Disk Type: Select the disk type of the OS disk. If you want to use Premium Storage for your data disks, we recommend using Premium Storage for the OS disk as well.
      • Use managed disks: If you want to use Managed Disks, select Yes. For more information about Managed Disks, see chapter Managed Disks in the planning guide.
    • Network
      • Virtual network and Subnet: To integrate the virtual machine with your intranet, select the virtual network that is connected to your on-premises network.
      • Public IP address: Select the public IP address that you want to use, or enter parameters to create a new public IP address. You can use a public IP address to access your virtual machine over the Internet. Make sure that you also create a network security group to help secure access to your virtual machine.
      • Network security group: For more information, see Control network traffic flow with network security groups.
    • Extensions: You can install virtual machine extensions by adding them to the deployment. You do not need to add extension in this step. The extensions required for SAP support are installed later. See chapter Configure the Azure Enhanced Monitoring Extension for SAP in this guide.
    • High Availability: Select an availability set, or enter the parameters to create a new availability set. For more information, see Azure availability sets.
    • Monitoring
      • Boot diagnostics: You can select Disable for boot diagnostics.
      • Guest OS diagnostics: You can select Disable for monitoring diagnostics.
  4. Summary:

    Review your selections, and then select OK.

Your virtual machine is deployed in the resource group you selected.

Create a virtual machine by using a template

To create a deployment by using a private OS image from the Azure portal, use one of the following SAP templates. These templates are published in the azure-quickstart-templates GitHub repository. You also can manually create a virtual machine, by using PowerShell.

In the Azure portal, enter the following parameters for the template:

  1. Basics:

    • Subscription: The subscription to use to deploy the template.
    • Resource group: The resource group to use to deploy the template. You can create a new resource group or select an existing resource group in the subscription.
    • Location: Where to deploy the template. If you selected an existing resource group, the location of that resource group is used.
  2. Settings:

    • SAP System ID: The SAP System ID.

    • OS type: The operating system type you want to deploy (Windows or Linux).

    • SAP system size: The size of the SAP system.

      The number of SAPS the new system provides. If you are not sure how many SAPS the system requires, ask your SAP Technology Partner or System Integrator.

    • System availability (three-tier template only): The system availability.

      Select HA for a configuration that is suitable for a high-availability installation. Two database servers and two servers for ASCS are created.

    • Storage type (two-tier template only): The type of storage to use.

      For larger systems, we highly recommend using Azure Premium Storage. For more information about storage types, see the following resources:

    • User image VHD URI (unmanaged disk image template only): The URI of the private OS image VHD, for example, https://<accountname>.blob.core.windows.net/vhds/userimage.vhd.

    • User image storage account (unmanaged disk image template only): The name of the storage account where the private OS image is stored, for example, <accountname> in https://<accountname>.blob.core.windows.net/vhds/userimage.vhd.

    • userImageId (managed disk image template only): Id of the Managed Disk image you want to use

    • Admin username and Admin password: The username and password.

      A new user is created, for signing in to the virtual machine.

    • New or existing subnet: Determines whether a new virtual network and subnet is created or an existing subnet is used. If you already have a virtual network that is connected to your on-premises network, select Existing.

    • Subnet ID: If you want to deploy the VM into an existing VNet where you have a subnet defined the VM should be assigned to, name the ID of that specific subnet. The ID usually looks like this: /subscriptions/<subscription id>/resourceGroups/<resource group name>/providers/Microsoft.Network/virtualNetworks/<virtual network name>/subnets/<subnet name>

  3. Terms and conditions:
    Review and accept the legal terms.

  4. Select Purchase.

Install the VM Agent (Linux only)

To use the templates described in the preceding section, the Linux Agent must already be installed in the user image, or the deployment will fail. Download and install the VM Agent in the user image as described in Download, install, and enable the Azure VM Agent. If you don't use the templates, you also can install the VM Agent later.

Join a domain (Windows only)

If your Azure deployment is connected to an on-premises Active Directory or DNS instance via an Azure site-to-site VPN connection or Azure ExpressRoute (this is called cross-premises in Azure Virtual Machines planning and implementation for SAP NetWeaver), it is expected that the VM is joining an on-premises domain. For more information about considerations for this step, see Join a VM to an on-premises domain (Windows only).

Configure proxy settings

Depending on how your on-premises network is configured, you might need to set up the proxy on your VM. If your VM is connected to your on-premises network via VPN or ExpressRoute, the VM might not be able to access the Internet, and won't be able to download the required extensions or collect monitoring data. For more information, see Configure the proxy.

Configure monitoring

To be sure SAP supports your environment, set up the Azure Monitoring Extension for SAP as described in Configure the Azure Enhanced Monitoring Extension for SAP. Check the prerequisites for SAP monitoring, and required minimum versions of SAP Kernel and SAP Host Agent, in the resources listed in SAP resources.

Monitoring check

Check whether monitoring is working, as described in Checks and troubleshooting for setting up end-to-end monitoring.

Scenario 3: Moving an on-premises VM by using a non-generalized Azure VHD with SAP

In this scenario, you plan to move a specific SAP system from an on-premises environment to Azure. You can do this by uploading the VHD that has the OS, the SAP binaries, and eventually the DBMS binaries, plus the VHDs with the data and log files of the DBMS, to Azure. Unlike the scenario described in Scenario 2: Deploying a VM with a custom image for SAP, in this case, you keep the hostname, SAP SID, and SAP user accounts in the Azure VM, because they were configured in the on-premises environment. You do not need to generalize the OS. This scenario applies most often to cross-premises scenarios where part of the SAP landscape runs on-premises and part of it runs on Azure.

In this scenario, the VM Agent is not automatically installed during deployment. Because the VM Agent and the Azure Enhanced Monitoring Extension for SAP are required to run SAP NetWeaver on Azure, you need to download, install, and enable both components manually after you create the virtual machine.

For more information about the Azure VM Agent, see the following resources.


Windows Windows

Azure Virtual Machine Agent overview

Linux Linux

Azure Linux Agent User Guide


The following flowchart shows the sequence of steps for moving an on-premises VM by using a non-generalized Azure VHD:

Flowchart of VM deployment for SAP systems by using a VM disk

If the disk is already uploaded and defined in Azure (see Azure Virtual Machines planning and implementation for SAP NetWeaver), do the tasks described in the next few sections.

Create a virtual machine

To create a deployment by using a private OS disk through the Azure portal, use the SAP template published in the azure-quickstart-templates GitHub repository. You also can manually create a virtual machine, by using PowerShell.

In the Azure portal, enter the following parameters for the template:

  1. Basics:

    • Subscription: The subscription to use to deploy the template.
    • Resource group: The resource group to use to deploy the template. You can create a new resource group or select an existing resource group in the subscription.
    • Location: Where to deploy the template. If you selected an existing resource group, the location of that resource group is used.
  2. Settings:

    • SAP System ID: The SAP System ID.

    • OS type: The operating system type you want to deploy (Windows or Linux).

    • SAP system size: The size of the SAP system.

      The number of SAPS the new system provides. If you are not sure how many SAPS the system requires, ask your SAP Technology Partner or System Integrator.

    • Storage type (two-tier template only): The type of storage to use.

      For larger systems, we highly recommend using Azure Premium Storage. For more information about storage types, see the following resources:

    • OS disk VHD URI (unmanaged disk template only): The URI of the private OS disk, for example, https://<accountname>.blob.core.windows.net/vhds/osdisk.vhd.

    • OS disk Managed Disk Id (managed disk template only): The Id of the Managed Disk OS disk, /subscriptions/92d102f7-81a5-4df7-9877-54987ba97dd9/resourceGroups/group/providers/Microsoft.Compute/disks/WIN

    • New or existing subnet: Determines whether a new virtual network and subnet are created, or an existing subnet is used. If you already have a virtual network that is connected to your on-premises network, select Existing.

    • Subnet ID: If you want to deploy the VM into an existing VNet where you have a subnet defined the VM should be assigned to, name the ID of that specific subnet. The ID usually looks like this: /subscriptions/<subscription id>/resourceGroups/<resource group name>/providers/Microsoft.Network/virtualNetworks/<virtual network name>/subnets/<subnet name>

  3. Terms and conditions:
    Review and accept the legal terms.

  4. Select Purchase.

Install the VM Agent

To use the templates described in the preceding section, the VM Agent must be installed on the OS disk, or the deployment will fail. Download and install the VM Agent in the VM, as described in Download, install, and enable the Azure VM Agent.

If you don't use the templates described in the preceding section, you can also install the VM Agent afterwards.

Join a domain (Windows only)

If your Azure deployment is connected to an on-premises Active Directory or DNS instance via an Azure site-to-site VPN connection or ExpressRoute (this is called cross-premises in Azure Virtual Machines planning and implementation for SAP NetWeaver), it is expected that the VM is joining an on-premises domain. For more information about considerations for this task, see Join a VM to an on-premises domain (Windows only).

Configure proxy settings

Depending on how your on-premises network is configured, you might need to set up the proxy on your VM. If your VM is connected to your on-premises network via VPN or ExpressRoute, the VM might not be able to access the Internet, and won't be able to download the required extensions or collect monitoring data. For more information, see Configure the proxy.

Configure monitoring

To be sure SAP supports your environment, set up the Azure Monitoring Extension for SAP as described in Configure the Azure Enhanced Monitoring Extension for SAP. Check the prerequisites for SAP monitoring, and required minimum versions of SAP Kernel and SAP Host Agent, in the resources listed in SAP resources.

Monitoring check

Check whether monitoring is working, as described in Checks and troubleshooting for setting up end-to-end monitoring.

Update the monitoring configuration for SAP

Update the SAP monitoring configuration in any of the following scenarios:

  • The joint Microsoft/SAP team extends the monitoring capabilities and requests more or fewer counters.
  • Microsoft introduces a new version of the underlying Azure infrastructure that delivers the monitoring data, and the Azure Enhanced Monitoring 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 monitoring 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 monitoring settings, update the monitoring infrastructure by following the steps in Configure the Azure Enhanced Monitoring Extension for SAP.

Detailed tasks for SAP software deployment

This section has detailed steps for doing specific tasks in the configuration and deployment process.

Deploy Azure PowerShell cmdlets

  1. Go to Microsoft Azure Downloads.

  2. Under Command-line tools, under PowerShell, select Windows install.

  3. In the Microsoft Download Manager dialog box, for the downloaded file (for example, WindowsAzurePowershellGet.3f.3f.3fnew.exe), select Run.

  4. To run Microsoft Web Platform Installer (Microsoft Web PI), select Yes.

  5. A page that looks like this appears:

    Installation page for Azure PowerShell cmdlets

  6. Select Install, and then accept the Microsoft Software License Terms.

  7. PowerShell is installed. Select Finish to close the installation wizard.

Check frequently for updates to the PowerShell cmdlets, which usually are updated monthly. The easiest way to check for updates is to do the preceding installation steps, up to the installation page shown in step 5. The release date and release number of the cmdlets are included on the page shown in step 5. 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

The result looks like this:

Result of Azure PowerShell cmdlet version check

If the Azure cmdlet version installed on your computer is the current version, the first page of the installation wizard indicates it by adding (Installed) to the product title (see the following screenshot). Your PowerShell Azure cmdlets are up-to-date. To close the installation wizard, select Exit.

Installation page for Azure PowerShell cmdlets indicating that the most recent version of Azure PowerShell cmdlets are installed

Deploy Azure CLI

  1. Go to Microsoft Azure Downloads.

  2. Under Command-line tools, under Azure command-line interface, select the Install link for your operating system.

  3. In the Microsoft Download Manager dialog box, for the downloaded file (for example, WindowsAzureXPlatCLI.3f.3f.3fnew.exe), select Run.

  4. To run Microsoft Web Platform Installer (Microsoft Web PI), select Yes.

  5. A page that looks like this appears:

    Installation page for Azure PowerShell cmdlets

  6. Select Install, and then accept the Microsoft Software License Terms.

  7. Azure CLI is installed. Select Finish to close the installation wizard.

Check frequently for updates to Azure CLI, which usually is updated monthly. The easiest way to check for updates is to do the preceding installation steps, up to the installation page shown in step 5.

To check the version of Azure CLI that is installed on your computer, run this command:

azure --version

The result looks like this:

Result of Azure CLI version check

Join a VM to an on-premises domain (Windows only)

If you deploy SAP VMs in a cross-premises scenario, where on-premises Active Directory and DNS are extended in Azure, it is expected that the VMs are joining an on-premises domain. The detailed steps you take to join a VM to an on-premises domain, and the additional software required to be a member of an on-premises domain, varies by customer. Usually, to join a VM to an on-premises domain, you need to install additional software, like antimalware software, and backup or monitoring software.

In this scenario, you also need to make sure that if Internet proxy settings are forced when a VM joins a domain in your environment, the Windows Local System Account (S-1-5-18) in the Guest VM has the same proxy settings. The easiest option is to force the proxy by using a domain Group Policy, which applies to systems in the domain.

Download, install, and enable the Azure VM Agent

For virtual machines that are deployed from an OS image that is not generalized (for example, an image that doesn't originate in the Windows System Preparation, or sysprep, tool), you need to manually download, install, and enable the Azure VM Agent.

If you deploy a VM from the Azure Marketplace, this step is not required. Images from the Azure Marketplace already have the Azure VM Agent.

Windows

  1. Download the Azure VM Agent:
    1. Download the Azure VM Agent installer package.
    2. Store the VM Agent MSI package locally on a personal computer or server.
  2. Install the Azure VM Agent:
    1. Connect to the deployed Azure VM by using Remote Desktop Protocol (RDP).
    2. Open a Windows Explorer window on the VM and select the target directory for the MSI file of the VM Agent.
    3. Drag the Azure VM Agent Installer MSI file from your local computer/server to the target directory of the VM Agent on the VM.
    4. Double-click the MSI file on the VM.
  3. For VMs that are joined to on-premises domains, make sure that eventual Internet proxy settings also apply to the Windows Local System account (S-1-5-18) in the VM, as described in Configure the proxy. The VM Agent runs in this context and needs to be able to connect to Azure.

No user interaction is required to update the Azure VM Agent. The VM Agent is automatically updated, and does not require a VM restart.

Linux

Use the following commands to install the VM Agent for Linux:

  • SUSE Linux Enterprise Server (SLES)

    sudo zypper install WALinuxAgent
    
  • Red Hat Enterprise Linux (RHEL) or Oracle Linux

    sudo yum install WALinuxAgent
    

If the agent is already installed, to update the Azure Linux Agent, do the steps described in Update the Azure Linux Agent on a VM to the latest version from GitHub.

Configure the proxy

The steps you take to configure the proxy in Windows are different from the way you configure the proxy in Linux.

Windows

Proxy settings must be set up correctly for the Local System account to access the Internet. If your proxy settings are not set by Group Policy, you can configure the settings for the Local System account.

  1. Go to Start, enter gpedit.msc, and then select Enter.
  2. Select Computer Configuration > Administrative Templates > Windows Components > Internet Explorer. Make sure that the setting Make proxy settings per-machine (rather than per-user) is disabled or not configured.
  3. In Control Panel, go to Network and Sharing Center > Internet Options.
  4. On the Connections tab, select the LAN settings button.
  5. Clear the Automatically detect settings check box.
  6. Select the Use a proxy server for your LAN check box, and then enter the proxy address and port.
  7. Select the Advanced button.
  8. In the Exceptions box, enter the IP address 168.63.129.16. Select OK.

Linux

Configure the correct proxy in the configuration file of the Microsoft Azure Guest Agent, which is located at \etc\waagent.conf.

Set the following parameters:

  1. HTTP proxy host. For example, set it to proxy.corp.local.

    HttpProxy.Host=<proxy host>
    
    
  2. HTTP proxy port. For example, set it to 80.

    HttpProxy.Port=<port of the proxy host>
    
    
  3. Restart the agent.

    sudo service waagent restart
    

The proxy settings in \etc\waagent.conf also apply to the required VM extensions. If you want to use the Azure repositories, make sure that the traffic to these repositories is not going through your on-premises intranet. If you created user-defined routes to enable forced tunneling, make sure that you add a route that routes traffic to the repositories directly to the Internet, and not through your site-to-site VPN connection.

  • SLES

    You also need to add routes for the IP addresses listed in \etc\regionserverclnt.cfg. The following figure shows an example:

    Forced tunneling

  • RHEL

    You also need to add routes for the IP addresses of the hosts listed in \etc\yum.repos.d\rhui-load-balancers. For an example, see the preceding figure.

  • Oracle Linux

    There are no repositories for Oracle Linux on Azure. You need to configure your own repositories for Oracle Linux or use the public repositories.

For more information about user-defined routes, see User-defined routes and IP forwarding.

Configure the Azure Enhanced Monitoring Extension for SAP

When you've prepared the VM as described in Deployment scenarios of VMs for SAP on Azure, the Azure VM Agent is installed on the virtual machine. The next step is to deploy the Azure Enhanced Monitoring Extension for SAP, which is available in the Azure Extension Repository in the global Azure datacenters. For more information, see Azure Virtual Machines planning and implementation for SAP NetWeaver.

You can use PowerShell or Azure CLI to install and configure the Azure Enhanced Monitoring Extension for SAP. To install the extension on a Windows or Linux VM by using a Windows machine, see Azure PowerShell. To install the extension on a Linux VM by using a Linux desktop, see Azure CLI.

Azure PowerShell for Linux and Windows VMs

To install the Azure Enhanced Monitoring Extension for SAP by using PowerShell:

  1. Make sure that you have installed the latest version of the Azure PowerShell cmdlet. For more information, see Deploying Azure PowerShell cmdlets.

  2. Run the following PowerShell cmdlet. For a list of available environments, run commandlet Get-AzEnvironment. If you want to use global Azure, your environment is AzureCloud. For Azure in China, 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 and identify the Azure virtual machine, 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.

Successful execution of SAP-specific Azure cmdlet Set-AzVMAEMExtension

The Set-AzVMAEMExtension configuration does all the steps to configure host monitoring for SAP.

The script output includes the following information:

  • Confirmation that monitoring 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 monitoring 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 monitoring configuration.
  • To check that all steps of Azure Enhanced Monitoring have been executed successfully, and that the Azure Infrastructure provides the necessary data, proceed with the readiness check for the Azure Enhanced Monitoring Extension for SAP, as described in Readiness check for Azure Enhanced Monitoring for SAP.
  • Wait 15-30 minutes for Azure Diagnostics to collect the relevant data.

Azure CLI for Linux VMs

To install the Azure Enhanced Monitoring Extension for SAP by using Azure CLI:

  1. Install Azure classic CLI, as described in Install the Azure classic CLI.

  2. Sign in with your Azure account:

    azure login
    
  3. Switch to Azure Resource Manager mode:

    azure config mode arm
    
  4. Enable Azure Enhanced Monitoring:

    azure vm enable-aem <resource-group-name> <vm-name>
    
  5. Install using Azure CLI 2.0

    1. Install Azure CLI 2.0, as described in Install Azure CLI 2.0.

    2. Sign in with your Azure account:

      az login
      
    3. Install Azure CLI AEM Extension

      az extension add --name aem
      
    4. Install the extension with

      az vm aem set -g <resource-group-name> -n <vm name>
      
  6. Verify that the Azure Enhanced Monitoring Extension 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 Enhanced Monitor:

    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;
    ...
    

Checks and troubleshooting for end-to-end monitoring

After you have deployed your Azure VM and set up the relevant Azure monitoring infrastructure, check whether all the components of the Azure Enhanced Monitoring Extension are working as expected.

Run the readiness check for the Azure Enhanced Monitoring Extension for SAP as described in Readiness check for the Azure Enhanced Monitoring Extension for SAP. If all readiness check results are positive and all relevant performance counters appear OK, Azure monitoring 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 monitoring infrastructure, as described in Health check for Azure monitoring infrastructure configuration. For more troubleshooting options, see Troubleshooting Azure monitoring for SAP.

Readiness check for the Azure Enhanced Monitoring Extension for SAP

This check makes sure that all performance metrics that appear inside your SAP application are provided by the underlying Azure monitoring infrastructure.

Run the readiness check on a Windows VM

  1. Sign in to the Azure virtual machine (using an admin account is not necessary).

  2. Open a Command Prompt window.

  3. At the command prompt, change the directory to the installation folder of the Azure Enhanced Monitoring Extension for SAP: C:\Packages\Plugins\Microsoft.AzureCAT.AzureEnhancedMonitoring.AzureCATExtensionHandler\<version>\drop

    The version in the path to the monitoring extension might vary. If you see folders for multiple versions of the monitoring extension in the installation folder, check the configuration of the AzureEnhancedMonitoring Windows service, and then switch to the folder indicated as Path to executable.

    Properties of service running the Azure Enhanced Monitoring Extension for SAP

  4. 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 Enhanced Monitoring Extension is not installed, or the AzureEnhancedMonitoring service is not running, the extension has not been configured correctly. For detailed information about how to deploy the extension, see Troubleshooting the Azure monitoring infrastructure for SAP.

Note

The Azperflib.exe is a component that can't be used for own purposes. It is a component which delivers Azure monitoring data related to the VM for the SAP Host Agent.

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 monitoring.

Output of health check by executing azperflib.exe, which indicates that no problems exist

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 monitoring 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:
  • Storage Read Op Latency Server msec
  • Storage Read Op Latency E2E msec
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 is not OK, follow the instructions in Health check for Azure monitoring infrastructure configuration.

Run the readiness check on a Linux VM

  1. Connect to the Azure Virtual Machine by using SSH.

  2. Check the output of the Azure Enhanced Monitoring Extension.

    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:

  1. 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

  2. Make sure that the Azure Enhanced Monitoring Extension 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 Enhanced Monitoring Extension 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

  3. 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 enhanced monitoring is enabled.

If any of these checks fail, and for detailed information about how to redeploy the extension, see Troubleshooting the Azure monitoring infrastructure for SAP.

Health check for the Azure monitoring infrastructure configuration

If some of the monitoring data is not delivered correctly as indicated by the test described in Readiness check for Azure Enhanced Monitoring for SAP, run the Test-AzVMAEMExtension cmdlet to check whether the Azure monitoring infrastructure and the monitoring extension for SAP are configured correctly.

  1. Make sure that you have installed the latest version of the Azure PowerShell cmdlet, as described in Deploying Azure PowerShell cmdlets.

  2. 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 Azure in China, 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>
    
  3. Enter your account data and identify the Azure virtual machine.

    Input page of SAP-specific Azure cmdlet Test-VMConfigForSAP_GUI

  4. The script tests the configuration of the virtual machine you select.

    Output of successful test of the Azure monitoring infrastructure for SAP

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 Enhanced Monitoring Extension for SAP. Wait 15 minutes, and repeat the checks described in Readiness check for Azure Enhanced Monitoring for SAP and Health check for Azure Monitoring Infrastructure Configuration. If the checks still indicate a problem with some or all counters, see Troubleshooting the Azure monitoring infrastructure for SAP.

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 see Troubleshooting the Azure monitoring infrastructure for SAP

Troubleshooting the Azure monitoring infrastructure for SAP

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 Enhanced Monitoring Extension 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 Enhanced Monitoring does not exist
Issue

The AzureEnhancedMonitoring Windows service does not exist.

Azperflib.exe output throws an error:

Execution of azperflib.exe indicates that the service of the Azure Enhanced Monitoring Extension for SAP is not running

Solution

If the service does not exist, the Azure Enhanced Monitoring Extension for SAP has not been installed correctly. Redeploy the extension by using the steps described for your deployment scenario in Deployment scenarios of VMs for SAP in Azure.

After you deploy the extension, after one hour, check again whether the Azure performance counters are provided in the Azure VM.

Service for Azure Enhanced Monitoring 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 monitoring extension for the VM, as described in Configure the Azure Enhanced Monitoring Extension for SAP.

Windows 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.

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 Enhanced Monitoring extension is empty
Issue

The directory \var\lib\waagent\ does not have a subdirectory for the Azure Enhanced Monitoring extension.

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 monitoring extension to check on statistics of the Standard Azure Storage Accounts. This is not a matter of concern. Reason for introducing the monitoring for Standard Disk Storage accounts was throttling of I/Os 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 monitoring data is not critical.

Linux 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 Enhanced Azure Monitoring 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 Enhanced Monitoring Extension for SAP. 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.