Setting up vhostmd monitoring daemon for SAP

Solution Unverified - Updated

Environment

  • SAP running in Red Hat Enterprise Linux 5 or 6 guest on Red Hat Enterprise Linux 5 or 6 host
  • Red Hat Enterprise Linux for SAP Applications

Issue

  • Instructions for setting up vhostmd required by SAP

Resolution

  1. Preparation:
    1. Customers require subscriptions for "Red Hat Enterprise Linux for SAP Applications"
    2. This content is not included.Subscribe both the Host and the Guest to the channel called "RHEL AP for SAP"
  2. Verify that the "RHEL for SAP" channel is available on the host and guest:
    [root@host|guest]# yum repolist
    ...
    rhel-x86_64-server-sap-6  RHEL for SAP (v. 6 for 64-bit x86_64)
    ...
    
  3. Install the package vhostmd on the host:
    [root@host]# yum install vhostmd
    
  4. Enable the vhostmd service:
    [root@host]# chkconfig vhostmd on
    
  5. Start the vhostmd service:
    [root@host]# service vhostmd start
    
  6. Install the package vm-dump-metrics on the guest:
    [root@guest]# yum install vm-dump-metrics
    
  7. Attach the /dev/shm/vhostmd0 to the guest as a block device with the This content is not included.procedure described in the Virtualization Guide.
    1. If you are using KVM on RHEL5 or RHEL6, the Content from service.sap.com is not included.SAP Note 1400911 (SAP Service Marketplace account required) explains everything nicely.
    2. If you are using Xen on RHEL5 in combination with libvirt:
      1. create an XML file (vhostmd-xen.xml) for the vhostmd-disk:
            <disk type='file' device='disk'>
              <driver name='file'/>
              <source file='/dev/shm/vhostmd0'/>
              <target dev='xvdm' bus='xen'/>
              <readonly/>
            </disk>
        
      2. attach the device on the running guest:
        [root@host]# virsh attach-device <guest-name> vhostmd-xen.xml --persistent
        
    3. If you are using Xen on RHEL5, without libvirt (not supported by SAP by default, the vhostmd-configuration needs to be updated):
      1. edit the configuration of your domU under /etc/xen/<guest>
      2. update the line that contains the disks, and add one disk like
        disk = [ ..., "file:/dev/shm/vhostmd0,xvdm,r" ]
        
      3. attach the new disk on the running guest with:
        [root@host]# xm block-attach <guest> file:/dev/shm/vhostmd0 xvdm r
        
After the configuration, the command vm-dump-metrics shows the information from the host:
[root@guest]# vm-dump-metrics | head
<metrics>
  <metric type='real64' context='host'>
    <name>TotalCPUTime</name>
    <value>351.560000
</value>
  </metric>
  <metric type='uint64' context='host'>
    <name>PagedOutMemory</name>
    <value>0
</value>

Root Cause

When running production SAP systems as RHEL KVM or Xen guests, SAP requires that certain metrics from the host can be read from within the guests running SAP.

Components
Category

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.