{"id":7660,"date":"2024-01-26T17:01:47","date_gmt":"2024-01-26T17:01:47","guid":{"rendered":"https:\/\/www.webhi.com\/how-to\/?p=7660"},"modified":"2024-01-26T17:01:49","modified_gmt":"2024-01-26T17:01:49","slug":"install-configure-kvm-on-ubuntu-debian-linux","status":"publish","type":"post","link":"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/","title":{"rendered":"How to Install and configure KVM on Ubuntu"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/01\/kvm_ubuntu_en.jpg\" alt=\"Installation and configuration of KVM on Ubuntu 18.04 \/ 20.04 \/ 22.04\" class=\"wp-image-7682\" srcset=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/01\/kvm_ubuntu_en.jpg 1200w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/01\/kvm_ubuntu_en-300x169.jpg 300w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/01\/kvm_ubuntu_en-1024x576.jpg 1024w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/01\/kvm_ubuntu_en-768x432.jpg 768w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/01\/kvm_ubuntu_en-150x84.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p><strong>KVM <\/strong>(Kernel-based Virtual Machine) is an open source virtualization technology that allows you to create and run virtual machines on Linux. KVM requires hardware virtualization support, which is available on most modern CPUs.<\/p>\n\n\n\n<p>In this comprehensive guide, we will cover how to install and configure KVM on Ubuntu 20.04\/22.04. We will go through the following steps:<\/p>\n\n\n\n<ul>\n<li>Install required packages<\/li>\n\n\n\n<li>Verify hardware support for virtualization<\/li>\n\n\n\n<li>Load KVM kernel modules<\/li>\n\n\n\n<li>Set up a KVM user group<\/li>\n\n\n\n<li>Create a KVM virtual machine using CLI<\/li>\n\n\n\n<li>Create a KVM virtual machine using Virt Manager (GUI)<\/li>\n\n\n\n<li>Manage KVM virtual machines<\/li>\n\n\n\n<li>Optimizations and best practices<\/li>\n<\/ul>\n\n\n\n<p>By the end of this guide, you will have KVM installed and configured, and you will have created virtual machines using both CLI and GUI methods. Let&#8217;s get started!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h2>\n\n\n\n<p>Before we install KVM, let&#8217;s go over the prerequisites:<\/p>\n\n\n\n<ul>\n<li>Ubuntu 20.04\/22.04 operating system<\/li>\n\n\n\n<li>Administrator (root) access to the system<\/li>\n\n\n\n<li>Intel VT-x or AMD-V CPU virtualization support enabled in BIOS<\/li>\n\n\n\n<li>At least 2 GB RAM (4 GB recommended)<\/li>\n<\/ul>\n\n\n\n<p>To verify that your CPU supports hardware virtualization, run this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ egrep -c '(vmx|svm)' \/proc\/cpuinfo<\/code><\/pre>\n\n\n\n<p>If the output is 1 or greater, your CPU supports hardware virtualization.<\/p>\n\n\n\n<p>You also need to ensure virtualization is enabled in BIOS. Reboot your system, enter BIOS setup, and enable Intel VT-x\/AMD-V.<\/p>\n\n\n\n<p>Now let&#8217;s move on to installing KVM.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-kvm-and-other-required-packages\">Install KVM and Other Required Packages<\/h2>\n\n\n\n<p>We need to install a few packages to use KVM. Run these commands to install KVM and other required utilities:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt update\n$ sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager<\/code><\/pre>\n\n\n\n<p>This installs the main packages:<\/p>\n\n\n\n<ul>\n<li>qemu-kvm &#8211; KVM hypervisor and processor emulator<\/li>\n\n\n\n<li>libvirt-daemon-system &#8211; Main daemon managing VMs and hypervisor<\/li>\n\n\n\n<li>libvirt-clients &#8211; Client tools for interacting with libvirt<\/li>\n\n\n\n<li>bridge-utils &#8211; Required for creating a network bridge<\/li>\n\n\n\n<li>virt-manager &#8211; GUI for managing virtual machines (optional)<\/li>\n<\/ul>\n\n\n\n<p>Verify the installation by checking the version of KVM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ kvm --version<\/code><\/pre>\n\n\n\n<p>The output should display the installed KVM version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.28)\nCopyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers<\/code><\/pre>\n\n\n\n<p>Now KVM and related utilities are installed. Next we&#8217;ll load the required kernel modules.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"load-kvm-kernel-modules\">Load KVM Kernel Modules<\/h2>\n\n\n\n<p>KVM requires the&nbsp;<code>kvm<\/code>&nbsp;and&nbsp;<code>kvm_intel<\/code>\/<code>kvm_amd<\/code>&nbsp;kernel modules to be loaded.<\/p>\n\n\n\n<p>Check if they are loaded:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ lsmod | grep kvm<\/code><\/pre>\n\n\n\n<p>If they are not loaded, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo modprobe kvm\n$ sudo modprobe kvm_intel<\/code><\/pre>\n\n\n\n<p>This loads&nbsp;<code>kvm<\/code>&nbsp;and&nbsp;<code>kvm_intel<\/code>&nbsp;modules. Verify they are now loaded:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ lsmod | grep kvm<\/code><\/pre>\n\n\n\n<p>The output should show the modules:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">kvm_intel             204800  0\nkvm                   593920  1 kvm_intel<\/code><\/pre>\n\n\n\n<p>KVM modules are now loaded and ready to use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"set-up-kvm-user-group\">Set Up KVM User Group<\/h2>\n\n\n\n<p>For better security and access control, we will create a dedicated KVM group and add users to it.<\/p>\n\n\n\n<p>Create a&nbsp;<code>kvm<\/code>&nbsp;group:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo groupadd kvm <\/code><\/pre>\n\n\n\n<p>Add your user to&nbsp;<code>kvm<\/code>&nbsp;group:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo usermod -aG kvm $USER<\/code><\/pre>\n\n\n\n<p>Add any other users who need KVM access to the&nbsp;<code>kvm<\/code>&nbsp;group as well.<\/p>\n\n\n\n<p>Now we can continue with creating virtual machines.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-a-kvm-virtual-machine-cli\">Create a KVM Virtual Machine (CLI)<\/h2>\n\n\n\n<p>Let&#8217;s create a KVM virtual machine using command line tools.<\/p>\n\n\n\n<p>We will perform the following steps:<\/p>\n\n\n\n<ul>\n<li>Create storage for the VM<\/li>\n\n\n\n<li>Create a virtual network bridge<\/li>\n\n\n\n<li>Define the VM resources &#8211; CPU cores, memory etc<\/li>\n\n\n\n<li>Launch the VM installation<\/li>\n<\/ul>\n\n\n\n<p>First, create a disk image that will be used for VM storage:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo qemu-img create -f qcow2 \/var\/lib\/libvirt\/images\/ubuntu-20.qcow2 10G<\/code><\/pre>\n\n\n\n<p>This creates a qcow2 format disk image at \/var\/lib\/libvirt\/images\/ubuntu-20.qcow2 with 10GB capacity.<\/p>\n\n\n\n<p>Next, we need to create a network bridge so the VM can connect to the network.<\/p>\n\n\n\n<p>Edit&nbsp;<code>\/etc\/netplan\/00-installer-config.yaml<\/code>&nbsp;and add a network bridge:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"yaml\" class=\"language-yaml\">network:\n  version: 2\n  renderer: networkd\n  ethernets:\n    enp0s3:\n      dhcp4: no\n    enp0s8:\n      dhcp4: yes\n\n  bridges:\n    br0:\n      interfaces: [enp0s3]\n      dhcp4: no\n      addresses: [192.168.122.1\/24]\n      gateway4: 192.168.122.1\n      nameservers:\n         addresses: [8.8.8.8,1.1.1.1]<\/code><\/pre>\n\n\n\n<p>This bridges the enp0s3 interface and assigns it an IP address of 192.168.122.1.<\/p>\n\n\n\n<p>Apply the configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo netplan apply<\/code><\/pre>\n\n\n\n<p>Now we have storage and networking ready. Let&#8217;s define the VM resources using a CLI definition file called ubuntu-vm.xml:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo nano ubuntu-vm.xml<\/code><\/pre>\n\n\n\n<p>Add this content:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"xml\" class=\"language-xml\">&lt;domain type='kvm'&gt;\n  &lt;name&gt;ubuntu-vm&lt;\/name&gt;\n  &lt;memory unit='GiB'&gt;2&lt;\/memory&gt;\n  &lt;vcpu&gt;2&lt;\/vcpu&gt;\n  &lt;os&gt;\n    &lt;type arch='x86_64'&gt;hvm&lt;\/type&gt;\n  &lt;\/os&gt;\n  &lt;devices&gt;\n    &lt;disk type='file' device='disk'&gt;\n      &lt;source file='\/var\/lib\/libvirt\/images\/ubuntu-20.qcow2'\/&gt;\n      &lt;target dev='vda'\/&gt;\n    &lt;\/disk&gt;\n    &lt;interface type='bridge'&gt;\n      &lt;source bridge='br0'\/&gt;\n    &lt;\/interface&gt;\n    &lt;graphics type='vnc' listen='0.0.0.0' port='-1'\/&gt;\n  &lt;\/devices&gt;\n&lt;\/domain&gt;<\/code><\/pre>\n\n\n\n<p>This defines a KVM domain with:<\/p>\n\n\n\n<ul>\n<li>2GB RAM<\/li>\n\n\n\n<li>2 vCPUs<\/li>\n\n\n\n<li>Disk pointing to the ubuntu-20.qcow2 image<\/li>\n\n\n\n<li>Network interface attached to br0 bridge<\/li>\n\n\n\n<li>VNC graphics for remote access<\/li>\n<\/ul>\n\n\n\n<p>Now let&#8217;s launch the VM installation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virt-install --import --name ubuntu-vm --ram 2048 --disk \/var\/lib\/libvirt\/images\/ubuntu-20.qcow2,size=10 --vcpus 2 --os-type linux --os-variant ubuntu20.04 --network bridge=br0 --graphics vnc --noautoconsole --print-xml &gt; ubuntu-vm.xml\n$ sudo virsh define ubuntu-vm.xml\n$ sudo virsh start ubuntu-vm<\/code><\/pre>\n\n\n\n<p>This will start the Ubuntu 20.04 installation from the ISO image. You can connect to the VNC console to complete the installation.<\/p>\n\n\n\n<p>After installation completes and the VM boots up, verify it is running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virsh list<\/code><\/pre>\n\n\n\n<p>The output will show the running VM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\"> Id    Name                           State\n----------------------------------------------------\n 2     ubuntu-vm                      running<\/code><\/pre>\n\n\n\n<p>We have successfully created a KVM virtual machine using CLI tools!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-a-kvm-virtual-machine-gui\">Create a KVM Virtual Machine (GUI)<\/h2>\n\n\n\n<p>We can also use a GUI like Virt Manager to manage KVM VMs.<\/p>\n\n\n\n<p>Install Virt Manager if you haven&#8217;t already:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt install virt-manager<\/code><\/pre>\n\n\n\n<p>Launch Virt Manager either from the command line or desktop environment.<\/p>\n\n\n\n<p>Click on Create a new virtual machine to begin the New VM wizard.<\/p>\n\n\n\n<p>Step through the wizard to define the VM resources, storage, network, etc.<\/p>\n\n\n\n<p>For example, select import existing disk image, enter the path to the qcow2 image created earlier e.g.&nbsp;<code>\/var\/lib\/libvirt\/images\/ubuntu-20.qcow2<\/code>.<\/p>\n\n\n\n<p>Complete the remaining steps, review the summary, and click Finish to create the VM.<\/p>\n\n\n\n<p>The VM should now be created and powered off. Right click on it and select Run to start it.<\/p>\n\n\n\n<p>Connect to the VNC console to complete OS installation.<\/p>\n\n\n\n<p>We have now created a KVM virtual machine using the graphical virt-manager tool. Using the GUI can help simplify managing multiple VMs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"manage-kvm-virtual-machines\">Manage KVM Virtual Machines<\/h2>\n\n\n\n<p>Now we have KVM installed and VMs created, let&#8217;s go over managing the VMs.<\/p>\n\n\n\n<p><strong>List all VMs:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virsh list --all<\/code><\/pre>\n\n\n\n<p>This will list all active and inactive VMs.<\/p>\n\n\n\n<p><strong>Start a VM:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virsh start ubuntu-vm<\/code><\/pre>\n\n\n\n<p><strong>Shutdown a VM:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virsh shutdown ubuntu-vm<\/code><\/pre>\n\n\n\n<p><strong>Force power off a VM:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virsh destroy ubuntu-vm<\/code><\/pre>\n\n\n\n<p><strong>Delete a VM:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virsh undefine ubuntu-vm<\/code><\/pre>\n\n\n\n<p>This will delete the VM configuration, but won&#8217;t delete the disk image.<\/p>\n\n\n\n<p><strong>Suspend\/resume a VM:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virsh suspend ubuntu-vm\n$ sudo virsh resume ubuntu-vm<\/code><\/pre>\n\n\n\n<p><strong>Reboot a VM:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virsh reboot ubuntu-vm<\/code><\/pre>\n\n\n\n<p><strong>Connect to VNC console:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virt-viewer ubuntu-vm<\/code><\/pre>\n\n\n\n<p>This will open a VNC window to interact with the VM&#8217;s graphical console.<\/p>\n\n\n\n<p><strong>VM status:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virsh domstate ubuntu-vm<\/code><\/pre>\n\n\n\n<p><strong>VM statistics:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo virsh domstats ubuntu-vm<\/code><\/pre>\n\n\n\n<p>This covers the basic VM management tasks with KVM. You can refer to the virsh man pages for more advanced management operations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"optimizations-and-best-practices\">Optimizations and Best Practices<\/h2>\n\n\n\n<p>Here are some tips for optimizing KVM performance and efficiency:<\/p>\n\n\n\n<ul>\n<li>Use paravirtualized drivers (virtio) for disk and network. This improves I\/O throughput.<\/li>\n\n\n\n<li>Use LVM based storage. Create a volume group for VM images to allow flexible allocation.<\/li>\n\n\n\n<li>Use network bridges instead of NAT for better network performance.<\/li>\n\n\n\n<li>Enable nested virtualization if you want to run VMs inside guest VMs.<\/li>\n\n\n\n<li>Allocate CPU cores\/memory appropriately based on workload. Do not over provision.<\/li>\n\n\n\n<li>Take regular VM snapshots before major configuration changes.<\/li>\n\n\n\n<li>Monitor VM resource usage to identify bottlenecks.<\/li>\n\n\n\n<li>Host critical VMs on machines with redundant storage\/network (High-availability).<\/li>\n\n\n\n<li>Isolate VM types by using different bridge networks and VLANs.<\/li>\n<\/ul>\n\n\n\n<p>Following best practices helps ensure your KVM infrastructure remains secure, stable and scalable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>We have installed KVM on Ubuntu 20.04\/22.04, created VMs using CLI and Virt Manager, and covered managing and optimizing KVM.<\/p>\n\n\n\n<p>KVM provides an open source and cost-effective virtualization solution on Linux. With its excellent performance and wide adoption, it is a great hypervisor for running Linux guest VMs.<\/p>\n\n\n\n<p>We encourage you to further explore KVM capabilities and build robust virtualized environments. This will allow you to consolidate servers, isolate services, and take advantage of powerful VM management features.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>KVM (Kernel-based Virtual Machine) is an open source virtualization technology that allows you to create and run virtual machines on Linux. KVM requires hardware virtualization support, which is available on most modern CPUs. In this comprehensive guide, we will cover how to install and configure KVM on Ubuntu 20.04\/22.04. We will go through the following ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[69,182],"tags":[],"yoast_head":"\n<title>How to Install and configure KVM on Ubuntu - WebHi Tutorials &amp; Documentations<\/title>\n<meta name=\"description\" content=\"Learn how to install and configure KVM on Ubuntu 20.04\/22.04. This comprehensive guide covers installing required packages, setting up virtual networking, creating VMs via CLI and GUI, managing VMs, and best practices.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install and configure KVM on Ubuntu - WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"og:description\" content=\"Learn how to install and configure KVM on Ubuntu 20.04\/22.04. This comprehensive guide covers installing required packages, setting up virtual networking, creating VMs via CLI and GUI, managing VMs, and best practices.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webhi.technology\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-26T17:01:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-26T17:01:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/01\/kvm_ubuntu_en.jpg\" \/>\n<meta name=\"author\" content=\"webhi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:site\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webhi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/\"},\"author\":{\"name\":\"webhi\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\"},\"headline\":\"How to Install and configure KVM on Ubuntu\",\"datePublished\":\"2024-01-26T17:01:47+00:00\",\"dateModified\":\"2024-01-26T17:01:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/\"},\"wordCount\":1107,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"articleSection\":[\"Linux system administration\",\"Virtualization &amp; Cloud computing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/\",\"name\":\"How to Install and configure KVM on Ubuntu - WebHi Tutorials &amp; Documentations\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\"},\"datePublished\":\"2024-01-26T17:01:47+00:00\",\"dateModified\":\"2024-01-26T17:01:49+00:00\",\"description\":\"Learn how to install and configure KVM on Ubuntu 20.04\/22.04. This comprehensive guide covers installing required packages, setting up virtual networking, creating VMs via CLI and GUI, managing VMs, and best practices.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webhi.com\/how-to\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install and configure KVM on Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"name\":\"WebHi Tutorials &amp; Documentations\",\"description\":\"System administration and knowledge base\",\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\",\"name\":\"WebHi Technology\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"width\":288,\"height\":95,\"caption\":\"WebHi Technology\"},\"image\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webhi.technology\",\"https:\/\/twitter.com\/WebHiTechnology\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\",\"name\":\"webhi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353\",\"caption\":\"webhi\"},\"sameAs\":[\"https:\/\/www.webhi.com\/how-to\"],\"url\":\"https:\/\/www.webhi.com\/how-to\/author\/webhi\/\"}]}<\/script>\n","yoast_head_json":{"title":"How to Install and configure KVM on Ubuntu - WebHi Tutorials &amp; Documentations","description":"Learn how to install and configure KVM on Ubuntu 20.04\/22.04. This comprehensive guide covers installing required packages, setting up virtual networking, creating VMs via CLI and GUI, managing VMs, and best practices.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Install and configure KVM on Ubuntu - WebHi Tutorials &amp; Documentations","og_description":"Learn how to install and configure KVM on Ubuntu 20.04\/22.04. This comprehensive guide covers installing required packages, setting up virtual networking, creating VMs via CLI and GUI, managing VMs, and best practices.","og_url":"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/","og_site_name":"WebHi Tutorials &amp; Documentations","article_publisher":"https:\/\/www.facebook.com\/webhi.technology","article_published_time":"2024-01-26T17:01:47+00:00","article_modified_time":"2024-01-26T17:01:49+00:00","og_image":[{"url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2024\/01\/kvm_ubuntu_en.jpg"}],"author":"webhi","twitter_card":"summary_large_image","twitter_creator":"@WebHiTechnology","twitter_site":"@WebHiTechnology","twitter_misc":{"Written by":"webhi","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/#article","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/"},"author":{"name":"webhi","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54"},"headline":"How to Install and configure KVM on Ubuntu","datePublished":"2024-01-26T17:01:47+00:00","dateModified":"2024-01-26T17:01:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/"},"wordCount":1107,"commentCount":0,"publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"articleSection":["Linux system administration","Virtualization &amp; Cloud computing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/","url":"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/","name":"How to Install and configure KVM on Ubuntu - WebHi Tutorials &amp; Documentations","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/#website"},"datePublished":"2024-01-26T17:01:47+00:00","dateModified":"2024-01-26T17:01:49+00:00","description":"Learn how to install and configure KVM on Ubuntu 20.04\/22.04. This comprehensive guide covers installing required packages, setting up virtual networking, creating VMs via CLI and GUI, managing VMs, and best practices.","breadcrumb":{"@id":"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhi.com\/how-to\/install-configure-kvm-on-ubuntu-debian-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhi.com\/how-to\/"},{"@type":"ListItem","position":2,"name":"How to Install and configure KVM on Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/www.webhi.com\/how-to\/#website","url":"https:\/\/www.webhi.com\/how-to\/","name":"WebHi Tutorials &amp; Documentations","description":"System administration and knowledge base","publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webhi.com\/how-to\/#organization","name":"WebHi Technology","url":"https:\/\/www.webhi.com\/how-to\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/","url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","contentUrl":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","width":288,"height":95,"caption":"WebHi Technology"},"image":{"@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webhi.technology","https:\/\/twitter.com\/WebHiTechnology"]},{"@type":"Person","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54","name":"webhi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/","url":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353","contentUrl":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353","caption":"webhi"},"sameAs":["https:\/\/www.webhi.com\/how-to"],"url":"https:\/\/www.webhi.com\/how-to\/author\/webhi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/7660"}],"collection":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/comments?post=7660"}],"version-history":[{"count":6,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/7660\/revisions"}],"predecessor-version":[{"id":7704,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/7660\/revisions\/7704"}],"wp:attachment":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/media?parent=7660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/categories?post=7660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/tags?post=7660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}