3.4. 安装和配置 Red Hat Virtualization Manager

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

重要

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

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

流程

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

    # yum update
    注意

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

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

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

    # engine-setup
  4. Enter 键配置这个机器上的 Manager:

    Configure Engine on this host (Yes, No) [Yes]:
  5. (可选)安装 Open Virtual Network(OVN)。选择 Yes 将在 Manager 机器上安装 OVN 中央服务器,并将其作为外部网络提供程序添加到 Red Hat Virtualization 中。默认集群将使用 OVN 作为其默认网络提供程序,添加的主机会自动配置为与 OVN 通信。

    Configure ovirt-provider-ovn (Yes, No) [Yes]:

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

  6. (可选)允许 engine-setup 配置镜像 I/O 代理(ovirt-imageio-proxy),以允许 Manager 将虚拟磁盘上传到存储域。

    Configure Image I/O Proxy on this host? (Yes, No) [Yes]:
  7. (可选)允许 engine-setup 配置 websocket 代理服务器,以便允许用户通过 noVNC 控制台连接到虚拟机:

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

    要在远程服务器中配置 websocket 代理,请回答 No,并在完成管理器配置后查看 附录 B, 在独立的机器中安装 Websocket 代理

    重要

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

    要在远程服务器中配置数据仓库,请回答 No,并在完成管理器配置后看到 第 3.5 节 “在一个单独的计算机上安装和配置数据仓库”

  9. (可选)允许通过命令行访问虚拟机的串行控制台。

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

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

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

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

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

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

  12. 指定是否在此机器上配置 Manager 数据库,还是在另一台机器上:

    Where is the Engine database located? (Local, Remote) [Local]:
    • 如果您选择 Remote,请为预配置的远程数据库服务器输入以下值:使用远程数据库服务器的 ip 地址或 FQDN 替换 localhost

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

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

    Application mode (Both, Virt, Gluster) [Both]:

    Both都提供最大的灵活性。在大多数情况下,选择 两者virt 允许您在环境中运行虚拟机; Gluster 仅允许从管理门户管理 GlusterFS。

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

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

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

    Organization name for certificate [autodetected domain-based name]:
  18. (可选)允许 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]:
  19. 默认情况下,与 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]:
  20. 查看安装设置,点 Enter 接受值并继续安装:

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

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

  21. 如果要将 Red Hat Virtualization 环境与目录服务器链接,请将日期和时间配置为与目录服务器使用的系统时钟同步,以避免意外的帐户到期问题。如需更多信息,请参阅 Red Hat Enterprise Linux 系统管理员指南中的使用远程服务器同步系统时钟
  22. 根据浏览器提供的说明安装证书颁发机构。您可以导航到 http://manager-fqdn/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA,将 manager-fqdn 替换为您在安装过程中提供的 FQDN。

在远程服务器中安装数据仓库服务和数据库: