Install Virtualization Packages

Before you can use virtualization, the virtualization packages must be installed. The following topics describe how to install virtualization packages on an existing Oracle Linux system.

Oracle Linux 9: Install Virtualization Packages

The following information describes how to install the virtualization packages on an Oracle Linux 9 system.

What Do You Need?

  • User credentials with administrator privileges.
  • To install the Oracle KVM Stack, the following requirements must be met:
    • Yum repository must be enabled or the ULN channel must be subscribed. See Enable Yum Repositories or Subscribe to ULN Channels for instructions.

      Note:

      To install the Default KVM Stack, you don't need to enable any repositories or subscribe to any other ULN channels.
    • The host system must be running the latest UEK R7.

Steps

Follow these steps to install the virtualization packages on an Oracle Linux 9 system.

  1. Log in to the Oracle Linux 9 system.
  2. Ensure that the latest packages are installed on the system:
    sudo dnf update
  3. Install the latest available base virtualization packages and other utilities:
    • To install the Default KVM Stack:

      sudo dnf group install "Virtualization Host"
      sudo dnf install qemu-kvm virt-install virt-viewer
    • To install the Oracle KVM Stack, first remove any existing virtualization packages and then install the packages as usual:

      sudo dnf remove libvirt qemu-kvm edk2
      sudo dnf group install "Virtualization Host"
      sudo dnf install qemu-kvm virt-install virt-viewer
  4. (Recommended) Reboot the system to ensure that the virtualization packages and utilities were updated.

    Note:

    After performing a system update, reboot the system to ensure that the system restarts with the latest packages.
  5. Start, enable, or check the service of the libvirtd service. See Libvirtd Service: Management Tasks for instructions.

    Note:

    Before you can create and manage KVM instances, the libvirtd service must be started and enabled.
  6. Verify that the system can act as act as a virtual host. See Validate Host System
  7. After verifying that the system can act as a virtual host, you can proceed to KVM Instances: Create and Manage.

Oracle Linux 8: Install Virtualization Packages

The following information describes how to install the virtualization packages on an Oracle Linux 8 system.

What Do You Need?

  • Administrator privileges.
  • To install the Oracle KVM Stack, the following requirements must be met:
    • Yum repository must be enabled or the ULN channel must be subscribed. See Enable Yum Repositories or Subscribe to ULN Channels for instructions.

      Note:

      To install the Default KVM Stack, you don't need to enable any repositories or subscribe to any other ULN channels.
    • The host system must be running the latest UEK R6 or UEK R7.

Steps

Follow these steps to install the virtualization packages on an Oracle Linux 8 system.

  1. Log in to the Oracle Linux 8 system.
  2. Ensure that the latest packages are installed on the system:
    sudo dnf update
  3. Install the KVM virtualization stack and other utilities:
    • To install the Default KVM Stack:
      sudo dnf module install virt
      sudo dnf install virt-install virt-viewer
    • To install the Oracle KVM Stack, install the module stream that you want to use. For example, to install the latest stream:

      sudo dnf module install virt:kvm_utils3
      sudo dnf install virt-install virt-viewer
  4. (Recommended) Reboot the system to ensure that the virtualization packages and utilities were updated.

    Note:

    After performing a system update, reboot the system to ensure that the system restarts with the latest packages.
  5. Start, enable, or check the service of the libvirtd service. See Libvirtd Service: Management Tasks for instructions.

    Note:

    Before you can create and manage KVM instances, the libvirtd service must be started and enabled.
  6. Verify that the system can act as act as a virtual host. See Validate Host System for instructions.
  7. After verifying that the system can act as a virtual host, proceed to KVM Instances: Create and Manage.

Oracle Linux 7: Install Virtualization Packages

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.

The following information describes how to install the virtualization packages on an Oracle Linux 7 system.

What Do You Need?

  • Administrator privileges.
  • To install the Oracle KVM Stack, the following requirements must be met:
    • Yum repository must be enabled or the ULN channel must be subscribed. See Enable Yum Repositories or Subscribe to ULN Channels for instructions.

      Note:

      To install the Default KVM Stack, you don't need to enable any repositories or subscribe to any other ULN channels.
    • The host system must be running the latest UEK R4, UEK R5, or UEK R6.

Steps

Follow these steps to install the virtualization packages on an Oracle Linux 7 system.

  1. Log in to the Oracle Linux 7 system.
  2. Ensure that the latest packages are installed on the system:
    sudo yum update
  3. Install the latest available base virtualization packages and other utilities:
    sudo yum groupinstall "Virtualization Host"
    sudo yum install qemu-kvm virt-install virt-viewer
  4. (Recommended) Restart the system to ensure that the packages and utilities were updated.

    Note:

    After performing a system update, reboot the system to ensure that the system restarts with the latest packages.
  5. Start, enable, or check the service of the libvirtd service. See Libvirtd Service: Management Tasks for instructions.

    Note:

    Before you can create and manage KVM instances, the libvirtd service must be started and enabled.
  6. Verify that the system can act as act as a virtual host. See Validate Host System for instructions.
  7. After verifying that the system can act as a virtual host, proceed to KVM Instances: Create and Manage.

Validate Host System

The libvirt package provides a validation utility that checks whether a system can function correctly as a virtualization host. The utility can check for several virtualization capabilities, but KVM functionality is covered by testing the qemu virtualization type.

  1. Run the virt-host-validate qemu command to validate the host system:
    sudo virt-host-validate qemu

    If all checks return a PASS value, the system can host guest VMs. If any of the tests fail, a reason is provided and information is displayed on how to resolve the issue, if such an option is available.

    Note:

    If the following message is displayed, the system isn't capable of functioning as a KVM host:

    QEMU: Checking for hardware virtualization: FAIL (Only emulated CPUs are
          available, performance will be significantly limited)

    If you try to create or start a VM on a host where this message is displayed, the action is likely to fail.