KVM for Beginners — Install KVM in Ubuntu Server and Create a Virtual Machine — Part 6
The process to install open source Kernel Virtual Machine (KVM) in an Ubuntu virtual machine is fairly straight forward to do. To start out learning KVM and understanding the installation process, all you need is an Ubuntu Server virtual machine. Let’s take a look at installing KVM in Ubuntu and see what steps are required.
Prerequisites
If you are installing in a virtual machine, which is a great way to learn, you can create a VM in your favorite virtualization environment. Note the following requirements:
Protect Your Data with BDRSuite
Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!
- Virtual Machine — Ubuntu 22.04 recommended
- Nested virtualization enabled — KVM needs to have access to the physical properties of the host CPU for proper virtualization. By enabling nested virtualization for the VM, you allow your KVM virtual machine to have physical CPU access and hardware acceleration. You will receive an error message with KVM if this is not the case
- Enough resources for the VM — I would recommend to begin with a sandbox and lab environment with KVM to have 4 vCPUs and 8 GB of RAM assigned
- Internet access — To download Ubuntu updates and the packages needed to install KVM in Ubuntu
Virtual Machine properties
Take a look at the properties of my virtual machine running inside VMware vSphere in the home lab environment. You will note the hardware virtualization is enabled for the vCPU. The ISO I had mounted is the Ubuntu Server 22.04 ISO image.
Properties of Ubuntu Server VM for KVM testing