Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Xen Guest Won't Boot on Gentoo Host
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
xtx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2011
Posts: 129

PostPosted: Thu Jun 27, 2013 6:05 pm    Post subject: Xen Guest Won't Boot on Gentoo Host Reply with quote

Can't boot the guest.

Following the guide http://www.gentoo.org/doc/en/xen-guide.xml I have a Gentoo host booting into the xen-configured kernel just fine. I copied my /usr/src/linux/vmlinux to /mnt/data/xen/kernel/kernel-xen1 and created the file /mnt/data/xen/configs/1 which has:
Code:

kernel = "/mnt/data/xen/kernel/kernel-xen1"
memory = 256
name = "test13"
disk = ['file:/mnt/data/xen/disks/1.img,sda1,w']
root= "/dev/sda1 ro"


I then try to launch the guest with
Code:
xl create /mnt/data/xen/configs/1 -c

and the first problem is that there is this message:
Code:
XENBUS: Waiting for devices to initialise: 25s...20s...

The seconds count down, then jump to 235, then count down again.

After this I immediately get
Code:
Timeout while connecting to device: device/vbd/2051 (local state 3, remote state 1)
VFS: Cannot open root device "sda1" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unalbe to mount root fs on unknown-block(0,0)


What gives? Im fairly certain I followed the guide exactly
If it matters the gentoo host is running in a VirtualBox VM
Back to top
View user's profile Send private message
Atom2
Apprentice
Apprentice


Joined: 01 Aug 2011
Posts: 185

PostPosted: Sun Jul 14, 2013 8:06 pm    Post subject: Reply with quote

I have had exactly the same issue, but it is now solved. The problem was that the backend drivers in the dom0 were not working correctly. In my view that's down to an issue with the way gentoo handles the backend drivers in case they are compiled as kernel modules. The problem dissapeared once I had all backend drivers compiled into the kernel.

The culprit is that the startup script xencommons (which actually is in the source tree) does not appear in any runlevel (and is also not installed into /etc/init.d). If I remember correctly (my system is currently down), gentoo instead uses xenconsoled and xenstored both of which do not load modules through modprobe. The missing xencommons on the other hand does have a lot of modprobe statements that load all required modules for xen.

The file: statement that you used in your example specifically requires a backend driver which relies on the code linked to CONFIG_XEN_GNTDEV being active and that was the one module not loaded in my case. Loading the module
Code:
modprobe xen-gntdev

solved the problem temporarily, compiling it into the kernel solved it permanently.

So on a nutshell you would either need to compile all backend drivers into the kernel or load all required modules prior to starting the guest.

The other option is to use an LVM disk as storage and use the phy: instead of file: - phy does not require the module xen-gntdev.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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