Convirt 是一个虚拟化管理平台,使用无代理模式工作。当需要管理的目标节点提供SSH登录方式时,ConVirt通过SSH登陆到计算节点,在计算节点上直接运行相对应的虚拟化管 理命令
。当需要管理的目标节点提供HTTP/HTTPS/XML-RPC远程调用接口时,ConVirt插件通过目标节点所提供的远程调用接口实现对目标平台的管理,目前最新版本为2.0.1。ConVirt2.0是一款使用
python和extjs结合编写的基于web的集中管理xen服务的程序。该程序在xen 社区项目,管理项目中被使用的量很高,ConVirt开发有开源版本与企业版本
因环境限制,convirt 和kvm 虚拟化都在一台centos 6.4 64位物理机上完成部署
1、准备convirt安装源
[root@ddd-s-8 yum.repos.d]# pwd /etc/yum.repos.d [root@ddd-s-8 yum.repos.d]# wget --no-cache http://www.convirture.com/repos/definitions/rhel/6.x/convirt.repo
2、下载convirt与cms安装包
cd /data/web/ wget --no-cache http://www.convirture.com/downloads/convirt/2.1.1/convirt-2.1.1.tar.gz wget --no-cache http://www.convirture.com/downloads/convirt/2.1.1/convirt-install-2.1.1.tar.gz
3、安装convirt安装包
[root@ddd-s-8 web]# tar zxvf convirt-install-2.1.1.tar.gz [root@ddd-s-8 web]# cd convirt-install/install/cms/scripts/ [root@ddd-s-8 scripts]# ./install_dependencies .......略 mysqld (pid 30621) is running... MySQL service is already running. Prerequsite for ConVirt Management Server (CMS) installed. [root@ddd-s-8 scripts]# cat install_config #修改CONVIRT_BASE为/data # As non root CONVIRT_BASE=/data/ CONVIRT_DIR=$CONVIRT_BASE/convirt VIRTUAL_ENV_NAME=tg2env VIRTUAL_ENV_DIR=$CONVIRT_DIR/$VIRTUAL_ENV_NAME if [ "$SERVER" == "" ]; then SERVER=www.convirture.com fi # convirt urls CONVIRT_TARBALL=convirt-2.0.tar.gz CONVIRT_DOWNLOAD_URL=http://${SERVER}/downloads/convirt/2.0/$CONVIRT_TARBALL
4.解压CMS软件包并安装
[root@ddd-s-8 scripts]# source install_config [root@ddd-s-8 scripts]# cd /data/web [root@ddd-s-8 web]# tar -zxvf convirt-2.1.1.tar.gz -C $CONVIRT_BASE #解压cms [root@ddd-s-8 web]# ll /data/convirt/ total 56 drwx------ 3 514 514 4096 May 17 2012 appliance_store drwx------ 3 514 514 4096 May 17 2012 common -rwx------ 1 514 514 5922 Jan 19 2011 convirt-ctl drwx------ 2 514 514 4096 May 17 2012 doc drwx------ 3 514 514 4096 May 17 2012 feeds drwx------ 10 514 514 4096 May 17 2012 p_w_picpath_store drwx------ 5 514 514 4096 May 17 2012 install -rw------- 1 514 514 194 May 17 2012 label_info.txt drwx------ 3 514 514 4096 May 17 2012 nw drwx------ 3 514 514 4096 May 17 2012 packaging drwx------ 3 514 514 4096 May 17 2012 src drwx------ 3 514 514 4096 May 17 2012 storage drwx------ 8 514 514 4096 May 17 2012 upgrade vim /data/convirt/src/convirt/web/convirt/development.ini #修改cms数据库连接文件,将xxx修改为你的数据库密码,如下 sqlalchemy.url=mysql://root:xxx@localhost:3306/convirt?charset=utf8 [root@ddd-s-8 scripts]# pwd /data/web/convirt-install/install/cms/scripts [root@ddd-s-8 scripts]# ./setup_tg2 .....略 Installed /data/convirt/tg2env/lib/python2.6/site-packages/Beaker-1.6.4-py2.6.egg Processing dependencies for Beaker>=1.4 Finished processing dependencies for Beaker>=1.4 ls: cannot access /data//convirt/tg2env/lib/python2.4/site-packages/Beaker-*py2.4.egg/beaker/ext/google.py: No such file or directory TurboGears environmnet setup successfully. [root@ddd-s-8 scripts]# ./setup_convirt #安装会让你输入密钥密码直接为空 .....略 iptables -I INPUT -p tcp --dport 8081 -j ACCEPT Once done, you should be able to access ConVirt application using http://ddd-s-8:8081/
5.启动convirt 打开convirt http://ddd-s-8:8081/ 默认用户名密码admin
[root@ddd-s-8 scripts]# cd /data/convirt/ [root@ddd-s-8 convirt]# ./convirt-ctl start
6.安装convirt-tools工具
wget http://www.convirture.com/downloads/convirture-tools/2.1.1/convirture-tools-2.1.1.tar.gz tar zxvf convirture-tools-2.1.1.tar.gz cd convirture-tools/install/managed_server/scripts ./convirt-tool install_dependencies ./convirt-tool setup
faq: 添加server的时候提示HostKeys object has no attribute has_key 解决方法
vim /data/convirt/src/convirt/core/utils/phelper.py #修改两个地方 @classmethod def validate_host_key(cls, transport, hostname): """ get the remote hosts key and validate against known host keys throws exception with errno, reason errno - reason 1 - Host not found 2. - Host found but key not found 3 - Authentication failed (wrong password?) 4 - Host found, key found, but keys do not match (server changed/spoofed) """ # check server's host key -- this is important. key = transport.get_remote_server_key() if not PHelper.host_keys.get(hostname): print "Warning : Host not found ! ", hostname #raise HostValidationException(1, "Host not found") elif not PHelper.host_keys[hostname].get(key.get_name()): print "Warning: Key not found ! ", hostname #raise HostValidationException(2, "Key not found.") elif PHelper.host_keys[hostname][key.get_name()] != key: raise HostValidationException(3, "Keys mismatch for " + hostname) return True
转载于:https://blog.51cto.com/dingmh/1436849