6.3. 復元環境として使用する新規セルフホストエンジン環境の構築

バックアップした環境で使用したハードウェア上にセルフホストエンジンを復元することはできますが、復元環境のデプロイメントにはフェイルオーバーホストを使用する必要があります。「セルフホストエンジンの Manager 仮想マシンのバックアップ」で使用したフェイルオーバーホスト Host 1hosted_engine_1 というデフォルトのホスト名を使用します。以下の手順でもこの名称を使用します。セルフホストエンジンの復元プロセスの性質上、フェイルオーバーホストを削除してから、復元したエンジンの最終同期を実行する必要があります。ただし、これは、バックアップ時に、ホスト上に仮想負荷がない場合にしか実行できません。また、バックアップ環境に使用していない別のハードウェアにバックアップを復元することも可能です。その場合には、この問題を考慮する必要はありません。

重要

本手順は、物理ホストへの Red Hat Enterprise Linux の新規インストール、必要なエンタイトルメントへのホストのサブスクリプション登録、ovirt-hosted-engine-setup パッケージのインストールが完了していることが前提となります。詳しい情報は、「必要なエンタイトルメントのサブスクライブ」および「セルフホストエンジン (Self-Hosted Engine) のパッケージのインストール」を参照してください。

手順6.2 復元環境として使用するために新規セルフホスト環境を構築する方法

  1. DNS の更新

    Red Hat Enterprise Virtualization 環境の完全修飾ドメイン名と新規 Manager の IP アドレスが相関するように、DNS を更新してください。以下の手順では、完全修飾ドメイン名は Manager.example.com に設定されています。engine に指定する完全修飾ドメイン名は、バックアップ元の engine を設定する際に指定したものと同一の名前を使用する必要があります。
  2. ホストエンジンデプロイメントの開始

    新規インストールされた Red Hat Enterprise Linux ホストで hosted-engine デプロイメントスクリプトを実行します。CTRL+D のキーの組み合わせを使用してデプロイメントを中断すると、スクリプトを随時終了することができます。ネットワーク経由で hosted-engine デプロイメントスクリプトを実行する場合には、ネットワークまたはターミナルの中断が発生した場合にセッションが失われないように screen ウィンドウマネージャーを使用することを推奨します。screen がインストールされれいない場合には、先にインストールしてください。
    # screen
    # hosted-engine --deploy
  3. 初期化の準備

    このスクリプトは最初に、セルフホストエンジン環境で対象のホストをハイパーバイザーとして使用することについての確認を要求します。
    Continuing will configure this host for serving as hypervisor and create a VM where you have to install oVirt Engine afterwards. 
    Are you sure you want to continue? (Yes, No)[Yes]:
  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) を検出し、次にファイアウォールの設定を確認して、その設定を Manager 仮想マシンにコンソールで (SPICE または VNC) アクセスできるように変更するかどうかを確認します。ovirt-ha-agent で使用できる、ping 送信可能なゲートウェイの IP アドレスを提供すると、Manager 仮想マシンを実行するのに適したホストであるかどうかを判断しやすくなります。
    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]: 
    Please indicate a pingable gateway IP address [X.X.X.X]:
    
  6. 新しい Manager 仮想マシンの設定

    このスクリプトにより、新しい Manager の仮想マシンとして設定される仮想マシンが作成されます。ブートデバイス (該当する場合)、インストールメディアのパス名、イメージのエイリアス、CPU タイプ、仮想 CPU の数、ディスクサイズを指定します。Manager の MAC アドレスを指定するか、ランダムに生成された Mac アドレスを適用します。MAC アドレスは、Manager の仮想マシンにオペレーティングシステムをインストール前に DHCP サーバーを更新するのに使用することができます。Manager 仮想マシンの作成に必要なメモリーサイズとコンソールの接続タイプも指定します。
    Please specify the device to boot the VM from (cdrom, disk, pxe) [cdrom]: 
    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 minimum requirement: 2]: 
    Please specify the disk size of the VM in GB [Defaults to minimum requirement: 25]: 
    You may specify a MAC address for the VM or accept a randomly generated default [00:16:3e:77:b2:a4]: 
    Please specify the memory size of the VM in MB [Defaults to minimum requirement: 4096]: 
    Please specify the console type you want to use to connect to the VM (vnc, spice) [vnc]:
    
  7. ホスト名の特定

    ホスト名には一意の名前を指定して、engine をバックアップから復元した時点で存在する他のリソースと競合しないようにします。本手順では、対象のホストは環境がバックアップされる前にメンテナンスモードに設定され、engine を復元してからホストと engine を同期するまでの間に、このホストを削除することができるため、hosted_engine_1 という名前を使用することができます。
    Enter the name which will be used to identify this host inside the Administration Portal [hosted_engine_1]:
  8. ホストエンジンの設定

    セルフホストエンジン環境の名前と、管理ポータルへアクセスする admin@internal ユーザーのパスワードを指定し、新しい Manager 仮想マシンの完全修飾ドメイン名を設定します。本手順では、Manager.example.com という完全修飾ドメイン名を使用します。次に、SMTP サーバーの 名前と TCP ポート番号、メール通知の送信先に使用するメールアドレス、これらの通知を受信するメールアドレス (コンマ区切りの一覧) を指定してください。

    重要

    engine に指定した完全修飾ドメイン名 (Manager.example.com) は、元の Manager の初期設定時に指定した名前と同じ完全修飾ドメイン名でなければなりません。
    Enter 'admin@internal' user password that will be used for accessing the Administrator Portal: 
    Confirm 'admin@internal' user password: 
    Please provide the FQDN for the engine you would like to use.
    This needs to match the FQDN that you will use for the engine installation within the VM.
     Note: This will be the FQDN of the VM you are now going to create,
     it should not point to the base host or to any other existing machine.
     Engine FQDN: Manager.example.com
    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]:
  9. 設定のプレビュー

    続行する前に、hosted-engine デプロイメントスクリプトは、入力された設定値を表示して、これらの値で設定を続行するかどうかを尋ねます。
    Bridge interface                   : eth1
    Engine FQDN                        : Manager.example.com
    Bridge name                        : rhevm
    SSH daemon port                    : 22
    Firewall manager                   : iptables
    Gateway address                    : X.X.X.X
    Host name for web application      : hosted_engine_1
    Host ID                            : 1
    Image alias                        : hosted_engine
    Image size GB                      : 25
    Storage connection                 : storage.example.com:/hosted_engine/nfs
    Console type                       : vnc
    Memory size MB                     : 4096
    MAC address                        : 00:16:3e:77:b2:a4
    Boot type                          : pxe
    Number of CPUs                     : 2
    CPU Type                           : model_Penryn
    
    Please confirm installation settings (Yes, No)[Yes]:
    
  10. 新しい Manager 仮想マシンの作成

    次にこのスクリプトは、Manager 仮想マシンとして設定する仮想マシンを作成し、接続情報を表示します。hosted-engine スクリプトがホストエンジンの設定に進む前に、仮想マシンにオペレーティングシステムをインストールする必要があります。
    [ INFO  ] Stage: Transaction setup
    [ INFO  ] Stage: Misc configuration
    [ INFO  ] Stage: Package installation
    [ INFO  ] Stage: Misc configuration
    [ INFO  ] Configuring libvirt
    [ INFO  ] Configuring VDSM
    [ INFO  ] Starting vdsmd
    [ INFO  ] Waiting for VDSM hardware info
    [ INFO  ] Waiting for VDSM hardware info
    [ INFO  ] Configuring the management bridge
    [ INFO  ] Creating Storage Domain
    [ INFO  ] Creating Storage Pool
    [ INFO  ] Connecting Storage Pool
    [ INFO  ] Verifying sanlock lockspace initialization
    [ INFO  ] Creating VM Image
    [ INFO  ] Disconnecting Storage Pool
    [ INFO  ] Start monitoring domain
    [ INFO  ] Configuring VM
    [ INFO  ] Updating hosted-engine configuration
    [ INFO  ] Stage: Transaction commit
    [ INFO  ] Stage: Closing up
    [ INFO  ] Creating VM
    You can now connect to the VM with the following command:
          /usr/bin/remote-viewer vnc://localhost:5900
    Use temporary password "3477XXAM" 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 console using the following command:
    virsh -c qemu+tls://Test/system console HostedEngine
    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
    The VM has been started.  Install the OS and shut down or reboot it.  To continue please make a selection:
             
      (1) Continue setup - VM installation is complete
      (2) Reboot the VM and restart installation
      (3) Abort setup
      (4) Destroy VM and abort setup
             
      (1, 2, 3, 4)[1]:
    本手順の命名規則を使用して、以下のコマンドで VNC を使って仮想マシンに接続します。
    /usr/bin/remote-viewer vnc://hosted_engine_1.example.com:5900
  11. 仮想マシンのオペレーティングシステムのインストール

    Manager の仮想マシンに接続して、Red Hat Enterprise Linux 6.7 のオペレーティングシステムをインストールします。
  12. ホストと Manager の同期

    ホストに戻り、オプション 1 を選択して hosted-engine デプロイメントスクリプトを続行します。
    (1) Continue setup - VM installation is complete
    Waiting for VM to shut down...
    [ INFO  ] Creating VM
    You can now connect to the VM with the following command:
          /usr/bin/remote-viewer vnc://localhost:5900
    Use temporary password "3477XXAM" 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 console using the following command:
    virsh -c qemu+tls://Test/system console HostedEngine
    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
    Please install and setup the engine in the VM.
    You may also be interested in subscribing to "agent" RHN/Satellite channel and installing rhevm-guest-agent-common package in the VM.
    To continue make a selection from the options below:
      (1) Continue setup - engine installation is complete
      (2) Power off and restart the VM
      (3) Abort setup
      (4) Destroy VM and abort setup
             
      (1, 2, 3, 4)[1]:
  13. Manager のインストール

    新しい Manager の仮想マシンに接続し、インストールしたパッケージがすべて最新版を使用していることを確認してから、rhevm パッケージをインストールします。
    # yum update
    # yum install rhevm
  14. Reports および Data Warehouse のインストール

    Reports および Data Warehouse を復元する場合には、rhevm-reports-setuprhevm-dwh-setup パッケージをインストールします。
    # yum install rhevm-reports-setup rhevm-dwh-setup
パッケージのインストールの完了後には、セルフホストエンジンの Manager の復元を続行することができます。