CentOS 6 Xen 客户机在“yum update”后无法启动。内核?

CentOS 6 Xen 客户机在“yum update”后无法启动。内核?

我似乎遇到了 Xen 客户机在 yum 更新后无法启动的问题。

DomU 配置:

#kernel     = '/boot/solus-vmlinuz'
#ramdisk    = '/boot/solus-initrd.img'
bootloader = '/usr/bin/pygrub'
extra      = ''
memory     = 128
hostname   = 'test.mydomain.com'
cpu_weight = 256
name       = 'vm111'
vif        = ['ip=192.168.0.34, vifname=vifvm111.0, mac=00:16:3e:05:8a:8a, rate=1280KB/s']
vnc        = 0
vcpus      = 1
vncviewer  = 0
serial     = 'pty'
disk       = ['phy:/dev/vg0/vm111_img,xvda1,w', 'phy:/dev/vg0/vm111_swap,xvda2,w']
#root       = '/dev/xvda1 ro'

客户操作系统 CentOS 6.4 x86_64 使用内核 2.6.32-358.0.1.el6.x86_64 可以正常启动。

然而之后;

#yum update

Dependencies Resolved

================================================================================
 Package Arch Version Repository
                                                                           Size
================================================================================
Installing:
 kernel x86_64 2.6.32-358.2.1.el6 updates 26 M
Updating:
 initscripts x86_64 9.03.38-1.el6.centos.1 updates 937 k
 kernel-firmware noarch 2.6.32-358.2.1.el6 updates 11 M
 krb5-libs x86_64 1.10.3-10.el6_4.1 updates 760 k
 selinux-policy noarch 3.7.19-195.el6_4.3 updates 1.8 M
 selinux-policy-targeted noarch 3.7.19-195.el6_4.3 updates 2.8 M
 tzdata noarch 2013b-1.el6 updates 457 k

Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 6 Package(s)

Total download size: 44 M
#Is this ok [y/N]:y

# cat /boot/grub/grub.conf
default=0
timeout=5
title CentOS (2.6.32-358.2.1.el6.x86_64)
  root (hd0,0)
  kernel /boot/vmlinuz-2.6.32-358.2.1.el6.x86_64 console=hvc0 xencons=tty0 root=/dev/xvda1 ro crashkernel=auto
  initrd /boot/initramfs-2.6.32-358.2.1.el6.x86_64.img
title vmlinuz-2.6.32-358.0.1.el6.x86_64
  root (hd0,0)
  kernel /boot/vmlinuz-2.6.32-358.0.1.el6.x86_64 console=hvc0 xencons=tty0 root=/dev/xvda1 ro
  initrd /boot/initramfs-2.6.32-358.0.1.el6.x86_64.img

Xen 客户机无法重新启动。以下是启动过程的(部分)串行控制台输出:

dracut: dracut-004-303.el6
udev: starting version 147
dracut: Starting plymouth daemon
dracut Warning: No root device "block:/dev/xvda1" found

dracut Warning: Boot has failed. To debug this issue add "rdshell" to the kernel command line.


dracut Warning: Signal caught!

dracut Warning: Boot has failed. To debug this issue add "rdshell" to the kernel command line.
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 2.6.32-358.2.1.el6.x86_64 0000001
Call Trace:
 [<ffffffff8150d248>] ? panic+0xa7/0x16f
 [<ffffffff81073ae2>] ? do_exit+0x862/0x870
 [<ffffffff81182965>] ? fput+0x25/0x30
 [<ffffffff81073b48>] ? do_group_exit+0x58/0xd0
 [<ffffffff81073bd7>] ? sys_exit_group+0x17/0x20
 [<ffffffff8100b072>] ? system_call_fastpath+0x16/0x1b

这是更新内核的问题吗,还是我的 DomU 配置不正确?

答案1

如果你的 domU 没有找到根设备,请尝试以下方法

mkinitrd -f -v --preload xenblk /boot/initramfswithxenblk.img $(uname -r)

在您的客户配置文件中

kernel = path of your kernel
ramdisk = /boot/initramfswithxenblk.img

答案2

原因可能是内核升级过程中缺少 depmod。启动旧内核并尝试以下操作:

yum upgrade module-init-tools
depmod -ae -F /boot/System.map-2.6.32-358.2.1.el6 2.6.32-358.2.1.el6
dracut --force '' 2.6.32-358.2.1.el6

答案3

检查 的内容/etc/modprobe.conf,您应该有:

alias scsi_hostadapter xenblk
alias eth0 xennet 

相关内容