Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

3.3. 配置 Red Hat Virtualization Manager

在安装完 rhevm 软件包和它所依赖的软件包后,需要使用 engine-setup 命令来配置 Red Hat Enterprise Manager。这个命令会要求输入一些信息,在提供了这些信息后,它会根据输入的信息对系统进行配置,并启动 ovirt-engine 服务。
在默认情况下,engine-setup 会在 Manager 所在机器的本地创建并配置 Manager 的数据库。您也可以配置 Manager 来使用远程的数据库;或使用手工配置的本地数据库,但是,这需要在运行 engine-setup 前设置好所需的数据库。如需了解设置远程数据库的信息,请参阅 附录 D, 为 Red Hat Manager 准备远程 PostgreSQL 数据库;如需了解手工配置本地数据库的信息,请参阅 附录 E, 为 Red Hat Virtualization Manager 在本地手工配置一个 PostgreSQL 数据库
在默认情况下,engine-setup 会在 Manager 中配置一个 websocket 代理。但是,出于安全以及性能的考虑,用户也可以选择在一台独立的主机上配置它。详情请参阅 附录 F, 在一个独立的机器上安装 Websocket 代理.

注意

engine-setup 命令会引导您经过几个不同的配置阶段,每个阶段都需要输入一些信息。系统推荐的默认信息会包括在方括号中,点 Enter 来接受这些值。

过程 3.2. 配置 Red Hat Virtualization Manager

  1. 运行 engine-setup 命令开始配置 Red Hat Virtualization Manager:
    # engine-setup
  2. Enter 来配置 Manager:
    Configure Engine on this host (Yes, No) [Yes]:
  3. 另外,还可以允许 engine-setup 配置镜像 I/O 代理,以便 Manager 将虚拟磁盘镜像上传到存储域。请参阅管理指南中的上传磁盘镜像至存储域,了解更多信息。
    Configure Image I/O Proxy on this host? (Yes, No) [Yes]:
  4. 或者,选择让 engine-setup 命令配置一个 websocket 代理服务器,它允许用户使用 noVNC 或 HTML 5 控制台连接到虚拟机:
    Configure WebSocket Proxy on this machine? (Yes, No) [Yes]:
    如果需要在一台独立的机器上配置 websocket 代理,选 No。请参阅 附录 F, 在一个独立的机器上安装 Websocket 代理
  5. 选择是否在 Manager 机器上配置 Data Warehouse。
    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,请选择 No,然后参阅 Data Warehouse 指南中的在独立的机器上安装和配置 Data Warehouse,了解安装和配置说明。
  6. 另外,也可以允许通过命令行访问虚拟机串口控制台。
    Configure VM Console Proxy on this host (Yes, No) [Yes]:
    为了使用这个功能,还需要在客户端机器上进行额外配置。详情请参阅虚拟机管理指南中的打开虚拟机的串行控制台
  7. Enter 接受自动检测到的主机名(请注意,如果您使用的主机是虚拟机,自动检测到的主机名可能不正确);或输入一个不同的主机名后点 Enter
    Host fully qualified DNS name of this server [autodetected host name]:
  8. engine-setup 命令会检查您的防火墙配置,并可以根据 Manager 的需要修改防火墙的配置(如打开 TCP 端口 80 和 443)。如果您不希望 engine-setup 命令自动修改防火墙配置,则必须手工打开 Red Hat Enterprise Virtualization Manager 需要使用的端口。
    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
  9. 选择使用本地的 PostgreSQL 数据库或远程的 PostgreSQL 数据库作为 Data Warehouse 的数据库:
    Where is the DWH database located? (Local, Remote) [Local]:
    • 如果选择 Localengine-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]:
      1. 如果选择 Automatic(按 Enter),则不需要其它操作。
      2. 如果选择 Manual,输入手工配置的本地数据库的以下值:
        DWH database secured connection (Yes, No) [No]:
        DWH database name [ovirt_engine_history]:
        DWH database user [ovirt_engine_history]:
        DWH database password:

        注意

        当 Manager 数据库在下一步中被配置后,engine-setup 会需要这些值。
    • 如果选择 Remote,输入远程数据库主机的以下值:
      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:

      注意

      当 Manager 数据库在下一步中被配置后,engine-setup 会需要这些值。
  10. 选择使用本地的 PostgreSQL 数据库或远程的 PostgreSQL 数据库作为 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]:
      1. 如果选择 Automatic(按 Enter),则不需要其它操作。
      2. 如果选择 Manual,输入手工配置的本地数据库的以下值:
        Engine database secured connection (Yes, No) [No]:
        Engine database name [engine]:
        Engine database user [engine]:
        Engine database password:
    • 如果选择 Remote,输入远程数据库主机的以下值:
      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:
  11. 为自动创建的 Red Hat Virtualization Manager 管理用户设定密码:
    Engine admin password:
    Confirm engine admin password:
  12. 选择 GlusterVirtBoth
    Application mode (Both, Virt, Gluster) [Both]:
    Both 选项提供了最大的灵活性,在多数情况下可以选择它。Virt 应用模式允许用户在环境中运行虚拟机;Gluster 应用模式只允许通过管理门户管理 GlusterFS。
  13. wipe_after_delete 设置默认值,这会在删除磁盘后把虚拟磁盘的数据块清除。
    Default SAN wipe after delete (Yes, No) [No]:
  14. Manager 使用证书来和它所管理的主机进行安全的通讯。这个证书也可以被用来对 Manager 的 HTTPS 数据进行加密。您需要为证书提供机构名(organization name):
    Organization name for certificate [autodetected domain-based name]:
  15. 另外,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]:
  16. 在默认的情况下,外部到 Manager 的 SSLHTTPS)通讯使用在以前配置主机间的安全通讯时创建的自签发证书进行加密。或者,您也可以为外部的 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]:
  17. 确认是否在 Manager 上创建 NFS 共享,以用作 ISO 存储域。本地 ISO 域提供一系列可用来实施虚拟机初始设置的镜像:
    Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [No]:
    • 如果您选择默认设置(No),则无需再执行任何操作。
    • 如果您选择 Yes,则需要提供额外信息,用于设置 ISO 域:
      1. 指定 ISO 域的路径:
        Local ISO domain path [/var/lib/exports/iso]:
      2. 指定需要访问 ISO 域的网络和主机:
        Local ISO domain ACL: 10.1.2.0/255.255.255.0(rw) host01.example.com(rw) host02.example.com(rw)
        在上面的例子中,一个 /24 网络和两个特定的主机可以访问 ISO 域。请参阅 exports(5) man page 来获得更详细的信息。
      3. 指定 ISO 域的显示名:
        Local ISO domain name [ISO_DOMAIN]:
  18. 选择 Data Warehouse 保留收集到的数据的时间:

    注意

    如果您选择不在 Manager 机器上配置 Data Warehouse,则会跳过此步骤。
    Please choose Data Warehouse sampling scale:
    (1) Basic
    (2) Full
    (1, 2)[1]:
    Full 使用Data Warehouse 指南中列出的数据存储设置默认值(建议在 Data Warehouse 安装于远程主机的情况下使用)。
    BasicDWH_TABLES_KEEP_HOURLY 的值降低至 720 ,将 DWH_TABLES_KEEP_DAILY 的值降低至 0,减轻 Manager 机器上的负载(建议在同一主机同时安装 Manager 和 Data Warehouse 的情况下使用)。
  19. 检查安装的设置,点 Enter 接受相关的值并继续安装过程:
    Please confirm installation settings (OK, Cancel) [OK]:
  20. 如果计划把 Red Hat Enterprise Virtualization 环境与一个目录服务器进行连接,则需要把时间设置为与目录服务器的时钟进行同步,否则会出现不可预见的帐号过期的错误。如需了解更多相关信息,请参阅 Red Hat Enterprise Linux System Administrator's Guide 中的 Network Time Protocol Setup
当环境被配置完成后,engine-setup 命令会显示如何访问您的环境的信息。如果选择手工配置防火墙,engine-setup 会根据在设置过程中所做的选择,提供一个需要被打开的端口列表。engine-setup 命令同时会把相关信息保存在一个应答文件中(您在以后可以使用它来以相同的值重新配置 Manager),并输出 Red Hat Virtualization Manager 配置过程的日志文件信息。
下一节介绍了如何以 admin@internal 用户身份登录到管理门户,然后进行设置主机和附加存储的操作。