Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

2.2. コマンドラインを使用したセルフホストエンジンのデプロイ

ご自分の環境の情報を収集する hosted-engine --deploy を使用して、コマンドラインからセルフホストエンジンをデプロイすることができます。

注記

必要であれば、hosted-engine --deploy --noansible を実行して、引き続き以前のバージョンの Red Hat Virtualization の 非 Ansible スクリプトを使用することができます。

前提条件

  • 新規にインストールされた Red Hat Virtualization Host または Red Hat Enterprise Linux 7。必要なリポジトリーが有効化されていること。詳細については、『インストールガイド』「Red Hat Virtualization Host のインストール」または「Red Hat Enterprise Linux ホストリポジトリーの有効化」を参照してください。
  • Manager およびホスト用の完全修飾ドメイン名。正引き (フォワードルックアップ) と逆引き (リバースルックアップ) の両方を DNS で設定する必要があります。
  • RHV-M Appliance 用に、少なくとも 5 GB の容量を持つホスト上のディレクトリー。デプロイメントのプロセスは、アプライアンスのファイルを抽出するのに十分なスペースが /var/tmp にあるかどうかチェックします。スペースが足りない場合には、別のディレクトリーを指定するか、外部ストレージをマウントすることができます。VDSM ユーザーおよび KVM グループには、このディレクトリーでの読み取り、書き込み、実行権限を指定する必要があります。
  • Manager 用仮想マシン専用のデータストレージドメインとして準備されたストレージ。このストレージドメインはセルフホストエンジンのデプロイメント中に作成され、容量は少なくとも 74 GiB 必要です。高可用性ストレージを推奨します。デプロイメント用ストレージの準備に関する詳しい情報は、『管理ガイド』「ストレージ」の章を参照してください。

    警告

    Red Hat では、セルフホストエンジンのストレージドメインとして、同じデータセンター内に別のアクティブなデータストレージドメインを用意することを強く推奨します。

    セルフホストエンジンをデータセンター内にデプロイする際に、アクティブなデータストレージドメインを 1 つしか用意しないと、そのデータストレージドメインが破損した場合に、新たなデータストレージドメインを追加することや破損したデータストレージドメインを削除することができません。セルフホストエンジンを再デプロイしなければなりません。

    重要

    iSCSI ストレージを使用する場合には、セルフホストエンジンのストレージドメインと追加のストレージドメインに同じ iSCSI ターゲットを使用しないでください。

手順

  1. デプロイメントツールをインストールします。

    # yum install ovirt-hosted-engine-setup
  2. Red Hat では、ネットワークやターミナルが切断された場合などにセッションが失われないように、screen ウィンドウマネージャーを使用してスクリプトを実行することを推奨します。screen をインストールして起動します。

    # yum install screen
    # screen
  3. デプロイメントスクリプトを開始します。

    # hosted-engine --deploy
    注記

    Ctrl+D のキーの組み合わせを使用してデプロイメントを中断すると、スクリプトをいつでも終了することができます。セッションがタイムアウトした場合や接続が中断された場合には、screen -d -r を実行してデプロイメントセッションを復元します。

  4. Yes を選択してデプロイメントを開始します。

    Continuing will configure this host for serving as hypervisor and create a local VM with a running engine.
    The locally running engine will be used to configure a storage domain and create a VM there.
    At the end the disk of the local VM will be moved to the shared storage.
    Are you sure you want to continue? (Yes, No)[Yes]:
  5. ネットワークを設定します。スクリプトにより、環境の管理ブリッジとして使用する NIC 候補が検出されます。

    Please indicate a pingable gateway IP address [X.X.X.X]:
    Please indicate a nic to set ovirtmgmt bridge on: (eth1, eth0) [eth1]:
  6. 仮想マシンのインストールにカスタムアプライアンスを使用する場合は、OVA アーカイブへのパスを入力します。該当しなければ、このフィールドを空欄のままにして RHV-M Appliance を使用します。

    If you want to deploy with a custom engine appliance image,
    please specify the path to the OVA archive you would like to use
    (leave it empty to skip, the setup will use rhvm-appliance rpm installing it if missing):
  7. 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:  manager.example.com
    Please provide the domain name you would like to use for the engine appliance.
    Engine VM domain: [example.com]
  8. Manager の root パスワードを入力します。

    Enter root password that will be used for the engine appliance:
    Confirm appliance root password:
  9. 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):
    Do you want to enable ssh access for the root user (yes, no, without-password) [yes]:
  10. 仮想マシンの CPU およびメモリー構成を入力します。

    Please specify the number of virtual CPUs for the VM (Defaults to appliance OVF value): [4]:
    Please specify the memory size of the VM in MB (Defaults to maximum available): [7267]:
  11. Manager 用仮想マシンの MAC アドレスを入力するか、無作為に生成される MAC アドレスを適用します。Manager 用仮想マシンへの IP アドレス割り当てに DHCP を使用するには、この MAC アドレスに有効な DHCP 予約があることを確認してください。デプロイメントスクリプトは、DHCP サーバーの設定は行いません。

    You may specify a unicast MAC address for the VM or accept a randomly generated default [00:16:3e:3d:34:47]:
  12. 仮想マシンのネットワークの詳細を入力します。

    How should the engine VM network be configured (DHCP, Static)[DHCP]?

    Static を指定した場合には、Manager の IP アドレスを入力します。

    重要

    静的 IP アドレスは、ホストと同じサブネットに属している必要があります。たとえば、ホストが 10.1.1.0/24 内にある場合、Manager 用仮想マシンの IP は同じサブネット範囲 (10.1.1.1-254/24) になければなりません。

    Please enter the IP address to be used for the engine VM [x.x.x.x]:
    Please provide a comma-separated list (max 3) of IP addresses of domain name servers for the engine VM
    Engine VM DNS (leave it empty to skip):
  13. Manager 用仮想マシンおよびベースホストのエントリーを仮想マシンの /etc/hosts ファイルに追加するかどうかを指定します。ホスト名は解決可能でなければなりません。

    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]
  14. SMTP サーバーの名前と TCP ポート番号、メール通知に使用するメールアドレス、通知を受信するメールアドレス (複数ある場合はコンマ区切りリスト) を指定します。

    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]:
  15. admin@internal ユーザーが管理ポータルにアクセスするためのパスワードを入力します。

    Enter engine admin password:
    Confirm engine admin password:

    スクリプトにより仮想マシンが作成されます。RHV-M Appliance をインストールする必要がある場合には、時間がかかることがあります。

  16. 使用するストレージのタイプを選択します。

    Please specify the storage you would like to use (glusterfs, iscsi, fc, nfs)[nfs]:
    • NFS の場合は、バージョン、完全なアドレス、およびストレージへのパスならびにマウントオプションを入力します。

      Please specify the nfs version you would like to use (auto, v3, v4, v4_1)[auto]:
      Please specify the full shared storage connection path to use (example: host:/path): storage.example.com:/hosted_engine/nfs
      If needed, specify additional mount options for the connection to the hosted-engine storage domain []:
    • iSCSI の場合は、ポータルの詳細を入力し、自動検出されたリストからターゲットおよび LUN を選択します。デプロイメント時に選択できる iSCSI ターゲットは 1 つだけですが、マルチパスがサポートされているので、同じポータルグループのポータルをすべて接続することができます。

      注記

      複数の iSCSI ターゲットを指定するには、セルフホストエンジンをデプロイする前にマルチパスを有効にする必要があります。詳細については、『Red Hat Enterprise Linux DM Multipath』を参照してください。Multipath Helper ツールを使用して、さまざまなオプションでマルチパスをインストールおよび設定するスクリプトを生成することもできます。

      Please specify the iSCSI portal IP address:
      Please specify the iSCSI portal port [3260]:
      Please specify the iSCSI discover user:
      Please specify the iSCSI discover password:
      Please specify the iSCSI portal login user:
      Please specify the iSCSI portal login password:
      
      The following targets have been found:
      	[1]	iqn.2017-10.com.redhat.example:he
      		TPGT: 1, portals:
      			192.168.1.xxx:3260
      			192.168.2.xxx:3260
      			192.168.3.xxx:3260
      
      Please select a target (1) [1]: 1
      
      The following luns have been found on the requested target:
        [1] 360003ff44dc75adcb5046390a16b4beb   199GiB  MSFT   Virtual HD
            status: free, paths: 1 active
      
      Please select the destination LUN (1) [1]:
    • Gluster ストレージの場合は、完全なアドレスおよびストレージへのパスならびにマウントオプションを入力します。

      重要

      サポートされるストレージは、レプリカ 3 の Gluster ストレージのみです。以下の設定を完了しておいてください。

      • 3 つすべての Gluster サーバーの /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
      If needed, specify additional mount options for the connection to the hosted-engine storage domain []:
    • ファイバーチャネルの場合は、自動検出されたリストから LUN を選択します。ホストのバスアダプターが設定、接続されている必要があります。設定/接続がされている場合には、デプロイメントスクリプトにより利用可能な LUN が自動で検出されます。また、LUN には既存のデータが含まれないようにする必要があります。既存の 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]:
  17. Manager のディスク容量を入力します。

    Please specify the size of the VM disk in GB: [50]:

    デプロイメントが正常に完了すると、1 つのデータセンター、クラスター、ホスト、ストレージドメイン、および Manager 用仮想マシンがすでに稼働しているはずです。管理ポータルにログインして、その他のリソースを追加することができます。

  18. Manager 用仮想マシンで必要なリポジトリーを有効にします。詳細については、『インストールガイド』「Red Hat Virtualization Manager リポジトリーの有効化」を参照してください。
  19. オプションとして、ovirt-engine-extension-aaa-ldap-setup の対話型設定スクリプトを使用して、ディレクトリーサーバーを追加します。これにより、環境に新規ユーザーを追加することができます。詳細については、『管理ガイド』「外部の LDAP プロバイダーの設定」を参照してください。

管理ポータルで、Manager 用仮想マシン、仮想マシンを実行しているホスト、およびセルフホストエンジンのストレージドメインに金色の王冠のフラグが付けられます。