|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Create a domU using rpmstrap CentOS
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
|
|
|
|
|