Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

6.2. セルフホストエンジン環境の復元

本セクションでは、新たにインストールしたホストのバックアップからセルフホストエンジン環境を復元する方法を説明します。サポートされる復元方法は engine-backup ツールを使用します。
セルフホストエンジン環境の復元には、以下の主要なアクションが含まれます。
  1. 新たにインストールした Red Hat Enterprise Linux ホストを作成し、hosted-engine デプロイメントスクリプトを実行します。
  2. 新しい Manager 仮想マシンに Red Hat Virtualization Manager の設定設定およびデータベースコンテンツを復元します。
  3. Non operational 状態のセルフホストエンジンノードを削除し、 復元されたセルフホストエンジン環境に再インストールします。

前提条件

  • セルフホストエンジン環境を復元するには、物理ホストに新しくインストールされた Red Hat Enterprise Linux システムを準備する必要があります。
  • 新規ホストおよび Manager のオペレーティングシステムのバージョンは、元のホストおよびマネージャーのオペレーティングシステムバージョンと同じである必要があります。
  • 新しい環境用の Red Hat Subscription Manager エンタイトルメントが必要です。必要なリポジトリーの一覧は、『Installation Guide』 の Subscribing to the Required Entitlements を参照してください。
  • 新しい Manager の完全修飾ドメイン名は、元の Manager と同じ完全修飾ドメイン名である必要があります。正引きおよび逆引きルックアップレコードの両方を DNS に設定する必要があります。
  • Manager 用仮想マシンの共有ストレージドメインとして使用する新しいセルフホストエンジン環境用にストレージを準備する必要があります。このドメインは 60 GB 以上である必要があります。デプロイメント用のストレージの準備に関する詳細は、『Administration Guide』 の Storage の章を参照してください。

6.2.1. 復元環境として使用する新しいセルフホストエンジン環境の作成

バックアップされた環境で使用されていたハードウェア上のセルフホストエンジンを復元できます。ただし、復元されたデプロイメントにフェイルオーバーホストを使用する必要があります。「セルフホストエンジンマネージャー仮想マシンのバックアップ」 で使用されるフェイルオーバーホスト Host 1 は、この手順でも使用される hosted_engine_1 のデフォルトのホスト名を使用します。 セルフホストエンジンの復元プロセスの性質上、は復元されたエンジンの最後の同期を行う前に、このフェイルオーバーホストを削除する必要があり、これは、バックアップの取得時にホストが仮想負荷を持たない場合にのみ実現できます。バックアップ環境で使用されていない別のハードウェアでバックアップを復元することもできますが、これは懸念ではありません。
重要
この手順は、物理ホストに Red Hat Enterprise Linux システムを新規インストールし、ホストを必要なエンタイトルメントにサブスクライブし、ovirt-hosted-engine-setup パッケージがインストールされていることを前提としています。詳細は、『インストールガイドの 必要なエンタイトルメントへのサブスクライブ および 「セルフホストエンジンパッケージのインストール」 を参照してください。

手順6.4 復元環境として使用する新しいセルフホスト型エンジンの作成

  1. DNS の更新

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

    新たにインストールした Red Hat Enterprise Linux ホストで、hosted-engine デプロイメントスクリプトを実行します。任意のタイミングでスクリプトをエスケープするには、CTRL+D キーボードの組み合わせを使用してデプロイメントを中止します。ネットワーク経由で hosted-engine デプロイメントスクリプトを実行する場合は、ネットワークや端末が中断した場合にセッションが失われないように、画面 ウィンドウマネージャーを使用することが推奨されます。インストールされていない場合は、最初に 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 ストレージタイプの場合は、FQDN または 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 ストレージの場合は、FQDN または IP アドレスのいずれかを使用して完全なアドレスを指定し、共有ストレージドメインのパス名を指定します。
      重要
      レプリカ 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
    • ファイバーチャネルの場合は、ホストバスアダプターを設定して接続し、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]:
  5. ネットワークの設定

    スクリプトは、環境の管理ブリッジとして使用する可能なネットワークインターフェイスコントローラー(NIC)を検出します。次に、ファイアウォール設定をチェックし、Manager 用仮想マシンにアクセスするコンソール(SPICE または VNC)用にこれを変更します。ovirt-ha-agent が使用する ping 可能なゲートウェイ IP アドレスを指定して、Manager 仮想マシンの実行に適したホストの適合性を判断できるようにします。
    Please indicate a nic to set ovirtmgmt 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 アドレスを受け入れます。Manager 用仮想マシンにオペレーティングシステムをインストールする前に、MAC アドレスを使用して 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. ホスト名の特定

    管理ポータルにアクセスするための admin@internal ユーザーのパスワードを指定します。
    エンジンがバックアップから復元されたときに存在する他のリソースと競合しないように、ホスト名に一意の名前を指定する必要があります。hosts _engine_1 という名前は、環境がバックアップされる前にメンテナンスモードになるため、この手順で使用できます。これにより、エンジンの復元とホストとエンジンの最終同期の間でこのホストの削除が可能になります。
    Enter engine admin password: 
    Confirm engine admin password:
    Enter the name which will be used to identify this host inside the Administration Portal [hosted_engine_1]:
  8. ホストエンジンの設定

    新しい Manager 仮想マシンの完全修飾ドメイン名を指定します。この手順では、完全修飾ドメイン名 Manager.example.com を使用します。SMTP サーバーの名前と TCP ポート番号、メール通知を送信するメールアドレス、メール通知を受信するメールアドレス (複数ある場合はコンマ区切りリスト) を指定します。
    重要
    エンジンに提供された完全修飾ドメイン名(Manager.example.com)は、元の Manager の初回セットアップ時に提供されたものと同じ完全修飾ドメイン名である必要があります。
    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                        : ovirtmgmt
    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 のデプロイメントスクリプトを 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 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 仮想マシンに接続し、Red Hat Subscription Management に登録して、必要なリポジトリーを有効にします。『インストールガイドの 必要なエンタイトルメントへのサブスクライブ を参照してください。
    インストールされているすべてのパッケージの最新バージョンが使用されていることを確認し、Netfilter パッケージを インストール します。
    # yum update
    注記
    カーネル関連のパッケージが更新されたら、マシンを再起動します。
    # yum install rhevm
パッケージのインストールが完了したら、セルフホストエンジンマネージャーの復元を続行できます。