Centos Xen 安装



配置 yum

[[email protected] 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

[[email protected] kernels]# yum install xen

修改 xen 内核为第一启动项

[[email protected] 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

重启系统

[[email protected] 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

[[email protected] boot]# xm list 

Name                                      ID Mem(MiB) VCPUs State   Time(s)

Domain-0                                   0     1484     8 r-----     15.0

安装成功

标签: linux, 虚拟化

相关文章

评论已关闭