2.2. Red Hat Enterprise Virtualization Hypervisor でのセルフホストエンジンの設定

Hypervisor の ISO を使用して Red Hat Enterprise Virtualization Hypervisor をインストールした後には、Hosted Engine の画面でセルフホストエンジンの設定を行います。現在セルフホストエンジンは、Red Hat Enterprise Virtualization Hypervisor 7 上でサポートされます。

前提条件:

  • 新規インストールした Red Hat Enterprise Virtualization Hypervisor (RHEV-H) を用意する必要があります。
  • セルフホストエンジン環境のストレージを準備する必要があります。ご使用のデプロイメントのストレージを用意する方法については、『管理ガイド』の「ストレージ」の章を参照してください。ストレージ共有は、少なくとも 60 GB 必要です。
  • Manager および Hypervisor ホスト用の完全修飾ドメイン名を設定しておく必要があります。正引き (フォワードルックアップ) と逆引き (リバースルックアップ) の両方を DNS で設定する必要があります。

    注記

    評価目的で、/etc/hosts ファイルを名前解決に使用することができます。
  • Security 画面で SSH パスワード認証を有効にしておく必要があります。
  • Manager 仮想マシンのオペレーティングシステムのインストールメディアを用意する必要があります。インストールには、RHEV-M Virtual Appliance を使用する方法を推奨しています。アプライアンスを使用するには、/tmp ディレクトリーの容量が少なくとも 60 GB で、HTTP 経由でハイパーバイザーからアプライアンスにアクセスできる状態でなければなりません。カスタマーポータルから RHEV-M Virtual Appliance をダウンロードしてください。

手順2.1 RHEV-H でのセルフホストエンジンの設定

以下の例では、Red Hat Enterprise Virtualization Hypervisor 7 にセルフホストエンジンを設定します。
  1. Deploy Hosted Engine をクリックします。
  2. Red Hat Enterprise Virtualization Manager 仮想マシンのインストール方法を指定します。RHEV-M Virtual Appliance を使用してインストールする場合は、アプライアンスに http://file.domain.com/rhevm-appliance.ova などの URL を入力します。これは、推奨される Manager のインストール方法です。Deploy をクリックしてから、Close をクリックします。
    または、PXE インストールが希望のインストール方法である場合は PXE Boot Engine VM を選択します。
  3. OK をクリックして hosted-engine デプロイメントスクリプトを開始します。Enter を押して操作の続行を確定します。
  4. ストレージの設定

    使用するストレージのタイプを選択します。
    During customization use CTRL-D to abort.
    Please specify the storage you would like to use (glusterfs, iscsi, fc, nfs3, nfs4)[nfs3]:
    • NFS ストレージタイプの場合には、完全修飾ドメイン名または IP アドレスを使用した完全なアドレスと、共有ストレージドメインのパス名を指定します。
      Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/nfs
    • iSCSI の場合には、iSCSI ポータルの IP アドレス、ユーザー名、およびパスワードを指定して、自動検出されたリストからターゲット名を選択します。デプロイメント時に選択できる iSCSI ターゲットは 1 つのみです。
      Please specify the iSCSI portal IP address:
      Please specify the iSCSI portal port [3260]:
      Please specify the iSCSI portal user:
      Please specify the iSCSI portal password:
      Please specify the target name (auto-detected values) [default]:
    • Gluster ストレージタイプの場合には、完全修飾ドメイン名または IP アドレスを使用した完全なアドレスと、共有ストレージドメインのパス名を指定します。

      重要

      サポートされるストレージは、レプリカ 3 の Gluster ストレージのみです。以下の設定が行われていることを確認してください。
      • Gluster サーバー 3 つすべての /etc/glusterfs/glusterd.vol ファイルで、rpc-auth-allow-insecureon に設定してください。
        option rpc-auth-allow-insecure on
      • 以下のようにボリュームを設定します。
        gluster volume set volume cluster.quorum-type auto
        gluster volume set volume network.ping-timeout 10
        gluster volume set volume auth.allow \*
        gluster volume set volume group virt
        gluster volume set volume storage.owner-uid 36
        gluster volume set volume storage.owner-gid 36
        gluster volume set volume server.allow-insecure on
      Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/gluster_volume
    • Fiber Channel については、ホストのバスアダプターが設定、接続されている必要があります。設定/接続がされている場合には hosted-engine により、利用可能な LUN が自動で検出されます。LUN には既存のデータが含まれないようにする必要があります。
      The following luns have been found on the requested target:
      [1]     3514f0c5447600351       30GiB   XtremIO XtremApp
                              status: used, paths: 2 active
      
      [2]     3514f0c5447600352       30GiB   XtremIO XtremApp
                              status: used, paths: 2 active
      
      Please select the destination LUN (1, 2) [1]:
    環境で使用するストレージドメインとストレージデータセンターの名前を選択します。
    [ INFO  ] Installing on first host
    Please provide storage domain name. [hosted_storage]:
    Local storage datacenter name is an internal name and currently will not be shown in engine's admin UI.Please enter local datacenter name [hosted_datacenter]:
  5. ネットワークの設定

    このスクリプトは、環境の管理ブリッジとして使用可能なネットワークインターフェースコントローラー (NIC) を検出し、次にファイアウォールの設定をチェックして、コンソールから (SPICE または VNC) アクセスできるようにその設定を変更するかどうかを確認します。

    注記

    現在、ボンディングネットワークおよび VLAN タグ付けされたネットワークのインターフェースを管理ブリッジとして設定できません。この問題を回避するには、https://access.redhat.com/solutions/1417783 から詳しい情報を確認してください。
    Please indicate a nic to set rhevm bridge on: (eth1, eth0) [eth1]:
    iptables was detected on your computer, do you wish setup to configure it? (Yes, No)[Yes]: Yes
    Please indicate a pingable gateway IP address [X.X.X.X]:
  6. 仮想マシンの設定

    このスクリプトは、仮想マシンを作成して、Red Hat Enterprise Virtualization Manager として設定していきます。

    注記

    Manager の仮想マシンを手動でインストールする場合は、「付録A Manager のオペレーティングシステムの手動インストール」を参照して、セルフホストエンジンの設定を完了してください。アプライアンスを使用すると、Manager 仮想マシンにユーザーの操作が必要ないため、ワークフローが簡素化されます。手動でのインストールでは、インストールを自由自在にコントロールすることができます。
    [ INFO ] Checking OVF archive content (could take a few minutes depending on archive size)
    [ INFO ] Checking OVF XML content (could take a few minutes depending on archive size)
             Would you like to use cloud-init to customize the appliance on the first boot (Yes, No)[Yes]?
             Would you like to generate on-fly a cloud-init no-cloud ISO image
             or do you have an existing one(Generate, Existing)[Generate]? Generate
             Please provide the FQDN you would like to use for the engine appliance.
             Note: This will be the FQDN of the engine VM you are now going to launch.
             It should not point to the base host or to any other existing machine.
             Engine VM FQDN: (leave it empty to skip): manager.example.com
             Automatically execute engine-setup on the engine appliance on first boot (Yes, No)[Yes]? Yes
             Automatically restart the engine VM as a monitored service after engine-setup (Yes, No)[Yes]? Yes
             Please provide the domain name you would like to use for the engine appliance.
             Engine VM domain: [example.com]
             Enter root password that will be used for the engine appliance (leave it empty to skip): p@ssw0rd
             Confirm appliance root password: p@ssw0rd
             How should the engine VM network be configured (DHCP, Static)[DHCP]? Static
             Please enter the IP address to be used for the engine VM: 192.168.x.x
    [ INFO ] The engine VM will be configured to use 192.168.x.x/24
             Please provide a comma-separated list (max3) of IP addresses of domain name servers for the engine VM
             Engine VM DNS (leave it empty to skip):
             Add lines for the appliance itself and for this host to /etc/hosts on the engine VM?
             Note: ensuring that this host could resolve the engine VM hostname is still up to you (Yes, No)[No] Yes
             Please specify an alias for the Hosted Engine image [hosted_engine]:
             The following CPU types are supported by this host:
                    - model_Penryn: Intel Penryn Family
                    - model_Conroe: Intel Conroe Family
             Please specify the CPU type to be used by the VM [model_Penryn]:
             Please specify the number of virtual CPUs for the VM [Defaults to appliance OVF value: 4]:
             You may specify a MAC address for the VM or accept a randomly generated default [00:16:3e:77:b2:a4]:
             Please specify the console type you would like to use to connect to the VM (vnc, spice) [vnc]: vnc
  7. ホストエンジンの設定

    Red Hat Enterprise Virtualization 環境で識別できるようにハイパーバイザーの名前を、また管理ポータルにアクセスできるように admin@internal ユーザーのパスワードを指定します。Manager 仮想マシンの FQDN を指定してください。
    Enter the name which will be used to identify this host inside the Administrator Portal [hosted_engine_1]:
    Enter 'admin@internal' user password that will be used for accessing the Administrator Portal: p@ssw0rd
    Confirm 'admin@internal' user password: p@ssw0rd
    Please provide the name of the SMTP server through which we will send notifications [localhost]:
    Please provide the TCP port number of the SMTP server [25]:
    Please provide the email address from which notifications will be sent [root@localhost]:
    Please provide a comma-separated list of email addresses which will get notifications [root@localhost]:
  8. 設定のプレビュー

    続行する前に、hosted-engine スクリプトは、入力された設定値を表示して、これらの値で設定を続行するかどうかを尋ねます。
  9. Manager 仮想マシンの作成

    このスクリプトでは、Manager 仮想マシンの作成、ovirt-engine および高可用性サービスの起動、ハイパーバイザーホストと共有ストレージドメインの Manager 仮想マシンへの接続が行われます。
    You can now connect to the VM with the following command:
    	/usr/bin/remote-viewer vnc://localhost:5900
    Use temporary password "3042QHpX" to connect to vnc console.
    Please note that in order to use remote-viewer you need to be able to run graphical applications.
    This means that if you are using ssh you have to supply the -Y flag (enables trusted X11 forwarding).
    Otherwise you can run the command from a terminal in your preferred desktop environment.
    If you cannot run graphical applications you can connect to the graphic console from another host or connect to the serial console using the following command:
    socat UNIX-CONNECT:/var/run/ovirt-vmconsole-console/fabbea5a-1989-411f-8ed7-7abe0917fc66.sock,user=ovirt-vmconsole STDIO,raw,echo=0,escape=1
    
    If you need to reboot the VM you will need to start it manually using the command:
    hosted-engine --vm-start
    You can then set a temporary password using the command:
    hosted-engine --add-console-password
    [ INFO ] Running engine-setup on the appliance
    ...
    [ INFO ] Engine-setup successfully completed
    [ INFO ] Engine is still unreachable
    [ INFO ] Engine is still unreachable, waiting...
    [ INFO ] Engine replied: DB Up!Welcome to Health Status!
    [ INFO ] Connecting to the Engine
             Enter the name of the cluster to which you want to add the host (Default) [Default]:
    [ INFO  ] Waiting for the host to become operational in the engine. This may take several minutes... [ INFO  ] Still waiting for VDSM host to become operational...
    [ INFO  ] The VDSM Host is now operational
    [ INFO  ] Shutting down the engine VM
    [ INFO  ] Enabling and starting HA services
    [ INFO  ] Saving hosted-engine configuration on the shared storage domain
              Hosted Engine successfully set up
    [ INFO  ] Stage: Clean up
    [ INFO  ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-2015xx.conf'
    [ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
    [ INFO  ] Stage: Pre-termination
    [ INFO  ] Stage: Termination
    
    [screen is terminating]
    Hit <Return> to return to the TUI
hosted-engine のデプロイメントスクリプトが正常に完了すると、Red Hat Enterprise Virtualization Manager の名前とステータスが Hosted Engine 画面に表示されます。表示されるまでに数分かかる場合があります。Red Hat Enterprise Virtualization Manager は設定されハイパーバイザーホストで実行されています。Manager によりデータセンター、クラスター、ハイパーバイザーホスト、Manager 仮想マシン、Manager 仮想マシン専用の共有ストレージドメインがすでに設定されています。admin@internal ユーザーでログインして、Manager の設定やその他のリソースの追加を継続することができます。通常の仮想マシンのデータをホストして、Manager 仮想マシンを管理ポータルに表示させるために、別のデータドメインを作成する必要があります。
Red Hat Enterprise Virtualization Manager をディレクトリーサーバーにリンクして、Manager 環境に新規ユーザーを追加することができます。Red Hat Enterprise Virtualization は、 Red Hat Directory Server (RHDS)、Red Hat Identity Management (IdM)、Active Directory など多くのディレクトリーサーバータイプをサポートします。ディレクトリーサーバーをお使いの環境に追加するには、ovirt-engine-extension-aaa-ldap-setup の対話型設定スクリプトを使用します。詳しい情報は、『管理ガイド』の「外部の LDAP プロバイダーの設定」を参照してください。
また、ovirt-hosted-engine-setup スクリプトにより、設定時に指定した回答がファイルに保存されます。このファイルは、障害復旧 (DR) に役立ちます。--generate-answer=<file> の引数で保存先が指定されていない場合には、応答ファイルは /etc/ovirt-hosted-engine/answers.conf に生成されます。

注記

RHEV-M Virtual Appliance では、デフォルトで SSH パスワード認証は有効になっていません。SPICE または VNC コンソールから Red Hat Enterprise Virtualization Manager 仮想マシンにアクセスして、SSH パスワード認証を有効にすることができます。sshd サービスが実行されていることを確認します。/etc/ssh/sshd_config を編集して、以下の 2 つのオプションを yes に変更します。
  • PasswordAuthentication
  • PermitRootLogin
sshd サービスを再起動して、変更を有効にします。