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

xen-users

[Top] [All Lists]

Re: [Xen-users] centos4.5(domU) on etch(dom0)

To: Chris Fanning <christopher.fanning@xxxxxxxxx>
Subject: Re: [Xen-users] centos4.5(domU) on etch(dom0)
From: Igor Chubin <igor@xxxxxxx>
Date: Sat, 1 Dec 2007 21:58:04 +0200
Cc: Xen users mailing list <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: 2007年12月01日 11:54:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <215ff4410711300946i4fb06108y13411967a9a9a2ac@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: <215ff4410711300946i4fb06108y13411967a9a9a2ac@xxxxxxxxxxxxxx>
Reply-to: Igor Chubin <igor@xxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.16 (2007年06月11日)
On Fr, Nov 30, 2007 at 06:46:52 +0100, Chris Fanning wrote:
> Hi,
>
> I'd like to know how to install centos (4.5 in my case) to run as a
> domU on a dom0 running etch.
>
> Any tips please?
Make sure that you have enough free space
on the file system where you are going to make image for centos
(or create PV if you are going to use LVM).
# df -h
# dd if=/dev/zero of=centos.img count=1 bs=1k seek=$[2*1024*1024]
# mkfs.ext3 centos.img
# mount -o loop centos.img /mnt
Now you have 2G-size image with ext3 filesystem mounted to /mnt directory.
After that:
# apt-get install yum
# yum -c /tmp/yum-xen.conf --installroot=/mnt -y groupinstall Base
where you-xen.conf file should look like:
===================================================
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
exclude=*-debuginfo
gpgcheck=0
obsoletes=1
reposdir=/dev/null
[base]
name=CentOS-$releasever - Plus
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
enabled=1
===================================================
if you have the error during installation
------------------------------------------------
Failed to add groups file for repository: base
Error: No Groups on which to run command
------------------------------------------------
then modify yum code like shown below:
------------------------------------------------
# cp /usr/share/python-support/yum/yum/comps.py{,.ORIG}
# vi /usr/share/python-support/yum/yum/comps.py 
# diff /usr/share/python-support/yum/yum/comps.py{.ORIG,}
124c124
< if type not in ('mandatory', 'default',
'optional'):
---
> if type not in ('mandatory', 'default',
> 'optional', 'conditional'):
143c143
< if type not in ('mandatory', 'default',
'optional'):
---
> if type not in ('mandatory', 'default',
> 'optional', 'conditional'):
------------------------------------------------
Create several directories and device files:
%# /mnt/{dev,proc,etc}
%# for i in console null zero ; do /sbin/MAKEDEV -d /mnt/dev -x $i ;
%done
Disable TLS.
%# mv /mnt/lib/tls /mnt/lib/tls-disabled
Create /etc/fstab
(of course you must specify correct device files)
%# cat <<EOL > /mnt/etc/fstab
/dev/sda1 / ext3 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 /mnt ext3 defaults 1 2
#/dev/sda3 swap swap defaults 0 0
EOL
Setup network interfaces
(I suppose that you use one interface which should acquire
its IP-address via DHCP).
%# cat <<EOL > /mnt/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain
EOL
cat <<EOL > /mnt/etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes
DEVICE=eth0
BOOTPROTO=dhcp
EOL
Copy kernel modules to the domU filesystem
(alternatively you can install Xenified Linux Kernel
inside domU using yum).
%# cp -R /lib/modules/2.6.*xen* /mnt/lib/modules/
Set root password for domU:
%$ sudo chroot /mnt
bash-3.1# pwconv
bash-3.1# passwd
Changing password for user root.
New UNIX password: 
Retype new UNIX password: 
passwd: all authentication tokens updated successfully.
bash-3.1# exit
That's all.
No you may umount your image and make 
%# xm create -c centos 
centos here is the name of the Xen domain config file
which will run the image that you have prepared.
>
> Thanks.
> Chris.
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users 
-- 
WBR, i.m.chubin
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-users] Gigabit Interface - XEN Full Virtualization , Sadique Puthen
Next by Date: [Xen-users] Good tutorial about using heartbeat2, ocfs2 and evms with xen 3.x , carlopmart
Previous by Thread: [Xen-users] Gigabit Interface - XEN Full Virtualization , Artur Baruchi
Next by Thread: Re: [Xen-users] centos4.5(domU) on etch(dom0) , Chris Fanning
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /