整个Convirt环境架构:
安装convirt环境包括如下三个部分:
1、准备一台物理机或虚拟机,安装Convirt Management Server (CMS)
2、准备需要被Convirt管理的服务器。(注意操作系统版本和Xen版本)
3、使用浏览器访问CMS并管理你的服务器
cd /etc/yum.repos.d wget --no-cache http://www.convirture.com/repos/definitions/rhel/6.x/convirt.repo
wget --no-cache http://www.convirture.com/downloads/convirt/2.0.1/convirt-install-2.0.1.tar.gz wget --no-cache http://www.convirture.com/downloads/convirt/2.0.1/convirt-2.0.1.tar.gz
tar -xzf convirt-install-2.0.1.tar.gz cd convirt-install/install/cms/scripts/ && ./install_dependencies
innodb_buffer_pool_size=1G innodb_additional_mem_pool_size=20M /etc/init.d/mysqld restart
cd convirt-install/install/cms/scripts/ && source install_config cd ~ && tar -xzf convirt-2.0.1.tar.gz -C $CONVIRT_BASE
cd convirt-install/install/cms/scripts/ ./setup_tg2 ./setup_convirt
iptables -I INPUT -p tcp --dport 8081 -j ACCEPT
cd ~/convirt && ./convirt-ctl start
- wget --no-cache http://www.convirture.com/downloads/convirture-tools/2.0.1/convirture-tools-2.0.1.tar.gz
- tar -zxf convirture-tools-2.0.1.tar.gz
- cd convirture-tools/install/managed_server/scripts/
- ./convirt-tool install_dependencies
- ./convirt-tool setup
三、使用convirt管理服务器:
参考官方文档:http://www.convirture.com/wiki/index.php?title=Convirt2_doc,操作比较简单。
官方文档中对向CMS中添加服务器、创建虚拟机、管理存储等都有详细的资料!
本人曾经使用CentOS 6.0,内核3.1.2,Xen4.1.2的服务器作为managed server,结果在安装convirture-tools的时候始终报错:
遇错:Hunk #1 FAILED at 95.
Patching failed.
Error executing /root/convirture-tools/install/managed_server/scripts/xen-3.0/configure-xend.sh
以为是错误信息中已经给出了答案,手动打补丁:
cd convirture-tools/install/managed_server/scripts/xen-4.0 && ./ configure-xend.sh
重新安装:
./convirt-tool setup
结果遇到另一个错误:Error: Unable to connect to xend: No such file or directory. Is xend running?
查看日志/var/log/xen/xend.log,发现错误:
(invalid xend config xend-tcp-xmlrpc-server-ssl-key-file: directory '/etc/xen/xmlrpc.key' does not exist
折腾了很久,发现没法解决这个问题,只好回滚xen配置文件/etc/xen/xendxend-config.sxp,并重启机器,xend顺利启动。但convirture-tools始终无法安装!