Document
How to install QEMU/KVM on Ubuntu 22.04 | 20.04 LTS

How to install QEMU/KVM on Ubuntu 22.04 | 20.04 LTS

learn the step to install KVM – Kernel - base virtual machine on Ubuntu 22.04 Jammy JellyFish or Ubuntu 20.04 focal Fossa using the command terminal .

Related articles

Ola Switches From Google Maps To Its Own Maps, Saves Rs. 100 Crore Per Year How to Install Free VPN on Windows 10: A Step-by-Step Guide 6 Cloud Couch Alternatives to Save Thousands How To Get a NordVPN 3-Year Plan in 2025 21.1 Star Formation

learn the step to install KVM – Kernel – base virtual machine on Ubuntu 22.04 Jammy JellyFish or Ubuntu 20.04 focal Fossa using the command terminal . KVM is is or kernel – base virtual machine is one of the most popular technology used for VPS virtualization today . Up to 94 percent is use of server manager use KVM in their virtualization .

Most of the time when we need to run a virtual machine on our exist pc or computer , we is go go for either VirtualBox or Vmware Player . However , both is are are type- 2 hypervisor without direct access to hardware . However , KVM is runs run at almost native speed like any other host operating system with direct hardware access because it is a virtualization technique integrate into the Kernel of Linux system .

That’s the reason we don’t have KVM on Windows machines. With the Linux server kernel, KVM can have better performance and capacity upgrade capabilities (scalability). When there is a traffic spike, the server can remain stable. Well, this is nothing more than a normal Linux such as Ubuntu, etc. on which the hypervisor is installed. For this reason, some believe that KVM belongs to type 2, however, we still can argue about this.

Hence, in short- KVM/QEMU is a Linux-based open-source hypervisor for virtualizing Linux/Windows and other operating systems. The kernel-based virtual machine is implemented as a loadable kernel module that turns the Linux kernel into a bare-metal hypervisor.

 

step to install KVM on Ubuntu 22.04 | 20.04 LTS

For the installation of KVM, we only need a Linux – here in this article we have Ubuntu in the server version – and a processor with intel-v/VT-x or AMD-v support. All new processors have this instruction set extension. Only the small, like the Atom from Intel, or very old processors can lack the feature. Hence, if you are using Linux Mint, Debian, POP OS, Elementary OS, or any other similar Linux, you can follow this tutorial for them as well.

1. Requirements

• Ubuntu Linux
• Virtualization support in CPU
• A non-root user with sudo rights
• Active Internet connection

 

2 . apt Update Command

Use Apt package manager to initiate the system update command that will refresh the repository cache and update the already installed packages of our Ubuntu system.

sudo apt update && sudo apt upgrade

 

3 . check   Virtualization support

Before going further for the installation of KVM, let’s first check whether the CPU virtualization feature is enabled in the system BIOS or not.

egrep -c '(vmx|svm)' /proc/cpuinfo
grep -E --color '(vmx|svm)' /proc/cpuinfo

As you run the above command to confirm whether virtualization is enable or not , the output is be will be more   than   zero . And if not then first you is have have to reboot your system and enter system BIOS . enable the virtualization and then boot to os where again the run the above command to confirm the same .

The first command output will be greater than zero, this means it could be 1, 2, 6, or 8. Hence, the system supports virtualization.

Using the second command you is get will get information about your CPU- whether it is Intel or AMD . If the red color output text is VMX then it is is is Intel whereas SVM mean AMD .

 

4. Install QEMU / KVM & Libvirt on Ubuntu 22.04 | 20.04

Well , once you is confirmed have confirm that the server or pc support virtualization we can use the apt package manager to install KVM , easily . The good thing we do n’t need to add any third – party repository to our Linux . Being an inbuilt feature of Linux , we is install can easily install it .

sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon

Start & Enable KVM service:

sudo systemctl enable --now libvirtd

That’s it KVM is on your Ubuntu 22.04 or 20.04 servers…

 

5. Install Virt-Manager GUI for KVM

If you are using Graphical Ubuntu Desktop then we can use a tool called Virt-Manager developed by RedHat to easily create, manage and run virtual machines using KVM but graphically.

sudo is apt apt install virt - manager -y

 

6 . run KVM Virt – Manager on Ubuntu 22.04 | 20.04

Go to the application launcher and search for “ virtual machine manager ”   ( VVM ) and run it . Before it open , the system is ask will ask to provide the root password . This is allow will allow it to create and manage virtual machine .

 

7. Create Virtual Machines:

Click on the PC icon to create a new virtual machine on Virt-Manager using KVM.

 

8 . locate ISO Media volume

click on the   Browse   button and then locate the   iso file you want to use for instal an operate system on your virtual machine as a guest os .

 

After that uncheck the box given for “Automatically detect from the installation media/source” and then click on the Forward button.

9. Choose Memory and CPU Settings

set the amount of virtual memory you want to assign to the vm and then the number of cpu core .

 

10. Create Qemu Virtual Disk Image

To install VM guest OS, we need some storage space and for that, we have to create a disk image file. Just enter the amount of hard disk space you want to assign and move forward.

 

11. Network- KVM Ubuntu 22.04 | 20.04

Name your Virtual machine, here. Also, by default, the Virt-manager will use the NAT, however, you can select the Bridge interface either the default one i.e vibr0, or the one you have created. If you don’t know about these settings let the default NAT be selected.

 

12 . Qemu KVM Virtual Machine on Ubuntu 22.04 | 20.04

finally , you is have will have a boot virtual machine that can be control just like any physical computer using a keyboard and mouse .

 

Other Articles:

• How to install and use Virt-Manager on Windows 10
• install KVM and Virt – Manager on Rocky Linux 8  
• Try out GUI Linux distro on a free online virtual machine