oVirt 4.5 : Configure Admin Node2024/02/21 |
Install oVirt which is the Upstream version of Red Hat Virtualization (RHV).
This example is based on the environment like follows. +-----------------------+ | +-----------------------+ | [ 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] is deployed as a Virtual machine on Admin Node.
So it needs to prepare an IP address to assign for the VM.
Shared storage is needed on oVirt Nodes.
It's possible to use NFS, ISCSI, FCP, GlusterFS for it. on this example, it uses NFS like above. |
|
[1] |
Install SMTP Server on a Node, refer to here.
It is used for notification messages on oVirt Nodes. On this example, install it on Admin Node. |
[2] |
Install NFS Server to configure shared storage, refer to here.
On this example, configure [/var/lib/ovirt-share] directory as a shared storage on [nfs.srv.world]. |
[3] | Create users and groups for oVirt requirements on NFS Server. |
[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] | Configure [oVirt Engine] on Admin Node. |
[root@dlp ~]#
dnf -y install centos-release-ovirt45
[root@dlp ~]#
dnf -y install ovirt-hosted-engine-setup # setup with 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 ==-- # specify gateway address Please indicate the gateway IP address [10.0.0.1]: ..... ..... # specify network interface to configure bridge interface 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. # set [datacenter] name (any name you like) Data center [Default]: Please enter the name of the cluster where you want to deploy this hosted-engine host. # set [cluster] name (any name you like) Cluster [Default]: # configure Keycloak or not 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. # specify [OVA archive] path if use # possible to skip with empty (possible to set later) Appliance image path []: # set virtual CPUs for oVirt Engine VM Please specify the number of virtual CPUs for the VM (Defaults to appliance OVF value): [4]: # set memory size for oVirt Engine VM (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. # set FQDN for oVirt Engine VM Engine VM FQDN: []: ctrl.srv.world Please provide the domain name you would like to use for the engine appliance. # specify domain name Engine VM domain: [srv.world] # set root password for oVirt Engine VM 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. # set SSH public key if you'd like to set for oVirt Engine VM SSH public key []: # select SSH root access permission Do you want to enable ssh access for the root user (yes, no, without-password) [yes]: # select to apply OpenSCAP security profile or not Do you want to apply a default OpenSCAP security profile (Yes, No) [No]: # enable FIPS or not Do you want to enable FIPS? (Yes, No) [No]: # MAC address for oVirt Engine VM You may specify a unicast MAC address for the VM or accept a randomly generated default [00:16:3e:5d:2e:8c]: # network setting for oVirt Engine VM (DHCP or Static) How should the engine VM network be configured (DHCP, Static)[DHCP]? Static # if select Static, specify an IP address for oVirt Engine VM 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 # set DNS for oVirt Engine VM Engine VM DNS (leave it empty to skip) [10.0.0.10]: # add the DNS into [/etc/hosts] on VM or not 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)[Yes] --== HOSTED ENGINE CONFIGURATION ==-- # specify SMTP Server to use for notifications Please provide the name of the SMTP server through which we will send notifications [localhost]: # specify SMTP port Please provide the TCP port number of the SMTP server [25]: # notification sender's email address Please provide the email address from which notifications will be sent [root@localhost]: # notification recipient email address Please provide a comma-separated list of email addresses which will get notifications [root@localhost]: # set oVirt Engine admin password (it used when login to web portal) Enter engine admin password: Confirm engine admin password: [ INFO ] Stage: Setup validation # specify hostname for Admin Node Please provide the hostname of this host on the management network [dlp.srv.world]: ..... ..... # ignore the error below [ 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' # specify the type of shared storage Please specify the storage you would like to use (glusterfs, iscsi, fc, nfs)[nfs]: # select version if select NFS Please specify the nfs version you would like to use (auto, v3, v4, v4_0, v4_1, v4_2)[auto]: # specify the path for shared storage Please specify the full shared storage connection path to use (example: host:/path): nfs.srv.world:/var/lib/ovirt-share # possible to specify mount options if you need If needed, specify additional mount options for the connection to the hosted-engine storagedomain (example: rsize=32768,wsize=32768) []: ..... ..... # specify disk size for oVirt Engine VM 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 # virtual machine [HostedEngine] is running [root@dlp ~]# virsh -c qemu:///system?authfile=/etc/ovirt-hosted-engine/virsh_auth.conf list Id Name State ------------------------------ 2 HostedEngine running # show status for oVirt Engine VM [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 # connect to serial console to oVirt Engine VM # for back to Host, it's the same way with libvirt operation # HostedEngine is still 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 |