Enable the Yum Repository

WARNING:

Oracle Linux 7 is now in Extended Support. See Oracle Linux Extended Support and Oracle Open Source Support Policies for more information.

Migrate applications and data to Oracle Linux 8 or Oracle Linux 9 as soon as possible.

If the system isn't subscribed to ULN and you want to use the Oracle KVM Stack, the ol7_kvm_utils yum repository must be enabled before installing the virtualization packages.

Note:

The Default KVM Stack is available in the core system repositories and can be installed without enabling any other repositories. If the Oracle KVM Stack is already installed and you intend to switch KVM stacks, see Switch KVM Stacks for more details.
What Do You Need?

Steps

Follow these steps to enable an Oracle Linux repository.

  1. Install or update the release package:
    sudo yum install -y oraclelinux-release-el7
  2. Enable the ol7_kvm_utils yum repository by performing one of the following:
    • Edit the repository configuration file at /etc/yum.repos.d/virt-ol7.repo and set the enabled option to 1:
      [ol7_kvm_utils] name=Oracle Linux $releasever KVM Utilities ($basearch) baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL7/kvm/utils/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1
    • Use the yum-config-manager command if the yum-utils package is installed.
      For example:
      sudo yum-config-manager --enable ol7_kvm_utils
  3. (Optional) To prevent yum from installing unwanted package versions from a particular repository, set an exclude option using the yum-config-manager command.
    For example, to prevent yum from installing unwanted virtualization packages that are included in the ol7_developer_EPEL repository, you would type:
    sudo yum-config-manager --setopt="ol7_developer_EPEL.exclude=libvirt* qemu*" --save
  4. Proceed to the topic for installing the virtualization packages (Install Virtualization Packages).