3.3. 配置 Red Hat Enterprise Virtualization Manager

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

注意

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

过程 3.2. 配置 Red Hat Enterprise Virtualization Manager

  1. 运行 engine-setup 命令来开始配置 Red Hat Enterprise Virtualization Manager:
    # engine-setup
  2. Enter 来配置 Manager:
    Configure Engine on this host (Yes, No) [Yes]:
  3. 另外,也可以通过命令行来允许到虚拟机串口控制台的访问。
    Configure VM Console Proxy on this host (Yes, No) [Yes]:
    为了使用这个功能,还需要在客户端机器上进行额外配置。详情请参阅虚拟机管理指南中的Opening a Serial Console to a Virtual Machine
  4. 或者,选择让 engine-setup 命令配置一个 websocket 代理服务器,它允许用户使用 noVNC 或 HTML 5 控制台连接到虚拟机:
    Configure WebSocket Proxy on this machine? (Yes, No) [Yes]:
  5. Enter 接受自动检测到的主机名(请注意,如果您使用的主机是虚拟机,自动检测到的主机名可能不正确);或输入一个不同的主机名后点 Enter
    Host fully qualified DNS name of this server [autodetected host name]:
  6. 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
  7. 选择使用本地的 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:
  8. 选择 GlusterVirtBoth
    Application mode (Both, Virt, Gluster) [Both]:
    Both 选项提供了最大的灵活性,在多数情况下可以选择它。Virt 应用模式允许用户在环境中运行虚拟机;Gluster 应用模式只允许通过管理门户管理 GlusterFS。
  9. 为自动创建的 Red Hat Enterprise Virtualization Manager 管理用户设定密码:
    Engine admin password:
    Confirm engine admin password:
  10. wipe_after_delete 设置默认值,这会在删除磁盘后把虚拟磁盘的数据块清除。
    Default SAN wipe after delete (Yes, No) [No]:
  11. Manager 使用证书来和它所管理的主机进行安全的通讯。这个证书也可以被用来对 Manager 的 HTTPS 数据进行加密。您需要为证书提供机构名(organization name):
    Organization name for certificate [autodetected domain-based name]:
  12. 在默认的情况下,外部到 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]:
  13. 另外,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]:
  14. 另外,也可以在 Manager 上创建一个 NFS 共享来作为一个 ISO 存储域使用。本地的 ISO 域提供了一组可以在初始设置虚拟机时使用的镜像:
    1. Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [Yes]:
    2. 指定 ISO 域的路径:
      Local ISO domain path [/var/lib/exports/iso]:
    3. 指定需要访问 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 来获得更详细的信息。
    4. 指定 ISO 域的显示名:
      Local ISO domain name [ISO_DOMAIN]:
  15. 另外,您也可以使用 engine-setup 命令来允许一个代理服务器处理 Red Hat Access 插件相关的操作:
    Would you like transactions from the Red Hat Access Plugin sent from the RHEV Manager to be brokered through a proxy server? (Yes, No) [No]:
  16. 检查安装的设置,点 Enter 接受相关的值并继续安装过程:
    Please confirm installation settings (OK, Cancel) [OK]:
  17. 如果计划把 Red Hat Enterprise Virtualization 环境与一个目录服务器进行连接,则需要把时间设置为与目录服务器的时钟进行同步,否则会出现不可预见的帐号过期的错误。如需了解更多相关信息,请参阅 Red Hat Enterprise Linux Deployment Guide 中的 Network Time Protocol Setup
当环境被配置完成后,engine-setup 命令会显示如何访问您的环境的信息。如果选择手工配置防火墙,engine-setup 会根据在设置过程中所做的选择,提供一个需要被打开的端口列表。engine-setup 命令同时会把相关信息保存在一个应答文件中(您在以后可以使用它来以相同的值重新配置 Manager),并输出 Red Hat Enterprise Virtualization Manager 配置过程的日志文件信息。
下一节介绍了如何以 admin@internal 用户身份登录到管理门户来继续对 Manager 进行配置。