[CentOS] CentOS on Xen question (Xen Hosting)

Mon Dec 5 06:51:34 UTC 2005
Michael Best <mbest at pendragon.org>

Josh Kelley wrote:
> Actually, I was able to get CentOS running under Xen (as host and
> guest) without too much effort.  Unfortunately, I didn't take very
> good notes...  No custom repository or newer gcc or other recompiling
> is needed.  A patched kernel is needed, but Xen automates that for
> you; see Xen's docs for details.
> 
> Xen's web site provides a binary download of Xen 2.0.7, which works
> without any problems, although their precompiled kernel (based off of
> a stock 2.6.x kernel) contains relatively few modules.  You can also
> recompile 2.0.7 from source to add kernel modules.  Getting Xen 2.x to
> work with CentOS's customized kernel, or getting Fedora's newer
> version of Xen to work, could be quite a bit more effort.
> 
> Since you haven't updated glibc, you'll want to mv /lib/tls
> /lib/tls.disabled on both host and guest OSes to improve performance. 
> Installing the guest OS can be a bit trickier; you can do a CD-based
> install (reboot the host off of the CD then install CentOS to an blank
> partition that will be used as the guest), or you can use rpmstrap or
> yum --installroot.  See
> http://mark.foster.cc/wiki/index.php/Centos-4_on_Xen for details on
> the latter two options.
> 
> Feel free to contact me if you have any more questions.  Hope this helps.
> 
> Josh Kelley

I'm using Centos as my host and guest operating systems.

The big thing that didn't work out of the box for me was firewalling so 
I compiled my own Xen kernel (only minor heavy lifting required)
http://www.pendragon.org/mywiki/Xen

If TLS is absolutely required glibc would have to be recompiled with the 
appropriate flag:  -mno-tls-direct-seg-refs
http://wiki.xensource.com/xenwiki/XenSpecificGlibc

You can also install guests using something like:
mount /dev/vg00/xen00 /mnt/tmp
yum --installroot=/mnt/tmp -y groupinstall base
umount /mnt/tmp

You will likely want to create a local repository out of the install 
media first though instead of installing all the rpms off of the 'net 
each time.

-Mike