Configure a KVM Host

To manage an Oracle Linux KVM host using Oracle Linux Virtualization Manager, prepare the KVM host by performing a fresh installation of Oracle Linux 8.8 or later (8.x), or 9.6 or later (9.x) and enabling the required repositories, and then you add the host to a data center using the Administration Portal.

Before you begin, ensure you have satisfied the KVM Host Requirements as detailed in the Oracle Linux Virtualization Manager: Architecture and Planning Guide.

See the Oracle® Linux: KVM User's Guide for information on the supported guest OS.

Prepare a KVM Host

Before you can add an Oracle Linux KVM host, prepare it by performing a fresh installation of Oracle Linux 8.8 or later (8.x), or 9.6 or later (9.x) and enabling the required repositories. You can download the installation ISO for Oracle Linux from the Oracle Software Delivery Cloud at https://edelivery.oracle.com.

Note:

Oracle Linux 9 KVM hosts require a cluster compatibility version of 4.7 and an engine host running ovirt-engine-4.5.5-1.65 or later release.

For more information on cluster compatibility versions, see Changing Cluster Compatibility Versions in the Oracle Linux Virtualization Manager Administrator's Guide.

Configure the KVM host

Complete the following steps to for each KVM host in the environment.

  1. Install Oracle Linux 8.8 or later (8.x), or 9.6 or later (9.x) on the host.

    Caution:

    KVM hosts running Oracle Linux 9 can't be added to a cluster that has GlusterFS or hyperconvergance configured.

    • Follow the installation instructions for the Oracle Linux release:

    • Select Minimal Install as the base environment for the installation.

      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 added the host to the Manager, because they might cause dependency issues.

  2. (Optional) If you use a proxy server for Internet access, configure Yum with the proxy server settings. For more information, see the Oracle® Linux: Managing Software on Oracle Linux.

  3. Complete one of the following sets of steps:

    • For ULN registered hosts or using Oracle Linux Manager

      Subscribe the system to the required channels and enable appstream modules.

      1. For ULN registered hosts, sign in to https://linux.oracle.com with a ULN username and password. For Oracle Linux Manager registered hosts, access the internal server URL.

      2. On the Systems tab, select the link named for the host in the list of registered machines.

      3. On the System Details page, select Manage Subscriptions.

      4. On the System Summary page, select each required channel from the list of available channels and select the right arrow to move the channel to the list of subscribed channels. Subscribe the system to the following channels, 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
        • (For 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.

      5. Select Save Subscriptions.

      6. Install the Oracle Linux Virtualization Manager Release 4.5 package, which automatically enables/disables the required repositories.

        dnf install oracle-ovirt-release-45-eln        
    • For Oracle Linux yum server configured KVM hosts

      Install the Oracle Linux Virtualization Manager Release 4.5 package and enable the required repositories. In the following instructions, n is the major Oracle Linux version (8 or 9):

      Note:

      Installing the Oracle Linux Virtualization Manager Release 4.5 package configures an Oracle Linux KVM host; it doesn't install the Manager.

      1. Enable the oln_baseos_latest repository.

        dnf config-manager --enable oln_baseos_latest
      2. Install the Oracle Linux Virtualization Manager Release 4.5 package, which automatically enables/disables the required repositories.

        dnf install oracle-ovirt-release-45-eln
      3. Use the dnf command to verify that the required repositories are enabled.

        1. Clear the dnf cache.

          dnf clean all 
        2. List the configured repositories and verify that the required repositories are enabled.

          dnf repolist        

          The following repositories must be enabled:

          • oln_baseos_latest

          • oln_appstream

          • ol8_kvm_appstream or ol9_kvm_utils

          • ovirt-4.5

          • ovirt-4.5-extra

          • (For Oracle Linux 8 only) ol8_gluster_appstream

          • (For VDSM)oln_UEKR7, or ol9_UEKR8 (Oracle Linux 9 only)

          Note:

          Gluster is only available on hosts running Oracle Linux 8.

        3. If a required repository isn't enabled, use the dnf config-manager command to enable it:

          dnf config-manager --enable repository
  4. If the host runs the Unbreakable Linux Kernel (UEK):
    1. Install the Extra kernel modules package.
      dnf install kernel-uek-modules-extra
    2. Reboot the host.

Check host configuration

To ensure that the KVM host is configured correctly, run the precheck script BEFORE you add it to the Manager.

Note:

To run the script on several KVM hosts simultaneously, we recommend using an Ansible playbook.

  1. Connect to the KVM host from a command line and run the precheck script:
    sudo olvm-pre-check.py

    A series of checks begins and you see something similar to

    -----------------------------------
    OLVM 4.5.5 PRE-CHECK SCRIPT
    -----------------------------------
    
    +++ Checking oracle-ovirt-release-45         [PASS]
    +++ Checking if Host is installed[WARN]
        The 'ovirt-host' package is already installed.
        This is a KVM Host, DO NOT install the engine on this host.
    
    +++ Checking if a Minimal Installation       [PASS]
    +++ Validating the 'Minimal Install' Group   [PASS]
    +++ Checking enabled repositories[WARN]
    
        Extra repositories are enabled:
        update-pcp
    
        Please run the command:
        dnf config-manager --set-disabled update-pcp
    
    +++ Running 'dnf makecache'                  [PASS]
    +++ Dry run 'dnf update --assumeno'          [PASS]
    +++ Checking Linux Kernel                    [PASS]
    +++ Checking kernel-uek-modules-extra        [WARN]
    
        Package kernel-uek-modules-extra is not installed.
        Please run: 'dnf install -y kernel-uek-modules-extra'
    +++ Checking Firewalld status                [PASS]
    +++ Checking SELinux status                  [PASS]
    +++ Checking FIPS status                     [PASS]
    FIPS is disabled.
    +++ If installed, check ansible version      [PASS]
    +++ If installed, check qemu-kvm version     [PASS]
    +++ If installed, check libvirt version      [PASS]
    +++ Checking Hostname/FQDN                   [PASS]
  2. If any checks are marked WARN or FAIL, the script output provides information that can help you resolve the issues:
    +++ Checking if Host is installed    [WARN]
        The 'ovirt-host' package is already installed.
        This is a KVM Host, DO NOT install the engine on this host.
    
    +++ Checking enabled repositories              [WARN]
    
        Extra repositories are enabled:
        update-pcp
    
        Please run the command:
        dnf config-manager --set-disabled update-pcp
    
    +++ Checking kernel-uek-modules-ext            [WARN]
    
        Package kernel-uek-modules-extra is not installed.
        Please run: 'dnf install -y kernel-uek-modules-extra'
  3. If you had warnings or failures to address, rerun the script to ensure that the system passes all configuration checks. For example:
    sudo olvm-pre-check.py
    
    -----------------------------------
    OLVM 4.5.5 PRE-CHECK SCRIPT
    -----------------------------------
    
    +++ Checking oracle-ovirt-release-45         [PASS]
    +++ Checking if Host is installed[PASS]
    +++ Checking if a Minimal Installation       [PASS]
    +++ Validating the 'Minimal Install' Group   [PASS]
    +++ Checking enabled repositories            [PASS]
    +++ Running 'dnf makecache'                  [PASS]
    +++ Dry run 'dnf update --assumeno'          [PASS]
    +++ Checking Linux Kernel                    [PASS]
    +++ Checking kernel-uek-modules-extra        [PASS]
    +++ Checking Firewalld status                [PASS]
    +++ Checking SELinux status                  [PASS]
    +++ Checking FIPS status                     [PASS]
    FIPS is disabled.
    +++ If installed, check ansible version      [PASS]
    +++ If installed, check qemu-kvm version     [PASS]
    +++ If installed, check libvirt version      [PASS]
    +++ Checking Hostname/FQDN                   [PASS]

The Oracle Linux KVM host is now ready to be added to the Manager using the Administration Portal.

Add a KVM Host

After you have configured an Oracle Linux KVM host, you use the Administration Portal to add the host to a data center so that it can be used to run virtual machines. Use the following steps to add KVM hosts installed with other supported guest OS.

Caution:

Oracle Linux Virtualization Manager lets you overallocate a KVM host's memory and CPU resources. As the KVM host itself also needs memory and CPU to run, we recommend that you reserve some memory and CPU for the KVM host. To do this, go to Administration and set a memory quota and a vCPU quota.

To add an Oracle Linux KVM host:

  1. Sign in to the Administration Portal.

    See Log in to the Administration Portal for details.

  2. Go to Compute and then select Hosts.

  3. On the Hosts pane, select New.

    The New Host dialog box opens with the General tab selected on the sidebar.

  4. From the Host Cluster dropdown list, select the data center and host cluster for the host.

    The Default data center is automatically selected.

    When you install Oracle Linux Virtualization Manager, a data center and cluster named Default is created. You can rename and configure this data center and cluster, or you can add new data centers and clusters, as required. See the Data Centers or Clusters tasks in the Oracle Linux Virtualization Manager: Administration Guide.

  5. In the Name field, enter a name for the host.

  6. In the Hostname field, enter the fully-qualified domain name or IP address of the host.

  7. In the SSH Port field, change the standard SSH port 22 if the SSH server on the host uses a different port.

  8. Under Authentication, select the authentication method to use.

    We recommend that you select SSH PublicKey authentication. If you select this option, copy the key displayed in the SSH PublicKey field to the /root/.ssh/authorized_keys file on the host.

    Otherwise, enter the root user's password to use password authentication.

  9. (Optional) Configure other settings for the host from the other tabs on the New Host sidebar.

    Note:

    If you don't want to set any other configuration options now, you can always make changes later by selecting a host from the Hosts pane and then Edit.

  10. Select OK.

    The Power Management Configuration screen is displayed.

  11. Do one of the following:

    The host is added to the list of hosts in the Manager. While the Manager is installing the host agent (VDSM) and other required packages on the host, the status of the host is shown as Installing. You can view the progress of the installation in the Hosts details pane. When the installation is complete, the host status changes to Up.

  12. (Optional) Complete the previous steps to add more KVM hosts to the Manager.

Note:

After a KVM host is added to a cluster, it's also crucial to avoid any spontaneous changes to the network configuration in /etc/sysconfig/network-scripts/ or through the NetworkManager (e.g. nmcli). Make all changes to the network configuration using the engine host/manager Administration Portal or REST API.

Now that the engine and host(s) are configured, see the Oracle Linux Virtualization Manager: Administration Guide for detailed configuration and administrative tasks.