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:19:01
Message-Id: 1644482.6sgKeQGbZq@andromeda
In Reply to: Re: [gentoo-user] installing Gentoo in a xen VM by lee
1 On Thursday, December 04, 2014 07:11:12 PM lee wrote:
2 > Tomas Mozes <tomas.mozes@××××.sk> writes:
3 > > On 2014-12-04 11:08, lee wrote:
4 > >> Tomas Mozes <tomas.mozes@××××.sk> writes:
5 > >>> On 2014-12-04 02:14, lee wrote:
6
7 <snipped part already answered>
8
9 > > name = "gentoobox"
10 > > kernel = "/xen/_kernel/kernel-3.14.23-gentoo-xen"
11 > > extra = "root=/dev/xvda1 net.ifnames=0"
12 > > memory = 2500
13 > > vcpus = 4
14 > > vif = [ '' ]
15 > > disk = [ '/dev/vg_data/gentoo-t1_root,raw,xvda1,rw' ]
16 >
17 > 'raw'? I'll have to look up what that does.
18 >
19 > > You can read about PV:
20 > > http://wiki.xenproject.org/wiki/Paravirtualization_%28PV%29
21 > >
22 > >>> If you prefer HVM, then you create a partition and use the install-cd
23 > >>> to boot. After your install cd boots up, you partition your disk
24 > >>> provided by xen dom0 (Debian), chroot, unpack stage3 and install the
25 > >>> system along with the kernel and a bootloader. You can boot your
26 > >>> Gentoo with pvgrub that will handle the booting to grub and it will
27 > >>> load the kernel. This way, the Gentoo machine is like a black box for
28 > >>> your Debian.
29 > >>>
30 > >>> I would recommend starting with HVM.
31 > >>
32 > >> Hm, I haven't used HVM yet. Can I change over to PV after the
33 > >> installation is done? What's the advantage of starting with HVM?
34 > >>
35 > >> The "disk" is an LVM volume and won't be partitioned. I've found it
36 > >> more reasonable to use a separate LVM volume for swap.
37 > >>
38 > >> I never installed Gentoo. I could start with my desktop since I
39 > >> want to
40 > >> replace Fedora anyway. That's a bit troublesome because I either have
41 > >> to plug in some disks for it which I'd need to buy first (I might get
42 > >> two small SSDs), or I'd have to repartition the existing ones.
43 > >>
44 > >> Hmmm. I think I'll try a VM with PV first. If that doesn't work, no
45 > >> harm is done and I can still ask when I'm stuck.
46 > >>
47 > >>
48 > >> Oh I almost forgot: Does the VM need internet access during the
49 > >> installation? The network setup is awfully complicated in this case.
50 > >
51 > > Well, you can copy the files to another place, but I have never done
52 > > this transformation. HVM is like a black box, you start like booting a
53 > > normal machine. For production, I always use PV, but for starters, HVM
54 > > is also fine.
55 >
56 > So you cannot easily change from HVM to PV?
57
58 You can, but then you need to ensure the install has both the PV as well as
59 the HVM drivers installed and can switch between them easily.
60
61 > > Yes, you will need internet access because we compile everything as it
62 > > goes, so you need to download the source files. Or, maybe you can
63 > > download a livedvd, but I've never tried that.
64 > >
65 > > Why is the networking complicated? Do you use bridging?
66 >
67 > Yes --- and it was terrible to begin with and still is very complicated.
68 > One of the VMs has a network card passed through to do pppoe for the
69 > internet connection, and it also does routing and firewalling. The
70 > Gentoo VM is supposed to have another network card passed through
71 > because I want a separate network for miscellaneous devices like IP
72 > phones and printers. Asterisk is going to run on the Gentoo VM.
73
74 This sounds convoluted. Why add to the complexity by adding multiple network
75 cards into the machine and pass the physical cards?
76
77 > Besides devices, there's the usual net, dmz and loc zones. To top it
78 > off, sooner or later I want to pass another network card to the
79 > firewall/router because I have an internet connection which is currently
80 > not in use and should be employed as an automatic fallback.
81
82 How many cards are you planning on having in the machine?
83 Are all these connected to the same switch?
84
85 --
86 Joost

Replies

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