How to install KVM in Fedora?


KVM which stands for Kernel-based Virtual Machine is a virtualization module in the Linux Kernel which turns the Linux kernel into a hypervisor.

KVM requires hardware with virtualization extensions like Intel-VT or AMD-V to provide hardware-assisted virtualization. It also provides paravirtualization support for Linux, FreeBSD, OpenBSD, Windows, etc using VirtIO API.

I already discussed how to install KVM in Ubuntu Linux.

Today in this article I will discuss how to install and configure KVM in Fedora.

Prerequisites

To follow this guide you should have the following.

  • Access to a user account that has superuser privileges
  • 4 GB RAM and 30 GB of internal storage (Recommended)
  • x86_64 CPU, with Intel VT-x/AMD-V/SVM

How to install KVM in Fedora

To install the KVM on a Fedora system follow the steps that are given below.

Make sure your CPU has Intel-VT or AMD-V virtualization extension

So before you start the installation of KVM on your system you should check if your CPU supports virtualization or not.

Use the following command to verify the same –

lscpu

This will display the details of the CPU with virtualization information as you can see in the image below.

lscpu

In some systems, virtualization extension is disabled by default so you need to enable it from the BIOS.

Installing KVM/QEMU on Fedora

To install the required package use the given command in your terminal –

sudo dnf -y install bridge-utils libvirt virt-install qemu-kvm virt-manager

Once the installation is completed by using the following command you can check whether the kernel module is loaded or not –

lsmod | grep kvm

check kernel module

Next, use the following command to install some other useful tools –

sudo dnf install libvirt-devel virt-top libguestfs-tools

Press y and then enter if it asks for confirmation.

Start KVM daemon

After installing the above packages for kvm now use the following command to start the KVM daemon.

sudo systemctl start libvirtd

Enable KVM daemon

If you want the KVM daemon to start automatically when you start your system then run the following command.

sudo systemctl enable libvirtd

Check the status of the KVM daemon

Now you can check the status of the kvm daemon by using the following command in your terminal –

sudo systemctl status libvirtd

If it is running you will status as given in the image below.

status libvirtd

Start virt manager and create virtual machines

You can start the virtual machine manager from the activities dashboard in your system. Search virtual machine and click on the icon as given in the image below to launch the virt manager.

search virt manager

Alternatively, you can run the given command in your terminal to start this application –

sudo virt-manager

This may ask you to enter your user password, enter it. Now you can create new virtual machines by clicking on the icon that is highlighted in the below image.

virt manager

If you want you can read the full instructions on how to create a virtual machine using KVM in Linux.

Conclusion

By following this article you can now install and use KVM in Fedora Linux. If you have a query then write us in the comments below.

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.