I've compiled a domU kernel (also 3.6.11) with xen-blkfront built-in and set the domU config file with this disk configuration:
Code: Select all
disk = [ 'file:/home/data/xen/megatron/root.img,xvda,w' ]
After I xl start my domU, xl block-list in dom0 shows the device connected to the domU but the domU kernel (with root=/dev/xvda) can't find the root filesystem:
Code: Select all
[...]
XENBUS: Timeout connecting to device: device/vbd/51712 (local state 3, remote state 1)
console [netcon0] enabled
netconsole: network logging started
ALSA device list:
No soundcards found.
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
VFS: Cannot open root device "xvda" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Pid: 1, comm: swapper/0 Not tainted 3.6.11-gentoo #8
Call Trace:
[<ffffffff815c59ff>] ? panic+0xc5/0x1cc
[<ffffffff815c5bd9>] ? printk+0x4c/0x51
[<ffffffff819990cd>] ? mount_block_root+0x1d4/0x1f2
[<ffffffff8108ebaa>] ? lg_local_lock+0x11/0x14
[<ffffffff81002930>] ? kvm_io_bus_sort_cmp+0x1c/0x27
[<ffffffff8110fcf8>] ? sys_mknodat+0x12c/0x140
[<ffffffff8199920f>] ? mount_root+0x124/0x12b
[<ffffffff81999d8f>] ? initrd_load+0x303/0x309
[<ffffffff8199937e>] ? prepare_namespace+0x168/0x19e
[<ffffffff81998702>] ? kernel_init+0x17f/0x191
[<ffffffff8199852b>] ? parse_early_options+0x2a/0x2a
[<ffffffff815cf644>] ? kernel_thread_helper+0x4/0x10
[<ffffffff815c8338>] ? retint_restore_args+0x5/0x6
[<ffffffff815cf640>] ? gs_change+0x13/0x13
On further investigation, it seems that the file block-device backend driver or something isn't working. In dom0, when I run
Code: Select all
xl block-attach Domain-0 file:/home/data/xen/megatron/root.img xvda w
Has anyone else run into this? I'm not sure if file-backend disk support has changed in Xen 4.2 / newer Linux kernel versions, if I have bad configuration somewhere, or if this is a bug in Xen.
----------------------
I found the solution, which was that I didn't have CONFIG_XEN_GNTDEV=y set in my kernel configuration.
I have also noticed that if I enable CONFIG_XEN_NETDEV_FRONTEND=y in the dom0 kernel, domUs don't see their network interfaces (even though they're created and visible on dom0). Strange.
For kernel configuration options, see this: http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs
