View previous topic :: View next topic |
Author |
Message |
pentium4borg n00b
Joined: 29 Aug 2006 Posts: 47
|
Posted: Tue Feb 05, 2013 4:25 am Post subject: [SOLVED] Xen 4.2.1: Root fs device missing (/dev/xvda) |
|
|
I just upgraded my computer from an old kernel (2.6.34-xen) to 3.6.11, and upgraded Xen to 4.2.0. I can't seem to get my domU to boot, as it can't find the root filesystem.
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: |
disk = [ 'file:/home/data/xen/megatron/root.img,xvda,w' ]
|
(The disk is just a file with an ext3 filesystem, I can mount it on loopback in dom0)
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: |
[...]
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
|
I have checked and I definitely have the correct kernel configuration for my domU (including the block frontend driver).
On further investigation, it seems that the file block-device backend driver or something isn't working. In dom0, when I run
Code: |
xl block-attach Domain-0 file:/home/data/xen/megatron/root.img xvda w
|
I can see the output when I run "xl block-list Domain-0". /dev/xvda is missing and dmesg shows nothing. However, when I create a loop device with losetup and run block-attach with phy:/dev/loop1, xl block-attach creates /dev/xvda which I can then mount successfully.
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 |
|
Back to top |
|
|
dblaci n00b
Joined: 05 Oct 2004 Posts: 30
|
Posted: Thu Mar 07, 2013 3:03 pm Post subject: |
|
|
I had CONFIG_XEN_GNTDEV=y in the kernel on Dom0, and loaded the module, but the problem was not solved. If I added the block device dynamically, then nothing happened, and no error was logged anywhere (I looked at). But when I added the block device in the config, it complained about qemu-dm executable missing. So I enabled the qemu use flag for 'app-emulation/xen-tools-4.2.1-r1' and now it seems to work fine. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|