This article is the next in the oVirt series, part one .
Articles
- Installing the Manager (ovirt-engine) and Hypervisors (hosts) — Here We Are
So, let's discuss the initial installation of the ovirt-engine and ovirt-host components.
More details about the installation processes can always be found in .
Content
Installing ovirt-engine
For the Engine, the minimum requirements are 2 cores/4 GiB RAM/25 GiB storage. Recommended — at least 4 cores/16 GiB RAM/50 GiB storage. We will use the Standalone Manager option, where the engine runs on a dedicated physical or virtual machine outside of the managed cluster. For our installation, we will take a virtual machine, for example, on a standalone ESXi*. It is convenient to use deployment automation tools or cloning from a previously prepared template or using kickstart installation.
*Note: For a production system, this is a bad idea, as the manager operates without redundancy and becomes a bottleneck. In this case, it’s better to consider the Self-hosted Engine option.
If necessary, the procedure for converting from Standalone to Self-hosted is described in detail in . In particular, the host needs to execute the reinstall command with Hosted Engine support.
On the VM, install CentOS 7 in minimal configuration, then update and reboot the system:
$ sudo yum update -y && sudo rebootFor the virtual machine, it is useful to install the guest agent:
$ sudo yum install open-vm-toolsfor VMware ESXi hosts, or for oVirt:
$ sudo yum install ovirt-guest-agentConnect the repository and install the manager:
$ sudo yum install https://resources.ovirt.org/pub/yum-repo/ovirt-release43.rpm
$ sudo yum install ovirt-engine
Basic Setup:
$ sudo engine-setupIn most cases, the default settings are sufficient; to use them automatically, you can run the configuration with the flag:
$ sudo engine-setup --accept-defaults Now we can connect to our new engine at the address . It's still empty here, so we move on to installing hypervisors.
Installing ovirt-host
On the physical host, install CentOS 7 in minimal configuration, then connect the repository, update, and reboot the system:
$ sudo yum install https://resources.ovirt.org/pub/yum-repo/ovirt-release43.rpm
$ sudo yum update -y && sudo reboot
Note: It is convenient to use deployment automation tools or kickstart installation for setup.
Example kickstart file
Attention! Existing partitions are automatically deleted! Be careful!
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us','ru' --switch='grp:alt_shift_toggle'
# System language
lang ru_RU.UTF-8
# Network information
network --bootproto=dhcp --device=ens192 --ipv6=auto --activate
network --hostname=kvm01.lab.example.com
# Root password 'monteV1DE0'
rootpw --iscrypted $6$6oPcf0GW9VdmJe5w$6WBucrUPRdCAP.aBVnUfvaEu9ozkXq9M1TXiwOm41Y58DEerG8b3Ulme2YtxAgNHr6DGIJ02eFgVuEmYsOo7./
# User password 'metroP0!is'
user --name=mgmt --groups=wheel --iscrypted --password=$6$883g2lyXdkDLbKYR$B3yWx1aQZmYYi.aO10W2Bvw0Jpkl1upzgjhZr6lmITTrGaPupa5iC3kZAOvwDonZ/6ogNJe/59GN5U8Okp.qx.
# System services
services --enabled="chronyd"
# System timezone
timezone Europe/Moscow --isUtc
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
# Partition clearing information
clearpart --all
# Disk partitioning information
part /boot --fstype xfs --size=1024 --ondisk=sda --label=boot
part pv.01 --size=45056 --grow
volgroup HostVG pv.01 --reserved-percent=20
logvol swap --vgname=HostVG --name=lv_swap --fstype=swap --recommended
logvol none --vgname=HostVG --name=HostPool --thinpool --size=40960 --grow
logvol / --vgname=HostVG --name=lv_root --thin --fstype=ext4 --label="root" --poolname=HostPool --fsoptions="defaults,discard" --size=6144 --grow
logvol /var --vgname=HostVG --name=lv_var --thin --fstype=ext4 --poolname=HostPool --fsoptions="defaults,discard" --size=16536
logvol /var/crash --vgname=HostVG --name=lv_var_crash --thin --fstype=ext4 --poolname=HostPool --fsoptions="defaults,discard" --size=10240
logvol /var/log --vgname=HostVG --name=lv_var_log --thin --fstype=ext4 --poolname=HostPool --fsoptions="defaults,discard" --size=8192
logvol /var/log/audit --vgname=HostVG --name=lv_var_audit --thin --fstype=ext4 --poolname=HostPool --fsoptions="defaults,discard" --size=2048
logvol /home --vgname=HostVG --name=lv_home --thin --fstype=ext4 --poolname=HostPool --fsoptions="defaults,discard" --size=1024
logvol /tmp --vgname=HostVG --name=lv_tmp --thin --fstype=ext4 --poolname=HostPool --fsoptions="defaults,discard" --size=1024
%packages
@^minimal
@core
chrony
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
# Reboot when the install is finished.
reboot --eject
Save this file, e.g., at . To use the script when starting the OS installation, choose 'Install CentOS 7', enable parameter editing mode (Tab key), and at the end (with a space, without quotes) append
' inst.ks=ftp://ftp.example.com/pub/labkvm.cfg'.
The installation script deletes existing partitions on /dev/sda, creates new ones based on (you can view them after installation using the lsblk command). The hostname is set to kvm01.lab.example.com (this can be changed later with the command hostnamectl set-hostname kvm03.lab.example.com), IP address acquisition is automatic, the timezone is Moscow, Russian language support is added.
Root user password: monteV1DE0, mgmt user password: metroP0!is.
Warning! Existing partitions are automatically deleted! Be careful!
Repeat (or perform concurrently) on all hosts. From turning on an 'empty' server to its ready state, with 2 long boot cycles, takes about 20 minutes.
Adding a node to oVirt
It is done very simply:
Compute → Hosts → New →…
In the wizard, the required fields are Name (display name, e.g., kvm03), Hostname (FQDN, e.g., kvm03.lab.example.com), and the Authentication section— root user (unchangeable) — password or SSH Public Key.
After clicking the button Ok You will receive the message ‘You haven’t configured Power Management for this Host. Are you sure you want to continue?’. This is normal—power management will be covered later, after the host has successfully connected. However, if the machines on which the hosts are installed do not support management (IPMI, iLO, DRAC, etc.), I recommend disabling it: Compute → Clusters → Default → Edit → Fencing Policy → Enable fencing, uncheck the box.
If the oVirt repository was not connected on the host, the installation will fail, but this is not a big deal—you need to add it, then click Install -> Reinstall.
Connecting the host takes no more than 5-10 minutes.
Configuring the Network Interface
Since we are building a fault-tolerant system, the network connection should also provide a redundant connection, which is done on the Compute → Hosts → HOST → Network Interfaces — Setup Host Networks tab.
Depending on the capabilities of your networking equipment and architectural approaches, there are various options. The most optimal connection is to a top-of-rack switch stack, ensuring that the network availability does not break in the event of a failure. Let's consider the example of an LACP aggregated channel. To set up the aggregated channel, 'grab' the 2nd unused adapter with the mouse and 'move' it to the 1st one. A window will open Create New Bond, where LACP (Mode 4, Dynamic link aggregation, 802.3ad) is chosen by default. On the switch side, the standard configuration of the LACP group is performed. If it's not possible to build a switch stack, the Active-Backup mode (Mode 1) can be utilized. We will cover VLAN settings in the next article, and more detailed recommendations for network configuration can be found in the document .
Configuring FC
Fibre Channel (FC) is supported 'out of the box' and does not pose any difficulties in use. We will not cover the setup of the storage network, including storage system configuration and zoning fabric switches within the oVirt setup.
Configuring FCoE
In my opinion, FCoE has not gained widespread adoption in storage networks, but it is often used on servers as a 'last mile', for example, in HPE Virtual Connect.
Configuring FCoE requires a few additional straightforward steps.
Setup FCoE Engine
Article on the Red Hat website , we add the key to the manager with the following command and restart it:
$ sudo engine-config -s UserDefinedNetworkCustomProperties='fcoe=^((enable|dcb|auto_vlan)=(yes|no),?)*$'
$ sudo systemctl restart ovirt-engine.service
Setup Node FCoE
On oVirt Hosts, it is necessary to install
$ sudo yum install vdsm-hook-fcoeNext, the standard FCoE configuration, as per the article on Red Hat: .
For Broadcom CNA, we look additionally at .
Ensure that the necessary packages (already included in minimal) are installed:
$ sudo yum install fcoe-utils lldpadNext, the actual configuration (replace ens3f2 and ens3f3 with the names of the CNAs connected to the storage network):
$ sudo cp /etc/fcoe/cfg-ethx /etc/fcoe/cfg-ens3f2
$ sudo cp /etc/fcoe/cfg-ethx /etc/fcoe/cfg-ens3f3
$ sudo vim /etc/fcoe/cfg-ens3f2
$ sudo vim /etc/fcoe/cfg-ens3f3
Important: if the network interface supports DCB/DCBX hardware, the DCB_REQUIRED parameter must be set to no.
DCB_REQUIRED='yes' → #DCB_REQUIRED='yes'
Next, ensure that adminStatus is disabled on all interfaces, including those without FCoE enabled:
$ sudo lldptool set-lldp -i ens3f0 adminStatus=disabled
...
$ sudo lldptool set-lldp -i ens3f3 adminStatus=disabled
If there are other network interfaces, LLDP can be enabled:
$ sudo systemctl start lldpad
$ sudo systemctl enable lldpad
As mentioned earlier, if hardware DCB/DCBX is used, the DCB_REQUIRED setting must be enabled in no and this step can be skipped.
$ sudo dcbtool sc ens3f2 dcb on
$ sudo dcbtool sc ens3f3 dcb on
$ sudo dcbtool sc ens3f2 app:fcoe e:1
$ sudo dcbtool sc ens3f3 app:fcoe e:1
$ sudo ip link set dev ens3f2 up
$ sudo ip link set dev ens3f3 up
$ sudo systemctl start fcoe
$ sudo systemctl enable fcoe
To check if auto-start is enabled for network interfaces:
$ sudo vim /etc/sysconfig/network-scripts/ifcfg-ens3f2
$ sudo vim /etc/sysconfig/network-scripts/ifcfg-ens3f3
ONBOOT=yesView the configured FCoE interfaces; the command output should not be empty.
$ sudo fcoeadm -iThe subsequent configuration of FCoE is performed as for regular FC.
Next, configure the storage systems and networks — zoning, SAN hosts, creating and presenting volumes/LUNs, after which the storage can be connected to the ovirt hosts: Storage → Domains → New Domain.
Leave Domain Function as Data, Storage Type as Fibre Channel, Host as any, name as, for example, storNN-volMM.
Surely your storage system allows not just path redundancy but also load balancing. Many modern systems can transfer data equally optimally across all paths (ALUA active/active).
To enable all paths to an active state, you need to configure multipathing, which will be explained in the following articles.
Configuring NFS and iSCSI is done similarly.
ISO Image Storage
For the OS installation, their installation files are required, most often available as ISO images. You can use the built-in path, but for working with images in oVirt, a special storage type — ISO — has been designed, which can be targeted to an NFS server. Add it:
Storage → Domains → New Domain,
Domain Function → ISO,
Export Path — for example, mynfs01.example.com:/exports/ovirt-iso (at the time of connection, the folder must be empty, and the manager must have write access to it),
Name — for example, mynfs01-iso.
To store images, the manager will create a structure.
/exports/ovirt-iso/<some UUID>/images/11111111-1111-1111-1111-111111111111/
If ISO images already exist on our NFS server, to save space, it is convenient to link them instead of copying files into this folder.
First VM
At this stage, you can already create the first virtual machine, install the OS and application software on it.
Compute → Virtual Machines → New
For the new machine, specify the name (Name), create a disk (Instance Images → Create), and attach a network interface (Instantiate VM network interfaces by picking a vNIC profile → select from the list the currently only ovirtmgmt).
On the client side, a modern browser and will be needed to interact with the console.
The first machine has been successfully launched. However, to fully operate the system, several additional configurations are required, which we will continue discussing in the following articles.
Source: habr.com
