Objective

The following quick guide will help you setup Redhat Enterprise Linux server as a virtualization host using KVM.

Operating System and Software Versions

  • Operating System: - Red Hat 7

Requirements

Privileged access to RHEL installation will be required.

Difficulty

EASY

Conventions

  • # - requires given command to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - given command to be executed as a regular non-privileged user

Instructions

Check Hardware Requirements

In order to configure Redhat as a Virtualization host, your system must support hardware-assisted virtualization. To find out whether your system is configured to support hardware-assisted virtualization, query /proc/cpuinfo file for either the vmx (Intel) or svm (AMD) flag. Run the following command to check your virtualzation support:
$(grep -qE 'vmx|svm' /proc/cpuinfo) && echo "Virtualization IS supported" || echo "Virtualization is NOT supported"
In case the Virtualization is NOT supported on your system, you may need to restart to BIOS and enable it or your hardware simply does not support it.

Virtualization Host installation

The following command will install KVM and all its prerequisites:
# yum group install "Virtualization Host"

Virtualization Client installation

In order to manage or create new VMs install Virtual machine Manager:
# yum install "Virtualization Client"

Confirm Virtualization Installation

At this stage you should be able to start Virtual Machine Manager from command line:
$ virt-manager
or from start menu by navigation to Applications -> System Tools -> Virtual Machine Manager. In case you run into issues, confirm that kvm_intel or kvm_amd is loaded correctly:
$ lsmod | grep kvm
kvm_intel             170181  4 
kvm                   554609  1 kvm_intel
irqbypass              13503  3 kvm