暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

使用阿里云oVirt镜像部署oVirt平台

原创 手机用户1979 2022-02-28
591

本文来自于【阿里云官方镜像站:https://developer.aliyun.com/mirror/?utm_content=g_1000307095 】

转发自【https://blog.csdn.net/qq_45392321/article/details/122098998】

【阿里云镜像】使用阿里云oVirt镜像部署oVirt平台

一、参考链接

阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区 (aliyun.com)

ovirt镜像-ovirt下载地址-ovirt安装教程-阿里巴巴开源镜像站 (aliyun.com)

二、oVirt介绍

oVirt是一款免费开源虚拟化软件,是RedHat商业版本虚拟化软件RHEV的开源版本。

oVirt基于kvm,并整合使用了libvirt、gluster、patternfly、ansible等一系列优秀的开源软件,oVirt的定位是替代vmware vsphere,oVirt目前已经成为了企业虚拟化环境可选的解决方案,另外相比OpenStack的庞大和复杂,oVirt在企业私有云建设中具备部署和维护使用简单的优势。

三、部署oVirt操作

本实验使用VM虚拟机模拟演示操作

基于CentOS7.9版本进行操作

1、查看系统版本信息

[root@centos-ovirt ~]# hostnamectl

   Static hostname: centos-ovirt

         Icon name: computer-vm

           Chassis: vm

        Machine ID: f6fc8fb7991c4c518238af7c75f16046

           Boot ID: 3028618b95f346e7a096c234f351ff7c

    Virtualization: vmware

  Operating System: CentOS Linux 7 (Core)

       CPE OS Name: cpe:/o:centos:centos:7

            Kernel: Linux 3.10.0-1160.el7.x86_64

      Architecture: x86-64

[root@centos-ovirt ~]# uname -a

Linux centos-ovirt 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

[root@centos-ovirt ~]# cat /etc/redhat-release

CentOS Linux release 7.9.2009 (Core)

[root@centos-ovirt ~]#

2、安装ovirt-engine组件失败

[root@centos-ovirt ~]# yum install -y ovirt-engine

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: mirrors.aliyun.com

 * extras: mirrors.aliyun.com

 * updates: mirrors.aliyun.com

No package ovirt-engine available.

Error: Nothing to do

3、更新阿里云YUM源

[root@centos-ovirt ~]# yum clean all

Loaded plugins: fastestmirror

Cleaning repos: base extras updates

Cleaning up list of fastest mirrors

[root@centos-ovirt ~]# yum repolist

Loaded plugins: fastestmirror

Determining fastest mirrors

 * base: mirrors.aliyun.com

 * extras: mirrors.aliyun.com

 * updates: mirrors.aliyun.com

base                                 | 3.6 kB  00:00:00                extras                               | 2.9 kB  00:00:00     

updates                              | 2.9 kB  00:00:00     

(1/4): base/7/x86_64/group_gz        | 153 kB  00:00:00     

(2/4): extras/7/x86_64/primary_db    | 243 kB  00:00:00     

(3/4): base/7/x86_64/primary_db      | 6.1 MB  00:00:01     

(4/4): updates/7/x86_64/primary_db   |  13 MB  00:00:02     

repo id                      repo                      name          statusbase/7/x86_64   CentOS-7 - Base - mirrors.aliyun.com   10,072

extras/7/x86_64       CentOS-7 - Extras - mirrors.aliyun.com    500

updates/7/x86_64      CentOS-7 - Updates - mirrors.aliyun.com   3,242

repolist: 13,814

[root@centos-ovirt ~]#


# 更新YUM源

[root@centos-ovirt ~]# yum install -y https://mirrors.aliyun.com/ovirt/yum-repo/ovirt-release42.rpm

Loaded plugins: fastestmirror

ovirt-release42.rpm                                                                              |  12 kB  00:00:00     Examining /var/tmp/yum-root-47iGoT/ovirt-release42.rpm: ovirt-release42-4.2.8-1.el7.noarch

Marking /var/tmp/yum-root-47iGoT/ovirt-release42.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package ovirt-release42.noarch 0:4.2.8-1.el7 will be installed

--> Finished Dependency Resolution


Dependencies Resolved


======================================================================================================================== Package                        Arch                  Version                     Repository                       Size

========================================================================================================================Installing:

 ovirt-release42                noarch                4.2.8-1.el7                 /ovirt-release42                 11 k


Transaction Summary

========================================================================================================================Install  1 Package


Total size: 11 k

Installed size: 11 k

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing : ovirt-release42-4.2.8-1.el7.noarch        1/1   Verifying  : ovirt-release42-4.2.8-1.el7.noarch        1/1 

Installed:

  ovirt-release42.noarch 0:4.2.8-1.el7                                                                                  

Complete!

[root@centos-ovirt ~]#

[root@centos-ovirt ~]# cd /etc/yum.repos.d/

[root@centos-ovirt yum.repos.d]# ll

total 52

-rw-r--r--. 1 root root 2523 Nov 28 18:12 CentOS-Base.repo

-rw-r--r--. 1 root root 1664 Oct 23  2020 CentOS-Base.repo.backup

-rw-r--r--. 1 root root 1309 Oct 23  2020 CentOS-CR.repo

-rw-r--r--. 1 root root  649 Oct 23  2020 CentOS-Debuginfo.repo

-rw-r--r--. 1 root root  314 Oct 23  2020 CentOS-fasttrack.repo

-rw-r--r--. 1 root root  630 Oct 23  2020 CentOS-Media.repo

-rw-r--r--. 1 root root 1331 Oct 23  2020 CentOS-Sources.repo

-rw-r--r--. 1 root root 8515 Oct 23  2020 CentOS-Vault.repo

-rw-r--r--. 1 root root  616 Oct 23  2020 CentOS-x86_64-kernel.repo

-rw-r--r--  1 root root 1991 Dec 23 22:51 ovirt-4.2-dependencies.repo

-rw-r--r--  1 root root  289 Dec 23 22:51 ovirt-4.2.repo

[root@centos-ovirt yum.repos.d]#

4、重新安装ovirt-engine组件

[root@centos-ovirt ~]# yum install -y ovirt-engine

# 执行上述命令后,安装结果有报错信息

yum --nogpgcheck install ovirt-engine

# 取消 GPG 验证即可

参考链接:https://github.com/grafana/grafana/issues/3126

Header V4 RSA/SHA1 signature: BAD, key ID 3dd18bdd (mengkang.net)

5、配置oVirt Engine管理端

安装结束一定要出现“Execution of setup completed successfully”提示

代表oVirt Engine管理端安装成功。

[root@centos-ovirt ~]# engine-setup

[root@centos-ovirt ~]# 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-20211223235336-iz4qly.log

          Version: otopi-1.7.8 (otopi-1.7.8-1.el7)

[ 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 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 [centos-ovirt]:

[WARNING] Host name centos-ovirt has no domain suffix

[WARNING] Failed to resolve centos-ovirt 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

[WARNING] Host name centos-ovirt has no domain suffix

[WARNING] Host name centos-ovirt has no domain suffix

[WARNING] Host name centos-ovirt has no domain suffix


          --== 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 [Test]:


          --== 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] Less than 16384MB of memory is available


          --== CONFIGURATION PREVIEW ==--


          Application mode                        : both

          Default SAN wipe after delete           : False

          Update Firewall                         : False

          Host FQDN                               : centos-ovirt

          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                        : Test

          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

[ 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://centos-ovirt:80/ovirt-engine

              https://centos-ovirt:443/ovirt-engine

          Internal CA 73:6F:DC:88:BB:61:21:08:67:8D:A1:47:C6:27:B2:7D:0E:87:7D:B0

          SSH fingerprint: SHA256:xD1NYKNS8ukCNWWVYUj33HHbnJ0KsjGlCM3vzOHuYU4

[WARNING] Less than 16384MB of memory is available


          --== END OF SUMMARY ==--


[ INFO  ] Stage: Clean up

          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20211223235336-iz4qly.log

[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20211223235631-setup.conf'

[ INFO  ] Stage: Pre-termination

[ INFO  ] Stage: Termination

[ INFO  ] Execution of setup completed successfully

[root@centos-ovirt ~]#

6、访问oVirt Engine管理端

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论