CentOS 5.4 Xen 3.4.2安装/升级

2010年2月24日 | 标签:

CentOS 5.4中带的Xen版本比较低,需要手工升级到新的版本。

安装过程中用到了rpmforge,需要提前配置好。另外,需要安装mercurial.

yum install mercurial --enablerepo=rpmforge

从xen.org下载Xen 3.4.2, 并解压。
(http://bits.xensource.com/oss-xen/release/3.4.2/xen-3.4.2.tar.gz)
从解压目录运行:

# make world
# make install

查看/boot下文件

# ls -laF /boot -t
-rw-r--r--  1 root root  972596 12月  6 21:01 System.map-2.6.18.8-xen
-rw-r--r--  1 root root   62986 12月  6 21:01 config-2.6.18.8-xen
-rw-r--r--  1 root root 1518101 12月  6 21:01 vmlinuz-2.6.18.8-xen
-rw-r--r--  1 root root  546167 12月  6 21:00 xen-3.4.2.gz
lrwxrwxrwx  1 root root      12 12月  6 21:00 xen-3.4.gz -> xen-3.4.2.gz
lrwxrwxrwx  1 root root      12 12月  6 21:00 xen-3.gz -> xen-3.4.2.gz
lrwxrwxrwx  1 root root      12 12月  6 21:00 xen.gz -> xen-3.4.2.gz
-rw-r--r--  1 root root 8830838 12月  6 21:00 xen-syms-3.4.2

制作initrd文件。

# depmod 2.6.18.8-xen
# mkinitrd -v -f --with=aacraid --with=sd_mod --with=scsi_mod --without-dmraid \
  /boot/initrd-2.6.18.8-xen-3.4.2 \
  2.6.18.8-xen

修改/boot/grub/grub.conf

title CentOS with Xen 3.4.2
        root (hd0,0)
        kernel /xen-3.4.2.gz console=vga
        module /vmlinuz-2.6.18.8-xen ro root=LABEL=/
        module /initrd-2.6.18.8-xen-3.4.2

重启动并查看版本信息

xm info

host                   :
release                : 2.6.18.8-xen
version                : #1 SMP Sun Dec 6 20:55:04 JST 2009
machine                : x86_64
nr_cpus                : 4
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 1
cpu_mhz                : 2400
hw_caps                : bfebfbff:20100800:00000000:00000140:0000e3bd:00000000:00000001:00000000
virt_caps              : hvm
total_memory           : 4094
free_memory            : 129
node_to_cpu            : node0:0-3
node_to_memory         : node0:129
xen_major              : 3  ←
xen_minor              : 4  ←
xen_extra              : .2 ←
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : unavailable
cc_compiler            : gcc  4.1.2 20080704 (Red Hat 4.1.2-46)
cc_compile_by          : root
cc_compile_domain      :
cc_compile_date        : Sun Dec  6 21:00:03 JST 2009
xend_config_format     : 4

相关文章:

  1. CentOS/Redhat下安装配置RPMforge
  2. 64位Xen kernel下运行32位linux (CentOS)
  3. CentOS 5中关闭ipv6
  4. CentOS/RHEL常用网络安全配置
  5. Linux下用curlftpfs挂载FTP服务器 [CentOS][转]
  1. 三天
    2010年4月14日09:33

    您好,博主,按照您的文章步骤,我在执行# make world这一步是提示错误,make[5]: gcc:命令未找到
    make[5]: *** [figlet] 错误 127
    make[5]: Leaving directory `/tools/xen-3.4.2/xen/tools/figlet’
    make[4]: *** [default] 错误 2
    make[4]: Leaving directory `/tools/xen-3.4.2/xen/tools’
    make[3]: *** [/tools/xen-3.4.2/xen/xen] 错误 2
    make[3]: Leaving directory `/tools/xen-3.4.2/xen’
    make[2]: *** [install] 错误 2
    make[2]: Leaving directory `/tools/xen-3.4.2/xen’
    make[1]: *** [install-xen] 错误 2
    make[1]: Leaving directory `/tools/xen-3.4.2′
    make: *** [world] 错误 2
    不知是否默认安装的CentOS5.4是否还需要另外安装GCC包,谢谢您了。

  2. 三天
    2010年4月14日11:58

    博主您好,后面安装了一些必需的包后,升级完成,但是在修改/boot/grub/grub.conf这一步时,因考虑到版本不知是否正确,该步未修改,导致系统重启后无法进入系统。在grub启动时提示文件不存在,但是在grub中修改后也无法启动,请指教。

  3. fallday
    2010年4月14日21:53

    grub修改后无法启动的现象是什么,启动到哪一步了呢?

  4. 三天
    2010年4月15日10:08

    原来是module /vmlinuz-2.6.18.8-xen ro root=LABEL=/这一项修改导致系统无法启动,修改后系统能正常启动,但是Xen却不正常。具体现象表现如下:
    #xm info
    [root@dell2850-2 ~]# xm info
    Error: (13, ‘Permission denied’)
    Usage: xm info

    Get information about Xen host.
    #xm list
    [root@dell2850-2 ~]# xm list
    Name ID Mem(MiB) VCPUs State Time(s)
    ACMError: Security information not found in info struct.
    Domain-0 0 3921 4 r—– 34.5
    看样子好像是编译的时候没有禁止ACM_SECURITY ? =n 这个选项造成的,请问我是否需要重新编译呢?

  5. fallday
    2010年4月16日13:16

    可能的原因会不只一种了。自己是按这个过程操作过几次,没有出现过大的问题。在一台机器上有过网卡没有被内核支持,需要自己安装网卡模块支持。如果你感觉是编译选项的问题,可以重新编译试试。自己是用的默认选项。