3.3. 安装和配置 Red Hat Virtualization Manager

安装 Red Hat Virtualization Manager 的软件包和依赖项,并使用 engine-setup 命令进行配置。该脚本将要求您回答一系列问题,并在提供所有问题所需的值后,应用该配置并启动 ovirt-engine 服务。

重要

engine-setup 命令指导您完成几个不同的配置阶段,每个阶段需要用户输入的几个步骤。建议的配置默认值在方括号中提供;如果给定步骤接受推荐的值,请按 Enter 以接受该值。

您可以运行 engine-setup --accept-defaults 来自动接受具有默认答案的所有问题。这个选项时应谨慎使用,只有在您熟悉 engine-setup 时才应使用。

流程

  1. 请确定所有软件包是最新的:

    # dnf upgrade --nobest
    注意

    如果任何与内核相关的软件包已更新,请重新启动机器。

  2. 安装 rhvm 软件包和依赖项。

    # dnf install rhvm
  3. 运行 engine-setup 命令以开始配置 Red Hat Virtualization Manager:

    # engine-setup
  4. 可选:输入 Yes 并按 Enter 在此机器上设置 Cinderlib 集成:

    Set up Cinderlib integration
    (Currently in tech preview)
    (Yes, No) [No]:
    重要

    Cinderlib 只是一个技术预览功能。技术预览功能不包括在红帽生产服务级别协议(SLA)中,且其功能可能并不完善。因此,红帽不建议在生产环境中使用它们。这些技术预览功能可以使用户提早试用新的功能,并有机会在开发阶段提供反馈意见。有关红帽技术预览功能支持范围的更多信息,请参阅 Red Hat 技术预览功能支持范围

  5. Enter 键配置这个机器上的 Manager:

    Configure Engine on this host (Yes, No) [Yes]:
  6. 可选:安装 Open Virtual Network(OVN)。选择 Yes 在 Manager 机器上安装 OVN 服务器,并将其添加到 Red Hat Virtualization 中作为外部网络供应商。此操作还会将 Default 集群配置为使用 OVN 作为其默认网络提供程序。

    重要

    另外,请参阅管理指南添加 Open Virtual Network(OVN)作为外部网络提供者中的"下一步"步骤。

    Configuring ovirt-provider-ovn also sets the Default cluster’s default network provider to ovirt-provider-ovn.
    Non-Default clusters may be configured with an OVN after installation.
    Configure ovirt-provider-ovn (Yes, No) [Yes]:

    有关在 Red Hat Virtualization 中使用 OVN 网络的更多信息,请参阅管理指南中的添加开放虚拟网络(OVN)作为外部网络提供程序

  7. 可选: 允许 engine-setup 配置 WebSocket Proxy 服务器,允许用户通过 noVNC 控制台连接到虚拟机:

    Configure WebSocket Proxy on this machine? (Yes, No) [Yes]:
    重要

    WebSocket 代理和 noVNC 只是一个技术预览功能。技术预览功能不被红帽产品服务级别协议(SLA)支持,且可能无法完成。红帽不建议在生产环境中使用它们。这些技术预览功能可以使用户提早试用新的功能,并有机会在开发阶段提供反馈意见。如需更多信息,请参阅红帽技术预览功能支持范围

  8. 选择是否在此机器上配置数据仓库。

    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]:
    重要

    红帽只支持在彼此相同的机器上安装数据仓库数据库、Data Warehouse 服务和 Grafana。

  9. Enter 在 Manager 中配置 Grafana:

    Configure Grafana on this host (Yes, No) [Yes]:
  10. 可选:从命令行访问虚拟机的串行控制台。

    Configure VM Console Proxy on this host (Yes, No) [Yes]:

    客户端机器上需要其他配置才能使用此功能。请参阅虚拟机管理指南 中的打开串行控制台到虚拟机

  11. Enter 接受自动检测到的主机名,或者输入备用主机名,然后按 Enter 键。请注意,如果您使用虚拟主机,自动检测的主机名可能不正确。

    Host fully qualified DNS name of this server [autodetected host name]:
  12. engine-setup 命令检查您的防火墙配置,并可以打开 Manager 用于外部通信的端口,如端口 80 和 443。如果您没有允许 engine-setup 修改防火墙配置,则必须手动打开由管理器使用的端口。firewalld 配置为防火墙管理器。

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

    如果您选择自动配置防火墙,且没有防火墙管理器处于活动状态,系统会提示您从支持的选项列表中选择您所选的防火墙管理器。输入防火墙管理器的名称,然后按 Enter。即使只列出了一个选项,也是如此。

  13. 指定是否在此机器上配置数据仓库数据库,或在其它机器上配置:

    Where is the DWH database located? (Local, Remote) [Local]:
    • 如果您选择 Local,则 engine-setup 脚本可以自动配置数据库(包括添加用户和数据库)或者它连接到预配置的本地数据库:

      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]:
      • 如果您通过按 Enter 来选择 Automatic,则不需要进一步的操作。
      • 如果选择 Manual,请为手动配置的本地数据库输入以下值:

        DWH database secured connection (Yes, No) [No]:
        DWH database name [ovirt_engine_history]:
        DWH database user [ovirt_engine_history]:
        DWH database password:
        注意

        engine-setup 在下一步中配置 Manager 数据库后请求这些值。

    • 如果您选择 Remote (例如,如果您在 Manager 机器上安装 Data Warehouse 服务,但已配置了远程数据仓库数据库),请为远程数据库服务器输入以下值:

      DWH database host [localhost]:
      DWH database port [5432]:
      DWH database secured connection (Yes, No) [No]:
      DWH database name [ovirt_engine_history]:
      DWH database user [ovirt_engine_history]:
      DWH database password:
      注意

      engine-setup 在下一步中配置 Manager 数据库后请求这些值。

    • 如果选择 Remote,系统会提示您输入 Grafana 数据库用户的用户名和密码:

      Grafana database user [ovirt_engine_history_grafana]:
      Grafana database password:
  14. 指定是否在此机器上配置 Manager 数据库,还是在另一台机器上:

    Where is the Engine database located? (Local, Remote) [Local]:
    • 如果选择 Localengine-setup 命令可以自动配置数据库(包括添加用户和数据库)或者它连接到预配置的本地数据库:

      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]:
      • 如果您通过按 Enter 来选择 Automatic,则不需要进一步的操作。
      • 如果选择 Manual,请为手动配置的本地数据库输入以下值:

        Engine database secured connection (Yes, No) [No]:
        Engine database name [engine]:
        Engine database user [engine]:
        Engine database password:
  15. 为 Red Hat Virtualization Manager 自动创建的管理员用户设置密码:

    Engine admin password:
    Confirm engine admin password:
  16. 选择 Gluster, Virt, 或 Both:

    Application mode (Both, Virt, Gluster) [Both]:
    • Both - 提供最大的灵活性。在大多数情况下,选择 Both
    • virt - 允许您在环境中运行虚拟机。
    • Gluster - 只允许从管理门户管理 GlusterFS。

      注意

      GlusterFS 存储已弃用,并将在以后的发行版本中删除。

  17. 如果安装了 OVN 供应商,您可以选择使用默认凭证,或者指定替代方案。

    Use default credentials (admin@internal) for ovirt-provider-ovn (Yes, No) [Yes]:
    oVirt OVN provider user[admin@internal]:
    oVirt OVN provider password:
  18. wipe_after_delete 标志设置默认值,它会在删除磁盘时擦除虚拟磁盘的块。

    Default SAN wipe after delete (Yes, No) [No]:
  19. Manager 使用证书与其主机安全通信。此证书也可以选择用来保护与 Manager 的 HTTPS 通信。为证书提供机构名称:

    Organization name for certificate [autodetected domain-based name]:
  20. (可选)允许 engine-setup 将 Manager 的登录页面设置为 Apache Web 服务器提供的默认页面:

    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 web page of the server? (Yes, No) [Yes]:
  21. 默认情况下,与 Manager 进行通信的外部 SSL(HTTPS)通讯会与配置前面创建的自签名证书进行保护,以安全地与主机通信。或者,为外部 HTTPS 连接选择另一个证书;这不会影响 Manager 与主机通信的方式:

    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]:
  22. 您可以为 Grafana admin 用户指定唯一密码,或者使用与 Manager admin 密码相同的密码:

    Use Engine admin password as initial Grafana admin password (Yes, No) [Yes]:
  23. 选择数据仓库将保留所收集数据的时长:

    Please choose Data Warehouse sampling scale:
    (1) Basic
    (2) Full
    (1, 2)[1]:

    Full 使用 Data Warehouse Guide 中列出的数据存储设置的默认值(当远程服务器上安装数据仓库时,发送)。

    Basic 会将 DWH_TABLES_KEEP_HOURLY 的值减小到 720DWH_TABLES_KEEP_DAILY 的值减小到 0,从而减轻了 Manager 集群的负载。在同一机器上安装 Manager 和数据仓库时,请使用 Basic

  24. 查看安装设置,点 Enter 接受值并继续安装:

    Please confirm installation settings (OK, Cancel) [OK]:

配置您的环境后,engine-setup 会显示有关如何访问您的环境的详细信息。

后续步骤

如果您选择手动配置防火墙,engine-setup 提供了一个需要打开的端口的自定义列表,具体取决于设置过程中选择的选项。engine-setup 还会将您的回答保存到一个文件,该文件可用于使用相同的值重新配置管理器,并输出 Red Hat Virtualization Manager 配置过程中的日志文件位置。

登录到管理门户,您可以在其中添加主机和存储到环境中: