Kexec in Proxmox

To answer my question: yes it works. Tried on Proxmox 1.7. To install it go to command line and:
aptitude install kexec-tools
To load always latest kernel I've edited /etc/init.d/kexec-load:
After:
REAL_APPEND="$APPEND"
Add:
KERNEL_IMAGE=`ls -r /boot/vmlinuz* | sed -n '1p'`
INITRD=`ls -r /boot/initrd* | sed -n '1p'`

If you don't want latest kernel set appropriate kernel in /etc/defaults/kexec.

Now my Intel server reboots in ~20 seconds.
 
Kexec in Proxmox 3

You can check if kexec is enabled with:

# grep KEXEC /boot/config-`uname -r`
Code:
CONFIG_KEXEC=y
CONFIG_KEXEC_AUTO_RESERVE=y
CONFIG_KEXEC_REUSE_CRASH=y
CONFIG_KEXEC_JUMP=y

If you see CONFIG_KEXEC=y kernel is kexec ready.


But i don't know why, it is not working.

# pveversion -v
Code:
pve-manager: 3.0-23 (pve-manager/3.0/957f0862)
running kernel: 2.6.32-22-pve
proxmox-ve-2.6.32: 3.0-107
pve-kernel-2.6.32-20-pve: 2.6.32-100
pve-kernel-2.6.32-22-pve: 2.6.32-107
lvm2: 2.02.95-pve3
clvm: 2.02.95-pve3
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.0-1
pve-cluster: 3.0-4
qemu-server: 3.0-20
pve-firmware: 1.0-23
libpve-common-perl: 3.0-4
libpve-access-control: 3.0-4
libpve-storage-perl: 3.0-8
vncterm: 1.1-4
vzctl: 4.0-1pve3
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.4-13
ksm-control-daemon: 1.1-1

# cat /etc/default/kexec
Code:
# Defaults for kexec initscript
# sourced by /etc/init.d/kexec and /etc/init.d/kexec-load


# Load a kexec kernel (true/false)
LOAD_KEXEC=true


# Kernel and initrd image
KERNEL_IMAGE="/vmlinuz"
INITRD="/initrd.img"


# If empty, use current /proc/cmdline
APPEND=""


# Load the default kernel from grub config (true/false)
USE_GRUB_CONFIG=true


any suggestions?

EDIT:

adding
Code:
[COLOR=#333333][I]KERNEL_IMAGE=`ls -r /boot/vmlinuz* | sed -n '1p'`[/I][/COLOR]
[COLOR=#333333][I]INITRD=`ls -r /boot/initrd* | sed -n '1p'`[/I][/COLOR]
will do the job.

Using the Grub config fails due to missing /boot/ in the initrd path
 
Last edited: