SAP HANA Deployment Guide

This deployment guide shows you how to deploy SAP HANA systems on Google Compute Engine, which is part of Google Cloud Platform (GCP). The guide helps you configure Compute Engine, persistent disks, and the SUSE Linux Enterprise Server (SLES) operating system, to achieve the best performance for your SAP HANA system. The guide incorporates best practices from Compute Engine and SAP.


SAP HANA is an in-memory, column-oriented, relational database that provides high-performance analytics and real-time data processing. At the core of this real-time data platform is the SAP HANA database. Customers can leverage ease of provisioning, highly scalable, and redundant GCP infrastructure capabilities to run their business critical workloads. GCP provides a set of physical assets, such as computers and hard disk drives, and virtual resources, such as Compute Engine virtual machines (VMs), located in Google data centers around the world.

When you deploy SAP HANA on GCP, you deploy to virtual machines running on Compute Engine. Compute Engine VMs provide persistent disks, which function similarly to physical disks in a desktop or a server, but are automatically managed for you by Compute Engine to ensure data redundancy and optimized performance.

GCP basics

GCP consists of many cloud-based services and products. When running SAP products on GCP, you mainly use the IaaS-based services offered through Google Compute Engine and Google Cloud Storage, as well as some platform-wide features, such as tools.

See the GCP platform overview for important concepts and terminology. This guide duplicates some information from the overview for convenience and context.

For an overview of considerations that enterprise-scale organizations should take into account when running on GCP, see best practices for enterprise organizations.

Interacting with GCP

GCP offers three main ways to interact with the platform, and your resources, in the cloud:

  • The Google Cloud Platform Console, which is a web-based user interface.
  • The gcloud command-line tool, which provides a superset of the functionality that Cloud Platform Console offers.
  • Client libraries, which provide APIs for accessing services and management of resources. Client libraries are useful when building your own tools.

GCP services

SAP deployments typically utilize some or all of the following GCP services:

Service Description
VPC Networking Connects your VM instances to each other and to the Internet. Each instance is a member of either a legacy network with a single global IP range, or a recommended subnet network, where the instance is a member of a single subnetwork that is a member of a larger network. Note that a network cannot span GCP projects, but a GCP project can have multiple networks.
Compute Engine Creates and manages VMs with your choice of operating system and software stack.
Persistent disks Persistent disks are available as either standard hard disk drives (HDD) or solid-state drives (SSD).
Google Cloud Platform Console Browser-based tool for managing Compute Engine resources. Use a template to describe all of the Compute Engine resources and instances you need. You don't have to individually create and configure the resources or figure out dependencies, because the Cloud Platform Console does that for you.
Google Cloud Storage You can back up your SAP database backups into Cloud Storage for added durability and reliability, with replication.
Stackdriver Monitoring Provides visibility into the performance, uptime, and health of Compute Engine, network, and persistent disks.

Stackdriver collects metrics, events, and metadata from GCP and uses these to generate insights through dashboards, charts, and alerts. You can monitor the compute metrics at no cost through Stackdriver Monitoring.
Cloud IAM Provides unified control over permissions for GCP resources. Control who can perform control-plane operations on your VMs, including creating, modifying, and deleting VMs and persistent disks, and creating and modifying networks.

Pricing and quotas

You can use the pricing calculator to estimate your usage costs. For more pricing information, see Compute Engine pricing and Cloud Storage pricing.

GCP resources are subject to quotas. If you plan to use high-CPU or high-memory machines, you might need to request additional quota. For more information, see Compute Engine resource quotas.

Resource requirements

VM types

The following VM types are officially supported by SAP for production use on GCP.

GCP Instance Type vCPU Memory(GiB) Operating System CPU Platform
n1-highmem-32 32 208 SLES 12 SP1
SLES 12 SP1 for SAP
SLES 12 SP2 for SAP
Intel Broadwell
n1-highmem-64 64 416 SLES 12 SP1
SLES 12 SP1 for SAP
SLES 12 SP2 for SAP
Intel Broadwell
n1-highmem-96 96 624 SLES 12 SP1
SLES 12 SP1 for SAP
SLES 12 SP2 for SAP
Intel Skylake

All instance types are supported for a scale-out scenario for production, with 15 additional worker nodes, totaling 16 nodes.

For more information about different instance types and their use cases, see machine types.

Storage configuration

SAP HANA is an in-memory database, so data is mostly stored and processed in memory. Protection against data loss is provided by saving the data to a persistent storage location.

To achieve optimal performance, the storage solution used for SAP HANA data and log volumes should meet SAP's storage KPIs. Google has worked with SAP to certify SSD persistent disks for use as the storage solution for SAP HANA workloads, as long as you use one of the supported VM types. VMs with 32 or more vCPUs and a 1.7 TiB volume for data and log files can achieve up to 400 MB/sec for writes, and 800 MB/sec for reads.

Storage for SAP HANA backup is configured with standard HDD persistent disks. Standard HDD persistent disks are efficient and economical for handling sequential read-write operations, but are not optimized to handle high rates of random input-output operations per second (IOPS). SAP HANA uses sequential IO with large blocks to back up the database. Standard HDD persistent disks provide a low-cost, high-performance option for this scenario.

The SAP HANA backup volume size is designed to provide optimal baseline and burst throughput as well as the ability to hold several backup sets. Holding multiple backup sets in the backup volume makes it easier to recover your database if necessary.

Memory configuration

See the supported VM types table.

Operating system configuration

See the supported VM types table.

For more information, see the SAP Note on supported operating systems.

Pricing and quotas

You are responsible for the costs incurred for using the resources created by following this deployment guide. Use the pricing calculator to help estimate your actual costs.


If you have a new GCP account, or if you haven't asked for an increased quota, you will need to do so to complete this guide. View your existing quota , and compare with the following table to see what increase to ask for. You can then request a quota-limit increase.

Instance Type CPU Memory Standard PD SSD PD
n1-highmem-64 (4x) 256 416 GB (4x) 1056 GB (4x) 2.0 TB (4x)
Bastion/NAT gateway 1 3.75 GB 8 GB 0 GB
SAP HANA Studio 1 3.75 GB 50 GB 0 GB


Running SAP HANA on GCP requires you to bring your own license (BYOL). For more information about SAP licensing, contact SAP.

For the purpose of this guide, you can follow the steps to create your SAP HANA instance, and apply your existing license to the instance before the grace period ends.

Deployment architecture

SAP HANA on GCP supports single-node and multi-node architectures.

Single-node architecture

The following diagram shows the single-node architecture. In the diagram, notice both the deployment in GCP and the disk layout. You can use Cloud Storage to back up your local backups available in /hanabackup. This mount should be sized equal to or greater than the data mount.

Deployment Layout

Notice that the VM for SAP HANA has no public IP, which means it cannot be reached from an external network. Instead, the deployment uses a NAT bastion host and SAP HANA Studio for accessing SAP HANA. The SAP HANA Studio instance and the bastion host are deployed in the same subnetwork as the SAP HANA instance.

You provision a Windows host on which you install SAP HANA Studio, with the instance placed in the same subnetwork, and with firewall rules that enable you to connect to the SAP HANA database from SAP HANA Studio.

You deploy SAP HANA using a single-node, scale-up architecture that has the following components:

  • One Compute Engine instance for the SAP HANA database, with SSD persistent disks having a size greater than 1.7 terabytes, and a network bandwidth of up to 16 Gbps. The SSD persistent disk is partitioned and mounted to /hana/data to host the data.

  • An optional, but recommended, subnetwork with a custom topology and IP ranges in the GCP region of your choice. The SAP HANA database and the other Compute Engine instances are launched within this subnetwork. You can use an existing subnetwork for SAP HANA.

  • An optional, but recommended, Internet gateway configured for outbound Internet access for your SAP HANA and other instances. This guide assumes you are using this gateway.

  • Compute Engine firewall rules restricting access to instances.

  • Persistent disk for backup of SAP HANA database.

  • Compute Engine VM, n1-standard-2, with Windows OS to host SAP HANA studio.

  • Compute Engine VM, n1-standard-1 as a bastion host.

  • Automated SAP HANA database installation with a configuration file that you create.

  • SAP HANA Studio.

Multi-node architecture

The following diagram shows the multi-node architecture, which is described in the guide.

Multi-node architecture diagram.

This guide shows you how to set up a multi-node architecture.

As the workload demand increases, especially when using OLAP, a multi-node, scale-out architecture can distribute the load across all nodes.

The scale-out architecture consists of one master node and number of worker nodes. They are inter-connected through a network with a capacity up to 16 Gbps. Each node has its own /hana/data, /hana/log, /usr/sap volumes on SSD persistent disks, which provide consistent, high IOPS, IO services. The master node also serves as an NFS master for /hana/shared and /hanabackup volumes, which is mounted on each worker node. Compute Engine's live migration and automatic instance restart features provide for high availability. For more information, see the SAP HANA Operations Guide.

In the event of a live migration or automatic instance restart event, the protected-persistent-storage-based /hana/shared and /hanabackup volumes can be back online as soon as an instance is up.

Backing up directly to Cloud Storage buckets by using Cloud Storage FUSE is currently not supported. However, if you want to utilize this functionality, you can mount your Cloud Storage volumes to /hanabackup_gcs and create a script to schedule the movement of your backups from /hanabackup to /hanabackup_gcs.

You deploy SAP HANA on a multi-node scale-out architecture with the following components:

  • Deploy one Compute Engine instance referenced in VM types, defining the setup script as detailed later in this guide. This script creates the additional required virtual instances and automatically adds the required SSD and HDD storage to each host, mounted in the correct location. It creates a central NFS location for the shared HANA binaries and /hanabackup location. Finally it automatically installs SAP HANA across the entire cluster.

  • An optional, but recommended, subnetwork with a custom topology and IP ranges in the GCP region of your choice. The SAP HANA database and the other Compute Engine instances are launched within this subnetwork. You can use an existing subnetwork if you prefer.

  • Optional Internet gateway configured for outbound Internet access for your SAP HANA instance and other instances. This guide assumes you are using this gateway.

  • Optional Compute Engine VM: n1-standard-2 with Windows operating system to host SAP HANA Studio.

  • Optional Compute Engine VM: n1-standard-1 as a bastion host.

  • Compute Engine firewall rules to restrict access to Compute Engine instances.

Deploying SAP HANA on GCP

This section shows you how to deploy a 4-node SAP HANA installation on GCP.

Setting up your Google account

A Google account is required to work with GCP.

  1. Sign up for a Google account if you don't already have one.
  2. Log in to the Google Cloud Platform Console, and create a new project.
  3. Enable your billing account.
  4. Configure SSH keys so that you are able to use them to SSH into your Compute Engine instances. Use the gcloud command-line tool to create a new SSH key, or, if you already have an existing SSH key, use the tool to format your existing SSH keys.
  5. Use the gcloud command-line tool or Cloud Platform Console to add the SSH keys to your project metadata. This allows you to access any Compute Engine instance created within this project, except for instances that explicitly disable project-wide SSH keys.

Creating a network and setting up a VPN gateway

When you create a project, a default network is created for your project. However, for security purposes, you should create a new network and specify firewall rules to control who has access.

To set up networking:

  1. Go to Cloud Shell.

    Go to Cloud Shell

  2. To create a new network in the custom subnetworks mode, run:

    gcloud compute networks create [YOUR_NETWORK_NAME] --mode custom

    where [YOUR_NETWORK_NAME] is the name of the new network. The network name can contain only lowercase characters, digits, and the dash character (-).

    Make sure to specify the custom flag instead of using an automatic subnetwork. An automatic subnetwork always has the same assigned IP address range, which can cause issues if you have multiple subnetworks and want to use VPN.

  3. Create a subnetwork, and specify the region and IP range:

    gcloud compute networks subnets create [YOUR_SUBNETWORK_NAME]
            --network [YOUR_NETWORK_NAME] --region [YOUR_REGION] --range [YOUR_RANGE]


    • [YOUR_SUBNETWORK_NAME] is the new subnetwork.
    • [YOUR_NETWORK_NAME] is the name of the network you created in the previous step.
    • [REGION] is the region where you want the subnetwork.
    • [YOUR_RANGE] is the IP address range, specified in CIDR format, such as If you plan to add more than one subnetwork, assign non-overlapping CIDR IP ranges for each subnetwork in the network. Note that each subnetwork and its internal IP ranges are mapped to a single region.
  4. Optionally, repeat the previous step and add additional subnetworks.

Optionally, you can also create a NAT gateway. If you intend to create a VM without a public IP address, you must create a NAT gateway so that your VM can access the Internet to download Google's monitoring agent. If you intend to assign an external public IP address to your VM, you can skip this step.

To create a NAT gateway:

  1. Create a VM to act as the NAT gateway in the subnet you just created:

    gcloud compute instances create [YOUR_VM_NAME] --can-ip-forward \
            --zone [YOUR_ZONE]  --image-family [YOUR_IMAGE_FAMILY] \
            --image-project [YOUR_IMAGE_PROJECT] \
            --machine-type=[YOUR_MACHINE_TYPE] --subnet [YOUR_SUBNETWORK_NAME] \
            --metadata startup-script="sysctl -w net.ipv4.ip_forward=1; iptables \
            -t nat -A POSTROUTING -o eth0 -j MASQUERADE" --tags [YOUR_VM_TAG]


    • [YOUR_VM_NAME] is the name of the VM you are creating that want to use for the NAT gateway.
    • [YOUR_ZONE] is the zone where you want the VM.
    • [YOUR_IMAGE_FAMILY] and [YOUR_IMAGE_PROJECT] specify the image you want to use for the NAT gateway.
    • [YOUR_MACHINE_TYPE] is any supported machine type. If you expect high network traffic, choose a machine type with that has at least eight virtual CPUs.
    • [YOUR_SUBNETWORK_NAME] is the name of the subnetwork where you want the VM.
    • [YOUR_VM_TAG] is a tag that is applied to the VM you are creating. If you use this VM as a bastion host, this tag is used to apply the related firewall rule only to this VM.
  2. Create a route that is tagged so that traffic passes through the NAT VM instead of the default Internet gateway:

    gcloud compute routes create [YOUR_ROUTE_NAME] \
            --network [YOUR_NETWORK_NAME] --destination-range \
            --next-hop-instance [YOUR_VM_NAME] --next-hop-instance-zone \
            [YOUR_ZONE] --tags [YOUR_TAG_NAME] --priority 800


    • [YOUR_ROUTE_NAME] is the name of the route you are creating.
    • [YOUR_NETWORK_NAME] is the network you created.
    • [YOUR_VM_NAME] is the VM you are using for your NAT gateway.
    • [YOUR_ZONE] is the zone where the VM is located.
    • [YOUR_TAG_NAME] is the tag on the route that directs traffic through the NAT VM.
  3. If you also want to use the NAT gateway VM as a bastion host, run the following command. This command creates a firewall rule that allows inbound SSH access to this instance from the Internet:

    gcloud compute firewall-rules create allow-ssh --network [YOUR_NETWORK_NAME] --allow tcp:22 --source-ranges --target-tags "[YOUR_VM_TAG]"


    • [YOUR_NETWORK_NAME] is the network you created.
    • [YOUR_VM_TAG] is the tag you specified when you created the NAT gateway VM. This tag is used so this firewall rule applies only to the VM that hosts the NAT gateway, and not to all VMs in the network.

Downloading SAP HANA

Unless you have already extracted the SAP HANA binaries to a Cloud Storage bucket, download SAP HANA now:

  1. Log into the SAP support portal.

    If your SAP Support Portal account does not allow access to the software and you believe that you should be entitled to the software, contact the SAP Global Support Customer Interaction Center.

  2. In the left navigation pane, choose Installation and Upgrades.

  3. Choose A – Z index. 0 In the Installations and Upgrades window, choose H.
  4. Choose SAP HANA Platform Edition from the list.
  5. Choose SAP HANA Platform Edit. 1.0 or 2.0.
  6. Choose Installation.
  7. In the Downloads windows, find the Linux x86_64 revision you wish to download, and download all applicable parts directly to your local drive. For example, all 3 parts of SAP HANA Platf.Ed.1.0 SPS12 DSP(SAP HANA DB
  8. Use the Cloud Platform Console to create a Cloud Storage bucket for storing the SAP HANA installation files. Note that the bucket name must be unique across GCP.

    • During bucket creation, choose Regional if you plan to create SAP HANA instances in a single region.

      Creating Buckets

    • If you are creating SAP HANA instances in other regions in the same continent, choose Multi-Regional for your storage class. If you are not sure, choose Multi-Regional.

  9. Configure bucket permissions. By default, as owner of the bucket, you have read-write access to the bucket. If you want, you can allow other members in your group or individual users to access your bucket, as shown here:

    Bucket Permissions

  10. In the Cloud Platform Console, in the Cloud Storage bucket page, choose Upload Files to upload the software to your bucket from your local media:

    Upload Files

  11. Note the name of the bucket that you uploaded the binaries to. You need to use it later when you install SAP HANA.

  12. Create a text file named install.cfg, which is used later by an install script to configure your SAP HANA installation, and add the following lines:

    # SAP HANA System ID
    # Instance Number
    # SAP Host Agent User (sapadm) Password
    # System Administrator Password
    # Database User (SYSTEM) Password
    Restart system after machine reboot? ( Default: n )

    Replace [SID] with an existing SAP System ID, or with a compliant string such as H1D. Replace the three password fields with existing or newly-generated values.

  13. Upload install.cfg to the root of the bucket you created.

  14. Delete the install.cfg file from your local machine as a security precaution, because it contains password information.

Creating a VM with SAP HANA installed

The following instructions create an SAP-certified n1-highmem-64 instance with all of the required disk configuration and install SAP HANA. Please refer to pricing section to understand the costs.

  1. Navigate to Cloud Shell.


  2. Set the follow environment variables. Replace [YOUR_BUCKET] with your bucket name.

    export INSTANCE_NAME="saphana01"
    export INSTANCE_TYPE="n1-highmem-64"
    export NETWORK_NAME="sapnetwork1"
    export ZONE="us-west1-a"
    export ADDITIONAL_NODES="3"
    export CPU_PLATFORM="Intel Broadwell"
    export LINUX_VERSION="SLES 12 SP1"

    Setting ADDITIONAL_NODES to 3 deploys 4 instances, and creates a HANA scale-out cluster.

  3. Create the instances:

    curl | bash

    The above command specifies a startup script that initates after VM creation completes. The script downloads the SAP HANA software from your bucket, and installs the software using the values specified in install.cfg. The script takes approximately 10 to 15 minutes to complete.

Verifying the SAP HANA installation

  1. After approximately 15 minutes has passed, navigate to the Storage Browser.


    Click the name of your bucket to access the contents.

  2. Look for a logs/ folder. If the folder does not appear, click the Refresh text every minute until it does. The startup script creates this folder after the script completes. Click the logs/ folder to access the contents.

  3. Click the file name that appears in the directory.

  4. Read the output to ensure that no errors occurred. If you see a quota error, ensure you've followed the setup steps.

  5. From your Cloud Shell window, SSH into the VM and change to the root user.

    gcloud compute ssh saphana01 --zone us-west1-a

    sudo su -

  6. At the command prompt, enter df -h. Ensure that you see output similar to the following, such as the /hana/data directory.

    Data volumes created by the script.

  7. Change to the SAP admin user. Replace [SID] with the value from the install.cfg file.

    su - [SID]adm

  8. Ensure that SAP HANA services are running on the instance.

    HDB info

If any of the above validation steps show that the installation failed, delete the instance and the disks, then re-run the create instances command. You need to delete the logs folder in the Cloud Storage bucket before re-running the command, as the startup script does not create multiple log files.

Completing the SAP HANA installation

  1. Add tags to all instances, including the worker nodes:

    export INSTANCE_NAME="saphana01"
    export NETWORK_NAME="sapnetwork1"
    export ZONE="us-west1-a"
    export TAG="private-hana-instance"

    gcloud compute instances add-tags "$INSTANCE_NAME" --tags="$TAG" --zone=$ZONE
    gcloud compute instances add-tags "$INSTANCE_NAME"w1 --tags="$TAG" --zone=$ZONE
    gcloud compute instances add-tags "$INSTANCE_NAME"w2 --tags="$TAG" --zone=$ZONE
    gcloud compute instances add-tags "$INSTANCE_NAME"w3 --tags="$TAG" --zone=$ZONE

  2. Delete external IPs:

    gcloud compute instances delete-access-config "$INSTANCE_NAME" --access-config-name "external-nat" --zone=$ZONE
    gcloud compute instances delete-access-config "$INSTANCE_NAME"w1 --access-config-name "external-nat" --zone=$ZONE
    gcloud compute instances delete-access-config "$INSTANCE_NAME"w2 --access-config-name "external-nat" --zone=$ZONE
    gcloud compute instances delete-access-config "$INSTANCE_NAME"w3 --access-config-name "external-nat" --zone=$ZONE

Creating a Windows VM for SAP HANA Studio

  1. Use the Cloud Shell to invoke the following commands.


    export NETWORK_NAME="sapnetwork1"
    export REGION="us-west1"
    export ZONE="us-west1-a"

    gcloud compute instances create "saphanastudio" --zone $ZONE --machine-type "n1-standard-2" --subnet $SUBNET --metadata "tag1=hanastudio" --image "windows-server-2012-r2-dc-v20170117" --image-project "windows-cloud" --boot-disk-size "100" --boot-disk-type "pd-standard" --boot-disk-device-name "saphanastudio"

    gcloud compute firewall-rules create ${NETWORK_NAME}-allow-rdp --network $NETWORK_NAME --allow tcp:3389 --source-ranges --target-tags "hanastudio"

    The above commands create a Windows server in the subnetwork you created earlier, with a firewall rule to allow access to the instance through Remote Desktop Protocol(RDP). Although not shown in this guide, you can whitelist your customer IP address range in the firewall rules.

  2. Install SAP HANA Studio on this server.

Setting up Google's monitoring agent for SAP HANA

Optionally, you can set up Google's monitoring agent for SAP HANA, which collects metrics from SAP HANA and sends them to Stackdriver Monitoring. Stackdriver Monitoring allows you to create dashboards for your metrics, set up custom alerts based on metric thresholds, and more. For more information on setting up and configuring Google's monitoring agent for SAP HANA, see the SAP HANA Monitoring Agent User Guide.

Connecting to SAP HANA

Note that because these instructions don't use an external IP for SAP HANA, you can only connect to the SAP HANA instances through the bastion instance using SSH or through the Windows server through SAP HANA Studio.

  • To connect to SAP HANA through the bastion instance, connect to the bastion host, and then to the SAP HANA instance(s) by using an SSH client of your choice.

  • To connect to the SAP HANA database through SAP HANA Studio, use a remote desktop client to connect to the Windows Server instance. After connection, manually install SAP HANA Studio and access your SAP HANA database.

Performing post-deployment tasks

Before using your SAP HANA instance, we recommend that you perform the following post-deployment steps. For mor information, see SAP HANA Installation and Update Guide.

  1. Update the SAP HANA software with the latest patches.

  2. Install any additional components such as Application Function Libraries (AFL) or Smart Data Access (SDA).

  3. Configure and backup your new SAP HANA database. For more information, see the SAP HANA operations guide.


Google Cloud Platform customers with Gold or Platinum Support can request assistance with SAP HANA provisioning and configuration questions on Compute Engine. You can find additional information about support options at the Google Cloud Support page.

You can also contact SAP support for SAP-related issues. SAP does the initial evaluation of the support ticket and transfers the ticket through to the Google queue if SAP considers it an infrastructure issue.

What's next

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...