Sunday, September 22, 2024
Google search engine
HomeGuest BlogsHow To Install KVM on Fedora 38/37/36/35/34/33

How To Install KVM on Fedora 38/37/36/35/34/33

This guide will cover the full installation of KVM hypervisor and its management tools onĀ  Fedora 38/37/36/35/34/33/32. 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.

install kvm on fedora

Install KVM on Fedora 38/37/36/35/34/33/32

In this section, weā€™ll cover all the steps to install the latest release of KVM hypervisor on Fedora. Weā€™ll also include the installation of management tools like libguestfs-tools

Step 1: Check Intel VT or AMD-V Virtualization extensions

The first step is to confirm that your CPU has eitherĀ 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"

Step 2: Install KVM / QEMU on Fedora

Install required virtualization packages on your Fedora system by running:

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

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 installĀ libvirt-devel virt-top libguestfs-tools guestfs-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 start libvirtd

Then enable the service to start on boot

sudoĀ systemctl enable libvirtd

Step 4: Install Virtual machine Manager GUI

If you have a Desktop version of Fedora, you can install virt-managerĀ which gives users a GUI interface to manage your Virtual Machines.

sudo dnf -y installĀ virt-manager

Step 5: Create a test instance

First start by creating a bridge network to be attached to your instances, below guides should help.

Once you have yourĀ bridge interface ready, create a test instance using CLI or Virtual Machine Manager.

sudo virt-install \
--name fed35 \
--ram 2048 \
--vcpus 2 \
--disk path=/var/lib/libvirt/images/fed35.img,size=20 \
--os-variant fedora34 \
--os-type linux \
--network bridge=br0 \
--graphics none \
--console pty,target_type=serial \
--location 'https://mirror.arizona.edu/fedora/linux/releases/35/Server/x86_64/os/' \
--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 35 (Server Edition)

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

localhost login:

You can also login through console:

sudo virsh console fed35

PressĀ <ENTER>Ā keyĀ on getting:

Escape character is ^]

If you want to generate KVM VM templates, refer to How to Create CentOS / Fedora / RHEL VM Templates on KVM

See our Virsh Commands cheat sheet for a complete list of virsh commands. For installation through Virtual Machine Manager GUI, you may need to configure virt-manager as a non-root user on Linux

Want to Automate VMs deployment on KVM?, check out How to Provision VMs on KVM with Terraform

Further reading:

RELATED ARTICLES

Most Popular

Recent Comments

ź°•ģ„œźµ¬ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
źøˆģ²œźµ¬ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ź“‘ėŖ…ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ź“‘ėŖ…ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė¶€ģ²œģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
źµ¬ģ›”ė™ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ź°•ģ„œźµ¬ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ģ˜¤ģ‚°ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ź“‘ėŖ…ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ģ•ˆģ–‘ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ė¶€ģ²œģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė™ķƒ„ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ģ„œģšøģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė¶„ė‹¹ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ė¶€ģ²œģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ķ™”ź³”ė™ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ź°•ģ„œźµ¬ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ź³ ģ–‘ģ¶œģž„ģ•ˆė§ˆ on How to store XML data into a MySQL database using Python?
ķ™”ģ„±ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?
ģ²œķ˜øė™ģ¶œģž„ė§ˆģ‚¬ģ§€ on How to store XML data into a MySQL database using Python?