oVirt 4.4 : Configure Admin Node2021/07/06 |
Install oVirt which is the Open Source implementation 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 ~]# groupadd kvm -g 36 [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 https://resources.ovirt.org/pub/yum-repo/ovirt-release44.rpm
[root@dlp ~]#
[root@dlp ~]# dnf -y install ovirt-hosted-engine-setup hosted-engine --deploy [ 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. # Enter Are you sure you want to continue? (Yes, No)[Yes]: Configuration files: Log file: /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20200710104518-uepm1p.log Version: otopi-1.9.2 (otopi-1.9.2-1.el8) ..... ..... [ 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 ==-- # set [datacenter] name (any name you like) Please enter the name of the datacenter where you want to deploy this hosted-engine host. [Default]: # set [cluster] name (any name you like) Please enter the name of the cluster where you want to deploy this hosted-engine host. [Default]: If you want to deploy with a custom engine appliance image, please specify the path to the OVA archive you would like to use # specify [OVA archive] path if use # possible to skip with empty (possible to set later) (leave it empty to skip, the setup will use ovirt-engine-appliance rpm installing it if missing): # 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): [14776]: [ 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: # set SSH public key if set for oVirt Engine VM Enter ssh public key for the root user that will be used for the engine appliance (leave it empty to skip): [WARNING] Skipping appliance root 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]: # 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:1c:e9:23]: # 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)[No] --== 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]: ..... ..... # 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-20210705183931.conf' [ INFO ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf' [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination [ INFO ] Hosted Engine successfully deployed # virtual machine [HostedEngine] is running [root@dlp ~]# virsh -c qemu:///system?authfile=/etc/ovirt-hosted-engine/virsh_auth.conf list Id Name State ------------------------------ 3 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 : 15452 Score : 3400 Engine status : {"vm": "up", "health": "good", "detail": "Up"} Hostname : dlp.srv.world Local maintenance : False stopped : False crc32 : 7984134a conf_on_shared_storage : True local_conf_timestamp : 15452 Status up-to-date : True Extra metadata (valid at timestamp): metadata_parse_version=1 metadata_feature_version=1 timestamp=15452 (Tue Jul 5 19:28:58 2021) host-id=1 score=3400 vm_conf_refresh_time=15452 (Tue Jul 5 19:28:58 2021) 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 [root@dlp ~]# hosted-engine --console The engine VM is running on this host Escape character is ^] CentOS Stream 8 Kernel 4.18.0-315.el8.x86_64 on an x86_64 Web console: https://ctrl.srv.world:9090/ or https://10.0.0.25:9090/ ctrl login: # * if following error is shown, change like follows # it's bug as of 2021/07 # reported on RedHat Bugzilla and will be fixed [root@dlp ~]# hosted-engine --console The engine VM is running on this host Escape character is ^] 2021/07/05 19:44:50 socat[51386] E Option "user" only with bind option[root@dlp ~]# vi /usr/sbin/hosted-engine # line 399 : remove [,user=ovirt-vmconsole]
exec /usr/bin/socat \
UNIX-CONNECT:/var/run/ovirt-vmconsole-console/${vmid}.sock,user=ovirt-vmconsole \
STDIO,raw,echo=0,escape=29
|
Sponsored Link |
|