[CentOS-devel] Re: CentOS5 virtual machine image

Nils Toedtmann centos-mail at nils.toedtmann.net
Thu Jan 25 19:54:13 UTC 2007

Am Donnerstag, den 25.01.2007, 17:01 +0000 schrieb Karanbir Singh: 
> Nils Toedtmann wrote: 
> > there is a demand for ready-to-boot virtual machine images for distros
> > like CentOS. Since i am an afinicado of CentOS and Xen, i would like to
> > build and maintain a CentOS5-image. 
> > RoadMap:
> > 
> >   * wait for CentOS5-beta2 ;-)
> Why ?
> CentOS-4 is in quite a decent shape to make it into VM's and _lots_ 
> people are going to want VM's for CentOS-3 [...]

I agree. But customization of C4 (and probably C3, too) to run smoothly
as a VM is a bit evil (i run a bunch of productive C4 DomUs, so walked
through that valley ...): glibc and db4 have to be patched/rebuilt
because of NPTL incompatibilities. 

For glibc there is the ugly workaround to blackhole /lib/tls. But you
have to make sure that glibc-updates do not fill /lib/tls again. For db4
there is no other option than rebuild it with other compiletime options.
I know at least one application (cyrus-imapd) which does not run on a
C4-VM with standard db4.

Unfortunately i am not a coder. So i can (and did) blackhole TLS-libs
and rebuild db4 - without exactly knowing what i'm doing! That
WorksForMe[tm] (uptimes > 1year), but probably won't meet CentOS quality
standards. So without the help of the glibc- and db4-maintainers, i
could only provide C4-images of questionable quality.

Btw: pointing virt-install to a C4-repo won't avoid that problem.

> One of the things on the ToDo list here is a document for a known 
> process to help with this migration -> Move a C3/C4 machine into a VM 
> under C5, so that your C3/C4 apps remain supported and function as they 
> do now, while still getting the added benefit of C5 on the host.

I am willing to write a migration guide. Besides the NPTL problem,
migration of a headless server native->VM should be fairly easy: 

1) install a kernel-xen-*.rpm into C4 (to get the necessary LKMs)
2) build an initrd in C4 and copy it to C5
3) write a /etc/xen/C4 config file. Map all blockdevs the native C4 has
   used to virtual /dev/sd*: 
     disk = ['phy:,VolGroup00/C4_root,sda1,w', ... ]
   and adjust C4's /etc/fstab to that mapping.
5) "xm create -c C4"

I could provide a customized DomU-kernel with static xen-{blk,net}-
support, obsoleting (1) and (2).

The main prob would be the C4 complaining about changed HW (particularly
if it runs kudzu): your tape-roboters, raid-controllers etc are gone,
you probably want to switch from local X to vnc- or rdp-server, ...

> >   * create and post a minimal CentOS5-beta2 i386 image with xen- and
> >     vmware configs, wait for reviews/bugreport
> >   * create and post a standard desktop CentOS5-beta2 i386 image, wait
> >     for reviews/bugreport
> Once there is a basic setup and required infrastructure in place, doing 
> roles is just a question of adding some more details to scripts etc, I 
> am sure there are many roles we can address like this.

Sure (i hope i know what you mean with "role"). Could be done by empty
meta-packages like ubuntu's "{,k,x}ubuntu-desktop".

> >   * if there are enough positive reports, repeat for CentOS5-final
> We are really not interested in doing / spending time on something that 
> is not going to be there for CentOS-5/Release - so if you are getting 
> involved, do so with the intent of seeing this through.

Now my english is drained - You mean i shall do it for C5/release
unconditionally ;-? OK

> >   * release when/if centos.org is pleased with the (bugfixed) images
> yes, we have a QA team now!
> > Are you interested in such a project? I am eager for comments.
> You have my attention and I am happy to push this along from the inside, 
> but if we are going to do this - lets try and cover the spectrum, not 
> just focus on C5 ( specially taking on board what Daniel has said, C5 
> VM's are trivial once you have the C5 host running )

Don't forget all those not using CentOS - yet!

> One (of the many) places where users are going to see really good
> benefit is when we can provide some alternatives to move their C3 / C4
> machines into.
> Still interested ?


But either you have to accept poor glibc/db4-hacks for C4 (and maybe
C3), or we need support from CentOS' glibc/db4-maintainers.

Still interested? (SCNR)

Regard, /nils.

More information about the CentOS-devel mailing list