1 |
On Thursday, September 24, 2015 03:33:28 PM Håkon Alstadheim wrote: |
2 |
> Den 24. sep. 2015 14:53, skrev Rich Freeman: |
3 |
> > On Thu, Sep 24, 2015 at 6:05 AM, hw <hw@×××××.de> wrote: |
4 |
> >> Hi, |
5 |
> >> |
6 |
> >> I'm installing Gentoo as a xen PV guest. Do I need to install a |
7 |
> >> bootloader |
8 |
> >> like grub, or should I rather just specify the kernel to boot in the |
9 |
> >> definition file of the guest? If I do the latter, what about the kernel |
10 |
> >> command line? |
11 |
> >> |
12 |
> >> Is there anything I should consider? The host is also running Gentoo. |
13 |
> > |
14 |
> > You can do either. I suspect it would be easier to just use grub. I |
15 |
> > don't know if xen provides a way to provide a command-line, if not you |
16 |
> > could build a default command-line into your kernel. |
17 |
> |
18 |
> Depending on your hardware you will want to use hvm or pvm for |
19 |
> efficiency. (VT-x means hvm is more efficient). |
20 |
|
21 |
What do you base this on? |
22 |
Without VT-x, HVM doesn't even work, which means PV is only option. |
23 |
|
24 |
With VT-x, PV still has higher performance as the drivers inside the guest |
25 |
talk directly to the host. |
26 |
|
27 |
> If running hvm on |
28 |
> quemu-xen-traditional, you HAVE to use a bootloader inside the VM, or |
29 |
> some kind of netboot/pvgrub thing. If running upstream quemu for a hvm, |
30 |
> you can choose. I find it less of a hassle to use bootloader inside the |
31 |
> VM. |
32 |
|
33 |
It's simple, if you don't have full access to the host. |
34 |
If you have full access, it's actually simpler as you don't have to worry |
35 |
about boot-order, partitioning and a bootloader. |
36 |
|
37 |
> If running pv, I BELIEVE you have to specify kernel and boot options |
38 |
> outside the VM-image, possibly through pvgrub. Pvgrub is supposed to be |
39 |
> able to fish out kernel and initrd from the VM disk. I never bothered to |
40 |
> get that working. Here is an example excerpt from a PVM I use (for a |
41 |
> debian vm): |
42 |
> --print.pvm--- |
43 |
> builder = "generic" |
44 |
> kernel = "/etc/xen/wheezy/vmlinuz-3.16.0-0.bpo.4-amd64" |
45 |
> ramdisk = "/etc/xen/wheezy/initrd.img-3.16.0-0.bpo.4-amd64" |
46 |
> extra = "root=/dev/xvda console=hvc0 tmem" |
47 |
> -- |
48 |
> For explanation check "man xl.cfg". When you specify |
49 |
> kernel&ramdisk¶meters in the vm config, you do NOT need a /boot/ |
50 |
> directory on your vm. Obviously when you build a kernel inside the vm, |
51 |
> it will end up in /boot, so you have to provide a way for the |
52 |
> dom0/hypervisor to load your kernel, either (when using full |
53 |
> virtualization) a regular boot-loader inside the vm, or (for a PV guest) |
54 |
> through some other means to let the dom0/hypervisor load your image. |
55 |
|
56 |
-- |
57 |
Joost |