Re: [vserver] Mix and match guest distributions

From: Daniel Hokka Zakrisson <daniel_at_hozac.com>
Date: Fri 15 Apr 2011 - 15:12:28 BST
Message-ID: <53074.192.168.102.6.1302876748.squirrel@192.168.100.17>

Roderick A. Anderson wrote:
> Daniel Hokka Zakrisson wrote:
>> Roderick A. Anderson wrote:
>>> Making another pass at some questions I've had over the years. I'm
>>> (re)looking at what distributions are used for the host and how to get
>>> other distributions in as guests.
>>>
>>> Excellent information on the web site but I haven't been able to find a
>>> few things.
>>>
>>> 1. Is it possible to build a non-Gentoo based guest template?
>>>
>>> Say I have a CentOS or Ubuntu guest on one system and want _VERY_
>>> similar bunches of guests on other systems. Can I build a template of a
>>> guest to put somewhere (CD/DVD, USB thumb, network) and use as needed?
>>
>> Sure. -m template is not at all Gentoo specific.
>
> I thought so but I found no examples. This is great.

I tend to find that templates just get outdated, and I hate having to
upgrade things right after installing. I'm just impatient that way :-)

>>> 2. If so, how do I create the template?
>>>
>>> Is it as simple as building a tarball of a (non-running) guest?
>>
>> I'd use cpio as it does hardlinks correctly, but yes.
>
> If you have a minute or two could you refresh my memory. Hardlinks
> "correctly" how? Heck I'll dig into the man pages later and see if I
> can figure the nuances of tar verses cpio.

Apparently this has changed and is no longer accurate. tar appears to
handle them fine as well. It used to be tar would store two copies of
the file, and extract them without regard to the fact that they were
hardlinks.

>>> 3. And if I'm heading down a good path what would you say is the most
>>> stripped down distribution that could be used for the host?
>>>
>>> Yes disk space is cheap and I can and do turn off all the
>>> non-essential services but every time I check for updates there is a
>>> bunch of stuff I have to download because of the coarse granularity of
>>> the dependencies of so many packages. (Would that be a mouth full if I
>>> had to say it out loud?)
>>
>> I run several CentOS systems with root filesystems <2GB, but to each
>> their own.
>
> Any tricks you can suggest on getting a minimal CentOS(/Linux-Vserver)
> host install?

Easiest way? Install with a kickstart with a %packages containing
only the few things you want. To clean up after the fact, I usually
start with all the x86 binaries, yum remove libgcc.i?86 glibc.i?86
then look through
rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH} %{SIZE}\n' | sort -n -k 2

But if at all possible, I'd go down the kickstart route.

-- 
Daniel Hokka Zakrisson
Received on Fri Apr 15 15:12:39 2011
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 15 Apr 2011 - 15:12:39 BST by hypermail 2.1.8