Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

2.3. セルフホストエンジンのデプロイ

hosted-engine --deploy または Cockpit のユーザーを使用してセルフホストエンジンのデプロイメントを開始した後には、ホストと Manager 用仮想マシンを設定するための一連の質問を尋ねられます。デプロイメントスクリプトのフィールドは、デフォルトの回答がある場合には事前入力されます。必要に応じて回答を変更または入力してください。
以下の手順では、デプロイメントの質問はテキスト形式で示されます。Cockpit のユーザーインターフェースでは、プロンプトが表示されたら Next をクリックしてください。

手順2.4 セルフホストエンジンのデプロイ

  1. デプロイの開始

    Yes を選択してデプロイを開始します。
    During customization use CTRL-D to abort.
    Continuing will configure this host for serving as hypervisor and create a VM where you have to install the engine afterwards.
    Are you sure you want to continue? (Yes, No)[Yes]:
  2. RHV-M Virtual Appliance のダウンロード

    RHV-M Virtual Appliance を手動でダウンロードしていない場合には、デプロイメント中にダウンロードしてインストールすることが可能です。アプライアンスをダウンロードするには Yes を選択します。
    The oVirt engine appliance is now required to deploy hosted-engine.
    You could get oVirt engine appliance installing ovirt-engine-appliance rpm.
    Do you want to install ovirt-engine-appliance rpm? (Yes, No) [Yes]:
    
  3. ストレージの設定

    使用するストレージのタイプを選択します。
    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]:
  4. ネットワークの設定

    スクリプトにより、環境の管理ブリッジとして使用するネットワークインターフェースコントローラー (NIC) 候補が検出されます。
    iptables was detected on your computer, do you wish setup to configure it? (Yes, No)[Yes]:
    Please indicate a nic to set ovirtmgmt bridge on: (eth1, eth0) [eth1]:
    Please indicate a pingable gateway IP address [X.X.X.X]:
  5. 仮想マシンの設定

    スクリプトにより、利用可能な RHV-M Virtual Appliances が自動検出されるので、その中から適切なアプライアンスを選択してください。
     The following appliance have been found on your system:
    [1] - The oVirt Engine Appliance image (OVA)
    [2] - Directly select an OVA file
    Please select an appliance (1, 2) [1]:
    仮想マシンに接続するコンソールタイプには vnc または spice を選択します。
    Please specify the console type you would like to use to connect to the VM (vnc, spice) [vnc]:
    cloud-init で Manager 用仮想マシンの初期設定を実行する場合には Yes を指定します。root パスワードの設定、ネットワークやホスト名の設定、engine-setup で使用するための応答ファイルの注入、起動時の engine-setup の実行などのタスクを cloud-init に処理させる場合には Generate を指定します。または、cloud-init の高度な機能を活用できるように既存の cloud-init スクリプトがある場合には、Existing を選択します。
    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 ISO image (of no-cloud type)
    or do you have an existing one (Generate, Existing)[Generate]?

    注記

    cloud-init に関する詳しい情報は https://cloudinit.readthedocs.org/en/latest/ を参照してください。
    Manager 用仮想マシンの FQDN を指定します。
    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
    Manager に使用するドメイン名を指定します (デフォルト以外の場合)。
    Please provide the domain name you would like to use for the engine appliance.
    Engine VM domain: [domain.example.com]
    Manager の初回起動時に engine-seup を自動的に実行して、Manager 用仮想マシンをモニタリング対象サービスとして再起動するかどうかを指定します。
    Automatically execute engine-setup on the engine appliance on first boot (Yes, No)[Yes]?
    Automatically restart the engine VM as a monitored service after engine-setup (Yes, No)[Yes]?
    Manager の root パスワードを入力します。
    Enter root password that will be used for the engine appliance (leave it empty to skip): p@ssw0rd
    Confirm appliance root password: p@ssw0rd
    後で Manager に root ユーザーとしてログインできるようにするための SSH 公開鍵を入力し、root ユーザーの SSH アクセスを有効にするかどうかを指定します。
    Enter ssh public key for the root user that will be used for the engine appliance (leave it empty to skip): ssh-rsa AAAAB3NzaBlyc2EAAAADAQABAAABAQDN79V0/3Y3R0iyoCvu7fbw0Mtggm7tHb76yMA4asmU2DBk7ql3AguTNAK9p7Hkc1FANjXGvAZh2vBk+OFN51F/mqe4mgWM1CrpJcsM5ouReT+HkJpMb2f8tU14ZGVRuB/JYfwzsXhs6Jx6Nhh810yqlduTODRDhR9tOtvmtv4cb5VoJhlpppsQOkVxGfB7fPRVucw5PMAUJDwFsOqvtqjuvbGniMYvSZwhv7Nw5Su8WOpMnyr3WfUfDdIAWli5rk4hBHWRZC4zbRsZK03V8wua3PZE0sX3iNvJy4g/s5ynwLytTz7zPXjdyTsYm7BMX8IDhariXY10cYso+fIfjyjf example@redhat.com
    Do you want to enable ssh access for the root user (yes, no, without-password) [yes]:
    Manager のディスク容量とメモリー容量を指定します。
    Please specify the size of the VM disk in GB: [50]:
    Please specify the memory size of the VM in MB (Defaults to appliance OVF value): [4096]:
    Manager に使用する CPU タイプと、使用する仮想 CPU の数を指定します。
    The following CPU types are supported by this host:
    - model_SandyBridge: Intel SandyBridge Family
    - model_Westmere: Intel Westmere Family
    - model_Nehalem: Intel Nehalem Family
    - model_Penryn: Intel Penryn Family
    - model_Conroe: Intel Conroe Family
    Please specify the CPU type to be used by the VM [model_SandyBridge]:
    Please specify the number of virtual CPUs for the VM [Defaults to appliance OVF value: 4]:
    Manager 用仮想マシンの MAC アドレスを指定するか、無作為に生成される MAC アドレスを受け入れるかを指定します。MAC アドレスは、仮想マシンにオペレーティングシステムをインストールする前に、DHCP および DNS サーバーの更新に使用することができます。Manager 用仮想マシンへの IP アドレス割り当てに DHCP を使用するには、その MAC アドレスに有効な DHCP 予約があることを確認してください。デプロイメントスクリプトは、DHCP サーバーの設定は行いません。
    You may specify a MAC address for the VM or accept a randomly generated default [00:16:3e:77:b2:a4]:
    仮想マシンのネットワークの詳細を指定します。
    How should the engine VM network be configured (DHCP, Static)[DHCP]?
    Static を指定した場合には、Manager の IP アドレスを入力します。
    Please enter the IP address to be used for the engine VM [10.x.x.x]:
    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]
  6. セルフホストエンジンの設定

    管理ポータルにアクセスするための admin@internal ユーザーのパスワードを指定します。SMTP サーバーの名前と TCP ポート番号、メール通知に使用するメールアドレス、通知を受信するメールアドレス (複数ある場合はコンマ区切りリスト) を指定します。
    Enter engine admin password: p@ssw0rd
    Confirm engine admin 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]:
  7. 設定のプレビュー

    デプロイメントが続行される前には、入力した設定値が表示され、それらの値で操作を続行するかどうかを確認するように要求されます。
    Please confirm installation settings (Yes, No)[Yes]: Yes
デプロイメントにより、Manager 用仮想マシンが作成されて、ovirt-engine および高可用性サービスが起動し、ホストと共有ストレージドメインが Manager 用仮想マシンに接続されます。
hosted-engine のデプロイメントが正常に完了すると、Red Hat Virtualization Manager が設定され、ホスト上で稼働するようになります。Manager によりデータセンター、クラスター、ホスト、Manager 用仮想マシン、Manager 用仮想マシン専用の共有ストレージドメインがすでに設定されています。

重要

Manager の設定を継続して、リソースをさらに追加するには、admin@internal ユーザーとしてログインします。通常の仮想マシンデータをホストするようにデータセンターを初期化して、Manager 用仮想マシンが見えるようにするには、別のデータドメインを作成する必要があります。ストレージの異なるオプションおよびデータストレージドメインの追加方法については、『管理ガイド』の「ストレージ」の章を参照してください。
Red Hat Virtualization Manager をディレクトリーサーバーにリンクして、Manager 環境に新規ユーザーを追加することができます。Red Hat Virtualization は、Red Hat Directory Server (RHDS)、Red Hat Identity Management (IdM)、Active Directory など多くのディレクトリーサーバータイプをサポートします。ディレクトリーサーバーをお使いの環境に追加するには、ovirt-engine-extension-aaa-ldap-setup の対話型設定スクリプトを使用します。詳しい情報は、『管理ガイド』の「外部 LDAP プロバイダーの設定」を参照してください。
設定時に指定した回答はファイルに保存されます。このファイルは、障害復旧 (DR) に役立ちます。--generate-answer=<file> の引数で保存先が指定されていない場合には、応答ファイルは /etc/ovirt-hosted-engine/answers.conf に生成されます。