Ovirt4.3在虚拟机上的部署实现及在node节点上创建虚拟机
环境准备
虚拟机软件:Vmware Workstation 15 pro
虚拟机版本:CentOS-7-x86_64-Minimal-1908
CPU:2*2
内存:4G
磁盘:60G
安装时由于ovirt-engine单独部署在主机上,所以要准备两台CentOS,分别部署ovirt-engine以及node节点。
- engine节点主机IP:192.168.126.131
- node节点主机IP:192.168.126.132
由于是在虚拟机环境中搭建ovirt,所以要在VMware中开启虚拟化内核:
ovirt-engine部署
导入ovirt源
[root@localhost /]# yum install https://resources.ovirt.org/pub/yum-repo/ovirt-release43.rpm
[root@localhost /]# yum update
配置基础环境
- 关闭防火墙
[root@localhost /]# systemctl stop firewalld
[root@localhost /]# systemctl disable firewalld
- 关闭SeLinux
编辑 /etc/selinux/config,将SELINUX=enforcing 更改为 SELINUX=disabled
[root@localhost ~]# vim /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
- 配置host
[root@localhost /]# vim /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.126.131 engine.com
192.168.126.132 node.com
- 修改主机名
hostnamectl --static set-hostname engine.com
- 重启主机
[root@localhost /]# reboot
安装ovirt engine包
[root@engine ~]# yum install ovirt-engine
执行后发现报错:
Error downloading packages:
python-testtools-1.8.0-2.el7.noarch: [Errno 256] No more mirrors to try.
python-unittest2-1.0.1-1.el7.noarch: [Errno 256] No more mirrors to try.
解决办法是在 http://rpm.pbone.net里下载上面两个包,上传到主机上自行安装:
[root@engine local]# yum localinstall python-unittest2-1.0.1-1.el7.noarch.rpm -y
[root@engine local]# yum localinstall python-testtools-1.8.0-2.el7.noarch.rpm -y
完成后重新执行:
[root@engine ~]# yum install ovirt-engine
配置并运行ovirt engine
[root@engine local]# Sengine-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-20200420133832-x8ofhs.log
Version: otopi-1.8.4 (otopi-1.8.4-1.el7)
[ INFO ] Stage: Environment packages setup
[ 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 WebSocket Proxy on this host