[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: howto build debian xen kernel?



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 (xm top and the like), I got some error messages because xend wasn't running. I cannot recall how I made it start up at boot, but it wasn't hard.

After all this, creating and getting a Guest to boot was another long and complicated process. I could help you out with that too if what I've written so far proves useful.

Hope this helps,
- GM



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.28/672 - Release Date: 2/6/2007 10:22 AM



Reply to: