[root@Dell ~]# yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release43.rpm
[root@Dell ~]# yum update
[root@Dell ~]# yum install ovirt-engine
[root@Dell ~]# hostnamectl --static set-hostname engineDell.com
[root@engineDell ~]# systemctl stop firewalld
[root@engineDell ~]# systemctl disable firewalld
[root@engineDell ~]# 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-20190507163116-tu2bb1.log
Version: otopi-1.8.1 (otopi-1.8.1-1.el7)
[ INFO ] Stage: Environment packages setup
[ INFO ] Yum Downloading: ovirt-4.3-centos-gluster5/x86_64 (0%)
[ INFO ] Stage: Programs detection
[ INFO ] Stage: Environment setup (late)
[ INFO ] Stage: Environment customization
--== PRODUCT OPTIONS ==--
Set up Cinderlib integration
(Currently in tech preview)
(Yes, No) [No]:
Configure Engine on this host (Yes, No) [Yes]:
Configure ovirt-provider-ovn (Yes, No) [Yes]:
Configure Image I/O Proxy on this host (Yes, No) [Yes]:
Configure WebSocket Proxy on this host (Yes, No) [Yes]:
* Please note * : Data Warehouse is required for the engine.
If you choose to not configure it on this host, you have to configure
it on a remote host, and then configure the engine on this host so
that it can access the database of the remote Data Warehouse host.
Configure Data Warehouse on this host (Yes, No) [Yes]:
Configure VM Console Proxy on this host (Yes, No) [Yes]:
--== PACKAGES ==--
[ INFO ] Checking for product updates...
[ INFO ] No product updates found
--== NETWORK CONFIGURATION ==--
Host fully qualified DNS name of this server [engineDell.com]:
[WARNING] Failed to resolve engineDell.com using DNS, it can be resolved only locally
Setup can automatically configure the firewall on this system.
Note: automatic configuration of the firewall may overwrite current settings.
NOTICE: iptables is deprecated and will be removed in future releases
Do you want Setup to configure the firewall? (Yes, No) [Yes]: no //前面已经手动关闭防火墙了,此处不需要配置
--== DATABASE CONFIGURATION ==--
Where is the DWH database located? (Local, Remote) [Local]:
Setup can configure the local postgresql server automatically for the DWH to run. This may conflict with existing applications.
Would you like Setup to automatically configure postgresql and create DWH database, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
Where is the Engine database located? (Local, Remote) [Local]:
Setup can configure the local postgresql server automatically for the engine to run. This may conflict with existing applications.
Would you like Setup to automatically configure postgresql and create Engine database, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
--== OVIRT ENGINE CONFIGURATION ==--
Engine admin password:
Confirm engine admin password:
Application mode (Virt, Gluster, Both) [Both]:
Use default credentials (admin@internal) for ovirt-provider-ovn (Yes, No) [Yes]:
--== STORAGE CONFIGURATION ==--
Default SAN wipe after delete (Yes, No) [No]:
--== PKI CONFIGURATION ==--
Organization name for certificate [com]:
--== APACHE CONFIGURATION ==--
Setup can configure the default page of the web server to present the application home page. This may conflict with existing applications.
Do you wish to set the application as the default page of the web server? (Yes, No) [Yes]:
Setup can configure apache to use SSL using a certificate issued from the internal CA.
Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
--== SYSTEM CONFIGURATION ==--
--== MISC CONFIGURATION ==--
Please choose Data Warehouse sampling scale:
(1) Basic
(2) Full
(1, 2)[1]:
--== END OF CONFIGURATION ==--
[ INFO ] Stage: Setup validation
[WARNING] Cannot validate host name settings, reason: resolved host does not match any of the local addresses
--== CONFIGURATION PREVIEW ==--
Application mode : both
Default SAN wipe after delete : False
Update Firewall : False
Host FQDN : engineDell.com
Set up Cinderlib integration : False
Configure local Engine database : True
Set application as default page : True
Configure Apache SSL : True
Engine database secured connection : False
Engine database user name : engine
Engine database name : engine
Engine database host : localhost
Engine database port : 5432
Engine database host name validation : False
Engine installation : True
PKI organization : com
Set up ovirt-provider-ovn : True
Configure WebSocket Proxy : True
DWH installation : True
DWH database host : localhost
DWH database port : 5432
Configure local DWH database : True
Configure Image I/O Proxy : True
Configure VMConsole Proxy : True
Please confirm installation settings (OK, Cancel) [OK]:
[ INFO ] Stage: Transaction setup
[ INFO ] Stopping engine service
[ INFO ] Stopping ovirt-fence-kdump-listener service
[ INFO ] Stopping dwh service
[ INFO ] Stopping Image I/O Proxy service
[ INFO ] Stopping vmconsole-proxy service
[ INFO ] Stopping websocket-proxy service
[ INFO ] Stage: Misc configuration (early)
[ INFO ] Stage: Package installation
[ INFO ] Stage: Misc configuration
[ INFO ] Upgrading CA
[ INFO ] Initializing PostgreSQL
[ INFO ] Creating PostgreSQL 'engine' database
[ INFO ] Configuring PostgreSQL
[ INFO ] Creating PostgreSQL 'ovirt_engine_history' database
[ INFO ] Configuring PostgreSQL
[ INFO ] Creating CA
[ INFO ] Creating/refreshing DWH database schema
[ INFO ] Configuring Image I/O Proxy
[ INFO ] Setting up ovirt-vmconsole proxy helper PKI artifacts
[ INFO ] Setting up ovirt-vmconsole SSH PKI artifacts
[ INFO ] Configuring WebSocket Proxy
[ INFO ] Creating/refreshing Engine database schema
[ INFO ] Creating/refreshing Engine 'internal' domain database schema
[ INFO ] Creating default mac pool range
[ INFO ] Adding default OVN provider to database
[ INFO ] Adding OVN provider secret to database
[ INFO ] Setting a password for internal user admin
[ INFO ] Generating post install configuration file '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf'
[ INFO ] Stage: Transaction commit
[ INFO ] Stage: Closing up
[ INFO ] Starting engine service
[ INFO ] Starting dwh service
[ INFO ] Restarting ovirt-vmconsole proxy service
--== SUMMARY ==--
[ INFO ] Restarting httpd
In order to configure firewalld, copy the files from
/etc/ovirt-engine/firewalld to /etc/firewalld/services
and execute the following commands:
firewall-cmd --permanent --add-service ovirt-postgres
firewall-cmd --permanent --add-service ovirt-https
firewall-cmd --permanent --add-service ovn-central-firewall-service
firewall-cmd --permanent --add-service ovirt-fence-kdump-listener
firewall-cmd --permanent --add-service ovirt-imageio-proxy
firewall-cmd --permanent --add-service ovirt-websocket-proxy
firewall-cmd --permanent --add-service ovirt-http
firewall-cmd --permanent --add-service ovirt-vmconsole-proxy
firewall-cmd --permanent --add-service ovirt-provider-ovn
firewall-cmd --reload
The following network ports should be opened:
tcp:2222
tcp:35357
tcp:443
tcp:5432
tcp:54323
tcp:6100
tcp:6641
tcp:6642
tcp:80
tcp:9696
udp:7410
An example of the required configuration for iptables can be found at:
/etc/ovirt-engine/iptables.example
Please use the user 'admin@internal' and password specified in order to login
Web access is enabled at:
http://engineDell.com:80/ovirt-engine
https://engineDell.com:443/ovirt-engine
Internal CA 9A:B0:6C:A6:EF:B9:A0:84:B1:B0:33:94:0F:E9:B9:04:ED:05:7F:41
SSH fingerprint: SHA256:/ZI7pqPc1AjGASIpznsRdcVbLpTUVkPEcXV4bDUcxkk
--== END OF SUMMARY ==--
[ INFO ] Stage: Clean up
Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20190507163116-tu2bb1.log
[ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20190507165112-setup.conf'
[ INFO ] Stage: Pre-termination
[ INFO ] Stage: Termination
[ INFO ] Execution of setup completed successfully
添加映射包括两个部分,一个是你用来访问管理网的机子需要添加,另一个是你的engine所在主机也要添加。
10.10.40.165(engine的ip) engineDell.com(上面配置显示的访问域名)
[root@engineDell ~]# vi /etc/hosts
//添加一行
10.10.40.165 engineDell.com
10.10.41.43 node43.com //后续添加计算节点使用
添加完成后,就可以使用客户端正常访问engine管理平台了。
注意 千万不要忽略这一步,非常重要!即使后续使用ip直接访问管理网,也一定要进行此配置,否则会出现PKI证书无法找到的错误,如下图:
本文在Windows的电脑上使用ip直接访问管理网。
点击左下角的管理门户,使用admin用户即可登陆。
oVirt官方安装指南
下载官方node定制镜像:
https://resources.ovirt.org/pub/ovirt-4.3/iso/ovirt-node-ng-installer/4.3.3-2019041712/el7/ovirt-node-ng-installer-4.3.3-2019041712.el7.iso
这个源是真的真的真的特别慢,所以找到了另一个源,也可以下载:
http://mirror.isoc.org.il/pub/ovirt/ovirt-4.3/iso/ovirt-node-ng-installer/4.3.3-2019041712/el7/ovirt-node-ng-installer-4.3.3-2019041712.el7.iso
制作系统启动盘,本文是直接刻了DVD,也可以做U盘启动,这里就不详细说过程了,网上有很多方法都可以用的。
使用官方定制oVirt-Node镜像安装,ovirt-node-ng-installer-4.3是基于CentOS7.6修改的,所以和安装CentOS系统的操作流程一模一样,这里就不赘述了。
【注意!!】ovirt-node默认是要求disk分区自动配置的,如果之前已经装了系统且剩余空间不多,在进行安装的时候就会一直报错,提示storage not enough。而且不同于普通CentOS的安装,可以在配置分区的时候删除原有分区数据,ovirt-node安装中完全不给机会去配置分区时删除原有系统数据。
因此,安装前一定要把空间留出来,具体至少要留多少,是不是45GB就足够,本文没有进行尝试,可以根据不同的需要去试一下。本文采取的方式是重装了一个20G左右的CentOS来把之前部的系统清理掉。再重新安装ovirt-node时就能顺利进入安装了。
安装结束先update一下
[root@node43 ~]# yum update
本文在安装node系统时已经将主机名改为了node43,如果安装时没有更改,可以参考前面的更改方法修改一下主机名
[root@node43 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eno1
具体配置不赘述了,保证能够访问外网即可。
[root@node43 ~]# vi /etc/hosts
//在末行添加
10.10.40.165 enginedell.com
10.10.41.43 node43.com //后续添加使用的是ip,所以这里影响不大
本文将NFS部署在节点node43的本地存储中。
如果是使用ovirt的定制镜像安装的node,那么应该自带了nfs-utils相关软件服务,不放心的话可以再yum安装一下。
[root@node43 ~]# chkconfig rpcbind on
Note: Forwarding request to 'systemctl enable rpcbind.service'.
[root@node43 ~]# chkconfig nfs on
Note: Forwarding request to 'systemctl enable nfs.service'.
Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service.
[root@node43 ~]# service rpcbind start
Redirecting to /bin/systemctl start rpcbind.service
//检查服务状态
[root@node43 ~]# service rpcbind status
Redirecting to /bin/systemctl status rpcbind.service
● rpcbind.service - RPC bind service
Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-05-09 09:54:22 CST; 5h 4min ago
Main PID: 6829 (rpcbind)
CGroup: /system.slice/rpcbind.service
└─6829 /sbin/rpcbind -w
May 09 09:54:22 node43 systemd[1]: Starting RPC bind service...
May 09 09:54:22 node43 systemd[1]: Started RPC bind service.
[root@node43 data]# mkdir vmstorage
[root@node43 data]# mkdir ISO
[root@node43 data]# ls
images vmstorage ISO
[root@node43 data]# chown 36:36 /data/ISO/ //更改文件夹权限给vdsm和kvm组
[root@node43 data]# chmod 755 /data/ISO/
[root@node43 data]# chown 36:36 /data/vmstorage/
[root@node43 data]# chmod 755 /data/vmstorage/
[root@node43 data]# vi /etc/exports
/data/ISO 0.0.0.0/0.0.0.0(rw,sync)
/data/vmstorage 0.0.0.0/0.0.0.0(rw,sync)
[root@node43 data]# exportfs -a
[root@node43 data]# service rpcbind start
Redirecting to /bin/systemctl start rpcbind.service
[root@node43 data]# service nfs-server start
Redirecting to /bin/systemctl start nfs-server.service
[root@node43 data]# systemctl enable rpcbind nfs-server
进行完上述操作,成功添加存储域后,查看node43的data目录,发现已经更新下级的文件夹
[root@node43 ~]# cd /data/ISO/
[root@node43 ISO]# ls
9aa52acd-acff-4383-80c2-06ac59f4a622 __DIRECT_IO_TEST__
[root@node43 ISO]# cd 9aa52acd-acff-4383-80c2-06ac59f4a622/
[root@node43 9aa52acd-acff-4383-80c2-06ac59f4a622]# ls
dom_md images
将iso文件传到/data/ISO/9aa52acd-acff-4383-80c2-06ac59f4a622/images/11111111-1111-1111-1111-111111111111目录下,之后不需要再进行文件权限修改即可正常使用。
本文选用spice客户端来访问虚拟机,因此需要在使用windows的机子上安装一个virt-viewer(也就是官方推荐的remote-viewer客户端),官网直接下载即可,没什么技巧。使用linux的机子就更简单啦~直接yum install virt-viewer即可。
附上下载链接:
Virt Viewer for 32-bit Windows
Virt Viewer for 64-bit Windows
高级配置
点击左下角的高级选项,根据需要自己定义内存大小,控制台图形界面类型可以选择spice或者是vnc。
记得选择引导序列,需要把CD附加勾选上。
配置好之后,点击确定稍等30秒左右,虚拟机创建成功。
调整引导顺序
点击确定会自动下载一个console.vv文件,在安装了remote-viewer的前提下,直接双击该文件即可打开虚拟机控制台。
接下来就是熟悉的装机操作啦~
至此,ovirt4.3的基本部署就结束啦~额外的一些配置后续慢慢探索。
欢迎大家一起讨论交流。
[root@enginedell ~]# engine-backup
Start of engine-backup with mode 'backup'
scope: all
archive file: /var/lib/ovirt-engine-backup/ovirt-engine-backup-20190510162901.backup
log file: /var/log/ovirt-engine-backup/ovirt-engine-backup-20190510162901.log
Backing up:
Notifying engine
- Files
- Engine database 'engine'
- DWH database 'ovirt_engine_history'
Packing into file '/var/lib/ovirt-engine-backup/ovirt-engine-backup-20190510162901.backup'
Notifying engine
Done.