{"id":5007,"date":"2022-09-06T11:53:20","date_gmt":"2022-09-06T05:53:20","guid":{"rendered":"https:\/\/10.100.1.199\/?p=5007"},"modified":"2023-03-14T17:06:39","modified_gmt":"2023-03-14T11:06:39","slug":"how-to-configure-kvm","status":"publish","type":"post","link":"https:\/\/saq-digital.com\/kk\/how-to-configure-kvm\/","title":{"rendered":"Ubuntu \u0436\u04af\u0439\u0435\u0441\u0456\u043d\u0434\u0435 KVM \u049b\u0430\u043b\u0430\u0439 \u043e\u0440\u043d\u0430\u0442\u0443\u0493\u0430 \u0431\u043e\u043b\u0430\u0434\u044b"},"content":{"rendered":"<p>KVM (Kernel-based Virtual Machine) is the leading open source virtualisation technology for Linux. It installs natively on all Linux distributions and turns underlying physical servers into hypervisors so that they can host multiple, isolated virtual machines (VMs). KVM comes with no licenses, type-1 hypervisor capabilities and a variety of performance extensions which makes it an ideal candidate for virtualisation and cloud infrastructure implementation.<\/p>\n\n\n\n<p>KVM hypervisor enables full virtualisation capabilities. It provides each VM with all typical services of the physical system, including virtual BIOS (basic input\/output system) and virtual hardware, such as processor, memory, storage, network cards, etc. As a result, every VM completely simulates a physical machine.<\/p>\n\n\n\n<p>KVM is available as a Linux kernel module. It plugs directly into the kernel\u2019s code and allows it to function as a hypervisor. Every VM runs as a separate Linux process under<a href=\"https:\/\/systemd.io\/\" target=\"_blank\" rel=\"noopener\" title=\"\">&nbsp;systemd<\/a>, with dedicated virtual hardware resources attached.&nbsp; KVM can only be used on a processor with hardware virtualisation extensions, such as<a href=\"https:\/\/www.intel.com\/content\/www\/us\/en\/virtualization\/virtualization-technology\/intel-virtualization-technology.html\" target=\"_blank\" rel=\"noopener\" title=\"\">&nbsp;Intel-VT<\/a>&nbsp;or<a href=\"https:\/\/www.amd.com\/en\/technologies\/virtualization-solutions\" target=\"_blank\" rel=\"noopener\" title=\"\">&nbsp;AMD-V<\/a>.<\/p>\n\n\n\n<p><strong>In our example we use Ubuntu 20.04<\/strong><\/p>\n\n\n\n<p>1. Execute the following command to install the required packages:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-palette-color-4-background-color has-text-color has-background\"><code>$ sudo apt -y install bridge-utils cpu-checker libvirt-clients libvirt-daemon qemu qemu-kvm\n<\/code><\/pre>\n\n\n\n<p>2. Execute the following command to make sure your processor supports virtualisation capabilities:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-palette-color-4-background-color has-text-color has-background\"><code>$ kvm-ok\n<\/code><\/pre>\n\n\n\n<p>The output of this command is pretty straightforward and clearly indicates whether KVM can be used or not:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-palette-color-4-background-color has-text-color has-background\"><code>INFO: \/dev\/kvm exists\nKVM acceleration can be used<\/code><\/pre>\n\n\n\n<p>Create a vm using virt-install CLI<\/p>\n\n\n\n<p> Before runing the CLI, please download the right iso file to \/var\/lib\/libvirt\/isos\/ )<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-palette-color-4-background-color has-text-color has-background\"><code>virt-install \\\n  --name ubuntu1804 \\\n  --ram 2048 \\\n  --disk path=\/var\/lib\/libvirt\/images\/u19.qcow2,size=8 \\\n  --vcpus 2 \\\n  --os-type linux \\\n  --os-variant generic \\\n  --console pty,target_type=serial \\\n  --cdrom \/var\/lib\/libvirt\/isos\/ubuntu-18.04.4-live-server-amd64.iso<\/code><\/pre>\n\n\n\n<p>Please feel free to update the above values as your needs. <\/p>","protected":false},"excerpt":{"rendered":"<p>KVM (Kernel-based Virtual Machine) is the leading open source virtualisation technology for Linux. It installs natively on all Linux distributions and turns underlying physical servers into hypervisors so that they can host multiple, isolated virtual machines (VMs). KVM comes with no licenses, type-1 hypervisor capabilities and a variety of performance extensions which makes it an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5080,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[85,83,104],"tags":[107,108,132],"class_list":["post-5007","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-infrastructure","category-kvm","category-virtualization","tag-kvm","tag-linux","tag-vitrulization"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"aioseo_notices":[],"featured_image_urls_v2":{"full":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/09\/linux-kvm-virtualization.jpg",1920,1080,false],"thumbnail":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/09\/linux-kvm-virtualization-150x150.jpg",150,150,true],"medium":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/09\/linux-kvm-virtualization-300x169.jpg",300,169,true],"medium_large":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/09\/linux-kvm-virtualization-768x432.jpg",768,432,true],"large":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/09\/linux-kvm-virtualization-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/09\/linux-kvm-virtualization-1536x864.jpg",1536,864,true],"2048x2048":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/09\/linux-kvm-virtualization.jpg",1920,1080,false],"trp-custom-language-flag":["https:\/\/saq-digital.com\/wp-content\/uploads\/2022\/09\/linux-kvm-virtualization.jpg",18,10,false]},"post_excerpt_stackable_v2":"<p>KVM (Kernel-based Virtual Machine) is the leading open source virtualisation technology for Linux. It installs natively on all Linux distributions and turns underlying physical servers into hypervisors so that they can host multiple, isolated virtual machines (VMs). KVM comes with no licenses, type-1 hypervisor capabilities and a variety of performance extensions which makes it an ideal candidate for virtualisation and cloud infrastructure implementation. KVM hypervisor enables full virtualisation capabilities. It provides each VM with all typical services of the physical system, including virtual BIOS (basic input\/output system) and virtual hardware, such as processor, memory, storage, network cards, etc. As a&hellip;<\/p>\n","category_list_v2":"<a href=\"https:\/\/saq-digital.com\/kk\/category\/infrastructure\/\" rel=\"category tag\">Infrastructure<\/a>, <a href=\"https:\/\/saq-digital.com\/kk\/category\/infrastructure\/virtualization\/kvm\/\" rel=\"category tag\">KVM<\/a>, <a href=\"https:\/\/saq-digital.com\/kk\/category\/infrastructure\/virtualization\/\" rel=\"category tag\">Virtualization<\/a>","author_info_v2":{"name":"SAQ","url":"https:\/\/saq-digital.com\/kk\/author\/serik-akim\/"},"comments_num_v2":"0 comments","brizy_media":[],"_links":{"self":[{"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/posts\/5007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/comments?post=5007"}],"version-history":[{"count":7,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/posts\/5007\/revisions"}],"predecessor-version":[{"id":6296,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/posts\/5007\/revisions\/6296"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/media\/5080"}],"wp:attachment":[{"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/media?parent=5007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/categories?post=5007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/saq-digital.com\/kk\/wp-json\/wp\/v2\/tags?post=5007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}