Hi All, I am running xen-3.3.1. I am trying to compile linux kernel 2.6.28.5 such that I can boot it as DomU kernel. I enabled all the config options related to xen in that kernel. After compiling the kernel and creating the initrd image I created my xen conf file that looks like, kernel = "/boot/vmlinuz-2.6.28.5" ramdisk = "/boot/initrd.img-2.6.28.5" builder=''linux'' memory = 256 name = "guest1" vcpus = 2 vif = [ ''mac=00:16:3e:ef:fe:11, ip="<my-ip>"'' ] disk = [ ''file:/mnt/domains/vm1/disk.img,sda1,w'' , ''file:/mnt/domains/vm1/swap,sda2,w'' ] root = "/dev/sda1 ro" on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' When I boot into it hangs at,>Done. >Begin: Waiting for root file system... ...So eventually it could not find the root file system and falls to busybox. I did cat /proc/partitions - It listed xvda1 and xvda2 as partitions. I don''t understand which driver is missing in kernel 2.6.28.5 to load xvda1. I did some googling and saw that I need to compile unmodified_drivers (present in xen-3.3.1 directory) for this linux kernel. So did,>cd xen-3.3.1/unmodified_drivers/linux-2.6 >export XL=/root/linux-2.6.28.5 >./mkbuildtreeIt created symlinks to the xen files in linux-2.6.28.5 tree. I did "make" and it is throwing whole bunch of errors. unmodified_drivers/linux-2.6/balloon/balloon.c:101:58: error: macro "DECLARE_WORK" passed 3 arguments, but takes just 2 unmodified_drivers/linux-2.6/balloon/balloon.c:101: warning: type defaults to ''int'' in declaration of ''DECLARE_WORK'' unmodified_drivers/linux-2.6/balloon/balloon.c: In function ''balloon_alarm'': unmodified_drivers/linux-2.6/balloon/balloon.c:186: error: ''balloon_worker'' undeclared (first use in this function) unmodified_drivers/linux-2.6/balloon/balloon.c:186: error: (Each undeclared identifier is reported only once unmodified_drivers/linux-2.6/balloon/balloon.c:186: error: for each function it appears in.) unmodified_drivers/linux-2.6/balloon/balloon.c: In function ''increase_reservation'': unmodified_drivers/linux-2.6/balloon/balloon.c:240: error: unknown field ''address_bits'' specified in initializer unmodified_drivers/linux-2.6/balloon/balloon.c:240: warning: excess elements in struct initializer unmodified_drivers/linux-2.6/balloon/balloon.c:240: warning: (near initialization for ''reservation'') I am not familiar with xen. Could someone please tell if I am on the right track? The DomU linux kernel (linux-2.6.18) that got compiled along with xen boots seemlessly. Can we compile custom kernels for xen like what I am doing ? Or we just have to stick with linux-2.6.18 to host VM''s ? Thanks, -Karthik _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Maximilian Wilhelm
2009-Feb-18 02:17 UTC
Re: [Xen-users] Compiling lInux2.6.28.5 for hosting VM
Anno domini 2009 KARTHIK BALAJI G scripsit: Hi!> I am running xen-3.3.1. I am trying to compile linux kernel 2.6.28.5 such > that I can boot it as DomU kernel. I enabled all the config options related > to xen in that kernel. After compiling the kernel and creating the initrd > image I created my xen conf file that looks like,> kernel = "/boot/vmlinuz-2.6.28.5" > ramdisk = "/boot/initrd.img-2.6.28.5" > builder=''linux'' > memory = 256 > name = "guest1" > vcpus = 2 > vif = [ ''mac=00:16:3e:ef:fe:11, ip="<my-ip>"'' ] > disk = [ ''file:/mnt/domains/vm1/disk.img,sda1,w'' , > ''file:/mnt/domains/vm1/swap,sda2,w'' ] > root = "/dev/sda1 ro"~~~> on_poweroff = ''destroy'' > on_reboot = ''restart'' > on_crash = ''restart''> When I boot into it hangs at,> >Done. > >Begin: Waiting for root file system... ...> So eventually it could not find the root file system and falls to busybox. I > did cat /proc/partitions - It listed xvda1 and xvda2 as partitions. I don''t~~~~~ ~~~~~> understand which driver is missing in kernel 2.6.28.5 to load xvda1. I did > some googling and saw that I need to compile unmodified_drivers (present in > xen-3.3.1 directory) for this linux kernel. So did,[...] When using a vanilla kernel all XenVirtualBlock devices will be named xvd<letter> so the declaration of ''sda1'' and ''sda2'' will be silently ignored. For convenience you should changed the disk line to disk = [ ''file:/mnt/domains/vm1/disk.img,xvda1,w'' , ''file:/mnt/domains/vm1/swap,xvda2,w'' ] and you have to change the root line to root = "/dev/xvda1 ro" HTH Ciao Max -- Follow the white penguin. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
KARTHIK BALAJI G
2009-Feb-18 02:41 UTC
Re: [Xen-users] Compiling lInux2.6.28.5 for hosting VM
Hi Max, Thanks for replying. I forgot to mention that I did try that step u suggested. It still hangs at the same place. I think we need to compile a driver for the vanilla kernel (2.6.25.8) for it to recognize xvd* devices. Please correct me if I am wrong. In that is case why xen related config options I enabled during kernel compilation did not compile any driver for recognizing these devices ? Thanks, Karthik. On Tue, Feb 17, 2009 at 9:17 PM, Maximilian Wilhelm <max@rfc2324.org> wrote:> Anno domini 2009 KARTHIK BALAJI G scripsit: > > Hi! > > > I am running xen-3.3.1. I am trying to compile linux kernel 2.6.28.5 such > > that I can boot it as DomU kernel. I enabled all the config options > related > > to xen in that kernel. After compiling the kernel and creating the initrd > > image I created my xen conf file that looks like, > > > kernel = "/boot/vmlinuz-2.6.28.5" > > ramdisk = "/boot/initrd.img-2.6.28.5" > > builder=''linux'' > > memory = 256 > > name = "guest1" > > vcpus = 2 > > vif = [ ''mac=00:16:3e:ef:fe:11, ip="<my-ip>"'' ] > > disk = [ ''file:/mnt/domains/vm1/disk.img,sda1,w'' , > > ''file:/mnt/domains/vm1/swap,sda2,w'' ] > > root = "/dev/sda1 ro" > ~~~ > > > on_poweroff = ''destroy'' > > on_reboot = ''restart'' > > on_crash = ''restart'' > > > When I boot into it hangs at, > > > >Done. > > >Begin: Waiting for root file system... ... > > > So eventually it could not find the root file system and falls to > busybox. I > > did cat /proc/partitions - It listed xvda1 and xvda2 as partitions. I > don''t > ~~~~~ ~~~~~ > > understand which driver is missing in kernel 2.6.28.5 to load xvda1. I > did > > some googling and saw that I need to compile unmodified_drivers (present > in > > xen-3.3.1 directory) for this linux kernel. So did, > [...] > > When using a vanilla kernel all XenVirtualBlock devices will be named > xvd<letter> > so the declaration of ''sda1'' and ''sda2'' will be silently ignored. > For convenience you should changed the disk line to > > disk = [ ''file:/mnt/domains/vm1/disk.img,xvda1,w'' , > ''file:/mnt/domains/vm1/swap,xvda2,w'' ] > > and you have to change the root line to > > root = "/dev/xvda1 ro" > > HTH > Ciao > Max > -- > Follow the white penguin. > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Maximilian Wilhelm
2009-Feb-18 04:21 UTC
Re: [Xen-users] Compiling lInux2.6.28.5 for hosting VM
Anno domini 2009 KARTHIK BALAJI G scripsit: Hi! [Please to not top-post. It''s far better readable the other way around]> Thanks for replying. I forgot to mention that I did try that step u > suggested. It still hangs at the same place. I think we need to compile a > driver for the vanilla kernel (2.6.25.8) for it to recognize xvd* devices. > Please correct me if I am wrong.> In that is case why xen related config options I enabled during kernel > compilation did not compile any driver for recognizing these devices ?This should make you happy, to be able to boot the VM without any initrd: max@vsc-build:/proc$ zgrep XEN config.gz CONFIG_XEN=y CONFIG_XEN_BLKDEV_FRONTEND=y CONFIG_XEN_NETDEV_FRONTEND=y CONFIG_HVC_XEN=y If you want to compile this stuff as modules you will have to use an initrd of course. HTH Ciao Max -- Follow the white penguin. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
KARTHIK BALAJI G
2009-Feb-18 21:31 UTC
Re: [Xen-users] Compiling lInux2.6.28.5 for hosting VM
On Tue, Feb 17, 2009 at 11:21 PM, Maximilian Wilhelm <max@rfc2324.org>wrote:> Anno domini 2009 KARTHIK BALAJI G scripsit: > > Hi! > > [Please to not top-post. It''s far better readable the other way around] > > > Thanks for replying. I forgot to mention that I did try that step u > > suggested. It still hangs at the same place. I think we need to compile a > > driver for the vanilla kernel (2.6.25.8) for it to recognize xvd* > devices. > > Please correct me if I am wrong. > > > In that is case why xen related config options I enabled during kernel > > compilation did not compile any driver for recognizing these devices ? > > This should make you happy, to be able to boot the VM without any initrd: > max@vsc-build:/proc$ zgrep XEN config.gz > CONFIG_XEN=y > CONFIG_XEN_BLKDEV_FRONTEND=y > CONFIG_XEN_NETDEV_FRONTEND=y > CONFIG_HVC_XEN=y > > If you want to compile this stuff as modules you will have to use an > initrd of course. > > HTH > Ciao > Max > -- >Hi Max, My compiled kernel configuration looks like this , >zgrep XEN .config CONFIG_XEN=y CONFIG_XEN_MAX_DOMAIN_MEMORY=20 CONFIG_XEN_SAVE_RESTORE=y CONFIG_XEN_DEBUG_FS=y CONFIG_XEN_BLKDEV_FRONTEND=y CONFIG_NETXEN_NIC=m CONFIG_XEN_NETDEV_FRONTEND=y CONFIG_XEN_KBDDEV_FRONTEND=m CONFIG_HVC_XEN=y CONFIG_XEN_FBDEV_FRONTEND=m CONFIG_XEN_BALLOON=y CONFIG_XEN_SCRUB_PAGES=y So I think I compiled some as modules and the required in kernel itself. The kernel image with this configuration is failing. -Karthik _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Feb-21 13:07 UTC
Re: [Xen-users] Compiling lInux2.6.28.5 for hosting VM
On Wed, Feb 18, 2009 at 9:41 AM, KARTHIK BALAJI G <findkb@gmail.com> wrote:> Hi Max, > > Thanks for replying. I forgot to mention that I did try that step u > suggested. It still hangs at the same place. I think we need to compile aDid you really? Did you ALSO change root = "/dev/xvda1 ro" on domU config file?> driver for the vanilla kernel (2.6.25.8) for it to recognize xvd* devices. > Please correct me if I am wrong.Your post says "I did cat /proc/partitions - It listed xvda1 and xvda2 as partitions.". Assuming you did that from within domU, then your kernel already recognizes xvd* devices. Have you tried mounting it manually? Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users