WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Create a domU using rpmstrap CentOS

To: Xen Users <Xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Create a domU using rpmstrap CentOS
From: Michael Kress <kress@xxxxxxxxxxx>
Date: Sat, 21 Oct 2006 07:50:16 +0200
Delivery-date: Fri, 20 Oct 2006 22:50:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <6af0ecc70610201934u7e6d4372r7d01b1de45271228@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <6af0ecc70610201934u7e6d4372r7d01b1de45271228@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)
Joao Correia write:
> I have CentOS release 4.4 (Final) dom0 and I want to create a CentOS
> domU using rpmstrap.
> I found several tutorials but I couldn't get a rpmstrap script to work
> with the current CentOS repositories. It misses packages and
> dependencies and it doesnt install properly.
>
> Any tips ? anyone has a rpmstrap script working for CentOS ?
>
> I followed this tutorial:
> http://mark.foster.cc/wiki/index.php/Centos-4_on_Xen
Hi Joao,

forget about mark's tutorial, it used 2b good, but the links over there
don't work anymore. Moreover rpmstrap also broke my neck.
Mount your partition and install your new system with yum ...
* mkdir for /mnt/xentemplate/dev /mnt/xentemplate/etc
* provide /mnt/xentemplate/etc/fstab
for example
/dev/sda1               /                       xfs    defaults 1 1
none                    /dev/pts                devpts  gid=5,mode=620 0 0
none                    /dev/shm                tmpfs   defaults 0 0
none                    /proc                   proc    defaults 0 0
none                    /sys                    sysfs   defaults 0 0
/dev/sda2               swap                    swap    defaults        0 0
* for i in console null zero ; do /sbin/MAKEDEV -d /mnt/xentemplate/dev
-x $i; done
* cp -a /lib/modules/2.6.16.29-xen/ /mnt/xentemplate/lib/modules/
* echo "DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes" >> /mnt/xentemplate/etc/sysconfig/network-scripts/ifcfg-eth0
* echo "NETWORKING=yes
HOSTNAME=template
GATEWAY=192.168.0.1">>/mnt/xentemplate/etc/sysconfig/network
yum
* mkdir -p /mnt/xentemplate/var/lock/rpm
* yum -c /etc/yum.conf --installroot=/mnt/xentemplate/ -y groupinstall Base
* replace /mnt/xentemplate/sbin/hwdata with an empty shell script
* mv /mnt/xentemplate/lib/tls /mnt/xentemplate/lib/tls.disabled
* umount /mnt/xentemplate/
* create a xen.cfg for example ...
kernel ="/boot/vmlinuz-2.6.16.29-xen"
ramdisk = "/var/local/initrd-2.6.16.29-xen-xenU.img"
memory = 256
vcpus=2
name = "template"
vif = ['mac=aa:bb:cc:dd:ee:11']
dhcp="dhcp"
disk =
['file:/tmp/xentemplate-centos44.img,sda1,w','file:/tmp/xentemplate-centos44-swap.img,sda2,w']
root = "/dev/sda1"
extra = "ro selinux=0 3"
* create an initrd /var/local/initrd-2.6.16.29-xen-xenU.img

It's good to have a local yum repo as 343 packages are being downloaded
during yum process.
HTH, this worked for me and seems to be quite clean.
Regards,
Michael

-- 
Michael Kress, kress@xxxxxxxxxxx
http://www.michael-kress.de / http://kress.net
P E N G U I N S   A R E   C O O L


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users