Re: howto build debian xen kernel?

2007-02-10 Thread Andy Smith
On Tue, Feb 06, 2007 at 03:58:45PM +0100, Jonas Meurer wrote:
 I've installed xen-hypervisor-3.0.3-1-amd64, which includes
 /boot/xen-3.0.3-1-amd64.gz.
 
 Do i still need a xen-enabled host kernel, or may i use the current
 self compiled kernel?

You need a kernel with xen patches and configured as dom0, such as
one of the debian xen kernels, or a kernel you've patched yourself.

 I saw that the current linux-source-2.6.18 from unstable contains a
 menuconfig option 'Xen support'. I guess that i need to enable this,
 and then use /boot/xen-3.0.3-1-amd64.gz as domain0 kernel.
 
 Is that correct?

Well, sort of.  The Linux kernel with Xen patches can function as
dom0 kernel or domU kernel or both, depending on how it's
configured.  In dom0's grub config you set the xen hypervisor (in
your case /boot/xen-3.0.3-1-amd64.gz) as the kernel, with your dom0
kernel as a module line in grub.

Later on you use the domU kernel (which may actually be the exact
same kernel you usein dom0) in the user domains' config files.

 But I cannot find any example kernel config in the xen-docs package.

It's pretty self explanatory when you look in the Xen part of the
kernel config, if you're using a xen-patched kernel.

Cheers,
Andy

-- 
http://bitfolk.com/ -- No-nonsense VPS hosting
Encrypted mail welcome - keyid 0x604DE5DB


signature.asc
Description: Digital signature


Re: howto build debian xen kernel?

2007-02-06 Thread Jonas Meurer
On 06/02/2007 Grok Mogger wrote:
 I didn't find any documentation about that topic. All howtos/tutorials/...
 that talk about building a xen kernel, use the original xen kernel
 sources, not the debian kernel source with patches.
 
 You may have some need to compile your own kernel, but if you'd 
 be fine with a pre-made vanilla Debian kernel, you can just 
 install the appropriate Xen package.  The right one will drop a 
 working Xen kernel in your /boot directory.  As I recall, you'll 
 have to edit your GRUB menu.lst file and make an initrd with 
 update-initramfs afterwards.  I think you want to pick one of 
 the packages that starts with xen-hypervisor.  There's a few 
 of them.
 
 I hope this might save you some trouble.

Hello Grok,

I've installed xen-hypervisor-3.0.3-1-amd64, which includes
/boot/xen-3.0.3-1-amd64.gz.

Do i still need a xen-enabled host kernel, or may i use the current
self compiled kernel?

I saw that the current linux-source-2.6.18 from unstable contains a
menuconfig option 'Xen support'. I guess that i need to enable this,
and then use /boot/xen-3.0.3-1-amd64.gz as domain0 kernel.

Is that correct?

The description for xen-hypervisor-3.0-unstable-1-amd64 claims:

 In order to boot a XEN system along with this package you also need a
 kernel specifically crafted to work as the Domain 0, mediating hardware
 access for XEN itself.  An example config file for this kernel and
 documentation on how to build it can be found in the xen-docs package.

But I cannot find any example kernel config in the xen-docs package.

greetings,
 jonas


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: howto build debian xen kernel?

2007-02-06 Thread Grok Mogger

Jonas Meurer wrote:

On 06/02/2007 Grok Mogger wrote:

I didn't find any documentation about that topic. All howtos/tutorials/...
that talk about building a xen kernel, use the original xen kernel
sources, not the debian kernel source with patches.
You may have some need to compile your own kernel, but if you'd 
be fine with a pre-made vanilla Debian kernel, you can just 
install the appropriate Xen package.  The right one will drop a 
working Xen kernel in your /boot directory.  As I recall, you'll 
have to edit your GRUB menu.lst file and make an initrd with 
update-initramfs afterwards.  I think you want to pick one of 
the packages that starts with xen-hypervisor.  There's a few 
of them.


I hope this might save you some trouble.


Hello Grok,

I've installed xen-hypervisor-3.0.3-1-amd64, which includes
/boot/xen-3.0.3-1-amd64.gz.

Do i still need a xen-enabled host kernel, or may i use the current
self compiled kernel?

I saw that the current linux-source-2.6.18 from unstable contains a
menuconfig option 'Xen support'. I guess that i need to enable this,
and then use /boot/xen-3.0.3-1-amd64.gz as domain0 kernel.

Is that correct?

The description for xen-hypervisor-3.0-unstable-1-amd64 claims:

 In order to boot a XEN system along with this package you also need a
 kernel specifically crafted to work as the Domain 0, mediating hardware
 access for XEN itself.  An example config file for this kernel and
 documentation on how to build it can be found in the xen-docs package.

But I cannot find any example kernel config in the xen-docs package.

greetings,
 jonas




Hey Jonas,

Okay, first off

[quoting]
The description for xen-hypervisor-3.0-unstable-1-amd64 claims:

 In order to boot a XEN system along with this package you also 
need a
 kernel specifically crafted to work as the Domain 0, mediating 
hardware

 access for XEN itself.  An example config file for this kernel and
 documentation on how to build it can be found in the xen-docs 
package.


But I cannot find any example kernel config in the xen-docs package.
[end quoting]

I know.  Believe me, I know.  That frustrated me to no end.  I 
never found any example kernel config either, nor did I find 
instructions on how I was supposed to build this kernel that I 
*supposedly* needed.  In truth, it turned out that I never had 
to build a kernel at all.  Now is it just me, or does that text 
not make it sound like you need to install the xen-hypervisor 
package and then still take further steps to build a kernel? 
Very misleading at best, flat out wrong at worst.


Anyway.  Let's see if I can help...

Do i still need a xen-enabled host kernel, or may i use the current
self compiled kernel?

I'm not totally sure what you mean here...  I think the short 
answer is yes, you're kernel needs to be xen-enabled.


I saw that the current linux-source-2.6.18 from unstable contains a
menuconfig option 'Xen support'. I guess that i need to enable this,
and then use /boot/xen-3.0.3-1-amd64.gz as domain0 kernel.

Is that correct?

I *think* so.  I'm not totally sure I understand what you mean, 
but I think you're on the right track.  You have a self-compiled 
kernel that you were using on a non-Xen system, and you want to 
use it now with Xen?  Is that it?  Maybe it'll help if I just 
show you what I did.  I used all pre-packaged kernels that came 
with Debian, no self-compiling at all.  If you have some custom 
kernel job you need, then maybe you can fill in the gaps around 
what I did.


  I did this on etch a while ago with Xen 3.0.2, and here's 
basically what the process was.  I hope I'm not missing 
anything, I'm doing this from memory.  =)




1)  Install Xen-Hypervisor.  This dropped a kernel in my boot 
directory.  /boot/xen-3.0.2-1-i386.gz.  You use this kernel 
for both your Dom0 and your Guest Domains (DomU's).  I guess it 
also dropped a kernel called vmlinuz-2.6.16-2-xen-686 in 
/boot.  Guess I forgot about that one.  =P


2)  Edit your /boot/grub/menu.lst file.  I had to add an 
option to boot into Xen.  Here's what I added as a sample:


## ## End Default Options ##

title   Xen 3.0 / XenLinux 2.6
kernel  /boot/xen-3.0.2-1-i386.gz dom0_mem=256M console=vga
module  /boot/vmlinuz-2.6.16-2-xen-686 root=/dev/md0 ro 
console=tty0

module  /boot/initrd.img-2.6.16-2-xen-686
savedefault
boot

3)  I had to make the initrd you see there 
(initrd.im-2.6.16-2-xen-686).  I recall trying yaird and it 
not working.  I did have success with update-initramfs.  I can't 
recall exactly what I did (sorry!), but I think it required the 
xen kernel modules.  I bet the xen-hypervisor package also 
created a directory in /lib/modules/ labeled something similar 
to 2.6.16-2-xen-686 (my xen kernel modules).  If not, you may 
need to install another package to get those.


4)  Now I seem to recall that being all I needed to boot into 
Dom0.  The one other thing (which may be fixed now) is that 
when I tried doing any Xen commands 

howto build debian xen kernel?

2007-02-05 Thread Jonas Meurer
Hello,

I just tried to build a debian xen kernel, based on linux-source-2.6.18,
linux-patch-debian-2.6.18 and kernel-package.

According to the docs i found, i can apply the debian kernel sources in
the following way:

resivo:/usr/src/linux-source-2.6.18$ ../kernel-patches/all/2.6.18/apply/debian 
2.6.18-10

unfortunately, the xen (and vserver) patches are not in the default
patchset, but in an extra 'series'. so i thought that the following
should work:

resivo:/usr/src/linux-source-2.6.18$ ../kernel-patches/all/2.6.18/apply/debian 
2.6.18-10-extra
Error: Target revision is not in our list of revisions

obviously, it doesn't.

So my simple question is: how do i build a debian xen kernel with
make-kpkg from debian kernel sources?

The official debian kernel images don't use make-kpkg, so it wouldn't
help to look in debian/rules from linux-2.6.

I didn't find any documentation about that topic. All howtos/tutorials/...
that talk about building a xen kernel, use the original xen kernel
sources, not the debian kernel source with patches.

greetings,
 jonas


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: howto build debian xen kernel?

2007-02-05 Thread Grok Mogger

Jonas Meurer wrote:

Hello,

I just tried to build a debian xen kernel, based on linux-source-2.6.18,
linux-patch-debian-2.6.18 and kernel-package.

According to the docs i found, i can apply the debian kernel sources in
the following way:

resivo:/usr/src/linux-source-2.6.18$ ../kernel-patches/all/2.6.18/apply/debian 
2.6.18-10

unfortunately, the xen (and vserver) patches are not in the default
patchset, but in an extra 'series'. so i thought that the following
should work:

resivo:/usr/src/linux-source-2.6.18$ ../kernel-patches/all/2.6.18/apply/debian 
2.6.18-10-extra
Error: Target revision is not in our list of revisions

obviously, it doesn't.

So my simple question is: how do i build a debian xen kernel with
make-kpkg from debian kernel sources?

The official debian kernel images don't use make-kpkg, so it wouldn't
help to look in debian/rules from linux-2.6.

I didn't find any documentation about that topic. All howtos/tutorials/...
that talk about building a xen kernel, use the original xen kernel
sources, not the debian kernel source with patches.

greetings,
 jonas




You may have some need to compile your own kernel, but if you'd 
be fine with a pre-made vanilla Debian kernel, you can just 
install the appropriate Xen package.  The right one will drop a 
working Xen kernel in your /boot directory.  As I recall, you'll 
have to edit your GRUB menu.lst file and make an initrd with 
update-initramfs afterwards.  I think you want to pick one of 
the packages that starts with xen-hypervisor.  There's a few 
of them.


I hope this might save you some trouble.

- GM


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.26/670 - Release Date: 2/5/2007 2:04 
PM


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]