Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] installing Gentoo in a xen VM
Date: Sun, 07 Dec 2014 13:23:46
Message-Id: 5402388.8HUQLDytBC@andromeda
In Reply to: Re: [gentoo-user] installing Gentoo in a xen VM by lee
1 On Thursday, December 04, 2014 11:55:50 PM lee wrote:
2 > Rich Freeman <rich0@g.o> writes:
3 > > On Thu, Dec 4, 2014 at 3:39 PM, lee <lee@××××××××.de> wrote:
4 > >> Rich Freeman <rich0@g.o> writes:
5 > >>> On Thu, Dec 4, 2014 at 1:11 PM, lee <lee@××××××××.de> wrote:
6 > >>>> Tomas Mozes <tomas.mozes@××××.sk> writes:
7 > >>>>> The kernel is not in stage3, you have to compile it yourself (or
8 > >>>>> download from somewhere). When you have the kernel image binary, the
9 > >>>>
10 > >>>>> xen configuration for the host can be simple as:
11 > >>>> Compile it with what? Are the sources in stage3, or downloaded so that
12 > >>>> I can compile a suitable Gentoo kernel within the chroot?
13 > >>>
14 > >>> If you've never installed Gentoo anywhere I wouldn't suggest doing it
15 > >>> for the first time under Xen.
16 > >>>
17 > >>> Gentoo stage3s include neither a binary kernel nor the sources. See:
18 > >>> https://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=7
19 > >>
20 > >> That's confusing ... I would think that I can create the file system on
21 > >> the LV and extract the stage3 archive, then chroot into it. From there,
22 > >> I'd have to 'emerge gentoo-sources' and to compile a kernel.
23 > >>
24 > >> Isn't that easier or the same as booting on bare metal into some life
25 > >> system and doing these things from there?
26 > >
27 > > When you boot a CD on bare metal all you're doing is creating the file
28 > > system, extracting the archive, and chrooting into it. So the outcome
29 > > is the same either way.
30 > >
31 > > If your xen guest is going to run on a regular LV you certainly can
32 > > just mount it on the host and chroot into it. That is exactly how I'd
33 > > go about it.
34 >
35 > Yes, I've already created a LV for it (along with others I'm going to
36 > need). Then I got stuck because I wanted to create an xfs file system
37 > and found that I hadn't installed a package required for that and
38 > couldn't install it because there was some problem with downloading
39 > package lists which they only fixed some time later ...
40 >
41 > BTW, can I use xfs for the VM, or will it be difficult to get the VM
42 > booted from xfs?
43
44 Using PV, not at all. As long as the kernel for the VM has XFS support built-
45 in. (This is valid for other filesystems as well)
46
47 > > Once you're in the chroot then you should install the kernel/etc per
48 > > the handbook.
49 >
50 > So there isn't really an advantage to use HVM ... it's even easier
51 > because I can access the LV from dom0.
52
53 Not really. For the PV, there isn't even a necessity to have a kernel in the
54 VM at all as it is simpler to have the kernel on the filesystem belonging to
55 the host and point the config to that.
56
57 --
58 Joost

Replies

Subject Author
Re: [gentoo-user] installing Gentoo in a xen VM lee <lee@××××××××.de>