Deploy Self-Hosted Engine Offline

You must perform a fresh installation of Oracle Linux 8.8 or later (8.x), or 9.6 or later (9.x) on a host to be configured as a KVM host before deploying a self-hosted engine. You can download the installation Oracle Linux ISO for from the Oracle Software Delivery Cloud at https://edelivery.oracle.com.

Prerequisites

  1. Create a local mirror for the following repositories, where n is the major Oracle Linux version (8 or 9):
    • oln_x86_64_baseos_latest
    • oln_x86_64_appstream
    • ol8_x86_64_kvm_appstream or ol9_x86_64_kvm_utils
    • oln_x86_64_ovirt45
    • oln_x86_64_ovirt45_extras
    • oln_x86_64_addons
    • (Oracle Linux 8 only)ol8_x86_64_gluster_appstream
    • (For VDSM)oln_x86_64_UEKR7, or ol9_x86_64_UEKR8 (Oracle Linux 9 only)

    Note:

    Gluster is only available on hosts running Oracle Linux 8.

    For information on creating local mirrors of Oracle Linux repositories, see Mirror a Yum Repository on Oracle Linux and Using Software Distribution Mirrors.

  2. The local repositories can't mimic the original repository names from the Oracle Yum Public server or ULN. Add a prefix to each repository to identify it as local. For example, prefix all local repositories with by local_:
    • local_oln_baseos_latest
    • local_oln_appstream
    • local_ol8_kvm_appstream or ol9_kvm_utils
    • local_oln_ovirt45
    • local_oln_ovirt45_extras
    • local_oln_UEKR7, or local_ol9_UEKR8 (Oracle Linux 9 only)
    • (Oracle Linux 8 only)local_ol8_gluster_appstream
  3. To configure the Oracle Linux hosts in the network to use the local repository for updates and package installation, create a file called /etc/yum.repos.d/local-oln.repo that lists all local repositories.

    Caution:

    The file must be named local-oln.repo and must reside in the /etc/yum.repos.d directory. Ensure that n in the file name matches the Oracle Linux major release.

  4. Follow the instructions in either Oracle® Linux 8: Installing Oracle Linux or Oracle® Linux 9: Installing Oracle Linux to install Oracle Linux 8.8 or later (8.x), or 9.6 or later (9.x) on the host using the Minimal Install base environment. See the Requirements and Scalability Limits section for an example of the partitioning schema.

    Caution:

    Do NOT select any other base environment than Minimal Install for the installation or the hosts will have incorrect qemu and libvirt versions, incorrect repositories configured, and no access to virtual machine consoles.

    Don't install any extra packages until after you have installed the Manager packages because they might cause dependency issues.

  5. Reboot the host.

Offline Installation

Before you begin, ensure that you haven't made any changes to the Minimal Install of Oracle Linux.

  1. List active repositories and disable all active external repositories. For example, using Oracle Linux 8:
    dnf repolist
    repo id           repo name
    ol8_UEKR7         Latest Unbreakable Enterprise Kernel Release 7 for Oracle Linux 8 (x86_64)
    ol8_appstream     Oracle Linux 8 Application Stream (x86_64)
    ol8_baseos_latest Oracle Linux 8 BaseOS Latest (x86_64)

    Disable the external repositories:

    dnf config-manager --disable ol8_UEKR7 ol8_appstream ol8_baseos_latest

    Or you can use a script, such as:

    for REPO in $( dnf repolist | awk '{print $1}' | tail -n +2 | grep -v local_ ); do dnf config-manager --disable ${REPO}; done
  2. Rerun dnf repolist to confirm no external repositories are active.
  3. So the installation can access the local repository, publish the local-oln.repo file to /etc/yum.repos.d directory.
  4. Enable the local repositories. For example, using Oracle Linux 8:
    dnf config-manager --enable local_ol8_UEKR7 local_ol8_appstream local_ol8_baseos_latest local_ol8_gluster_appstream local_ol8_kvm_appstream local_ovirt-4.5 local_ovirt-4.5-extra
  5. Rerun dnf repolist to confirm that the local repositories are active.
  6. When you install the release packages, some external repositories (ol8_gluster_appstream, ovirt-4.5, and ovirt-4.5-extra) are enabled. To prevent the installation from failing because it can't access these external repositories, enable the dnf skip_if_unavailable option:
    dnf config-manager --save --setopt "skip_if_unavailable=True"
  7. Install the Oracle Linux Virtualization Manager Release 4.5 package.
    1. (Optional) Without internet access, installing the oracle-ovirt-release-45-eln rpm package takes longer to complete. To speed up the installation, create an entry in the /etc/hosts file pointing yum.oracle.com to localhost, for example:
      echo '127.0.0.1  yum.oracle.com' >> /etc/hosts
    2. Install the release package:
      dnf install oracle-ovirt-release-45-eln

      Note:

      Installing the release package automatically enables/disables the required external repositories. With the skip_if_unavailable configuration, alerts show on the screen that you can ignore.

  8. Rerun dnf repolist. If the installation enabled any external repository, disable them.
    for REPO in $( dnf repolist | awk '{print $1}' | tail -n +2 | grep -v local_ ); do dnf config-manager --disable ${REPO}; done
  9. If the host runs the Unbreakable Linux Kernel (UEK):
    1. Install the Extra kernel modules package.
      dnf install kernel-uek-modules-extra
    2. Install available updates for all installed packages:
      dnf update
    3. Reboot the host.
  10. Install the ovirt-hosted-engine-setup and ovirt-engine-appliance rpm packages. Installing these packages together speeds up the deployment.
    dnf -y install ovirt-hosted-engine-setup ovirt-engine-appliance
  11. To instruct the setup process to perform an offline installation and not enable KeyCloak, create a file called /root/extra-vars.yml that contains the following:
    ---
    he_offline_deployment: true
    he_enable_keycloak: false

    Caution:

    The file must begin with three en dashes (---)

  12. Deploy the self-hosted engine using the local repository:
    hosted-engine --deploy --4 --ansible-extra-vars="@/root/extra-vars.yml"
  13. Answer the on-screen questions to customize the deployment. Refer to the Engine Configuration Options.
  14. When the installation completes and the self-hosted engine starts, connect to it using ssh and add the same entry to the /etc/hosts file pointing yum.oracle.com to localhost:
    echo '127.0.0.1  yum.oracle.com' >> /etc/hosts