• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News 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
{{postValue.id}}

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
{{postCtrl.cmtErrMsg}}

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

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 David Lopez Guillen ?
Ayuda urgente instale SSL para servidor Opensuse y ahora no funciona tengo servicio web

hola segui este tutorial para tener un certificado ssl y ahora no se ve mi app en la red, espero alguien pueda ayudarme, tengo M9oodle en3.5 en un servidor open suse y ahora no funciona por favor ayuda.

https://www.linuxhelp.com/how-to-create-ssl-certificate-in-opensuse

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.