Linux - Install KVM

Last verified: October 2026 for RHEL 9 against the Red Hat virtualization, networking and web console guides.

Prerequisites

Once the prerequisites are met then jump into installation steps of KVM.

1) Check Whether Virtualization is Enabled or not

To get off the ground, you need to verify if your system supports Virtualization. This is usually enabled in the BIOS/UEFI. To verify, run one of the following commands; any output means the CPU flag is present.

For Intel CPUs

grep -e 'vmx' /proc/cpuinfo

For AMD CPUs

grep -e 'svm' /proc/cpuinfo

Alternatively, you can run the following command. VT-x is Intel’s virtualization technology and AMD-V is AMD’s.

lscpu | grep Virtualization

Also, you might want to check if KVM modules are loaded.

lsmod | grep kvm

2) Install Virtualization Packages

First refresh the repositories, install all available updates and reboot once.

sudo dnf update -y
sudo reboot

Next, install the virtualization packages listed in the Red Hat guide.

sudo dnf install qemu-kvm libvirt virt-install virt-viewer

virt-install is a command-line tool for creating virtual machines. virt-viewer is a lightweight UI that lets you interact with a VM using the VNC or SPICE protocol.

Optionally, install additional virtualization tools.

sudo dnf install -y virt-top guestfs-tools

3) Start the Virtualization Services

RHEL 9 uses modular libvirt daemons (virtqemud, virtnetworkd and so on) instead of the old monolithic libvirtd, which is deprecated. Start their sockets as shown in the Red Hat guide:

for drv in qemu network nodedev nwfilter secret storage interface; do sudo systemctl start virt${drv}d{,-ro,-admin}.socket; done

Then verify that the host is ready for virtualization. If all checks return PASS, you can create VMs.

sudo virt-host-validate

4) Configure Network Bridge for KVM

If you want to access your KVM virtual machines from outside the KVM hypervisor, configure a network bridge (kvmbr0) and attach the physical interface to it.

Note: The virtual bridge virbr0 is created automatically by libvirt. VMs on it get a NATed address, so it is mainly useful for testing.

To create the bridge kvmbr0 on RHEL 9.4 or later, run the following commands. Run them from the local console rather than over SSH on the same interface, because the existing connection on that interface is removed and the network drops until the bridge comes up.

nmcli connection show
sudo nmcli connection add type bridge con-name kvmbr0 ifname kvmbr0
sudo nmcli connection modify kvmbr0 ipv4.addresses '192.168.1.179/24' ipv4.gateway '192.168.1.1' ipv4.dns '192.168.1.1' ipv4.method manual
sudo nmcli connection delete enp0s3
sudo nmcli connection add type ethernet port-type bridge con-name kvmbr0-port1 ifname enp0s3 controller kvmbr0
sudo nmcli connection up kvmbr0

Note: Replace the interface name and IP address details as per your setup. Releases before RHEL 9.4 use slave-type and master instead of port-type and controller.

Check the bridge status and its ports with the ip command.

ip addr show kvmbr0
ip link show master kvmbr0

5) Create a Virtual Machine using the Web Console

On RHEL 9 the Virtual Machine Manager (virt-manager) GUI is deprecated; Red Hat recommends the RHEL web console (Cockpit) for managing VMs graphically. Install and enable the web console and its virtual machines plug-in:

sudo dnf install cockpit cockpit-machines
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --add-service=cockpit --permanent
sudo firewall-cmd --reload

Open https://<server-ip>:9090 in a browser (or https://localhost:9090 on the host itself) and log in with your sudo user.

  1. Open Virtual Machines and click Create VM.
  2. Enter the basic configuration: Name, Connection (privilege level), Installation type (for example a local installation medium / ISO), Operating system, Storage, Storage Limit and Memory.
  3. Click Create and run to start the installation straight away, or Create and edit to change the VM (for example its network interface) before the operating system is installed.

From the command line, virt-install can place a new VM directly on the bridge with --network bridge=kvmbr0.

Conclusion

And there you have it. In this guide, we have illustrated how to install KVM on RHEL 9.

Sources


Revision #1
Created 22 July 2025 17:28:44 by Admin
Updated 24 October 2026 14:10:46 by Admin