• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to install KVM on Debian 11.3

  • 00:34 lsb_release -a
  • 00:41 sudo apt-get update
  • 01:05 sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
  • 01:40 sudo adduser linux1
  • 02:06 sudo adduser linux1 libvirt
  • 02:34 sudo adduser linux1 kvm
  • 02:50 virsh list --all
  • 03:13 sudo systemctl status libvirtd
  • 03:32 sudo systemctl enable --now libvirtd
  • 03:58 sudo apt install virt-manager
  • 04:28 sudo virt-manager
7375

To Install Kernel-based Virtual Machine on Debian 11.3

Introduction:

KVM is an open-source virtualization technology that changes the Linux kernel into a hypervisor that can be used for virtualization and is an alternative to proprietary virtualization technologies, such as those offered by VMware.

Step 1: Check the OS Version by using the below command

[root@linuxhelp: ~#] lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11	
Codename:	bullseye

Step 2: Next, update the system package by using the below command

[root@linuxhelp: ~#] sudo apt-get update
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main Sources [8,633 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main Sources [158 kB]
Get:6 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [186 kB]
Get:7 http://security.debian.org/debian-security bullseye-security/main Translation-en [117 kB]
Get:8 http://deb.debian.org/debian bullseye-updates/main Sources.diff/Index [11.7 kB]
Get:9 http://deb.debian.org/debian bullseye-updates/main amd64 Packages.diff/Index [11.7 kB]
-2032.44.pdiff [286 B]
Fetched 923 kB in 1s (945 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done

Step 3: Then, install essential KVM packages by using the below command

[root@linuxhelp: ~#] sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done

Note, selecting 'qemu-system-x86' instead of 'qemu-kvm'
The following additional packages will be installed:
  augeas-lenses dmeventd ibverbs-providers ipxe-qemu jq libaio1 libaugeas0 libcacard0 libcapstone4 libdaxctl1 libdevmapper-event1.02.1 libexecs0 libfdt1 libibverbs1 libjq1 liblvm2cmd2.03 libndctl6 libnetcf1 libnss-mymachines
  libnss-systemd libonig5 libpam-systemd libpmem1 librdmacm1 libslirp0 libspice-server1 libsystemd0 liburing1 libusbredirparser1 libvdeplug2 libvirglrenderer1 libvirt-daemon libvirt-daemon-config-network
  libvirt-daemon-config-nwfilter libvirt-daemon-driver-lxc libvirt-daemon-driver-qemu libvirt-daemon-driver-vbox libvirt-daemon-driver-xen libvirt-daemon-system-systemd libvirt0 libxencall1 libxendevicemodel1 libxenevtchn1
  libxenforeignmemory1 libxengnttab1 libxenhypfs1 libxenmisc4.14 libxenstore3.0 libxentoolcore1 libxentoollog1 libxml2-utils lvm2 mdevctl netcat-openbsd ovmf qemu-system-common qemu-system-data qemu-system-gui qemu-utils seabios
  systemd systemd-container systemd-timesyncd thin-provisioning-tools
Suggested packages:
  augeas-doc augeas-tools libvirt-login-shell libvirt-daemon-driver-storage-gluster libvirt-daemon-driver-storage-iscsi-direct libvirt-daemon-driver-storage-rbd libvirt-daemon-driver-storage-zfs numad auditd nfs-common open-iscsi
  pm-utils radvd systemtap zfsutils samba vde2 qemu-block-extra debootstrap
The following NEW packages will be installed.

Step 4: Next create and add the user in libvirt and Kvm group by using the below command

[root@linuxhelp: ~#] sudo adduser linux1
[root@linuxhelp: ~#] sudo adduser linux1 libvirt
Adding user `linux1' to group `libvirt' ...
Adding user linux1 to group libvirt
Done.

[root@linuxhelp: ~#] sudo adduser linux1 kvm
Adding user `linux1' to group `kvm' ...
Adding user linux1 to group kvm
Done.

Step 5: Confirm the installation was successful by using the virsh command

[root@linuxhelp: ~#] sudo virsh list --all
Id   Name   State
--------------------

Step 6: Next check the status from the libvirt, then enable the libvirt by using the below command

[root@linuxhelp: ~#] sudo systemctl status libvirtd
● libvirtd.service - Virtualization daemon
     Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-11-14 01:33:36 IST; 4min 35s ago
TriggeredBy: ● libvirtd-ro.socket
             ● libvirtd-admin.socket
             ● libvirtd.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
   Main PID: 5955 (libvirtd)
      Tasks: 19 (limit: 32768)
     Memory: 13.8M
        CPU: 275ms
     CGroup: /system.slice/libvirtd.service
             └─5955 /usr/sbin/libvirtd

Nov 14 01:33:36 linuxhelp systemd[1]: Starting Virtualization daemon...
Nov 14 01:33:36 linuxhelp systemd[1]: Started Virtualization daemon.


[root@linuxhelp: ~#] sudo systemctl enable --now libvirtd

Step 7: Now create the virtual machine manager by using the below command

[root@linuxhelp: ~#] sudo apt install virt-manager
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  genisoimage gir1.2-ayatanaappindicator3-0.1 gir1.2-gtk-vnc-2.0 gir1.2-libosinfo-1.0 gir1.2-libvirt-glib-1.0 gir1.2-spiceclientglib-2.0 gir1.2-spiceclientgtk-3.0 libgovirt-common libgovirt2 libgtk-vnc-2.0-0 libgvnc-1.0-0
  libphodav-2.0-0 libphodav-2.0-common libspice-client-glib-2.0-8 libspice-client-gtk-3.0-5 libusbredirhost1 libvirt-glib-1.0-0 python3-libvirt python3-libxml2 spice-client-glib-usb-acl-helper virt-viewer virtinst


0 upgraded, 23 newly installed, 0 to remove and 126 not upgraded.
Need to get 3,479 kB of archives.
After this operation, 16.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.debian.org/debian-security bullseye-security/main amd64 python3-libxml2 amd64 2.9.10+dfsg-6.7+deb11u3 [197 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 genisoimage amd64 9:1.1.11-3.2 [380 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 gir1.2-ayatanaappindicator3-0.1 amd64 0.5.5-2+deb11u2 [71.3 kB].

Step 8: Now start the virtual machine manager by using the below command

[root@linuxhelp: ~#] sudo virt-manager

snap 1

Step 9: In the first window, click the computer icon in the upper-left corner as shown in the below image.

snap 2

Step 10: In the dialogue box that opens, select the option to install the VM using an ISO image. Then click Forward as shown in the below image.

snap 3

Step 11: In the next dialogue, click Browse Local and navigate to the path where you stored the ISO you wish to install as shown in the below image.

snap 4

Step 12: After that you can choice Ram details, CPU details and allocate hard disk space to the VM then finally click Finish to complete the setup.

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to install KVM on Debian 11.3. Your feedback is much welcome.

Tags:
connor
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

Is KVM the same as VMware?

A

VMware is an actual Type 1 hypervisor that runs on bare-metal server hardware, increasing the performance of the tool over Type 2 hypervisors. KVM is technically a Type 2 hypervisor, as it runs on the Linux kernel, but it acts as though it is running on the bare-metal server like a Type 1 hypervisor.

Q

Who uses KVM for virtualization?

A

Vendors such as Red Hat, IBM, Canonical, and Google rely on KVM-based virtualization technology for many of their virtualization products because it enables IT administrators to execute multiple OSes on the same hardware. As a result, it has become a staple in IT admins' virtual systems.

Q

Is KVM a container?

A

LXC stands for Linux Containers and KVM is an acronym for Kernel-Based Virtual Machine. The main difference here is that virtual machines require their own kernel instance to run while containers share the same kernel.

Q

Is KVM faster than ESXi?

A

ESXi generally requires more time to create and start a server than KVM. ESXi also has slower performance when running servers, although this difference may be insignificant for typical loads.

Q

Where is KVM stored?

A

As stated already, all KVM/Libvirt images are stored in /var/lib/libvirt/images/ location by default. Since this location resides in the rootfs partition, you may want to move it to some other location, for example, $HOME directory

Related Tutorials in How to install KVM on Debian 11.3

Related Tutorials in How to install KVM on Debian 11.3

How to install Gparted on Debian 9.0
How to install Gparted on Debian 9.0
Sep 13, 2017
Installation SSL Certificate on Ubuntu/Linuxmint/Debian to Secure Apache
Installation SSL Certificate on Ubuntu/Linuxmint/Debian to Secure Apache
Sep 19, 2018
How to install Xrdp Server (Remote Desktop) on Oracle Linux 8.5
How to install Xrdp Server (Remote Desktop) on Oracle Linux 8.5
Oct 17, 2022
How to install and update OpenSSL on Debian 11.3
How to install and update OpenSSL on Debian 11.3
Oct 21, 2022
How to install qBittorrent on Debian 9.0
How to install qBittorrent on Debian 9.0
Sep 8, 2017
How to Install FileZilla in Debian
How to Install FileZilla in Debian
Nov 29, 2016
How to Install and Configure Mega in Linux
How to Install and Configure Mega in Linux
Jul 19, 2016
How to install Nmap on Debian 9.0
How to install Nmap on Debian 9.0
Sep 9, 2017

Related Forums in How to install KVM on Debian 11.3

Related Forums in How to install KVM on Debian 11.3

Linux
jayce class=
shasum command not found
May 5, 2017
Linux
stephan class=
How to list all samba users
Jan 12, 2018
pv command
muhammad class=
pvcreate command not found error
May 9, 2017
KVM
christian class=
Error: No active connection to install on
May 9, 2017
Linux
henry class=
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
Apr 25, 2017
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Linux
baseer class=
single command to apply setfacl for multiple user at a time
Jan 23, 2018
Linux
beulah class=
What does mean by 0 0 value in fstab file
Jan 2, 2018

Related News in How to install KVM on Debian 11.3

Related News in How to install KVM on Debian 11.3

Anbox, the Android-to-Linux tool the developers have been waiting for
Anbox, the Android-to-Linux tool the developers have been waiting for
Apr 17, 2017
Linus Torvalds stops signing Linux kernel RC tarballs
Linus Torvalds stops signing Linux kernel RC tarballs
May 17, 2017
Capsule8 Launches Linux-Based Container Security Platform
Capsule8 Launches Linux-Based Container Security Platform
Feb 14, 2017
Symantec updates Management console product
Symantec updates Management console product
Nov 22, 2017
Latest Linux driver release feature seven AMD Vega
Latest Linux driver release feature seven AMD Vega
Mar 23, 2017
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
Apr 9, 2019
Microsoft makes its Azure App service now available on Linux Systems
Microsoft makes its Azure App service now available on Linux Systems
Sep 7, 2017
Docker friendly Alpine Linux gets hardened Node.js
Docker friendly Alpine Linux gets hardened Node.js
Apr 19, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Sebastian ?
How to change non required to required field in SuiteCRM Custom/Default Modules

How to change not required to the required field in SuiteCRM Custom/Default Modules?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.