How to install KVM on RHEL 8 / CentOS 8

Cpanel/Whm License $3/mo Plesk License $10/mo Cloudlinux License $5/mo

How to install KVM on RHEL 8 / CentOS 8?. This guide will cover the full installation of KVM hypervisor and its management tools on  RHEL 8 / CentOS 8. KVM (Kernel-based Virtual Machine) is a full virtualization solution for Linux Systems running on x86 hardware with virtualization extensions (Intel VT or AMD-V).

KVM consists of a loadable kernel module,kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko. Follow the steps below to install KVM on your RHEL 8 server.

Install KVM on RHEL 8 / CentOS 8

The next sections will take you through the steps to install the latest release of KVM hypervisor on RHEL 8. This will include the installation of KVM management tools – libguestfs-tools{text-align:left} img{margin:0 auto 0 0}

Step 1: Ensure host CPU has Intel VT or AMD-V Virtualization extensions

The first step is to verify your CPU support for Intel VT or AMD-V Virtualization extensions. In some systems, this is disabled on BIOS and you may need to enable it.

$ cat /proc/cpuinfo | egrep "vmx|svm"

You can also do the same with lscpu command

$ lscpu | grep Virtualization
Virtualization: VT-x

Step 2: Install KVM / QEMU on RHEL/ CentOS 8

KVM packages are distributed on RHEL 8 via AppStream repository. Install KVM on your RHEL 8 server by running the following commands:

sudo yum update
sudo yum install @virt

After installation, verify that Kernel modules are loaded

$ lsmod | grep kvm
kvm_intel 233472 0
kvm 737280 1 kvm_intel

Also install useful tools for virtual machine management.

sudo dnf -y install virt-top libguestfs-tools

We have a guide on how to use libguestfs-tools like:

Step 3: Start and enable KVM daemon

By default, KVM daemon libvirtd is not started, start the service using the command:

sudo systemctl enable --now libvirtd

Step 4: Install Virtual machine Manager GUI – Optional

If you have a Desktop Environment on your RHEL 8, you can install the virt-manager tool which allows you to manage Virtual Machines from a GUI.

sudo yum -y install virt-manager

Step 5: Create a VM instance on KVM

Once you have your bridge interface ready, create a test instance using CLI or Virtual Machine Manager. The example below is for creating a Fedora 29 VM.

--name fed29 
--ram 1024 
--vcpus 1 
--disk path=/var/lib/libvirt/images/fed29.img,size=20 
--os-variant fedora29 
--os-type linux 
--network bridge=br0 
--graphics none 
--console pty,target_type=serial 
--location '' 
--extra-args 'console=ttyS0,115200n8 serial'

The installation is on text mode but the procedure of installation is similar to GUI. After finishing the installation, reboot the instance and login

Fedora 29 (Server Edition)
Kernel 4.18.16-300.fc29.x86_64 on an x86_64 (ttyS0)

Web console: https://localhost:9090/ or

localhost login:

You can also login through console:

$ virsh console fed29

Press <ENTER> key on getting:

Escape character is ^]

Related posts

How To: Open a Reboot Request using Manage


How to install curl on Debian Linux 9/8


Purse Proposal Touts Extension Blocks as Bitcoin Scaling Solution


TrueUSD Stablecoin to Add ‘Real Time’ Monitoring of Dollar Backing


Microsoft CEO Challenges Swift: Build ‘Useful’ Blockchain Applications


White House Team Is Monitoring Cryptocurrencies, Says Press Secretary


Credit Card Giant Visa Hints at Digital Asset Service Plans


eToro Adds First Ethereum Tokens to Its Wallet – 120 of Them


Gavin Andresen: Rising Transaction Fees Could Price Poor Out of Bitcoin


This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More