Menu Close
3.3. RHEL ベースのセルフホストエンジンの設定
hosted-engine
スクリプトは、ホストハイパーバイザーおよび Manager 仮想マシンの設定を容易にするために提供されています。このスクリプトは、一連の質問を尋ね、その回答に基づいて環境を構築していきます。
以下の前提条件が満たされていることを確認してください。
前提条件
- 新規インストールした Red Hat Enterprise Linux 7 システムに ovirt-hosted-engine-setup パッケージをインストールしておく必要があります。
- セルフホストエンジン環境のストレージを準備する必要があります。ご使用のデプロイメントのストレージを用意する方法については、『管理ガイド』の「ストレージ」の章を参照してください。
- Manager およびハイパーバイザーホスト用の完全修飾ドメイン名を設定しておく必要があります。正引き (フォワードルックアップ) と逆引き (リバースルックアップ) の両方を DNS で設定する必要があります。
- Manager のオペレーティングシステムのインストール用に CD-ROM、ディスクまたは PXE インストールメディアのいずれかを用意しておく必要があります。推奨の方法は、ディスクオプションを選択して、Manager のインストールに RHEV-M Virtual Appliance を使用することです。rhevm-appliance パッケージをインストールして、RHEV-M Virtual Appliance を取得します。CD-ROM オプションを使用するには、ISO ファイルを用意する必要があります。物理 CD-ROM ドライブはサポートしていません。
- Manager のインストールに RHEV-M Virtual Appliance を使用する場合には、
/tmp
ディレクトリーのサイズが少なくとも 60 GB 必要です。
手順3.3 RHEL ベースのセルフホストエンジンの設定
ホストエンジンデプロイメントの開始
hosted-engine
スクリプトを実行します。ネットワークや端末が切断された場合などにセッションが失われないように、screen
ウィンドウマネージャーを使用してスクリプトを実行することを推奨します。このウィンドウマネージャーがインストールされていない場合は、標準の Red Hat Enterprise Linux に含まれている screen パッケージをインストールしてください。CTRL+D のキーボードの組み合わせを使用してデプロイメントを中断し、スクリプトをいつでも終了することができます。# yum install screen
# screen hosted-engine --deploy
注記
セッションのタイムアウトまたは接続の切断の際には、screen -d -r
を実行してhosted-engine
デプロイメントセッションを復元します。ストレージの設定
使用するストレージのタイプを選択します。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-insecure
をon
に設定してください。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]:
ネットワークの設定
このスクリプトは、環境の管理ブリッジとして使用可能なネットワークインターフェースコントローラー (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]:
仮想マシンの設定
注記
Manager の仮想マシンを手動でインストールする場合は、「付録A Manager のオペレーティングシステムの手動インストール」を参照して、セルフホストエンジンの設定を完了してください。アプライアンスを使用すると、Manager 仮想マシンにユーザーの操作が必要ないため、ワークフローが簡素化されます。手動でのインストールでは、インストールを自由自在にコントロールすることができます。ブートデバイスタイプに disk を選択すると、スクリプトにより自動的に利用可能な RHEV-M Appliances が検出されます。メモリーサイズを指定してください。Please specify the device to boot the VM from (cdrom, disk, pxe) [disk]: [ INFO ] Detecting available oVirt engine 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]: [ INFO ] Checking OVF archive content (could take a few minutes depending on archive size) Please specify the memory size of the appliance in MB (Defaults to OVF value: 16384):
cloud-init で Manager 仮想マシンの初期設定を行う場合にはYes
を指定します。root パスワードの設定、ネットワークやホスト名の設定、engine-setup
で使用するための応答ファイルの注入、起動時のengine-setup
の実行などのタスクを cloud-init に処理させる場合には Generate を指定します。または、cloud-init の高度な機能を活用できるように既存の cloud-init スクリプトがある場合には、Existing を選択します。次に、Manager 仮想マシンの FQDN を指定します。また、HostedEngine-VM の MAC アドレスを指定するか、任意で作成されたアドレスを受け入れます。この MAC アドレスを使用して、仮想マシンにオペレーティングシステムをインストールする前に DCHP および DNS サーバーを更新することができます。注記
cloud-init に関する詳しい情報は https://cloudinit.readthedocs.org/en/latest/ を参照してください。Would you like to use cloud-init to customize the appliance on the first boot (Yes, No)[Yes]? 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 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
ホストエンジンの設定
管理ポータル内で識別するためのハイパーバイザーホストの名前と、管理ポータルへアクセスするためのadmin@internal
ユーザーのパスワードを指定します。SMTP サーバーの名前と TCP ポート番号、メール通知に使用するメールアドレス、通知を受信するメールアドレス (複数ある場合はコンマ区切りリスト) を指定します。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]:
設定のプレビュー
続行する前に、hosted-engine
スクリプトは、入力された設定値を表示して、これらの値で設定を続行するかどうかを尋ねます。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
hosted-engine
のデプロイメントスクリプトが正常に完了すると、Red Hat Enterprise Virtualization Manager が設定され、ハイパーバイザー上で稼働するようになります。Manager によりすでにデータセンター、クラスター、ハイパーバイザーホスト、Manager 仮想マシン、Manager 仮想マシン専用の共有ストレージドメインがすでに設定されています。admin@internal ユーザーでログインして、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
サービスを再起動して、変更を有効にします。