Gentoo Archives: gentoo-user

From: "Håkon Alstadheim" <hakon@×××××××××××××××.no>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] installing Gentoo as a xen guest
Date: Thu, 24 Sep 2015 13:33:44
Message-Id: 5603FBA8.1090508@alstadheim.priv.no
In Reply to: Re: [gentoo-user] installing Gentoo as a xen guest by Rich Freeman
1 Den 24. sep. 2015 14:53, skrev Rich Freeman:
2 > On Thu, Sep 24, 2015 at 6:05 AM, hw <hw@×××××.de> wrote:
3 >> Hi,
4 >>
5 >> I'm installing Gentoo as a xen PV guest. Do I need to install a bootloader
6 >> like grub, or should I rather just specify the kernel to boot in the
7 >> definition file of the guest? If I do the latter, what about the kernel
8 >> command line?
9 >>
10 >> Is there anything I should consider? The host is also running Gentoo.
11 >>
12 > You can do either. I suspect it would be easier to just use grub. I
13 > don't know if xen provides a way to provide a command-line, if not you
14 > could build a default command-line into your kernel.
15 >
16 Depending on your hardware you will want to use hvm or pvm for
17 efficiency. (VT-x means hvm is more efficient). If running hvm on
18 quemu-xen-traditional, you HAVE to use a bootloader inside the VM, or
19 some kind of netboot/pvgrub thing. If running upstream quemu for a hvm,
20 you can choose. I find it less of a hassle to use bootloader inside the
21 VM. If running pv, I BELIEVE you have to specify kernel and boot options
22 outside the VM-image, possibly through pvgrub. Pvgrub is supposed to be
23 able to fish out kernel and initrd from the VM disk. I never bothered to
24 get that working. Here is an example excerpt from a PVM I use (for a
25 debian vm):
26 --print.pvm---
27 builder = "generic"
28 kernel = "/etc/xen/wheezy/vmlinuz-3.16.0-0.bpo.4-amd64"
29 ramdisk = "/etc/xen/wheezy/initrd.img-3.16.0-0.bpo.4-amd64"
30 extra = "root=/dev/xvda console=hvc0 tmem"
31 --
32 For explanation check "man xl.cfg". When you specify
33 kernel&ramdisk&parameters in the vm config, you do NOT need a /boot/
34 directory on your vm. Obviously when you build a kernel inside the vm,
35 it will end up in /boot, so you have to provide a way for the
36 dom0/hypervisor to load your kernel, either (when using full
37 virtualization) a regular boot-loader inside the vm, or (for a PV guest)
38 through some other means to let the dom0/hypervisor load your image.

Replies

Subject Author
Re: [gentoo-user] installing Gentoo as a xen guest "J. Roeleveld" <joost@××××××××.org>