正在加载...

Centos Xen 安装

[ 2010/03/01 18:15 | by selboo ]

配置 yum
[root@localhost kernels]# vi /etc/yum.repos.d/1.repo
[centos]
baseurl=file:///mnt
enabled=1

修改 /etc/yum.conf 下的 gpgcheck=1  为 gpgcheck=0

挂在镜像
mount -o loop /iso/CentOS-5.3-x86_64-bin-DVD.iso /mnt/

安装 xen
[root@localhost kernels]# yum install *xen*

修改 xen 内核为第一启动项

[root@localhost boot]# vi /boot/grub/grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda5
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-128.el5xen)
        root (hd0,0)
        kernel /xen.gz-2.6.18-128.el5
        module /vmlinuz-2.6.18-128.el5xen ro root=LABEL=/
        module /initrd-2.6.18-128.el5xen.img
title CentOS (2.6.28)
        root (hd0,0)
        kernel /vmlinuz-2.6.28 ro root=LABEL=/
        initrd /initrd-2.6.28.img
title CentOS (2.6.18-8.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/
        initrd /initrd-2.6.18-8.el5.img

重启系统

[root@localhost boot]# uname -a
Linux localhost.localdomain 2.6.18-128.el5xen #1 SMP Wed Jan 21 11:12:42 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost boot]# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     1484     8 r-----     15.0

安装成功
最后编辑: selboo 编辑于2011/09/03 02:00
Tags: , ,
,
发表评论
表情
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]