The Xen Port of Kexec / Kdump A short introduction and status report - - PowerPoint PPT Presentation

the xen port of kexec kdump
SMART_READER_LITE
LIVE PREVIEW

The Xen Port of Kexec / Kdump A short introduction and status report - - PowerPoint PPT Presentation

The Xen Port of Kexec / Kdump A short introduction and status report Magnus Damm Simon Horman VA Linux Systems Japan K.K. www.valinux.co.jp/en/ Xen Summit, September 2006 Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit,


slide-1
SLIDE 1

The Xen Port of Kexec / Kdump

A short introduction and status report Magnus Damm Simon Horman

VA Linux Systems Japan K.K. www.valinux.co.jp/en/

Xen Summit, September 2006

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 1 / 17

slide-2
SLIDE 2

Outline

Introduction to Kexec What is Kexec? Kexec Examples Kexec Overview Introduction to Kdump What is Kdump? Kdump Kernels The Crash Utility Xen Porting Effort Kexec under Xen Kdump under Xen The Dumpread Tool Partial Dumps Current Status

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 2 / 17

slide-3
SLIDE 3

Introduction to Kexec

Outline

Introduction to Kexec What is Kexec? Kexec Examples Kexec Overview Introduction to Kdump What is Kdump? Kdump Kernels The Crash Utility Xen Porting Effort Kexec under Xen Kdump under Xen The Dumpread Tool Partial Dumps Current Status

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 3 / 17

slide-4
SLIDE 4

Introduction to Kexec What is Kexec?

What is Kexec?

“kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot but it is indepedent of the system firmware...”

Configuration help text in Linux-2.6.17

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 4 / 17

slide-5
SLIDE 5

Introduction to Kexec What is Kexec?

What is Kexec?

“kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot but it is indepedent of the system firmware...”

Configuration help text in Linux-2.6.17

Kexec allows you to reboot from Linux into any kernel. . .

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 4 / 17

slide-6
SLIDE 6

Introduction to Kexec What is Kexec?

What is Kexec?

“kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot but it is indepedent of the system firmware...”

Configuration help text in Linux-2.6.17

Kexec allows you to reboot from Linux into any kernel. . . . . . as long as the new kernel doesn’t depend on the BIOS for setup.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 4 / 17

slide-7
SLIDE 7

Introduction to Kexec Kexec Examples

Kexec Examples

Below are a few examples on how to use Kexec to reboot into. . .

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 5 / 17

slide-8
SLIDE 8

Introduction to Kexec Kexec Examples

Kexec Examples

Below are a few examples on how to use Kexec to reboot into. . . Linux

◮ kexec vmlinux –append=”root=/dev/hda3”

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 5 / 17

slide-9
SLIDE 9

Introduction to Kexec Kexec Examples

Kexec Examples

Below are a few examples on how to use Kexec to reboot into. . . Linux

◮ kexec vmlinux –append=”root=/dev/hda3” ◮ kexec bzImage –append=”ip=on” –initrd=initramfs.cpio.gz

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 5 / 17

slide-10
SLIDE 10

Introduction to Kexec Kexec Examples

Kexec Examples

Below are a few examples on how to use Kexec to reboot into. . . Linux

◮ kexec vmlinux –append=”root=/dev/hda3” ◮ kexec bzImage –append=”ip=on” –initrd=initramfs.cpio.gz

Xen

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 5 / 17

slide-11
SLIDE 11

Introduction to Kexec Kexec Examples

Kexec Examples

Below are a few examples on how to use Kexec to reboot into. . . Linux

◮ kexec vmlinux –append=”root=/dev/hda3” ◮ kexec bzImage –append=”ip=on” –initrd=initramfs.cpio.gz

Xen

◮ kexec -t multiboot-x86 /xen.gz

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 5 / 17

slide-12
SLIDE 12

Introduction to Kexec Kexec Examples

Kexec Examples

Below are a few examples on how to use Kexec to reboot into. . . Linux

◮ kexec vmlinux –append=”root=/dev/hda3” ◮ kexec bzImage –append=”ip=on” –initrd=initramfs.cpio.gz

Xen

◮ kexec -t multiboot-x86 /xen.gz

–append="/xen.gz com1=115200,8n1,0x3f8"

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 5 / 17

slide-13
SLIDE 13

Introduction to Kexec Kexec Examples

Kexec Examples

Below are a few examples on how to use Kexec to reboot into. . . Linux

◮ kexec vmlinux –append=”root=/dev/hda3” ◮ kexec bzImage –append=”ip=on” –initrd=initramfs.cpio.gz

Xen

◮ kexec -t multiboot-x86 /xen.gz

–append="/xen.gz com1=115200,8n1,0x3f8" –module="/vmlinuz console=ttyS0,115200 ip=on"

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 5 / 17

slide-14
SLIDE 14

Introduction to Kexec Kexec Examples

Kexec Examples

Below are a few examples on how to use Kexec to reboot into. . . Linux

◮ kexec vmlinux –append=”root=/dev/hda3” ◮ kexec bzImage –append=”ip=on” –initrd=initramfs.cpio.gz

Xen

◮ kexec -t multiboot-x86 /xen.gz

–append="/xen.gz com1=115200,8n1,0x3f8" –module="/vmlinuz console=ttyS0,115200 ip=on" –module="/initramfs.cpio.gz"

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 5 / 17

slide-15
SLIDE 15

Introduction to Kexec Kexec Overview

Kexec Overview

Kexec is a combination of kernel code and user space code:

◮ Linux kernel support available through CONFIG_KEXEC. ◮ kexec-tools provides the user space tool kexec.

◮ http://www.xmission.com/~ebiederm/files/kexec/ Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 6 / 17

slide-16
SLIDE 16

Introduction to Kexec Kexec Overview

Kexec Overview

Kexec is a combination of kernel code and user space code:

◮ Linux kernel support available through CONFIG_KEXEC. ◮ kexec-tools provides the user space tool kexec.

◮ http://www.xmission.com/~ebiederm/files/kexec/

Supported architectures:

◮ i386, x86_64, PowerPC/PPC, s390, SH are all in Linux-2.6.17. ◮ ia64 support is currently under development.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 6 / 17

slide-17
SLIDE 17

Introduction to Kexec Kexec Overview

Kexec Overview

Kexec is a combination of kernel code and user space code:

◮ Linux kernel support available through CONFIG_KEXEC. ◮ kexec-tools provides the user space tool kexec.

◮ http://www.xmission.com/~ebiederm/files/kexec/

Supported architectures:

◮ i386, x86_64, PowerPC/PPC, s390, SH are all in Linux-2.6.17. ◮ ia64 support is currently under development.

Development:

◮ Discussions take place on the fastboot mailing list.

◮ https://lists.osdl.org/mailman/listinfo/fastboot

◮ Many patches available for kexec-tools.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 6 / 17

slide-18
SLIDE 18

Introduction to Kdump

Outline

Introduction to Kexec What is Kexec? Kexec Examples Kexec Overview Introduction to Kdump What is Kdump? Kdump Kernels The Crash Utility Xen Porting Effort Kexec under Xen Kdump under Xen The Dumpread Tool Partial Dumps Current Status

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 7 / 17

slide-19
SLIDE 19

Introduction to Kdump What is Kdump?

What is Kdump?

Kdump is a Kexec-based crash dumping solution.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 8 / 17

slide-20
SLIDE 20

Introduction to Kdump What is Kdump?

What is Kdump?

Kdump is a Kexec-based crash dumping solution. What is a crash dump then?

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 8 / 17

slide-21
SLIDE 21

Introduction to Kdump What is Kdump?

What is Kdump?

Kdump is a Kexec-based crash dumping solution. What is a crash dump then? A crash dump is similar to a core dump:

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 8 / 17

slide-22
SLIDE 22

Introduction to Kdump What is Kdump?

What is Kdump?

Kdump is a Kexec-based crash dumping solution. What is a crash dump then? A crash dump is similar to a core dump:

◮ A core dump represents the contents of a process.

◮ User space register contents and virtual memory.

◮ A crash dump represents the contents of the kernel.

◮ Register contents and physical memory. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 8 / 17

slide-23
SLIDE 23

Introduction to Kdump What is Kdump?

What is Kdump?

Kdump is a Kexec-based crash dumping solution. What is a crash dump then? A crash dump is similar to a core dump:

◮ A core dump represents the contents of a process.

◮ User space register contents and virtual memory.

◮ A crash dump represents the contents of the kernel.

◮ Register contents and physical memory.

Kdump is used to extract a crash dump from a crashed machine.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 8 / 17

slide-24
SLIDE 24

Introduction to Kdump What is Kdump?

What is Kdump?

Kdump is a Kexec-based crash dumping solution. What is a crash dump then? A crash dump is similar to a core dump:

◮ A core dump represents the contents of a process.

◮ User space register contents and virtual memory.

◮ A crash dump represents the contents of the kernel.

◮ Register contents and physical memory.

Kdump is used to extract a crash dump from a crashed machine. The crash utility is later on used to analyze the crash dump.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 8 / 17

slide-25
SLIDE 25

Introduction to Kdump Kdump Kernels

Kdump Kernels

A Kdump enabled setup requires two kernels.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 9 / 17

slide-26
SLIDE 26

Introduction to Kdump Kdump Kernels

Kdump Kernels

A Kdump enabled setup requires two kernels.

◮ Primary kernel:

◮ Regular Linux kernel.

◮ Secondary kernel:

◮ “Crash kernel” which is used to retrieve the crash dump. ◮ Started by the primary kernel when a panic occurs. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 9 / 17

slide-27
SLIDE 27

Introduction to Kdump Kdump Kernels

Kdump Kernels

A Kdump enabled setup requires two kernels.

◮ Primary kernel:

◮ Regular Linux kernel. ◮ Booted with “crashkernel=” to reserve a physical memory window.

◮ Secondary kernel:

◮ “Crash kernel” which is used to retrieve the crash dump. ◮ Started by the primary kernel when a panic occurs. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 9 / 17

slide-28
SLIDE 28

Introduction to Kdump Kdump Kernels

Kdump Kernels

A Kdump enabled setup requires two kernels.

◮ Primary kernel:

◮ Regular Linux kernel. ◮ Booted with “crashkernel=” to reserve a physical memory window.

◮ Secondary kernel:

◮ “Crash kernel” which is used to retrieve the crash dump. ◮ Started by the primary kernel when a panic occurs. ◮ Runs in the reserved physical address window. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 9 / 17

slide-29
SLIDE 29

Introduction to Kdump Kdump Kernels

Kdump Kernels

A Kdump enabled setup requires two kernels.

◮ Primary kernel:

◮ Regular Linux kernel. ◮ Booted with “crashkernel=” to reserve a physical memory window. ◮ Configured with CONFIG_KEXEC=y.

◮ Secondary kernel:

◮ “Crash kernel” which is used to retrieve the crash dump. ◮ Started by the primary kernel when a panic occurs. ◮ Runs in the reserved physical address window. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 9 / 17

slide-30
SLIDE 30

Introduction to Kdump Kdump Kernels

Kdump Kernels

A Kdump enabled setup requires two kernels.

◮ Primary kernel:

◮ Regular Linux kernel. ◮ Booted with “crashkernel=” to reserve a physical memory window. ◮ Configured with CONFIG_KEXEC=y.

◮ Secondary kernel:

◮ “Crash kernel” which is used to retrieve the crash dump. ◮ Started by the primary kernel when a panic occurs. ◮ Runs in the reserved physical address window. ◮ Configured with CONFIG_CRASH_DUMP=y. ◮ CONFIG_PHYSCIAL_START needs to match crashkernel option. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 9 / 17

slide-31
SLIDE 31

Introduction to Kdump Kdump Kernels

Kdump Kernels

A Kdump enabled setup requires two kernels.

◮ Primary kernel:

◮ Regular Linux kernel. ◮ Booted with “crashkernel=” to reserve a physical memory window. ◮ Configured with CONFIG_KEXEC=y.

◮ Secondary kernel:

◮ “Crash kernel” which is used to retrieve the crash dump. ◮ Started by the primary kernel when a panic occurs. ◮ Runs in the reserved physical address window. ◮ Configured with CONFIG_CRASH_DUMP=y. ◮ CONFIG_PHYSCIAL_START needs to match crashkernel option. ◮ The file /proc/vmcore contains the crash dump. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 9 / 17

slide-32
SLIDE 32

Introduction to Kdump Kdump Kernels

Kdump Kernels

A Kdump enabled setup requires two kernels.

◮ Primary kernel:

◮ Regular Linux kernel. ◮ Booted with “crashkernel=” to reserve a physical memory window. ◮ Configured with CONFIG_KEXEC=y.

◮ Secondary kernel:

◮ “Crash kernel” which is used to retrieve the crash dump. ◮ Started by the primary kernel when a panic occurs. ◮ Runs in the reserved physical address window. ◮ Configured with CONFIG_CRASH_DUMP=y. ◮ CONFIG_PHYSCIAL_START needs to match crashkernel option. ◮ The file /proc/vmcore contains the crash dump.

A patched kexec-tools is required to use Kdump.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 9 / 17

slide-33
SLIDE 33

Introduction to Kdump The Crash Utility

The Crash Utility

The crash utility is used to analyze crash dumps.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 10 / 17

slide-34
SLIDE 34

Introduction to Kdump The Crash Utility

The Crash Utility

The crash utility is used to analyze crash dumps. By this time the crash dump file /proc/vmcore has been copied to some place where we have access to it.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 10 / 17

slide-35
SLIDE 35

Introduction to Kdump The Crash Utility

The Crash Utility

The crash utility is used to analyze crash dumps. By this time the crash dump file /proc/vmcore has been copied to some place where we have access to it. The crash utility can then be used on the crash dump file to. . .

◮ Extract dmesg from the primary kernel. ◮ List running processes. ◮ Backtrace and debug. ◮ . . .

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 10 / 17

slide-36
SLIDE 36

Introduction to Kdump The Crash Utility

The Crash Utility

The crash utility is used to analyze crash dumps. By this time the crash dump file /proc/vmcore has been copied to some place where we have access to it. The crash utility can then be used on the crash dump file to. . .

◮ Extract dmesg from the primary kernel. ◮ List running processes. ◮ Backtrace and debug. ◮ . . .

More information about crash can be found at: http://people.redhat.com/anderson/crash_whitepaper/

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 10 / 17

slide-37
SLIDE 37

Xen Porting Effort

Outline

Introduction to Kexec What is Kexec? Kexec Examples Kexec Overview Introduction to Kdump What is Kdump? Kdump Kernels The Crash Utility Xen Porting Effort Kexec under Xen Kdump under Xen The Dumpread Tool Partial Dumps Current Status

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 11 / 17

slide-38
SLIDE 38

Xen Porting Effort Kexec under Xen

Kexec under Xen

The Xen port of Kexec allows you to reboot the machine from dom0. . .

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 12 / 17

slide-39
SLIDE 39

Xen Porting Effort Kexec under Xen

Kexec under Xen

The Xen port of Kexec allows you to reboot the machine from dom0. . . . . . in the same way that you reboot using Kexec under Linux.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 12 / 17

slide-40
SLIDE 40

Xen Porting Effort Kexec under Xen

Kexec under Xen

The Xen port of Kexec allows you to reboot the machine from dom0. . . . . . in the same way that you reboot using Kexec under Linux.

◮ Kexec under Xen reboots the physical machine.

◮ This means that the hypervisor and all domains go away.

◮ Kexec can reboot into Xen or into a Linux kernel.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 12 / 17

slide-41
SLIDE 41

Xen Porting Effort Kexec under Xen

Kexec under Xen

The Xen port of Kexec allows you to reboot the machine from dom0. . . . . . in the same way that you reboot using Kexec under Linux.

◮ Kexec under Xen reboots the physical machine.

◮ This means that the hypervisor and all domains go away.

◮ Kexec can reboot into Xen or into a Linux kernel.

The kexec-tools used under Xen are the same as for Linux.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 12 / 17

slide-42
SLIDE 42

Xen Porting Effort Kdump under Xen

Kdump under Xen

Kdump under Xen is similar to the standard Linux implementation.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 13 / 17

slide-43
SLIDE 43

Xen Porting Effort Kdump under Xen

Kdump under Xen

Kdump under Xen is similar to the standard Linux implementation.

◮ Both dom0 kernel panic and hypervisor panic are supported.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 13 / 17

slide-44
SLIDE 44

Xen Porting Effort Kdump under Xen

Kdump under Xen

Kdump under Xen is similar to the standard Linux implementation.

◮ Both dom0 kernel panic and hypervisor panic are supported.

◮ dom0 loads the secondary “crash kernel”. ◮ The secondary kernel starts if dom0 panics or Xen panics. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 13 / 17

slide-45
SLIDE 45

Xen Porting Effort Kdump under Xen

Kdump under Xen

Kdump under Xen is similar to the standard Linux implementation.

◮ Both dom0 kernel panic and hypervisor panic are supported.

◮ dom0 loads the secondary “crash kernel”. ◮ The secondary kernel starts if dom0 panics or Xen panics.

◮ The physical memory range is reserved in the hypervisor.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 13 / 17

slide-46
SLIDE 46

Xen Porting Effort Kdump under Xen

Kdump under Xen

Kdump under Xen is similar to the standard Linux implementation.

◮ Both dom0 kernel panic and hypervisor panic are supported.

◮ dom0 loads the secondary “crash kernel”. ◮ The secondary kernel starts if dom0 panics or Xen panics.

◮ The physical memory range is reserved in the hypervisor.

◮ Range is reserved using Xen command line options

kdump_megabytes and kdump_megabytes_base.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 13 / 17

slide-47
SLIDE 47

Xen Porting Effort Kdump under Xen

Kdump under Xen

Kdump under Xen is similar to the standard Linux implementation.

◮ Both dom0 kernel panic and hypervisor panic are supported.

◮ dom0 loads the secondary “crash kernel”. ◮ The secondary kernel starts if dom0 panics or Xen panics.

◮ The physical memory range is reserved in the hypervisor.

◮ Range is reserved using Xen command line options

kdump_megabytes and kdump_megabytes_base.

Remember /proc/vmcore?

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 13 / 17

slide-48
SLIDE 48

Xen Porting Effort Kdump under Xen

Kdump under Xen

Kdump under Xen is similar to the standard Linux implementation.

◮ Both dom0 kernel panic and hypervisor panic are supported.

◮ dom0 loads the secondary “crash kernel”. ◮ The secondary kernel starts if dom0 panics or Xen panics.

◮ The physical memory range is reserved in the hypervisor.

◮ Range is reserved using Xen command line options

kdump_megabytes and kdump_megabytes_base.

Remember /proc/vmcore? It is used in the case of Xen too.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 13 / 17

slide-49
SLIDE 49

Xen Porting Effort Kdump under Xen

Kdump under Xen

Kdump under Xen is similar to the standard Linux implementation.

◮ Both dom0 kernel panic and hypervisor panic are supported.

◮ dom0 loads the secondary “crash kernel”. ◮ The secondary kernel starts if dom0 panics or Xen panics.

◮ The physical memory range is reserved in the hypervisor.

◮ Range is reserved using Xen command line options

kdump_megabytes and kdump_megabytes_base.

Remember /proc/vmcore? It is used in the case of Xen too. The secondary “crash” kernel interface is unchanged.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 13 / 17

slide-50
SLIDE 50

Xen Porting Effort Kdump under Xen

Kdump under Xen

Kdump under Xen is similar to the standard Linux implementation.

◮ Both dom0 kernel panic and hypervisor panic are supported.

◮ dom0 loads the secondary “crash kernel”. ◮ The secondary kernel starts if dom0 panics or Xen panics.

◮ The physical memory range is reserved in the hypervisor.

◮ Range is reserved using Xen command line options

kdump_megabytes and kdump_megabytes_base.

Remember /proc/vmcore? It is used in the case of Xen too. The secondary “crash” kernel interface is unchanged. This means that the secondary kernel used as Linux “crash kernel” can be reused under Xen without modification.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 13 / 17

slide-51
SLIDE 51

Xen Porting Effort The Dumpread Tool

The Dumpread Tool

The dumpread tool extracts information from Xen crash dumps.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 14 / 17

slide-52
SLIDE 52

Xen Porting Effort The Dumpread Tool

The Dumpread Tool

The dumpread tool extracts information from Xen crash dumps. Supported crash dump operations:

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 14 / 17

slide-53
SLIDE 53

Xen Porting Effort The Dumpread Tool

The Dumpread Tool

The dumpread tool extracts information from Xen crash dumps. Supported crash dump operations:

◮ Extract the hypervisor.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 14 / 17

slide-54
SLIDE 54

Xen Porting Effort The Dumpread Tool

The Dumpread Tool

The dumpread tool extracts information from Xen crash dumps. Supported crash dump operations:

◮ Extract the hypervisor. ◮ Get a list of domains.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 14 / 17

slide-55
SLIDE 55

Xen Porting Effort The Dumpread Tool

The Dumpread Tool

The dumpread tool extracts information from Xen crash dumps. Supported crash dump operations:

◮ Extract the hypervisor. ◮ Get a list of domains. ◮ dom0 and domU extraction.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 14 / 17

slide-56
SLIDE 56

Xen Porting Effort The Dumpread Tool

The Dumpread Tool

The dumpread tool extracts information from Xen crash dumps. Supported crash dump operations:

◮ Extract the hypervisor. ◮ Get a list of domains. ◮ dom0 and domU extraction.

◮ Extracted domains can then be analyzed with the crash utility. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 14 / 17

slide-57
SLIDE 57

Xen Porting Effort The Dumpread Tool

The Dumpread Tool

The dumpread tool extracts information from Xen crash dumps. Supported crash dump operations:

◮ Extract the hypervisor. ◮ Get a list of domains. ◮ dom0 and domU extraction.

◮ Extracted domains can then be analyzed with the crash utility.

Dumpread fully supports i386 and i386/PAE. Basic x86_64 support is in place too.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 14 / 17

slide-58
SLIDE 58

Xen Porting Effort The Dumpread Tool

The Dumpread Tool

The dumpread tool extracts information from Xen crash dumps. Supported crash dump operations:

◮ Extract the hypervisor. ◮ Get a list of domains. ◮ dom0 and domU extraction.

◮ Extracted domains can then be analyzed with the crash utility.

Dumpread fully supports i386 and i386/PAE. Basic x86_64 support is in place too. It is possible to use the crash utility directly on Xen crash dumps. Extraction of domU is however not supported by crash.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 14 / 17

slide-59
SLIDE 59

Xen Porting Effort The Dumpread Tool

The Dumpread Tool

The dumpread tool extracts information from Xen crash dumps. Supported crash dump operations:

◮ Extract the hypervisor. ◮ Get a list of domains. ◮ dom0 and domU extraction.

◮ Extracted domains can then be analyzed with the crash utility.

Dumpread fully supports i386 and i386/PAE. Basic x86_64 support is in place too. It is possible to use the crash utility directly on Xen crash dumps. Extraction of domU is however not supported by crash. More information about dumpread can be found at: http://people.valinux.co.jp/~moriwaka/dumpread/

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 14 / 17

slide-60
SLIDE 60

Xen Porting Effort Partial Dumps

Partial Dumps

In the secondary kernel /proc/vmcore points to the crash dump.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 15 / 17

slide-61
SLIDE 61

Xen Porting Effort Partial Dumps

Partial Dumps

In the secondary kernel /proc/vmcore points to the crash dump. This file includes all physical memory - excluding the reserved window.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 15 / 17

slide-62
SLIDE 62

Xen Porting Effort Partial Dumps

Partial Dumps

In the secondary kernel /proc/vmcore points to the crash dump. This file includes all physical memory - excluding the reserved window. The standard procedure is to copy /proc/vmcore somewhere.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 15 / 17

slide-63
SLIDE 63

Xen Porting Effort Partial Dumps

Partial Dumps

In the secondary kernel /proc/vmcore points to the crash dump. This file includes all physical memory - excluding the reserved window. The standard procedure is to copy /proc/vmcore somewhere.

◮ Probably OK during development (on smaller machines). ◮ Not suitable for large production machines.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 15 / 17

slide-64
SLIDE 64

Xen Porting Effort Partial Dumps

Partial Dumps

In the secondary kernel /proc/vmcore points to the crash dump. This file includes all physical memory - excluding the reserved window. The standard procedure is to copy /proc/vmcore somewhere.

◮ Probably OK during development (on smaller machines). ◮ Not suitable for large production machines.

Wanted: A small tool that extracts parts of /proc/vmcore.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 15 / 17

slide-65
SLIDE 65

Xen Porting Effort Partial Dumps

Partial Dumps

In the secondary kernel /proc/vmcore points to the crash dump. This file includes all physical memory - excluding the reserved window. The standard procedure is to copy /proc/vmcore somewhere.

◮ Probably OK during development (on smaller machines). ◮ Not suitable for large production machines.

Wanted: A small tool that extracts parts of /proc/vmcore. /proc/vmcore provides enough information for such a tool already.

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 15 / 17

slide-66
SLIDE 66

Xen Porting Effort Partial Dumps

Partial Dumps

In the secondary kernel /proc/vmcore points to the crash dump. This file includes all physical memory - excluding the reserved window. The standard procedure is to copy /proc/vmcore somewhere.

◮ Probably OK during development (on smaller machines). ◮ Not suitable for large production machines.

Wanted: A small tool that extracts parts of /proc/vmcore. /proc/vmcore provides enough information for such a tool already.

We are talking about a rather complex tool though - it requires knowledge about kernel and hypervisor data structures. These tend to change over time

  • too. . .

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 15 / 17

slide-67
SLIDE 67

Xen Porting Effort Current Status

Current Status

The Xen port of Kexec / Kdump supports the following architectures: Kexec Kexec Kexec Kdump vmlinux bzImage Xen vmlinux Dumpread i386 OK OK OK OK OK i386/PAE OK OK OK OK OK x86_641 OK OK OK OK Limited ia642 WIP WIP WIP WIP WIP PPC

  • 1Xen, x86_64 and vmlinux requires a patched kexec-tools.

2Ia64 support not included in mainline Linux yet. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 16 / 17

slide-68
SLIDE 68

Xen Porting Effort Current Status

Current Status

The Xen port of Kexec / Kdump supports the following architectures: Kexec Kexec Kexec Kdump vmlinux bzImage Xen vmlinux Dumpread i386 OK OK OK OK OK i386/PAE OK OK OK OK OK x86_641 OK OK OK OK Limited ia642 WIP WIP WIP WIP WIP PPC

  • Kexec / Kdump status: i386, i386/PAE and x86_64 are fully functional.

1Xen, x86_64 and vmlinux requires a patched kexec-tools. 2Ia64 support not included in mainline Linux yet. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 16 / 17

slide-69
SLIDE 69

Xen Porting Effort Current Status

Current Status

The Xen port of Kexec / Kdump supports the following architectures: Kexec Kexec Kexec Kdump vmlinux bzImage Xen vmlinux Dumpread i386 OK OK OK OK OK i386/PAE OK OK OK OK OK x86_641 OK OK OK OK Limited ia642 WIP WIP WIP WIP WIP PPC

  • Kexec / Kdump status: i386, i386/PAE and x86_64 are fully functional.

Dumpread status: x86_64 supports extracting the hypervisor for now.

1Xen, x86_64 and vmlinux requires a patched kexec-tools. 2Ia64 support not included in mainline Linux yet. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 16 / 17

slide-70
SLIDE 70

Xen Porting Effort Current Status

Current Status

The Xen port of Kexec / Kdump supports the following architectures: Kexec Kexec Kexec Kdump vmlinux bzImage Xen vmlinux Dumpread i386 OK OK OK OK OK i386/PAE OK OK OK OK OK x86_641 OK OK OK OK Limited ia642 WIP WIP WIP WIP WIP PPC

  • Kexec / Kdump status: i386, i386/PAE and x86_64 are fully functional.

Dumpread status: x86_64 supports extracting the hypervisor for now. Our team is currently focusing on ia64 support.

1Xen, x86_64 and vmlinux requires a patched kexec-tools. 2Ia64 support not included in mainline Linux yet. Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 16 / 17

slide-71
SLIDE 71

Summary

Summary

◮ The Xen port of Kexec reboots the entire physical machine. ◮ Kdump under Xen triggers a crash dump from Xen and dom0. ◮ i386 and x86_64 are ready now. ia64 is under development.

Any questions?

Magnus Damm (magnus@valinux.co.jp) Kexec / Kdump Xen Summit, September 2006 17 / 17