krish – 起死回生 [Wake up from death & return to life.]

September 28, 2011

Core dump Xen domU/guests

Filed under: Free / Open Source — krish @ 7:39 pm
Tags: , , , , , , , , , , ,

If you’ve been wondering why on_crash='coredump-restart' or on_crash='coredump_restart'(as per some manuals) doesnt work or gives you
“Error: Invalid event handling mode: crash”, here’s why:

I spend hours looking for the answer, and no one one ##xen would also tell me why (asked multiple times, and idled long enough)..and after breaking my head for hours I found the answer.
So listen carefully 🙂

A. Xendump can be configured to capture vmcore dumps of para-virtualized (PV) Xen domU/guests automatically upon a crash. ie., by using on_crash=’coredump-restart’

B. Core dumps from fully-virtualized (FV) Xen domU/guests can only be taken manually by running the `xm dump-core` command.


Here’s a detailed how-to on enabling coredump for Xen domU/guest:


1. On the dom0/Xenserver, edit /etc/xen/xend_config.sxp and uncomment
# (enable-dump no)
and make it
(enable-dump yes)

2. Restart Xend (depending on whether you use init.d scripts or service utility)
# /etc/init.d/xend restart
# service xend restart

3. On the domU/Guest, edit domU.cfg (domU’s configuration file) and add/edit line

#If your domU is fully-virtualized


#If your domU is para-virtualized

4. Start domU

# xm create /path/to/domU.cfg

5. Now, if your domU/guest is para-virtualized, login to the domU and

Check if kernel.panic key is true
# sysctl -A | grep -e kernel | grep -e panic

Set them if they are not
# sysctl -w kernel.panic=1
# sysctl -w kernel.panic_on_oops=1

6. Test it from inside domU/Guest. (Para-Virtualized Guest)
Warning: The next line of code will crash your domU for test.

# echo "c" >/proc/sysrq-trigger

Note: The above command is a way of invoking magic sysrq
a. It will not work if sysrq is disabled on the box
b. NO. I am not gonna talk about magic sysrq’s in this post; or even how to find if its disabled 🙂

7. Test it from dom0/Xenserver. (Fully-Virtualized Guest)
Warning: The next line of code will crash your domU for test.

# xm dump-core -C

8. Above steps 6/7 will dump vmcore to /var/xen/dump (default directory unless you have changed it)
Oh, BTW, make sure you create that directory if it doesn’t exists before taking the dump 😀

Enjoy analyzing the dump 😉


  1. sounds greek to me 🙂

    Comment by Manish — September 28, 2011 @ 9:02 pm

  2. Oh no my friend, it is Latin 😉

    Comment by krish — September 29, 2011 @ 8:33 am

  3. I always spent my half an hour to read this web site’s posts daily along with a mug of coffee.

    Comment by myds — May 29, 2013 @ 1:21 am

  4. […] -c <cap>/-w <weight>#priority xm migrate -l <vm> <server> xen coredump is here (xm dump-core/on_crash='coredump-restart') Good Luck! (adsbygoogle = window.adsbygoogle || […]

    Pingback by xen tips - Take hold of IT technology trends - learn, practice, troubleshoot, blog — December 28, 2015 @ 2:16 pm

RSS feed for comments on this post. TrackBack URI

Please leave a Reply / Discuss this topic here :)

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

The Male Factor (TMF)

Serving MANkind

Rough Draft

by Atteris Amarth and Darrek Ringo

The Kochi Post.

Read by all + Influenced by none


A signature of Kiran


This blog is just for additional and extension share of it's main frames. No activity is planned from here

krish - 起死回生 [Wake up from death & return to life.]

Get a sneak peek into krish's life, work and passion. is the best place for your personal blog or business site.

A Tale of Two and a Half

Monika Amita Bakshi

%d bloggers like this: