[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] DomU can't start after recompiling DomU(PV) OS kernel



On 06/26/2017 08:37 AM, 謝 東曄 wrote:
Xen Version:4.5.5
Guest OS(DomU OS):Ubuntu 14.04
Old kernel: 4.4.0
new recompile Kernel : 4.4.31

// Install DomU OS in image file
first, i use dd if=/dev/zero of=test.img bs=1M count=20480 to create 20G empty image file.
then use xl create vm.cfg command to create VM.
The configuration file(vm.cfg) is as follows:

kernel = "vmlinuz"
ramdisk = "initrd.img"
name = "test"
memory = "1024"
disk = [ 'file:test.img,xvda,w', ]

vmlinuz and initrd.img is download from http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/xen/

then use xl console test command to log in and install DomU OS(Ubuntu 14.04).
when DomU OS install complete , I start recompile DomU OS kernel.

// Recompile DomU OS kernel
download linux kernel source from http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.31.tar.gz
add some printk in driver/xen/balloon.c.
Configure the DomU OS kernel according to https://wiki.xenproject.org/wiki/Mainline_Linux_Kernel_Configs#Getting_the_Current_Stable_Version

then

make
make modules_install
make install

reboot VM after recompile complete.

Use xl create startVM.cfg command to create VM.
The VM configuration file(startVM.cfg) is as follows:

name = "test"
memory = "1024"
bootloader = 'pygrub'
disk = [ 'file:test.img,xvda,w', ]

but i can't start VM after recompiling DomU OS kernel.
DomU can boot into grub and start successful by choosing other kernel(4.4.0), but when choosing kernel that i compile(4.4.31), it fail(maybe it create and crash immediately).
No error message on the terminal.
Can someone tell me where it is wrong?

Not with the data you provided.

Things you should try:

- use the kernel config of the working kernel (it  might be provided via
  /proc/config.gz)
- build a ramdisk matching the new kernel (from the steps you mentioned
  above you might still use the old one)
- add "earlyprintk=xen" to the kernel's boot options. Use "xl dmesg" to
  check for error messages issued during early boot process
- post your kernel config

Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.