Hi, All! I''m trying to install xen-2.0-testing and having some troubles.. Docs for Xen seem to be pretty vague about installation process and mostly tell me to use binary package. I want to compile my own kernel (both privileged and unprivileged), and can''t figure out, how.. Could someone tell me precise steps to do this? Thanks in advance! -- Timur Irmatov, JID: thor@jabber.org.au. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, 2005-09-02 at 18:36 +0500, Timur Irmatov wrote:> Hi, All! > > I''m trying to install xen-2.0-testing and having some troubles.. Docs > for Xen seem to be pretty vague about installation process and mostly > tell me to use binary package. > > I want to compile my own kernel (both privileged and unprivileged), > and can''t figure out, how.. > > Could someone tell me precise steps to do this? > > Thanks in advance! >We did put together some step by step instructions for our test lab. They are very specific but, if they are of use, I could send them to you. I''ve generally found the xen documentation good but the subject is so enormous that even the excellent documentation is not enough! Let me know - John -- John A. Sullivan III Open Source Development Corporation +1 207-985-7880 jsullivan@opensourcedevel.com If you would like to participate in the development of an open source enterprise class network security management system, please visit http://iscs.sourceforge.net _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, 2005-09-02 at 18:36 +0500, Timur Irmatov wrote:> Hi, All! > > I''m trying to install xen-2.0-testing and having some troubles.. Docs > for Xen seem to be pretty vague about installation process and mostly > tell me to use binary package. > > I want to compile my own kernel (both privileged and unprivileged), > and can''t figure out, how.. > > Could someone tell me precise steps to do this? > > Thanks in advance!By the way, it took us a little while to figure out that building custom kernels was just like building any kernel once xen was initially installed other than needing to specify ARCH=xen. We kept wondering why every time we ran make world, we would overwrite our configurations! When you first install xen, it will make its kernel trees. You can control the number, names and kernels of the trees by editing Makefile and the buildconfigs files. Once that is done, one can copy the kernel trees for various customizations. Then do typical make ARCH=xen menuconfig make ARCH=xen deps make ARCH=xen make ARCH=xen modules make ARCH=xen modules_install mkinitrd etc. Remember to copy the /lib/modules/<kernel directory> to the domain. I think those are the main points we had to work out. Hope this helps - John -- John A. Sullivan III Open Source Development Corporation +1 207-985-7880 jsullivan@opensourcedevel.com If you would like to participate in the development of an open source enterprise class network security management system, please visit http://iscs.sourceforge.net _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Sep 02, 2005 at 06:36:36PM +0500, Timur Irmatov wrote:> I''m trying to install xen-2.0-testing and having some troubles.. Docs > for Xen seem to be pretty vague about installation process and mostly > tell me to use binary package. > > I want to compile my own kernel (both privileged and unprivileged), > and can''t figure out, how.. > > Could someone tell me precise steps to do this?* Unpack kernel source tree somewhere (call it $KERNELSRCDIR) * cd $XENSRCDIR/linux-2.x.yy-xen-sparse * Run mkbuildtree from the linux-2.x.yy-xen-sparse directory with $KERNELSRCDIR as an argument (eg ./mkbuildtree $KERNELSRCDIR) * Go back to the kernel source dir and build your kernel more-or-less as normal, but set the architecture to xen *at* *all* *times* (ghods how much mess I''ve caused by not following that rule). So, basically: - make ARCH=xen menuconfig - make ARCH=xen dep - make ARCH=xen vmlinuz - make ARCH=xen modules - make ARCH=xen modules-install * Copy the built vmlinuz file to /boot/whatever. The only difference, effectively, between the dom0 and domU is choosing whether to enable the privileged guest (dom0). Note that a lot of kernel options (IDE support) tend to get turned off in domU mode, so don''t worry if your .config file looks a little thin when building the domU. - Matt _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
>> I''m trying to install xen-2.0-testing and having some troubles.. Docs >> for Xen seem to be pretty vague about installation process and mostly >> tell me to use binary package. >> >> I want to compile my own kernel (both privileged and unprivileged), >> and can''t figure out, how.. >> >> Could someone tell me precise steps to do this? > >* Unpack kernel source tree somewhere (call it $KERNELSRCDIR) > >* cd $XENSRCDIR/linux-2.x.yy-xen-sparse > >* Run mkbuildtree from the linux-2.x.yy-xen-sparse directory with > $KERNELSRCDIR as an argument (eg ./mkbuildtree $KERNELSRCDIR) > >* Go back to the kernel source dir and build your kernel more-or-less as > normal, but set the architecture to xen *at* *all* *times* (ghods > how much mess I''ve caused by not following that rule). So, > basically: > > - make ARCH=xen menuconfig# make ARCH=xen menuconfig scripts/kconfig/mconf arch/xen/Kconfig arch/xen/i386/Kconfig:747: can''t open file "drivers/pci/pcie/Kconfig" make[1]: *** [menuconfig] Error 1 make: *** [menuconfig] Error 2> - make ARCH=xen dep > - make ARCH=xen vmlinuz > - make ARCH=xen modules > - make ARCH=xen modules-install > >* Copy the built vmlinuz file to /boot/whatever. > >The only difference, effectively, between the dom0 and domU is choosing >whether to enable the privileged guest (dom0). Note that a lot of kernel >options (IDE support) tend to get turned off in domU mode, so don''t worry if >your .config file looks a little thin when building the domU.What''s wrong? Do you have any solution? Thanks Stephan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
>> I''m trying to install xen-2.0-testing and having some troubles.. Docs >> for Xen seem to be pretty vague about installation process and mostly >> tell me to use binary package. >> >> I want to compile my own kernel (both privileged and unprivileged), >> and can''t figure out, how.. >> >> Could someone tell me precise steps to do this? > >* Unpack kernel source tree somewhere (call it $KERNELSRCDIR) > >* cd $XENSRCDIR/linux-2.x.yy-xen-sparse > >* Run mkbuildtree from the linux-2.x.yy-xen-sparse directory with > $KERNELSRCDIR as an argument (eg ./mkbuildtree $KERNELSRCDIR) > >* Go back to the kernel source dir and build your kernel more-or-less as > normal, but set the architecture to xen *at* *all* *times* (ghods > how much mess I''ve caused by not following that rule). So, > basically: > > - make ARCH=xen menuconfig# make ARCH=xen menuconfig scripts/kconfig/mconf arch/xen/Kconfig arch/xen/i386/Kconfig:747: can''t open file "drivers/pci/pcie/Kconfig" make[1]: *** [menuconfig] Error 1 make: *** [menuconfig] Error 2 # cd drivers/pci # ln -s . pcie # cd ../.. Now it works. Do i need to select something in the menu?> - make ARCH=xen depnot needed anymore (with kernel 2.6)> - make ARCH=xen vmlinuz# make ARCH=xen vmlinuz CHK include/linux/version.h CC arch/i386/kernel/asm-offsets.s In file included from include/asm-xen/asm/msr.h:5, from include/asm-xen/asm/processor.h:17, from include/asm/thread_info.h:16, from include/linux/thread_info.h:21, from include/linux/spinlock.h:12, from include/linux/capability.h:45, from include/linux/sched.h:7, from arch/i386/kernel/asm-offsets.c:7: include/asm-xen/hypervisor.h:44:39: asm-generic/pgtable-nopmd.h: No such file or directory In file included from include/asm-xen/asm/msr.h:5, from include/asm-xen/asm/processor.h:17, from include/asm/thread_info.h:16, from include/linux/thread_info.h:21, from include/linux/spinlock.h:12, from include/linux/capability.h:45, from include/linux/sched.h:7, from arch/i386/kernel/asm-offsets.c:7: include/asm-xen/hypervisor.h:79: error: parse error before ''*'' token include/asm-xen/hypervisor.h:79: warning: function declaration isn''t a prototype include/asm-xen/hypervisor.h:90: error: parse error before ''*'' token include/asm-xen/hypervisor.h:90: warning: function declaration isn''t a prototype In file included from include/linux/timex.h:61, from include/linux/sched.h:11, from arch/i386/kernel/asm-offsets.c:7: include/asm-xen/asm/io.h:48:31: asm-generic/iomap.h: No such file or directory make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1 make: *** [arch/i386/kernel/asm-offsets.s] Error 2> - make ARCH=xen modules > - make ARCH=xen modules-install > >* Copy the built vmlinuz file to /boot/whatever. > >The only difference, effectively, between the dom0 and domU is choosing >whether to enable the privileged guest (dom0). Note that a lot of kernel >options (IDE support) tend to get turned off in domU mode, so don''t worry if >your .config file looks a little thin when building the domU.What''s wrong? Do you have any solution? Thanks Stephan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, 2005-09-02 at 18:42 +0200, Stephan Böni wrote:> >> I''m trying to install xen-2.0-testing and having some troubles.. Docs > >> for Xen seem to be pretty vague about installation process and mostly > >> tell me to use binary package. > >> > >> I want to compile my own kernel (both privileged and unprivileged), > >> and can''t figure out, how.. > >> > >> Could someone tell me precise steps to do this? > > > >* Unpack kernel source tree somewhere (call it $KERNELSRCDIR) > > > >* cd $XENSRCDIR/linux-2.x.yy-xen-sparse > > > >* Run mkbuildtree from the linux-2.x.yy-xen-sparse directory with > > $KERNELSRCDIR as an argument (eg ./mkbuildtree $KERNELSRCDIR) > > > >* Go back to the kernel source dir and build your kernel more-or-less as > > normal, but set the architecture to xen *at* *all* *times* (ghods > > how much mess I''ve caused by not following that rule). So, > > basically: > > > > - make ARCH=xen menuconfig > > # make ARCH=xen menuconfig > scripts/kconfig/mconf arch/xen/Kconfig > arch/xen/i386/Kconfig:747: can''t open file "drivers/pci/pcie/Kconfig" > make[1]: *** [menuconfig] Error 1 > make: *** [menuconfig] Error 2 > > # cd drivers/pci > # ln -s . pcie > # cd ../.. > > Now it works. Do i need to select something in the menu? > > > - make ARCH=xen dep > > not needed anymore (with kernel 2.6) > > > - make ARCH=xen vmlinuz > > # make ARCH=xen vmlinuz > CHK include/linux/version.h > CC arch/i386/kernel/asm-offsets.s > In file included from include/asm-xen/asm/msr.h:5, > from include/asm-xen/asm/processor.h:17, > from include/asm/thread_info.h:16, > from include/linux/thread_info.h:21, > from include/linux/spinlock.h:12, > from include/linux/capability.h:45, > from include/linux/sched.h:7, > from arch/i386/kernel/asm-offsets.c:7: > include/asm-xen/hypervisor.h:44:39: asm-generic/pgtable-nopmd.h: No such file or > directory > In file included from include/asm-xen/asm/msr.h:5, > from include/asm-xen/asm/processor.h:17, > from include/asm/thread_info.h:16, > from include/linux/thread_info.h:21, > from include/linux/spinlock.h:12, > from include/linux/capability.h:45, > from include/linux/sched.h:7, > from arch/i386/kernel/asm-offsets.c:7: > include/asm-xen/hypervisor.h:79: error: parse error before ''*'' token > include/asm-xen/hypervisor.h:79: warning: function declaration isn''t a prototype > include/asm-xen/hypervisor.h:90: error: parse error before ''*'' token > include/asm-xen/hypervisor.h:90: warning: function declaration isn''t a prototype > In file included from include/linux/timex.h:61, > from include/linux/sched.h:11, > from arch/i386/kernel/asm-offsets.c:7: > include/asm-xen/asm/io.h:48:31: asm-generic/iomap.h: No such file or directory > make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1 > make: *** [arch/i386/kernel/asm-offsets.s] Error 2 > > > - make ARCH=xen modules > > - make ARCH=xen modules-install > > > >* Copy the built vmlinuz file to /boot/whatever. > > > >The only difference, effectively, between the dom0 and domU is choosing > >whether to enable the privileged guest (dom0). Note that a lot of kernel > >options (IDE support) tend to get turned off in domU mode, so don''t worry if > >your .config file looks a little thin when building the domU. > > What''s wrong? Do you have any solution? ><snip> ouch! I''m afraid I don''t off hand and am under a nasty deadline and so can''t be of much help. I hope someone else on the list can step in and help - John -- John A. Sullivan III Open Source Development Corporation +1 207-985-7880 jsullivan@opensourcedevel.com Financially sustainable open source development http://www.opensourcedevel.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Easiest way to build your kernels: * Download Xen source bia tarball or mercurial. * make world * cd linux-2.6.whatever-xen0 * make ARCH=xen menuconfig # change stuff * cd .. * make dist *Should* pick up your config changes and put the build kernels under the dist/install/ tree. Cheers, Mark On Friday 02 September 2005 18:29, John A. Sullivan III wrote:> On Fri, 2005-09-02 at 18:42 +0200, Stephan Böni wrote: > > >> I''m trying to install xen-2.0-testing and having some troubles.. Docs > > >> for Xen seem to be pretty vague about installation process and mostly > > >> tell me to use binary package. > > >> > > >> I want to compile my own kernel (both privileged and unprivileged), > > >> and can''t figure out, how.. > > >> > > >> Could someone tell me precise steps to do this? > > > > > >* Unpack kernel source tree somewhere (call it $KERNELSRCDIR) > > > > > >* cd $XENSRCDIR/linux-2.x.yy-xen-sparse > > > > > >* Run mkbuildtree from the linux-2.x.yy-xen-sparse directory with > > > $KERNELSRCDIR as an argument (eg ./mkbuildtree $KERNELSRCDIR) > > > > > >* Go back to the kernel source dir and build your kernel more-or-less as > > > normal, but set the architecture to xen *at* *all* *times* (ghods > > > how much mess I''ve caused by not following that rule). So, > > > basically: > > > > > > - make ARCH=xen menuconfig > > > > # make ARCH=xen menuconfig > > scripts/kconfig/mconf arch/xen/Kconfig > > arch/xen/i386/Kconfig:747: can''t open file "drivers/pci/pcie/Kconfig" > > make[1]: *** [menuconfig] Error 1 > > make: *** [menuconfig] Error 2 > > > > # cd drivers/pci > > # ln -s . pcie > > # cd ../.. > > > > Now it works. Do i need to select something in the menu? > > > > > - make ARCH=xen dep > > > > not needed anymore (with kernel 2.6) > > > > > - make ARCH=xen vmlinuz > > > > # make ARCH=xen vmlinuz > > CHK include/linux/version.h > > CC arch/i386/kernel/asm-offsets.s > > In file included from include/asm-xen/asm/msr.h:5, > > from include/asm-xen/asm/processor.h:17, > > from include/asm/thread_info.h:16, > > from include/linux/thread_info.h:21, > > from include/linux/spinlock.h:12, > > from include/linux/capability.h:45, > > from include/linux/sched.h:7, > > from arch/i386/kernel/asm-offsets.c:7: > > include/asm-xen/hypervisor.h:44:39: asm-generic/pgtable-nopmd.h: No such > > file or directory > > In file included from include/asm-xen/asm/msr.h:5, > > from include/asm-xen/asm/processor.h:17, > > from include/asm/thread_info.h:16, > > from include/linux/thread_info.h:21, > > from include/linux/spinlock.h:12, > > from include/linux/capability.h:45, > > from include/linux/sched.h:7, > > from arch/i386/kernel/asm-offsets.c:7: > > include/asm-xen/hypervisor.h:79: error: parse error before ''*'' token > > include/asm-xen/hypervisor.h:79: warning: function declaration isn''t a > > prototype include/asm-xen/hypervisor.h:90: error: parse error before ''*'' > > token include/asm-xen/hypervisor.h:90: warning: function declaration > > isn''t a prototype In file included from include/linux/timex.h:61, > > from include/linux/sched.h:11, > > from arch/i386/kernel/asm-offsets.c:7: > > include/asm-xen/asm/io.h:48:31: asm-generic/iomap.h: No such file or > > directory make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1 > > make: *** [arch/i386/kernel/asm-offsets.s] Error 2 > > > > > - make ARCH=xen modules > > > - make ARCH=xen modules-install > > > > > >* Copy the built vmlinuz file to /boot/whatever. > > > > > >The only difference, effectively, between the dom0 and domU is choosing > > >whether to enable the privileged guest (dom0). Note that a lot of > > > kernel options (IDE support) tend to get turned off in domU mode, so > > > don''t worry if your .config file looks a little thin when building the > > > domU. > > > > What''s wrong? Do you have any solution? > > <snip> > ouch! I''m afraid I don''t off hand and am under a nasty deadline and so > can''t be of much help. I hope someone else on the list can step in and > help - John_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson wrote (ao):> Easiest way to build your kernels: > > * Download Xen source bia tarball or mercurial. > * make world > * cd linux-2.6.whatever-xen0 > * make ARCH=xen menuconfig # change stuff > * cd .. > * make dist > > *Should* pick up your config changes and put the build kernels under the > dist/install/ tree.Exactly, this is (almost) how I do it too, and It Works For Me(tm). I copy the xen0 kernel .config to a different place, copy my own .config in place, do a ''make ARCH=xen oldconfig'', and look in the xen0 .config what I need to answer. The documentation on http://www.cl.cam.ac.uk/Research/SRG/netos/xen/readmes/user/user.html is very good. Kudos! Kind regards, Sander -- Humilis IT Services and Solutions http://www.humilis.net _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
>Easiest way to build your kernels: > >* Download Xen source bia tarball or mercurial. >* make world >* cd linux-2.6.whatever-xen0 >* make ARCH=xen menuconfig # change stuff >* cd .. >* make dist > >*Should* pick up your config changes and put the build kernels under the >dist/install/ tree.Well done. I've copied all in the right place and runned the mkinitrd command. After editing the menu.lst file i've rebooted the system using this kernel. But bad news: I've got a boot error "INITRD TO BIG". Do you have any suggestions? Thanks. Stephan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Thanks to all who replied! > > I have successfully compiled my own kernels for use with Xen, > now I try to add one virtual machine.. I have a couple of > questions.. First > one: my machine has about 224 megs of ram, I have reserved > 128 megs for dom0, and tried to launch domU machine with 96 > megs, but memory allocation failed until I lowered amount of > memory for virtual machine to 80 megs (actually, I tried with > 95, 94, 93, 90, then jumped to 80).. Is this normal?The Xen kernel itself uses some memory, both directly (about half a meg or so), and dynamically allocated (some megabytes, definitely > 4MB). You may want to try a binary search between 80 and 90, but my guess is that you''ll end up closer to 80 than 90. The Dom0 memory is really that, it''s memory used for the kernel that is loaded as Domain0, not counting memory that the Xen kernel itself needs.> > Second question: when domU boots, I see a lot of ''Warning: > failed update VA mapping''.. But machine boots successfully.. > Is this sign of some problem?Sorry, don''t know that one... -- Mats _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks to all who replied! I have successfully compiled my own kernels for use with Xen, now I try to add one virtual machine.. I have a couple of questions.. First one: my machine has about 224 megs of ram, I have reserved 128 megs for dom0, and tried to launch domU machine with 96 megs, but memory allocation failed until I lowered amount of memory for virtual machine to 80 megs (actually, I tried with 95, 94, 93, 90, then jumped to 80).. Is this normal? Second question: when domU boots, I see a lot of ''Warning: failed update VA mapping''.. But machine boots successfully.. Is this sign of some problem? P.S. I''m using xen-2.0-testing, kernel-2.6.12.5.. On 9/2/05, Timur Irmatov <irmatov@gmail.com> wrote:> Hi, All! > > > I''m trying to install xen-2.0-testing and having some troubles.. Docs > for Xen seem to be pretty vague about installation process and mostly > tell me to use binary package. > > I want to compile my own kernel (both privileged and unprivileged), > and can''t figure out, how.. > > Could someone tell me precise steps to do this? > > Thanks in advance! > > > -- > Timur Irmatov, JID: thor@jabber.org.au. >-- Timur Irmatov, JID: thor@jabber.org.au. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 9/7/05, Petersson, Mats <mats.petersson@amd.com> wrote:> The Xen kernel itself uses some memory, both directly (about half a meg > or so), and dynamically allocated (some megabytes, definitely > 4MB). > You may want to try a binary search between 80 and 90, but my guess is > that you''ll end up closer to 80 than 90. > > The Dom0 memory is really that, it''s memory used for the kernel that is > loaded as Domain0, not counting memory that the Xen kernel itself needs.I got it, thanks for clarifications..> > > > Second question: when domU boots, I see a lot of ''Warning: > > failed update VA mapping''.. But machine boots successfully.. > > Is this sign of some problem?In mailing list archive I see some reports of problems with 2.6.12 kernel. Does anybody has positive experience with 2.6.12 kernel? May be I should switch to 2.6.11, before I get into any troubles.. :) -- Timur Irmatov, JID: thor@jabber.org.au. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Sep 07, 2005 at 09:39:55AM +0200, Petersson, Mats wrote:> > Thanks to all who replied! > > > > I have successfully compiled my own kernels for use with Xen, > > now I try to add one virtual machine.. I have a couple of > > questions.. First > > one: my machine has about 224 megs of ram, I have reserved > > 128 megs for dom0, and tried to launch domU machine with 96 > > megs, but memory allocation failed until I lowered amount of > > memory for virtual machine to 80 megs (actually, I tried with > > 95, 94, 93, 90, then jumped to 80).. Is this normal? > > The Xen kernel itself uses some memory, both directly (about half a meg > or so), and dynamically allocated (some megabytes, definitely > 4MB). > You may want to try a binary search between 80 and 90, but my guess is > that you''ll end up closer to 80 than 90. > > The Dom0 memory is really that, it''s memory used for the kernel that is > loaded as Domain0, not counting memory that the Xen kernel itself needs.Somewhere in the documentation I found 64 MB as a safe lower limit for the Dom0 and that''s what I use. SInce my Dom0 isn''t doing much besides providing storage for DomUs and managing them, it copes just fine with only 64 MB. I did however add 128 MB of swap to it because the Debian package tools tend to get rather unhappy with less than 50 MB of usable address space. Regards, Alex. -- "Opportunity is missed by most people because it is dressed in overalls and looks like work." -- Thomas A. Edison _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users