Guest VM kernel panic with VIRTIO_BLK with KVM

  • Thread starter saurabh agarwal
  • Start date
S

saurabh agarwal

Guest
We have compiled a new linux kernel for a guest VM with CONFIG_VIRTIO_BLK=y. But it doesn't boot and kernel panics. To kernel command line I tried passing root=/dev/vda and root=/dev/vda1 but same kernel panic comes every time. VIRTIO_NET worked fine.
But with VIRTIO_BLK we see the below kernel panic. Can someone suggest what could be going wrong?

Kernel command line is
kernel /boot/bzImage root=/dev/vda1 early_printk=serial console=hvc0 console=tty0 console=ttyS0,115200n8 divider=10 e1000.disable_vlan_offload=1 initrd /boot/initramfs.cpio

Below is a portion of GuestVM Kernel Console logs while booting up
brd: module loaded^M
vda: vda1 vda2 vda3 vda4^M
scsi0 : ata_piix^M
scsi1 : ata_piix^M
ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc180 irq 14^M
ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc188 irq 15^M
................
...................
...............

VFS: Cannot open root device "vda" or unknown-block(253,0)^M
Please append a correct "root=" boot option; here are the available partitions:^M
fd00 8388608 vda driver: virtio_blk^M
fd01 7340032 vda1 00000000-0000-0000-0000-000000000000^M
fd02 512000 vda2 00000000-0000-0000-0000-000000000000^M
fd03 535552 vda3 00000000-0000-0000-0000-000000000000^M
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(253,0)^M

Can someone suggest what could be wrong?

Regards,
Saurabh
 


Hi, what kernel version fo you use on VM and why "divider=10" in use? What version of KVM?
 
Hi, what kernel version fo you use on VM and why "divider=10" in use? What version of KVM?
You can ignore divider=10. It is a custom parameter for me. Kernel version in VM is 3.0.76

kvm --version gives me this output
"QEMU emulator version 1.3.0, Copyright (c) 2003-2008 Fabrice Bellard"
 
Have you double checked the initrd and the file systems?
 
Have you double checked the initrd and the file systems?

Can you please tell what do you mean by "double checked the initrd and the file systems"? The initrd and the filesystems are the same as when i was using ide and not vitrio_blk. This time I have compiled VIRTIO_BLK into the kernel.
 
Did you rebuild the initrd file for the new kernel? I think the image file is the issue.
 

Members online


Top