How do I configure Xendump on Red Hat Enterprise Linux 5?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 5 Xen host
  • Red Hat Enterprise Linux para-virt Xen guest

Issue

  • How do I configure Xendump on Red Hat Enterprise Linux 5?
  • How do I capture a vmcore from a Red Hat Enterprise Linux para-virtualized Xen guest?

Resolution

Use the following steps to configure Xendump:

  1. Enable the automatic Xendump facility for para-virt guests. Edit /etc/xen/xend-config.sxp and change the following line

    #(enable-dump no)
    

    to:

    (enable-dump yes)
    
  2. Restart the xen daemon:

    # service xend restart
    
  3. To make sure that Xendump works, start a Xen guest:

    # xm create /etc/xen/<domain>
    
  4. Capture a vmcore by typing:

    # xm dump-core <domain-name> <vmcore-file>
    

The vmcore file can then be found under /var/lib/xen/dump/

Take note that, right now, Xendump can be configured to capture vmcore dumps of para-virtualized (PV) Xen guests automatically upon a crash. However, vmcore dumps from fully-virtualized (FV) Xen guests can only be taken manually by running the xm dump-core command. Also note the xm dump-core command does not need enable-dump yes set to allow manual dumps.

Root Cause

Xendump is a facility for capturing vmcore dumps from Xen guests. It is built-in to the Xen Hypervisor. Vmcore dumps are useful for analysing system crashes, using the tool crash. Crash is similar to traditional Unix crash tool, and it provides stack traces and other debugging functionality for locating problem areas causing the crashes. A similar facility, but meant for non Xen-enabled kernels, is called Kdump. To find out more about how Kdump works, please read How do I configure kexec/kdump on Red Hat Enterprise Linux 5?

Components
Tags

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.