{"id":20418,"date":"2023-08-31T13:52:52","date_gmt":"2023-08-31T13:52:52","guid":{"rendered":"https:\/\/linuxways.net\/?p=20418"},"modified":"2023-08-31T13:52:52","modified_gmt":"2023-08-31T13:52:52","slug":"how-to-install-kvm-on-debian-12","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/debian\/how-to-install-kvm-on-debian-12\/","title":{"rendered":"How to Install KVM on Debian 12"},"content":{"rendered":"<p><strong>KVM<\/strong> (Kernel-Based-Virtualization) is a Linux-based open source virtualization tool, that is used by Linux operating systems for virtualization. KVM uses hypervisor mode for the better performance of virtual machines. <strong>Hypervisor<\/strong> provides the functionality to run multiple virtual machines individually. Debian 12 has the built-in functionality to work with virtual machines. As KVM is a Linux-based virtualization tool we can use it for the management of different guest machines.<\/p>\n<p>This particular blog explains how you can install KVM on Debian 12.<\/p>\n<h2><strong>How to Install KVM on Debian 12?<\/strong><\/h2>\n<p>If you want to host multiple machines on a single system, you can manage with the help of <strong>KVM<\/strong>. KVM is a free kernel-based virtualization tool that provides the facility of virtualization technology. It is Linux-based and can be installed on any Linux distribution.<\/p>\n<p>In order to install KVM on Debian follow the commands mentioned below.<\/p>\n<h3><strong>Step 1: Verify Your Processor<\/strong><\/h3>\n<p>Before proceeding to the installation process, you check whether your processor is compatible with KVM or not. Because KVM runs only on <strong>AMD<\/strong> and <strong>Intel <\/strong>processors. Type the following command to check the processor manufacturer:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\"># <\/span>lscpu<\/div><\/div>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"600\" class=\"wp-image-20419\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-1.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-1.jpeg 2048w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-1-300x88.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-1-1024x300.jpeg 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-1-768x225.jpeg 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-1-1536x450.jpeg 1536w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/strong><\/p>\n<p>The command displays the specifications of the processor that is installed in the system.<\/p>\n<h3><strong>Step 2: Check Your Virtualization Utility is Enabled<\/strong><\/h3>\n<p>Check if the virtualization is enabled or not by using the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\"># <\/span>lscpu <span class=\"sy0\">|<\/span> <span class=\"kw2\">grep<\/span> Virtualization<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"332\" class=\"wp-image-20420\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-2.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-2.jpeg 2048w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-2-300x49.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-2-1024x166.jpeg 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-2-768x125.jpeg 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-2-1536x249.jpeg 1536w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/p>\n<p>The command displays that the virtualization type is full. All the requirements are checked and fulfilled, we can install KVM on Debian.<\/p>\n<h3><strong>Step 3: Install KVM<\/strong><\/h3>\n<p>Type the command mentioned below in the terminal to install KVM:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\"># <\/span>apt <span class=\"kw2\">install<\/span> virt-manager qemu-system libvirt-daemon-system qemu-utils<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"843\" class=\"wp-image-20421\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-3.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-3.jpeg 2048w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-3-300x123.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-3-1024x422.jpeg 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-3-768x316.jpeg 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-3-1536x632.jpeg 1536w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/p>\n<p>It will require permission to use additional disk space. Type \u201c<strong>y<\/strong>\u201d for confirmation and then press \u201c<strong>Enter<\/strong>\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"258\" class=\"wp-image-20422\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-4.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-4.jpeg 2048w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-4-300x38.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-4-1024x129.jpeg 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-4-768x97.jpeg 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-4-1536x194.jpeg 1536w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/p>\n<p>The above command will download and install all the necessary packages of KVM. Use the following command to confirm whether the KVM modules are installed correctly and working properly:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\"># <\/span><span class=\"kw2\">lsmod<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">grep<\/span> <span class=\"re5\">-i<\/span> kvm<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"199\" class=\"wp-image-20423\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-5.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-5.jpeg 2048w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-5-300x29.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-5-1024x100.jpeg 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-5-768x75.jpeg 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-5-1536x149.jpeg 1536w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/p>\n<p>The command loads the KVM modules into memory. After installation, enable and start services of KVM.<\/p>\n<h3><strong>Step 4: Open KVM<\/strong><\/h3>\n<p>Before using KVM, we start some services, that help KVM in the management of virtual machines. Type the \u201c<strong>systemctl enable &#8211;now libvirtd<\/strong>\u201d command to enable libvirt management daemon tool, which acts as a monitoring tool for different virtual machines:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\"># <\/span>systemctl <span class=\"kw3\">enable<\/span> <span class=\"re5\">--now<\/span> libvirtd<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"172\" class=\"wp-image-20424\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-6.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-6.jpeg 2048w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-6-300x25.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-6-1024x86.jpeg 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-6-768x65.jpeg 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-6-1536x129.jpeg 1536w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Now check libvirt status before opening the KVM, use the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\"># <\/span>systemctl status libvirtd<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"939\" class=\"wp-image-20425\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-7.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-7.jpeg 2048w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-7-300x138.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-7-1024x470.jpeg 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-7-768x352.jpeg 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-7-1536x704.jpeg 1536w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/p>\n<p>The command shows that the libvirt service is loaded and active. Now exit the terminal, go to the Debian Desktop, and type kvm in search, KVM will be shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1822\" height=\"378\" class=\"wp-image-20426\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-8.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-8.jpeg 1822w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-8-300x62.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-8-1024x212.jpeg 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-8-768x159.jpeg 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-8-1536x319.jpeg 1536w\" sizes=\"auto, (max-width: 1822px) 100vw, 1822px\" \/><\/p>\n<p>Click on the \u201cVirtual Machine Manager\u201d option and the following window will open:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1114\" height=\"521\" class=\"wp-image-20427\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-9.png 1114w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-9-300x140.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-9-1024x479.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-9-768x359.png 768w\" sizes=\"auto, (max-width: 1114px) 100vw, 1114px\" \/><\/p>\n<p>Click on open, it will require the password for root authentication, type your password, and click on \u201c<strong>Authenticate<\/strong>\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"2006\" height=\"1459\" class=\"wp-image-20428\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-10.jpeg\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-10.jpeg 2006w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-10-300x218.jpeg 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-10-1024x745.jpeg 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-10-768x559.jpeg 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-10-1536x1117.jpeg 1536w\" sizes=\"auto, (max-width: 2006px) 100vw, 2006px\" \/><\/p>\n<p>After root authentication, your KVM virtual management program window opens:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"564\" height=\"596\" class=\"wp-image-20429\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-11.png 564w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/08\/word-image-20418-11-284x300.png 284w\" sizes=\"auto, (max-width: 564px) 100vw, 564px\" \/><\/p>\n<p>Now you can manage different virtual machines with the help of KVM.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p><strong>KVM <\/strong>is a kernel-based visualization tool that uses hypervisor technology in order to manage and host different virtual machines that have their own private virtual hardware resources. KVM is a Linux-based and open-source virtual machine management tool. In this article, we have explored how to install KVM on Debian 12 and use it for hosting different virtual machines.<\/p>","protected":false},"excerpt":{"rendered":"<p>KVM is a virtualization tool that uses hypervisor technology to manage host different virtual machines that have their own private virtual hardware resources.<\/p>","protected":false},"author":110,"featured_media":20448,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-20418","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/20418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=20418"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/20418\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/20448"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=20418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=20418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=20418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}