[ 0.137372] (driver?)
[ 0.137550] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 0.137762] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.34 #1
[ 0.137937] Hardware name: linux,dummy-virt (DT)
[ 0.138079] Call trace:
[ 0.138153] dump_backtrace+0x0/0x150
[ 0.138256] show_stack+0x14/0x20
[ 0.138365] dump_stack+0xb4/0xd8
[ 0.138469] panic+0x150/0x328
[ 0.138576] mount_block_root+0x21c/0x340
[ 0.138682] mount_root+0x84/0x94
[ 0.138789] prepare_namespace+0x16c/0x1b4
[ 0.138896] kernel_init_freeable+0x248/0x270
[ 0.139038] kernel_init+0x10/0x100
[ 0.139144] ret_from_fork+0x10/0x18
[ 0.139252] Kernel Offset: 0x586ee8400000 from 0xffff800010000000
[ 0.139427] PHYS_OFFSET: 0xffffc6b280000000
[ 0.139533] CPU features: 0x0002,22a08218
[ 0.139639] Memory Limit: none
[ 0.139746] Rebooting in 1 seconds..
原来是 -drive id=image-3da809c1d0297a2d,file=kata-containers-ubuntu-latest.img,aio=threads,format=raw,if=none,readonly没有指定 -device virtio-blk-pci,如下指定就可以了
-device virtio-blk-pci,disable-modern=false,drive=image-3da809c1d0297a2d,scsi=off,config-wce=off,romfile=,share-rw=on
-drive id=image-3da809c1d0297a2d,file=kata-containers-ubuntu-latest.img,aio=threads,format=raw,if=none,readonly