ovirt是RHEV的社区版,是一个免费开源的虚拟化软件。它包括管理端和node节点,类似于vsphere和esxi大关系一样。Ovirt中集成了glusterfs分布式存储的管理功能,在图形化界面下友好的管理了glusterfs。下面大概看看它的组成部分:
一个 Ovirt环境包括:
1、主机(host):基于 KVM 的、用来运行虚拟机的主机。在本文档中有时也被称为虚拟主机。
代理和工具程序:运行在主机上的代理和工具程序(包括 VDSM、QEMU 和 libvirt)。这些工具程序提供了对虚拟机、网络和存储进行本地管理的功能。
2、ovirt manager:一个对 CecOSvt 环境进行中央管理的图形界面平台。用户可以使用它查看、增添和管理资源。
3、存储域:用来存储虚拟资源(如虚拟机、模版和 ISO 文件)。
4、数据库:用来跟踪记录整个环境的变化和状态。/5、目录服务器:用来提供用户账户以及相关的用户验证功能的外部目录服务器。
5、网络:用来把整个环境联系在一起。它包括物理网络连接和逻辑网络。
搭建Ovirt 管理的ovirt-engine
本次系统环境为centos6.5,由于本次只是搭建管理端,并没有采用"all in one"的部署方式,所以我们本次的环境就仅仅有一台服务器。
将所有主机配置好DNS服务器或者将所有主机的主机名写入/etc/hosts中
将所有主机配置好DNS服务器或者将所有主机的主机名写入/etc/hosts中
[root@ovirt-engine ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.2.100 ovirt-engine
开始安装engine:
yum localinstall http://plain.resources.ovirt.org/pub/yum-repo/ovirt-release35.rpm
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@ovirt-engine ~]# yum install -y ovirt-engine
如果是图形界面建议安装firefox管理虚拟机控制台的插件
yum install -y spice-xpi (虚拟机控制台)
[root@ovirt-engine ~]# yum update -y
[root@ovirt-engine ~]# engine-setup
[ INFO ] Stage: Initializing
[ INFO ] Stage: Environment setup
Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf']
Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20150612131118-j8qm28.log
Version: otopi-1.3.2 (otopi-1.3.2-1.el6)
[ INFO ] Stage: Environment packages setup
[ INFO ] Stage: Programs detection
[ INFO ] Stage: Environment setup
[ INFO ] Stage: Environment customization
--== PRODUCT OPTIONS ==--
Configure Engine on this host (Yes, No) [Yes]: 直接回车去默认值
Configure WebSocket Proxy on this host (Yes, No) [Yes]:
--== PACKAGES ==--
[ INFO ] Checking for product updates...
[ INFO ] No product updates found
--== ALL IN ONE CONFIGURATION ==--
--== NETWORK CONFIGURATION ==-
Setup can automatically configure the firewall on this system.
Note: automatic configuration of the firewall may overwrite current settings.
Do you want Setup to configure the firewall? (Yes, No) [Yes]:No
Host fully qualified DNS name of this server [ovirt-engine]:
Where is the Engine database located? (Local, Remote) [Local]:
Would you like Setup to automatically configure postgresql and create Engine database, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
Engine admin password: 输入密码
Confirm engine admin password: 确认密码
[WARNING] Password is weak: it is based on a dictionary word
Use weak password? (Yes, No) [No]:Yes
Application mode (Virt, Gluster, Both) [Both]:
Organization name for certificate [Test]:
Do you wish to set the application as the default page of the web server? (Yes, No) [Yes]:
Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [Yes]: no
[WARNING] Less than 16384MB of memory is available
--== CONFIGURATION PREVIEW ==--
Application mode : both
Update Firewall : False
Host FQDN : ovirt-engine
Engine database name : engine
Engine database secured connection : False
Engine database host : localhost
Engine database user name : engine
Engine database host name validation : False
Engine database port : 5432
Engine installation : True
PKI organization : Test
Configure local Engine database : True
Set application as default page : True
Configure Apache SSL : True
Configure WebSocket Proxy : True
Engine Host FQDN : ovirt-engine
Please confirm installation settings (OK, Cancel) [OK]:
SSH fingerprint: 4F:3A:0C:D2:BC:A9:7E:4B:BD:DD:5A:66:9A:1A:7A:F4
Internal CA 50:59:B6:0A:49:E1:2C:AE:5E:43:0B:4F:81:67:FF:8E:05:3F:90:6B
Web access is enabled at:
http://ovirt-engine:80/ovirt-engine
https://ovirt-engine:443/ovirt-engine
Please use the user "admin" and password specified in order to login
In order to configure firewalld, copy the files from
/etc/ovirt-engine/firewalld to /etc/firewalld/services
and execute the following commands:
firewall-cmd -service ovirt-postgres
firewall-cmd -service ovirt-https
firewall-cmd -service ovirt-fence-kdump-listener
firewall-cmd -service ovirt-websocket-proxy
firewall-cmd -service ovirt-http
The following network ports should be opened:
tcp:443
tcp:5432
tcp:6100
tcp:80
udp:7410
An example of the required configuration for iptables can be found at:
/etc/ovirt-engine/iptables.example
--== END OF SUMMARY ==--
[ INFO ] Starting engine service
[ INFO ] Restarting httpd
[ INFO ] Stage: Clean up
Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20150612131118-j8qm28.log
[ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20150612131850-setup.conf'
[ INFO ] Stage: Pre-termination
[ INFO ] Stage: Termination
[ INFO ] Execution of setup completed successfully
可以看到已经安装成功了。使用浏览器输入https://192.168.2.100 输入账户密码就可以进入管理界面,一睹我们的管理平台了。
来源:oschina
链接:https://my.oschina.net/u/4361896/blog/4318511