oVirt 4.5 : oVirt 管理ノードの設定2024/02/21 |
Red Hat Virtualization (RHV) の アップストリーム、oVirt のインストールと設定です。
当例では以下のような環境を例に設定します。 +-----------------------+ | +-----------------------+ | [ Admin Node ] |10.0.0.30 | 10.0.0.25| [ oVirt Engine ] | | dlp.srv.world +----------+----------+ ctrl.srv.world | | | | | | +-----------------------+ | +-----------------------+ | +-----------------------+ | | [ Shared Storage ] |10.0.0.35 | | nfs.srv.world +----------+ | | +-----------------------+ |
[oVirt Engine] は 設定ツールにより、管理ノード上に仮想マシンで構築されます。
よって、事前に [oVirt Engine] 用に、名前解決可能な IP アドレスを用意しておく必要があります。
また oVirt ノード間で共有ストレージが必要になります。
NFS, ISCSI, FCP, GlusterFS が使用可能となっています。 当例では上記のように NFS サーバーを使用します。 |
|
[1] |
こちらを参考に SMTP サーバーをインストールして起動しておきます。
各種メール通知に使用されます。当例では管理ノードにインストールして進めます。 |
[2] |
こちらを参考に NFS サーバーをインストールして起動しておきます。
なお、当例では [nfs.srv.world] 上の [/var/lib/ovirt-share] を共有ディレクトリとして設定します。 |
[3] | NFS サーバー上に必要な ユーザー/グループ を作成しておきます。 |
[root@nfs ~]# useradd vdsm -u 36 -g 36 -s /sbin/nologin -M -d / [root@nfs ~]# chown -R vdsm:kvm /var/lib/ovirt-share [root@nfs ~]# chmod 755 /var/lib/ovirt-share |
[4] | 管理ノード上で [oVirt Engine] を構成します。 |
[root@dlp ~]#
dnf -y install centos-release-ovirt45
[root@dlp ~]#
dnf -y install ovirt-hosted-engine-setup # ipv4 でセットアップ [root@dlp ~]# hosted-engine --deploy --4 [ INFO ] Stage: Initializing [ INFO ] Stage: Environment setup During customization use CTRL-D to abort. Continuing will configure this host for serving as hypervisor and will create a local VM with a running engine. The locally running engine will be used to configure a new 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]: Configuration files: Log file: /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20240220153940-jnv5xo.log Version: otopi-1.10.4 (otopi-1.10.4-1.el9) ..... ..... [ INFO ] Stage: Environment customization --== STORAGE CONFIGURATION ==-- --== HOST NETWORK CONFIGURATION ==-- # ゲートウェイの IP アドレスを指定 Please indicate the gateway IP address [10.0.0.1]: ..... ..... # ブリッジを構成するネットワークインターフェースを指定 Please indicate a nic to set ovirtmgmt bridge on: (enp1s0) [enp1s0]: Please specify which way the network connectivity should be checked (ping, dns, tcp, none) [dns]: --== VM CONFIGURATION ==-- Please enter the name of the data center where you want to deploy this hosted-engine host. # [datacenter] の名称を設定 (任意の名称) Data center [Default]: Please enter the name of the cluster where you want to deploy this hosted-engine host. # [cluster] の名称を設定 (任意の名称) Cluster [Default]: # Keycloak を統合するかどうか Configure Keycloak integration on the engine(Yes, No) [Yes]: If you want to deploy with a custom engine appliance image, please specify the path to the OVA archive you would like to use. Entering no value will use the image from the ovirt-engine-appliance rpm, installing it if needed. # [OVA archive] を使用する場合は Path を指定 # 空 Enter でスキップ (後から設定可能) Appliance image path []: # oVirt Engine 仮想マシンの仮想 CPU 数を設定 Please specify the number of virtual CPUs for the VM (Defaults to appliance OVF value): [4]: # oVirt Engine 仮想マシンのメモリサイズを設定 (MB) Please specify the memory size of the VM in MB (Defaults to maximum available): [14541]: [ INFO ] Detecting host timezone. Please provide the FQDN you would like to use for the engine. 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. # oVirt Engine 仮想マシンの FQDN を指定 Engine VM FQDN: []: ctrl.srv.world Please provide the domain name you would like to use for the engine appliance. # ドメインを指定 Engine VM domain: [srv.world] # oVirt Engine 仮想マシンの root パスワードを設定 Enter root password that will be used for the engine appliance: Confirm appliance root password: You may provide an SSH public key, that will be added by the deployment script to the authorized_keys file of the root user in the engine appliance. This should allow you passwordless login to the engine machine after deployment. If you provide no key, authorized_keys will not be touched. # oVirt Engine 仮想マシンに SSH 鍵鍵を設定する場合は公開鍵を指定 SSH public key []: # oVirt Engine 仮想マシンへの SSH での root ログイン許可/不許可の設定 Do you want to enable ssh access for the root user (yes, no, without-password) [yes]: # OpenSCAP の デフォルト セキュリティプロファイル を適用するか否か Do you want to apply a default OpenSCAP security profile (Yes, No) [No]: # FIPS を有効にするか否か Do you want to enable FIPS? (Yes, No) [No]: # 仮想マシンに設定する MAC アドレス You may specify a unicast MAC address for the VM or accept a randomly generated default [00:16:3e:2a:47:91]: # oVirt Engine 仮想マシンのネットワーク設定 (DHCP or 固定) How should the engine VM network be configured (DHCP, Static)[DHCP]? Static # 固定 IP を選択した場合は IP アドレスを設定 Please enter the IP address to be used for the engine VM []: 10.0.0.25 [ INFO ] The engine VM will be configured to use 10.0.0.25/24 Please provide a comma-separated list (max 3) of IP addresses of domain name servers for the engine VM # 仮想マシンが参照する DNS を設定 Engine VM DNS (leave it empty to skip) [10.0.0.10]: # 仮想マシンのローカル [/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. Add lines to /etc/hosts? (Yes, No)[Yes]: --== HOSTED ENGINE CONFIGURATION ==-- # 通知メール送信に使用する SMTP サーバー Please provide the name of the SMTP server through which we will send notifications [localhost]: # SMTP サーバーが使用するポート 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]: # oVirt Engine の admin パスワードを設定 Enter engine admin password: Confirm engine admin password: [ INFO ] Stage: Setup validation # 管理ノードのホスト名を指定 Please provide the hostname of this host on the management network [dlp.srv.world]: ..... ..... # 下記エラーは無視で OK [ ERROR ] b'[DEPRECATION WARNING]: Encryption using the Python crypt module is deprecated. \n' [ ERROR ] b'The Python crypt module is deprecated and will be removed from Python 3.13. \n' [ ERROR ] b'Install the passlib library for continued encryption functionality. This \n' [ ERROR ] b'feature will be removed in version 2.17. Deprecation warnings can be disabled \n' [ ERROR ] b'by setting deprecation_warnings=False in ansible.cfg.\n' # 使用する共有ストレージを指定 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_0, v4_1, v4_2)[auto]: # 共有のパスを指定 Please specify the full shared storage connection path to use (example: host:/path): nfs.srv.world:/var/lib/ovirt-share # 必要に応じてマウントオプション指定可 If needed, specify additional mount options for the connection to the hosted-engine storagedomain (example: rsize=32768,wsize=32768) []: ..... ..... # oVirt Engine 仮想マシンに割り当てるディスク容量を指定 Please specify the size of the VM disk in GiB: [51]: ..... ..... [ INFO ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-20240220163130.conf' [ INFO ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf' [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination [ INFO ] Hosted Engine successfully deployed You have new mail in /var/spool/mail/root # 仮想マシン [HostedEngine] が稼働 [root@dlp ~]# virsh -c qemu:///system?authfile=/etc/ovirt-hosted-engine/virsh_auth.conf list Id Name State ------------------------------ 2 HostedEngine running # oVirt Engine 仮想マシンのステータス確認 [root@dlp ~]# hosted-engine --vm-status
--== Host dlp.srv.world (id: 1) status ==-- Host ID : 1 Host timestamp : 4390 Score : 3400 Engine status : {"vm": "up", "health": "good", "detail": "Up"} Hostname : dlp.srv.world Local maintenance : False stopped : False crc32 : fca5bafe conf_on_shared_storage : True local_conf_timestamp : 4390 Status up-to-date : True Extra metadata (valid at timestamp): metadata_parse_version=1 metadata_feature_version=1 timestamp=4390 (Tue Feb 20 16:32:07 2024) host-id=1 score=3400 vm_conf_refresh_time=4390 (Tue Feb 20 16:32:07 2024) conf_on_shared_storage=True maintenance=False state=EngineUp stopped=False # oVirt Engine 仮想マシンにコンソール接続する # 戻る場合は通常の libvirt の操作と同じ # * デプロイされる HostedEngine は CentOS Stream 8 [root@dlp ~]# hosted-engine --console The engine VM is running on this host Escape character is ^] CentOS Stream 8 Kernel 4.18.0-539.el8.x86_64 on an x86_64 Web console: https://ctrl.srv.world:9090/ or https://10.0.0.25:9090/ ctrl login: |
Sponsored Link |