在debian5环境使用xen-tools安装centos5虚拟机
2011-05-06 11:18
387 查看
xen是目前很流行的虚拟化解决方案之一,它使用所谓的“半虚拟化”方式,使得guest OS性能损耗较传统的虚拟方式大大降低,同时,由于半虚拟化的存在,是的其安装guest os的方式和传统的虚拟化方式也有所不同,本文将记录在debian5环境下使用xen-tools安装centos5的guest os的过程。
首先了解下xen-tools,它是一款增强管理xen的工具,其官网为:http://www.xen-tools.org/,它不包含在xen源码包中,因此,如果系统中没有提供,需要手动进行安装,如果debian5使用apt方式安装xen,那么需要
来完成xen-tools的安装,如果是源码编译安装,建议直接下载最新版的xen-tools安装,其安装方式很简单:
这样就完成了xen-tools的安装。
xen-tools安装centos有一些依赖包,在正式安装之前也必须装上:
注意,在安装centos的过程中,实际上使用了rinse进行安装,而默认的配置文件可能导致rinse安装失败,因此我们需要修改配置文件:
当然,我们还可以配置centos安装源,在国内推荐163的源,修改过程:
最后,我们使用xen-create-image来安装centos,命令如下:
经过一段时间的等待,等软件包安装完毕后,系统会要求输入guest os的密码,输入后,整个安装过程完成,最后,我们需要修改配置文件/etc/xen/vm01.cfg
view source
print?
修改后,我们才可以通过xen连接到guest os。
最后,启动和连接到guest os
到此,我们成功在debian5上使用xen-tools安装了centos5.5的系统.
首先了解下xen-tools,它是一款增强管理xen的工具,其官网为:http://www.xen-tools.org/,它不包含在xen源码包中,因此,如果系统中没有提供,需要手动进行安装,如果debian5使用apt方式安装xen,那么需要
1 | apt-get install xen-tools |
1 | wget http://www.xen-tools.org/software/xen-tools/xen-tools-4.1. tar .gz |
2 | tar zxvf xen-tools-4.1. tar .gz |
3 | cd xen-tools-4.1 |
4 | make install |
xen-tools安装centos有一些依赖包,在正式安装之前也必须装上:
1 | apt-get install debootstrap libbeecrypt6 libc6-xen libconfig-inifiles-perl libexpect-perl libio-pty-perl libio-stty-perl librpm4.4 libterm-readline-gnu-perl libterm-size-perl libtext-template-perl reiserfsprogs rinse rpm screen vnstat |
1 | nano /etc/rinse/centos-5.packages |
2 | ... |
3 | #在最后部分新增 |
4 | nss |
5 | nspr |
6 | python-iniparsel |
7 | authconfig |
1 | nano /etc/rinse/rinse,conf |
2 | .... |
3 | [centos-5] |
4 | #将默认源注释掉 |
5 | #mirror = http://mirror.bytemark.co.uk/centos/5/os/i386/CentOS/ |
6 | #mirror.amd64 = http://mirror.bytemark.co.uk/centos/5/os/x86_64/CentOS/ |
7 | #新增163源 |
8 | mirror = http://mirrors.163.com/centos/5.5/os/i386/CentOS/ |
9 | mirror.amd64 = http://mirrors.163.com/centos/5.5/os/x86_64/CentOS |
1 | xen-create-image -- hostname =vm01 --ip=192.168.1.102 --netmask=255.255.255.0 --gateway=192.168.1.1 --dist=centos-5 -- install -method=rinse --size=2G --memory=256M --swap=512M --arch=i386 -- passwd -- dir =/home/xen/vm |
view source
print?
1 | nano /etc/xen/vm01.cfg |
2 | ... |
3 | #新增如下部分 |
4 | # |
5 | # Extra |
6 | # |
7 | extra = 'console=hvc0 xencons=tty' |
最后,启动和连接到guest os
1 | xm create vm01.cfg |
2 | xm console vm01 |
相关文章推荐
- 使用虚拟机7.1.3安装完Debian 6后,安装VMware-tools时,不能添加共享文件夹?
- Hibernate Tools for Eclipse插件的安装和使用【转】
- 在vc中使用xtremetoolkit界面库-----安装及环境配置
- RT_Thread 学习笔记 之 Env使用环境安装
- Xen安装与使用
- Debian下使用apt-get安装 Nginx + MySQL + PHPMyAdmin 备忘
- windows环境下使用pip安装python的sklean包
- AD域环境下利用Supercrypt实现普通用户安装/运行/更新使用管理权限的方法
- Linux环境VNC服务安装、配置与使用
- 全新安装Mac OSX 开发者环境 同时使用homebrew搭建 PHP,Nginx ,MySQL,Redis,Memcache ... ... (LNMP开发环境)
- Linux环境使用pip安装软件提示ascii无法转换
- Hibernate Tools for Eclipse插件的安装和使用
- 转:debian下安装java 环境
- nodejs安装,配置环境,使用express建立一个新项目
- 在Windows 7环境下使用dos命令安装.Net 4.0 及ISAPI和CGI限制配置
- windows环境下mongodb下载、安装和使用总结
- Linux 软件安装使用(8)PATH与环境变量
- Linux-CentOS环境下使用yum命令安装gcc/g++/gdb
- IOS笔记(1)20141210 [项目环境搭建之CocoaPods的安装和使用]