Configuring SAP Monitoring with vhostmd in RHV

Solution Verified - Updated -


  • Red Hat Virtualization 3.x
  • Red Hat Virtualization 4.x


  • How to setup vhostmd to monitor SAP in Red Hat Virtualization?


  • Machine monitoring for SAP applications uses the vhostmd VDSM hook, which is provided to hosts by the vdsm-hook-vhostmd package. Red Hat Virtualization Hypervisor hosts (RHV-H) & Red Hat Enterprise Linux hosts include the vdsm-hook-vhostmd package as an optional installable package in the RHV-H and RHEL channels, respectively, so the user will need to manually install vdsm-hook-vhostmd on the hosts as needed.
  • The VM running SAP Netweaver must be subscribed to Red Hat Enterprise Linux for SAP Solutions subscription.

Install the needed packages on the Hypervisor host

The following steps illustrate how to:

  • install the vdsm-hook-vhostmd package on the host
  • enable SAP monitoring for a virtual machine
  • verify the monitoring.

As root, install the vdsm-hook-vhostmd package on the host:

    # yum install vdsm-hook-vhostmd

Enable SAP Monitoring for a Virtual Machine

The following steps demonstrate how to enable SAP monitoring for a virtual machine using the Red Hat Enterprise Virtualization administration portal.

  1. Select the virtual machine to be monitored from the Virtual Machines tab.
  2. Shutdown the virtual machine.
  3. Click the Edit button to display the Edit Virtual Machine dialog.
  4. Select the Custom Properties tab.
  5. In the Custom Properties text field, select sap_agent and set this to true, then Click OK:

    Screenshot from RHV showing the Custom Properties Settings

  6. Start the virtual machine.

You have now enabled monitoring of a virtual machine for use with SAP. Repeat the procedure for each virtual machine that is part of the SAP environment. The Custom Properties tab is also available from the New Virtual Machine dialog. SAP monitoring can be enabled for new virtual machines by following this procedure at the time of the virtual machine creation.

Verify the SAP Monitoring.

The following steps can be used to verify the SAP monitoring on your virtual machines. There are two methods that can be utilized, Virtual Disk and Virtio-Serial, to retrieve the metrics data. Virtual Disk is the legacy option which transports the data via a virtual disk and Virtio-Serial is a new method which is more secure and transports the data via a virtio-serial device.

  1. Install the vm-dump-metrics package on the virtual machine:

    # yum install vm-dump-metrics
  2. Run the vm-dump-metrics--vbd command on the virtual machine to verify that the XML with the host metrics is accessible from the guest using the Virtual Disk configuration:

    # vm-dump-metrics--vbd
  3. Run the vm-dump-metrics --virtio command on the virtual machine to verify that the XML with the host metrics is accessible from the guest using the Virtio-Serial configuration:

    # vm-dump-metrics --virtio

Further information can be found in the RHV 3.0 Administration Guide Appendix.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.