This guide shows you how to configure the guest operating system (OS) on
Compute Engine bare metal instances for the optimal running of SAP HANA
workloads, by using Google Cloud's Agent for SAP.
To seamlessly perform the required guest OS configurations on bare metal
instances such as X4, you run the configureinstance command of
Google Cloud's Agent for SAP.
This guide is meant for SAP Basis and SAP system administrators who want to run
their SAP workloads on Compute Engine bare metal instances.
Before you begin
Deploy a bare metal instance, such as X4.
For information about the Compute Engine bare metal machine types that
you can use to run SAP HANA on Google Cloud, the OS versions that you
can use, and information about block storage configuration, see
Bare metal machine types for SAP HANA.
In some scenarios, you can improve the performance of OLTP based SAP HANA
workloads by disabling hyperthreading on the underlying X4 instances.
For more information, see
Hyperthreading.
To disable hyperthreading for your X4 instance by using
Google Cloud's Agent for SAP, complete the following steps:
Connect to your X4 instance by using SSH or your preferred method.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Configure guest OS on Compute Engine bare metal instances\n\n\u003cbr /\u003e\n\nThis guide shows you how to configure the guest operating system (OS) on\nCompute Engine bare metal instances for the optimal running of SAP HANA\nworkloads, by using Google Cloud's Agent for SAP.\n\nTo seamlessly perform the required guest OS configurations on bare metal\ninstances such as X4, you run the `configureinstance` command of\nGoogle Cloud's Agent for SAP.\n\nThis guide is meant for SAP Basis and SAP system administrators who want to run\ntheir SAP workloads on Compute Engine bare metal instances.\n\nBefore you begin\n----------------\n\n- Deploy a bare metal instance, such as X4.\n\n For information about the Compute Engine bare metal machine types that\n you can use to run SAP HANA on Google Cloud, the OS versions that you\n can use, and information about block storage configuration, see\n [Bare metal machine types for SAP HANA](/sap/docs/sap-hana-planning-guide#x4-machines-for-hana).\n\n For information about how to deploy a bare metal instance, see\n [Create a bare metal instance from a public image](/compute/docs/instances/create-start-instance#baremetal).\n- Make sure that version 3.9 (latest) of\n Google Cloud's Agent for SAP is installed on your bare metal instance.\n\n For information about how to install the agent on a compute instance, see\n [Install and configure Google Cloud's Agent for SAP on a Compute Engine instance](/sap/docs/agent-for-sap/latest/install-config-on-vm).\n\nConfigure the guest OS on your bare metal instance\n--------------------------------------------------\n\n1. Connect to your bare metal instance by using SSH or your preferred method.\n\n2. Check whether the OS on your bare metal instance is optimally configured to\n run SAP HANA workloads:\n\n ```\n sudo /usr/bin/google_cloud_sap_agent configureinstance -check\n ```\n\n The command output informs if any OS configurations are needed. For\n information about the OS packages that X4 instances need to run SAP HANA, see\n the following file in the agent's read-only repository on GitHub:\n [GoogleCloudPlatform/sapagent/internal/onetime/configureinstance/configurex4.go](https://github.com/GoogleCloudPlatform/sapagent/blob/main/internal/onetime/configureinstance/configurex4.go).\n3. If the preceding command output mentions that OS configurations are required,\n then apply them:\n\n ```\n sudo /usr/bin/google_cloud_sap_agent configureinstance -apply\n ```\n4. Restart your bare metal instance.\n\n5. Optionally, to view information about the OS configurations that the agent\n performed on your bare metal instance, see the following log file:\n\n ```\n /var/log/google-cloud-sap-agent/configureinstance.log\n ```\n\nDisable hyperthreading for an X4 instance\n-----------------------------------------\n\nIn some scenarios, you can improve the performance of OLTP based SAP HANA\nworkloads by disabling hyperthreading on the underlying X4 instances.\nFor more information, see\n[Hyperthreading](/sap/docs/sap-hana-planning-guide#hyperthreading).\n\nTo disable hyperthreading for your X4 instance by using\nGoogle Cloud's Agent for SAP, complete the following steps:\n\n1. Connect to your X4 instance by using SSH or your preferred method.\n\n2. Disable hyperthreading for your X4 instance:\n\n ```\n sudo /usr/bin/google_cloud_sap_agent configureinstance -apply -hyperThreading=\"off\"\n ```\n3. Restart your X4 instance."]]