News, tips, partners, and perspectives for Oracle’s virtualization offerings

Configure KVM host on Oracle Linux with UEK

Honglin Su
Sr. Director of Product Management

Kernel-based Virtual Machine (KVM) is a feature that comes with Oracle Linux. The Unbreakable Enterprise Kernel (UEK) for Oracle Linux has KVM built-in. Whether you start a fresh Oracle Linux installation or configure an existing Oracle Linux environment, you can easily and quickly turn the Oracle Linux OS into an KVM host.

# lsmod | grep kvm
kvm_intel             167936  0
kvm                   516096  1 kvm_intel

KVM requires the CPU virtualization extension (Intel vmx or AMD svm) support by the hardware platform. For example, you can verify the virtualization extension support on an Intel based system.

# grep -e 'vmx' /proc/cpuinfo
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt

If you start a fresh install of Oracle Linux, make sure that you select the virtualization software option during the installation process.

For example, for Oracle Linux 7, you could choose "Virtualization Host" which has only the basic virtualization packages; or you could start with "Server with GUI" with the following add-ons:

  • Virtualization Client
  • Virtualization Hypervisor
  • Virtualization Tools

Once Oracle Linux 7 is installed, your KVM host environment is ready.

If you have an existing Oracle Linux installation, Oracle Linux 7 for example, you configure the yum repos to install/update the required packages.

# cd /etc/yum.repos.d/
# wget http://yum.oracle.com/public-yum-ol7.repo
# vi public-yum-ol7.repo
name=Oracle Linux $releasever Latest ($basearch)

name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch)

# yum install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client 

After the packages are installed, you restart libvirtd daemon which performs management tasks for the KVM host.

# systemctl restart libvirtd
# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2017-08-25 15:46:17 PDT; 13s ago

The libvirtd daemon is now running. Oracle Linux OS is ready to configure KVM virtual machines, to be managed by Oracle OpenStack, virt-manager, etc.

Join the discussion

Comments ( 1 )
  • Rich H Monday, January 29, 2018
    I see in Oracle Linux 7 update 4 release notes that kvm_intel will not load properly under UEK. Isn't that a problem for running KVM under the UEK kernel?
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.