快速业务通道

Linux 中的 XEN 虚拟化技术(二)Xen 的安装和配置

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-15

1. 安装 Xen

Red Hat 公司在 RHEL5 版本的 Linux 操作系统中正式加入了对 Xen 虚拟技术的支持.而在RHEL5 之前的 Linux 系统中安装 Xen 需要进行编译内核的工作,安装过程较为繁琐和复杂. 在 RHEL5 中安装 Xen 有多种方式: 方法一:在 RHEL5 安装时输入包含支持 virtualization 的功能的安装号,系统默认会自动安装Xen 相关软件包. 方法二:在 RHEL5 的安装光盘中已包含全部 Xen 的软件包,完全可以手动安装 RHEL5安装光盘中的 Xen 相关软件包,需要安装软件包较多,此方法比较繁琐,不建议初学者使用. 方法三:在能连入互联网的前提下,使用 RHEL5 订阅号,利用 yum 工具安装 Xen 内核补丁、Xen 虚拟机、virt-manager 虚拟化管理工具. 方法四:利用 RHEL5 的 DVD 安装光盘构建本地 yum 安装源,利用 yum 工具安装 Xen 内核补丁、Xen 虚拟机、virt-manager 虚拟化管理工具. 这里推荐使用第四种方法进行安装. 现在以一个已安装 GNOME 图形桌面,已安装 Apache,但没有安装任何 Xen 软件的 RHEL5系统为例讲解如何安装 Xen 虚拟化软件. 拥有帝国一切,皆有可能。欢迎访问phome.net 参照 http://jiayf.blog.51cto.com/1659430/342416 构建本地 yum 安装源,过程这里不再赘述.构建完成后执行以下命令安装 Xen 内核补丁、Xen 虚拟机、virt-manager 虚拟化管理工具

[root@xen ~]# yum install kernel-xen xen virt-manager Loaded plugins: rhnplugin, security This system is not registered with RHN. RHN support will be disabled. Cluster | 1.3 kB 00:00 Cluster/primary | 6.5 kB 00:00 Cluster 32/32 ClusterStorage | 1.3 kB 00:00 ClusterStorage/primary | 8.8 kB 00:00 ClusterStorage 39/39 VT | 1.3 kB 00:00 VT/primary | 9.0 kB 00:00 VT 36/36 Setting up Install Process Package kernel-xen-2.6.18-164.el5.i686 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package virt-manager.i386 0:0.6.1-8.el5 set to be updated --> Processing Dependency: gnome-python2-gnomekeyring >= 2.15.4 for package: virt-manager --> Processing Dependency: gtk-vnc-python >= 0.3.8 for package: virt-manager --> Processing Dependency: libvirt-python >= 0.3.3 for package: virt-manager --> Processing Dependency: python-virtinst >= 0.400.3 for package: virt-manager ---> Package xen.i386 0:3.0.3-94.el5 set to be updated --> Processing Dependency: xen-libs = 3.0.3-94.el5 for package: xen --> Processing Dependency: libxenctrl.so.3.0 for package: xen --> Processing Dependency: libfsimage.so.1.0 for package: xen --> Processing Dependency: libxenguest.so.3.0 for package: xen --> Processing Dependency: libxenstore.so.3.0 for package: xen --> Processing Dependency: bridge-utils for package: xen --> Processing Dependency: libblktap.so.3.0 for package: xen --> Processing Dependency: libfsimage.so.1.0(libfsimage.so.1.0) for package: xen --> Running transaction check ---> Package bridge-utils.i386 0:1.1-2 set to be updated ---> Package gnome-python2-gnomekeyring.i386 0:2.16.0-3.el5 set to be updated ---> Package gtk-vnc-python.i386 0:0.3.8-3.el5 set to be updated --> Processing Dependency: gtk-vnc = 0.3.8-3.el5 for package: gtk-vnc-python --> Processing Dependency: libgtk-vnc-1.0.so.0 for package: gtk-vnc-python ---> Package libvirt-python.i386 0:0.6.3-20.el5 set to be updated --> Processing Dependency: libvirt = 0.6.3-20.el5 for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.6.1) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.2.3) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.1.1) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.1.9) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.2.1) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.4.5) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.2.0) for package: libvirt-python --> Processing Dependency: libvirt.so.0 for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.1.5) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.4.1) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.1.0) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.3.3) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.6.3) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.6.0) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.4.0) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.5.0) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.1.4) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.3.0) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.3.2) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.0.3) for package: libvirt-python --> Processing Dependency: libvirt.so.0(LIBVIRT_0.0.5) for package: libvirt-python ---> Package python-virtinst.noarch 0:0.400.3-5.el5 set to be updated ---> Package xen-libs.i386 0:3.0.3-94.el5 set to be updated --> Running transaction check ---> Package gtk-vnc.i386 0:0.3.8-3.el5 set to be updated ---> Package libvirt.i386 0:0.6.3-20.el5 set to be updated --> Processing Dependency: cyrus-sasl-md5 for package: libvirt --> Processing Dependency: iscsi-initiator-utils for package: libvirt --> Running transaction check ---> Package cyrus-sasl-md5.i386 0:2.1.22-5.el5 set to be updated ---> Package iscsi-initiator-utils.i386 0:6.2.0.871-0.10.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: virt-manager i386 0.6.1-8.el5 VT 1.5 M xen i386 3.0.3-94.el5 VT 1.9 M Installing for dependencies: bridge-utils i386 1.1-2 Server 28 k cyrus-sasl-md5 i386 2.1.22-5.el5 Server 45 k gnome-python2-gnomekeyring i386 2.16.0-3.el5 Server 16 k gtk-vnc i386 0.3.8-3.el5 Server 80 k gtk-vnc-python i386 0.3.8-3.el5 Server 12 k iscsi-initiator-utils i386 6.2.0.871-0.10.el5 Server 773 k libvirt i386 0.6.3-20.el5 VT 1.9 M libvirt-python i386 0.6.3-20.el5 VT 132 k python-virtinst noarch 0.400.3-5.el5 VT 378 k xen-libs i386 3.0.3-94.el5 Server 154 k Transaction Summary ================================================================================ Install 12 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 6.9 M Is this ok [y/N]: y Downloading Packages: (1/12): iscsi-initiator-utils-6.2.0.871-0.10.el5.i386.rp | 773 kB 00:00 (2/12): bridge-utils-1.1-2.i386.rpm | 28 kB 00:00 (3/12): gtk-vnc-python-0.3.8-3.el5.i386.rpm | 12 kB 00:00 (4/12): xen-libs-3.0.3-94.el5.i386.rpm | 154 kB 00:00 (5/12): cyrus-sasl-md5-2.1.22-5.el5.i386.rpm | 45 kB 00:00 (6/12): gtk-vnc-0.3.8-3.el5.i386.rpm | 80 kB 00:00 (7/12): xen-3.0.3-94.el5.i386.rpm | 1.9 MB 00:00 (8/12): gnome-python2-gnomekeyring-2.16.0-3.el5.i386.rpm | 16 kB 00:00 (9/12): libvirt-python-0.6.3-20.el5.i386.rpm | 132 kB 00:00 (10/12): virt-manager-0.6.1-8.el5.i386.rpm | 1.5 MB 00:00 (11/12): libvirt-0.6.3-20.el5.i386.rpm | 1.9 MB 00:00 (12/12): python-virtinst-0.400.3-5.el5.noarch.rpm | 378 kB 00:00 -------------------------------------------------------------------------------- Total 2.3 MB/s | 6.9 MB 00:02 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : xen-libs 1/12 Installing : bridge-utils 2/12 Installing : gtk-vnc 3/12 Installing : gtk-vnc-python 4/12 Installing : cyrus-sasl-md5 5/12 Installing : iscsi-initiator-utils 6/12 Installing : libvirt 7/12 Installing : libvirt-python 8/12 Installing : gnome-python2-gnomekeyring 9/12 Installing : python-virtinst 10/12 Installing : xen 11/12 Installing : virt-manager 12/12 Installed: virt-manager.i386 0:0.6.1-8.el5 xen.i386 0:3.0.3-94.el5 Dependency Installed: bridge-utils.i386 0:1.1-2 cyrus-sasl-md5.i386 0:2.1.22-5.el5 gnome-python2-gnomekeyring.i386 0:2.16.0-3.el5 gtk-vnc.i386 0:0.3.8-3.el5 gtk-vnc-python.i386 0:0.3.8-3.el5 iscsi-initiator-utils.i386 0:6.2.0.871-0.10.el5 libvirt.i386 0:0.6.3-20.el5 libvirt-python.i386 0:0.6.3-20.el5 python-virtinst.noarch 0:0.400.3-5.el5 xen-libs.i386 0:3.0.3-94.el5 Complete!

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号