WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Xen 4.0 Custom kernels

To: Pasi Kärkkäinen <pasik@xxxxxx>
Subject: Re: [Xen-users] Xen 4.0 Custom kernels
From: Net Warrior <netwarrior863@xxxxxxxxx>
Date: Mon, 17 May 2010 12:53:25 -0300
Cc: Xen Mailing List <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 17 May 2010 08:55:16 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=nn1gqCV0hkaA5uCg3j1FCM7wipvtvP0MHFggTy0G8tA=; b=K8ajU9JJWjP1SI2qsLe6zdSWwK7nuwfWpihmwwDuBIFnNGfCzoN9zRPqe0oxx6sN/4 p2W/lBPxG9+cjUqE00+OMunD+v+KRhOvXhV3K90mUiWfSVua/AAGF47bNGBZeHRw8HKy Kc5VCJndqWhyv6rhUGqDPHzU0n9SZyEJN4/gQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=iltTzTz1KJhyjt6DYi6O6t8sLuYhjxTB8HJGjWj3/L4cNEsLqK0ltL5rB8eHQ65Xmw f0asvHPx0Kt3pZSMliRPZWVPmPV8XPAl9KOPMvYvTpC+Mneq6jpZrsNwGR45mnXxmJ2Q dWNeOy+VvjGK4rO8PT8OqZhBPrDdQX+3rV8PU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTil8PJctD7vN2XwtBTqYKMp-dwUXtMm1Xns9sUYy@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTikDNh__bm2E83zYLVku80G1VJzhpfCKks2Oh59S@xxxxxxxxxxxxxx> <20100513174614.GC17817@xxxxxxxxxxx> <AANLkTilCGf-6rwTwNGoBvGxWAL_FqUg-6oic_H4ED1uE@xxxxxxxxxxxxxx> <20100514055836.GQ17817@xxxxxxxxxxx> <AANLkTil41fbflg02tNFPBT3gcyAWLiqxbsq4mKznhtG4@xxxxxxxxxxxxxx> <20100514110433.GT17817@xxxxxxxxxxx> <AANLkTinduNY9bERxVBE39uQ9Us1lX4r3LJJ3ouOnUVUh@xxxxxxxxxxxxxx> <20100517054519.GY17817@xxxxxxxxxxx> <AANLkTinOWpKUzsbPP_arwGTDrn1MGbriLTV1DQsyY5lJ@xxxxxxxxxxxxxx> <AANLkTil8PJctD7vN2XwtBTqYKMp-dwUXtMm1Xns9sUYy@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Well.. good news

I was able to boot the DomU server, I found an example in Virtuatoia  related to my problem, the trick was this
mkinitrd --omit-scsi-modules --with=xennet --with=xenblk --preload=xenblk, I was using mkinitrd without any parameters  only  -f to overwrite , path to the image and the kernel version, that was for the Dom0.

Now, I happy :D, lets rock.

Thanks for your time and support guys
Best Regards


2010/5/17 Net Warrior <netwarrior863@xxxxxxxxx>
Well.. I'm having the same error

Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys

switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 2.6.31.13 #16
Call Trace:
[<c105beb6>] panic+0x46/0x100
[<c105e856>] do_exit+0x626/0x6d0
[<c105e931>] do_group_exit+0x31/0x90
[<c105e99f>] sys_exit_group+0xf/0x20
[<c102a069>] syscall_call+0x7/0xb

----

CONFIG_XEN_NETDEV_FRONTEND=m
CONFIG_XEN_BLKDEV_FRONTEND=m

config file 
disk = [ 'phy:VG-NW/root,xvda1,w','phy:VG-NW/swap,xvda2,w' ]
root = "/dev/xvda1 ro"

fstab for DomU
/dev/xvda1 / ext3 defaults 1 1
tmpfs /dev/shm tmpfs defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
#devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/xvda2 swap swap defaults 0 0

Do not know what's missing, I'll keep trying.

Thanks for your time and support.
Best Regards


2010/5/17 Net Warrior <netwarrior863@xxxxxxxxx>

Hi There.

Thank you very much for your assistance, I'll try to compile it as module and give it a try , for sure I know is compiled embeded.
Will report as soon as I get some results.

Best Regards

2010/5/17 Pasi Kärkkäinen <pasik@xxxxxx>

On Mon, May 17, 2010 at 12:29:59AM -0300, Net Warrior wrote:
>    Hi There.
>    Sorry for the delay, here is the config file for DomU , Only the options I
>    modified, the rest is as it is, by default.
>    # Kernel image file.
>    kernel = "/boot/vmlinuz-2.6.31.13"
>
>    # Optional ramdisk.
>    ramdisk = "/boot/initrd-2.6.31.13.img"
>
>    memory = 64
>
>    # A name for your domain. All domains must have different names.
>    name = "Netwarrior"
>
>    vif = [ '' ]
>    disk = [ 'phy:VG-NW/root,sda1,w','phy:VG-NW/swap,sda2,w' ]
>    # Set root device.
>    root = "/dev/sda1 ro"
>

Wrong. You should be using xvda1 and xvda2 instead of sda1 and sda2.
pvops kernels only support xvd* disk names in the guest.

>    # Sets runlevel 4.
>    extra = "4"
>    How do I know which hardware Xen ( Dom0 ) is providing to the DomU ?
>

Also check the 2.6.31.13 kernel .config if xen-blkfront is built-in or compiled as a module.
If it's compiled as a module then you need to have an initrd that actually loads it!

-- Pasi

>    Thank you very much.
>    Regards
>    2010/5/14 Pasi Kärkkäinen <[1]pasik@xxxxxx>
>
>      On Fri, May 14, 2010 at 07:47:33AM -0300, Net Warrior wrote:
>      >    Hi There.
>      >    The hardware is the same, so I asume that the initramfs used for
>      Dom0
>      >    could be used for DomU as well
>      >
>
>      No, the hardware is not the same!
>
>      domU only has "virtual" hardware provided by Xen, which is totally
>      different
>      from the physical hardware dom0 has access to!
>
>      , and yes I specified the root partition in
>      >    the DomU config file as well something like root /dev/sda1 ro ,
>      should I
>      >    use xdev as well in there?
>      >    Thanks for your time and support.
>      >
>
>      Please paste your /etc/xen/<guest> cfgfile.
>
>      -- Pasi
>
>      >    Best Regards
>      >    2010/5/14 Pasi Kärkkäinen <[1][2]pasik@xxxxxx>
>      >
>      >      On Thu, May 13, 2010 at 07:40:51PM -0300, Net Warrior wrote:
>      >      > Hi there guys
>      >      >
>      >      > As a test, I started using the same kernel and initramfs like
>      in Dom0
>      >      > which i know it works, but when starting up DomU I've get.
>      >      >
>      >      > switchroot: mount failed: No such file or directory
>      >      > Kernel panic - not syncing: Attempted to kill init!
>      >      > Pid: 1, comm: init Not tainted 2.6.31.13 #14
>      >      >
>      >
>      >      So the dom0 initrd image is not suitable for domU, ie. it doesn't
>      load
>      >      xen block frontend driver.. most probably. So the domU kernel is
>      >      not able to access the virtual disks provided to it.
>      >      > I've got the same error while setting up Dom0 and was a problem
>      with
>      >      > the scsi modules which I included in the kernel and not in the
>      >      > initramfs, my bad !!
>      >      >
>      >      > My config file looks this.
>      >      >
>      >
>       #----------------------------------------------------------------------------
>      >      > # Kernel image file.
>      >      > kernel = "/boot/vmlinuz-2.6.31.13"
>      >      >
>      >      > # Optional ramdisk.
>      >      > ramdisk = "/boot/initrd-2.6.31.13.img"
>      >      >
>      >      > disk = [ 'phy:VG-NW/root,sda1,w','phy:VG-NW/swap,sda2,w' ]
>      >      >
>      >
>      >      You should use xvda1 and xvda2 here, not sda1 and sda2.
>      >      the sd* naming is deprecated for xen PV guests.
>      >      > Also copied the /lib/modules/kernel_version to the *guest*
>      partition.
>      >      >
>      >      > What am I missing?
>      >      >
>      >
>      >      You need to create an initrd image that is suitable for the domU.
>      >
>      >      Also did you specify root= parameter for the domU kernel?
>      >      -- Pasi
>      >
>      >      > Thanks for your time and support
>      >      > Regards
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >      > 2010/5/13, Pasi Kärkkäinen <[2][3]pasik@xxxxxx>:
>      >      > > On Thu, May 13, 2010 at 02:38:40PM -0300, Net Warrior wrote:
>      >      > >> Hi Pasi.
>      >      > >>
>      >      > >> Did not know I could use the Vanila Kernel for DomU usage, I
>      >      thought
>      >      > >> it has to be patched somehow as well.. so good news, I'll
>      try to
>      >      > >> compile a custom one using the latest stable from
>      [3][4]kernel.org and
>      >      leave
>      >      > >> the Dom0 which is working as it is.
>      >      > >>
>      >      > >
>      >      > > I recommend using the latest stable 2.6.32.x kernel for the
>      domU.
>      >      > >
>      >      > > If you're building a 32bit domU kernel remember it needs to
>      be PAE
>      >      (64G mem
>      >      > > support),
>      >      > > otherwise you won't see the pvops Xen domU options at all in
>      the
>      >      kernel
>      >      > > configuration.
>      >      > >
>      >      > > There are no special requirements for 64bit domU kernel.
>      >      > >
>      >      > > -- Pasi
>      >      > >
>      >      > >> Thanks for your time and support
>      >      > >> Regards
>      >      > >>
>      >      > >>
>      >      > >>
>      >      > >>
>      >      > >>
>      >      > >> 2010/5/13, Pasi Kärkkäinen <[4][5]pasik@xxxxxx>:
>      >      > >> > On Thu, May 13, 2010 at 12:38:00PM -0300, Net Warrior
>      wrote:
>      >      > >> >>    Hi there guys.
>      >      > >> >>
>      >      > >> >>    I'm using CentOS 5.4, I was able to compile my custom
>      Dom0
>      >      kernel
>      >      > >> >> and
>      >      > >> >> boot
>      >      > >> >>    it, now I've got some doubts.
>      >      > >> >>
>      >      > >> >>    I'd like to compile a custom DomU image, the problem
>      is that
>      >      when I
>      >      > >> >> do,
>      >      > >> >>    make kernels KERNELS="linux-2.6-xen0 linux-2.6-xenU"
>      it tries
>      >      to
>      >      > >> >> download
>      >      > >> >>    the kernel
>      >      > >> >>    from the HG repository which seems to have old 2.6.18
>      >      kernels, I
>      >      > >> >> want
>      >      > >> >> to
>      >      > >> >>    use the GIT repository which is alrealdy downloaded
>      and is
>      >      the
>      >      > >> >> source I
>      >      > >> >>    used to complile Dom0 using
>      >      > >> >>    kernel 2.6.33.13.
>      >      > >> >>
>      >      > >> >
>      >      > >> > specifying KERNELS="linux-2.6-xen0 linux-2.6-xenU" will
>      compile
>      >      > >> > linux-2.6.18-xen,
>      >      > >> > that's how it should be.
>      >      > >> >
>      >      > >> > If you don't specify KERNELS= at all, then it'll build
>      >      linux-2.6.31.x
>      >      > >> > kernel.
>      >      > >> > Or alternatively you can specify KERNELS="linux-2.6-pvops"
>      to get
>      >      the
>      >      > >> > same
>      >      > >> > result.
>      >      > >> >
>      >      > >> >>    Question:
>      >      > >> >>    Which files do I have to modify or how do I have to
>      proceed
>      >      to
>      >      > >> >> achieve
>      >      > >> >>    what I want?
>      >      > >> >>
>      >      > >> >
>      >      > >> > Did you know you can use the *default* (vanilla)
>      [5][6]kernel.org
>      >      Linux
>      >      > >> > kernels as
>      >      > >> > Xen PV domU?
>      >      > >> > No patches needed for that, the upstream kernels will work
>      for
>      >      domU.
>      >      > >> >
>      >      > >> >>    Under /usr/src/xen-4.0.0/buildconfigs I can see some
>      files
>      >      which
>      >      > >> >> define
>      >      > >> >>    some stuff depending on what I chose but not sure if
>      it's
>      >      safe to
>      >      > >> >> mees
>      >      > >> >>    with this.
>      >      > >> >>
>      >      > >> >>    Thanks for your time and support.
>      >      > >> >
>      >      > >> > Hopefully that helps.
>      >      > >> >
>      >      > >> > -- Pasi
>      >      > >> >
>      >      > >> >
>      >      > >
>      >
>      > References
>      >
>      >    Visible links
>      >    1. mailto:[7]pasik@xxxxxx
>      >    2. mailto:[8]pasik@xxxxxx
>      >    3. [9]http://kernel.org/
>      >    4. mailto:[10]pasik@xxxxxx
>      >    5. [11]http://kernel.org/
>
> References
>
>    Visible links
>    1. mailto:pasik@xxxxxx
>    2. mailto:pasik@xxxxxx
>    3. mailto:pasik@xxxxxx
>    4. http://kernel.org/
>    5. mailto:pasik@xxxxxx
>    6. http://kernel.org/
>    7. mailto:pasik@xxxxxx
>    8. mailto:pasik@xxxxxx
>    9. http://kernel.org/
>   10. mailto:pasik@xxxxxx
>   11. http://kernel.org/



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users